From 50eb9da406f52b74f269ecfb207ee1f5e0c0e896 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 6 Nov 2017 16:55:00 +0100 Subject: [PATCH] missing files Signed-off-by: Gwenhael Le Moine --- .gitignore | 38 +- .../.bin/google-closure-compiler-js | 1 + public/app/vendor/node_modules/.bin/tsc | 1 + public/app/vendor/node_modules/.bin/tsserver | 1 + .../@uirouter/angularjs/CHANGELOG.md | 1600 + .../@uirouter/angularjs/CONTRIBUTING.md | 113 + .../node_modules/@uirouter/angularjs/DOCS.md | 48 + .../@uirouter/angularjs/ISSUE_TEMPLATE.md | 53 + .../node_modules/@uirouter/angularjs/LICENSE | 21 + .../@uirouter/angularjs/README.md | 56 + .../@uirouter/angularjs/artifacts.json | 8 + .../@uirouter/angularjs/lib-esm/angular.d.ts | 1 + .../@uirouter/angularjs/lib-esm/angular.js | 4 + .../angularjs/lib-esm/angular.js.map | 13 + .../lib-esm/directives/stateDirectives.d.ts | 3 + .../lib-esm/directives/stateDirectives.js | 569 + .../lib-esm/directives/stateDirectives.js.map | 13 + .../lib-esm/directives/viewDirective.d.ts | 142 + .../lib-esm/directives/viewDirective.js | 414 + .../lib-esm/directives/viewDirective.js.map | 13 + .../@uirouter/angularjs/lib-esm/index.d.ts | 19 + .../@uirouter/angularjs/lib-esm/index.js | 18 + .../@uirouter/angularjs/lib-esm/index.js.map | 13 + .../angularjs/lib-esm/injectables.d.ts | 0 .../angularjs/lib-esm/injectables.js | 366 + .../angularjs/lib-esm/injectables.js.map | 13 + .../angularjs/lib-esm/interface.d.ts | 730 + .../@uirouter/angularjs/lib-esm/interface.js | 1 + .../angularjs/lib-esm/interface.js.map | 13 + .../lib-esm/legacy/resolveService.d.ts | 6 + .../lib-esm/legacy/resolveService.js | 67 + .../lib-esm/legacy/resolveService.js.map | 13 + .../angularjs/lib-esm/legacy/stateEvents.d.ts | 124 + .../angularjs/lib-esm/legacy/stateEvents.js | 270 + .../lib-esm/legacy/stateEvents.js.map | 13 + .../angularjs/lib-esm/locationServices.d.ts | 43 + .../angularjs/lib-esm/locationServices.js | 73 + .../angularjs/lib-esm/locationServices.js.map | 13 + .../@uirouter/angularjs/lib-esm/services.d.ts | 16 + .../@uirouter/angularjs/lib-esm/services.js | 113 + .../angularjs/lib-esm/services.js.map | 13 + .../angularjs/lib-esm/stateFilters.d.ts | 3 + .../angularjs/lib-esm/stateFilters.js | 42 + .../angularjs/lib-esm/stateFilters.js.map | 13 + .../angularjs/lib-esm/stateProvider.d.ts | 254 + .../angularjs/lib-esm/stateProvider.js | 138 + .../angularjs/lib-esm/stateProvider.js.map | 13 + .../statebuilders/onEnterExitRetain.d.ts | 10 + .../statebuilders/onEnterExitRetain.js | 23 + .../statebuilders/onEnterExitRetain.js.map | 13 + .../lib-esm/statebuilders/views.d.ts | 34 + .../angularjs/lib-esm/statebuilders/views.js | 105 + .../lib-esm/statebuilders/views.js.map | 13 + .../angularjs/lib-esm/templateFactory.d.ts | 85 + .../angularjs/lib-esm/templateFactory.js | 192 + .../angularjs/lib-esm/templateFactory.js.map | 13 + .../angularjs/lib-esm/urlRouterProvider.d.ts | 157 + .../angularjs/lib-esm/urlRouterProvider.js | 204 + .../lib-esm/urlRouterProvider.js.map | 13 + .../angularjs/lib-esm/viewScroll.d.ts | 9 + .../@uirouter/angularjs/lib-esm/viewScroll.js | 21 + .../angularjs/lib-esm/viewScroll.js.map | 13 + .../@uirouter/angularjs/lib/angular.d.ts | 1 + .../@uirouter/angularjs/lib/angular.js | 6 + .../@uirouter/angularjs/lib/angular.js.map | 13 + .../lib/directives/stateDirectives.d.ts | 3 + .../lib/directives/stateDirectives.js | 571 + .../lib/directives/stateDirectives.js.map | 13 + .../lib/directives/viewDirective.d.ts | 142 + .../angularjs/lib/directives/viewDirective.js | 290 + .../lib/directives/viewDirective.js.map | 13 + .../@uirouter/angularjs/lib/index.d.ts | 19 + .../@uirouter/angularjs/lib/index.js | 23 + .../@uirouter/angularjs/lib/index.js.map | 13 + .../@uirouter/angularjs/lib/injectables.d.ts | 0 .../@uirouter/angularjs/lib/injectables.js | 368 + .../angularjs/lib/injectables.js.map | 13 + .../@uirouter/angularjs/lib/interface.d.ts | 730 + .../@uirouter/angularjs/lib/interface.js | 3 + .../@uirouter/angularjs/lib/interface.js.map | 13 + .../angularjs/lib/legacy/resolveService.d.ts | 6 + .../angularjs/lib/legacy/resolveService.js | 69 + .../lib/legacy/resolveService.js.map | 13 + .../angularjs/lib/legacy/stateEvents.d.ts | 124 + .../angularjs/lib/legacy/stateEvents.js | 150 + .../angularjs/lib/legacy/stateEvents.js.map | 13 + .../angularjs/lib/locationServices.d.ts | 43 + .../angularjs/lib/locationServices.js | 75 + .../angularjs/lib/locationServices.js.map | 13 + .../@uirouter/angularjs/lib/services.d.ts | 16 + .../@uirouter/angularjs/lib/services.js | 116 + .../@uirouter/angularjs/lib/services.js.map | 13 + .../@uirouter/angularjs/lib/stateFilters.d.ts | 3 + .../@uirouter/angularjs/lib/stateFilters.js | 46 + .../angularjs/lib/stateFilters.js.map | 13 + .../angularjs/lib/stateProvider.d.ts | 254 + .../@uirouter/angularjs/lib/stateProvider.js | 140 + .../angularjs/lib/stateProvider.js.map | 13 + .../lib/statebuilders/onEnterExitRetain.d.ts | 10 + .../lib/statebuilders/onEnterExitRetain.js | 25 + .../statebuilders/onEnterExitRetain.js.map | 13 + .../angularjs/lib/statebuilders/views.d.ts | 34 + .../angularjs/lib/statebuilders/views.js | 109 + .../angularjs/lib/statebuilders/views.js.map | 13 + .../angularjs/lib/templateFactory.d.ts | 85 + .../angularjs/lib/templateFactory.js | 194 + .../angularjs/lib/templateFactory.js.map | 13 + .../angularjs/lib/urlRouterProvider.d.ts | 157 + .../angularjs/lib/urlRouterProvider.js | 206 + .../angularjs/lib/urlRouterProvider.js.map | 13 + .../@uirouter/angularjs/lib/viewScroll.d.ts | 9 + .../@uirouter/angularjs/lib/viewScroll.js | 23 + .../@uirouter/angularjs/lib/viewScroll.js.map | 13 + .../@uirouter/angularjs/package.json | 188 + .../angularjs/release/angular-ui-router.js | 10075 ++ .../release/angular-ui-router.js.map | 193 + .../release/angular-ui-router.min.js | 12 + .../release/angular-ui-router.min.js.map | 1679 + .../angularjs/release/resolveService.js | 83 + .../angularjs/release/resolveService.js.map | 19 + .../angularjs/release/resolveService.min.js | 8 + .../release/resolveService.min.js.map | 47 + .../angularjs/release/stateEvents.js | 294 + .../angularjs/release/stateEvents.js.map | 17 + .../angularjs/release/stateEvents.min.js | 8 + .../angularjs/release/stateEvents.min.js.map | 102 + .../angularjs/release/ui-router-angularjs.js | 2014 + .../release/ui-router-angularjs.js.map | 70 + .../release/ui-router-angularjs.min.js | 9 + .../release/ui-router-angularjs.min.js.map | 541 + .../@uirouter/angularjs/rollup.config.js | 116 + .../@uirouter/angularjs/stats.html | 152 + .../@uirouter/angularjs/yarn.lock | 3984 + .../node_modules/@uirouter/core/CHANGELOG.md | 1498 + .../@uirouter/core/CONTRIBUTING.md | 61 + .../node_modules/@uirouter/core/LICENSE | 21 + .../node_modules/@uirouter/core/README.md | 80 + .../@uirouter/core/_bundles/ui-router-core.js | 7911 ++ .../core/_bundles/ui-router-core.js.map | 161 + .../core/_bundles/ui-router-core.min.js | 10 + .../core/_bundles/ui-router-core.min.js.map | 1390 + .../@uirouter/core/artifacts.json | 8 + .../@uirouter/core/lib-esm/common/common.d.ts | 376 + .../@uirouter/core/lib-esm/common/common.js | 537 + .../core/lib-esm/common/common.js.map | 13 + .../core/lib-esm/common/coreservices.d.ts | 183 + .../core/lib-esm/common/coreservices.js | 9 + .../core/lib-esm/common/coreservices.js.map | 13 + .../@uirouter/core/lib-esm/common/glob.d.ts | 63 + .../@uirouter/core/lib-esm/common/glob.js | 81 + .../@uirouter/core/lib-esm/common/glob.js.map | 13 + .../@uirouter/core/lib-esm/common/hof.d.ts | 162 + .../@uirouter/core/lib-esm/common/hof.js | 236 + .../@uirouter/core/lib-esm/common/hof.js.map | 13 + .../@uirouter/core/lib-esm/common/index.d.ts | 9 + .../@uirouter/core/lib-esm/common/index.js | 10 + .../core/lib-esm/common/index.js.map | 13 + .../core/lib-esm/common/predicates.d.ts | 27 + .../core/lib-esm/common/predicates.js | 44 + .../core/lib-esm/common/predicates.js.map | 13 + .../@uirouter/core/lib-esm/common/queue.d.ts | 15 + .../@uirouter/core/lib-esm/common/queue.js | 44 + .../core/lib-esm/common/queue.js.map | 13 + .../core/lib-esm/common/strings.d.ts | 57 + .../@uirouter/core/lib-esm/common/strings.js | 148 + .../core/lib-esm/common/strings.js.map | 13 + .../@uirouter/core/lib-esm/common/trace.d.ts | 112 + .../@uirouter/core/lib-esm/common/trace.js | 237 + .../core/lib-esm/common/trace.js.map | 13 + .../@uirouter/core/lib-esm/globals.d.ts | 49 + .../@uirouter/core/lib-esm/globals.js | 36 + .../@uirouter/core/lib-esm/globals.js.map | 13 + .../core/lib-esm/hooks/coreResolvables.d.ts | 2 + .../core/lib-esm/hooks/coreResolvables.js | 16 + .../core/lib-esm/hooks/coreResolvables.js.map | 13 + .../core/lib-esm/hooks/ignoredTransition.d.ts | 2 + .../core/lib-esm/hooks/ignoredTransition.js | 29 + .../lib-esm/hooks/ignoredTransition.js.map | 13 + .../core/lib-esm/hooks/invalidTransition.d.ts | 3 + .../core/lib-esm/hooks/invalidTransition.js | 17 + .../lib-esm/hooks/invalidTransition.js.map | 13 + .../core/lib-esm/hooks/lazyLoad.d.ts | 13 + .../@uirouter/core/lib-esm/hooks/lazyLoad.js | 94 + .../core/lib-esm/hooks/lazyLoad.js.map | 13 + .../core/lib-esm/hooks/onEnterExitRetain.d.ts | 4 + .../core/lib-esm/hooks/onEnterExitRetain.js | 55 + .../lib-esm/hooks/onEnterExitRetain.js.map | 13 + .../core/lib-esm/hooks/redirectTo.d.ts | 2 + .../core/lib-esm/hooks/redirectTo.js | 35 + .../core/lib-esm/hooks/redirectTo.js.map | 13 + .../@uirouter/core/lib-esm/hooks/resolve.d.ts | 3 + .../@uirouter/core/lib-esm/hooks/resolve.js | 41 + .../core/lib-esm/hooks/resolve.js.map | 13 + .../core/lib-esm/hooks/updateGlobals.d.ts | 2 + .../core/lib-esm/hooks/updateGlobals.js | 33 + .../core/lib-esm/hooks/updateGlobals.js.map | 13 + .../@uirouter/core/lib-esm/hooks/url.d.ts | 2 + .../@uirouter/core/lib-esm/hooks/url.js | 23 + .../@uirouter/core/lib-esm/hooks/url.js.map | 13 + .../@uirouter/core/lib-esm/hooks/views.d.ts | 3 + .../@uirouter/core/lib-esm/hooks/views.js | 45 + .../@uirouter/core/lib-esm/hooks/views.js.map | 13 + .../@uirouter/core/lib-esm/index.d.ts | 16 + .../@uirouter/core/lib-esm/index.js | 17 + .../@uirouter/core/lib-esm/index.js.map | 13 + .../@uirouter/core/lib-esm/interface.d.ts | 105 + .../@uirouter/core/lib-esm/interface.js | 19 + .../@uirouter/core/lib-esm/interface.js.map | 13 + .../@uirouter/core/lib-esm/params/index.d.ts | 14 + .../@uirouter/core/lib-esm/params/index.js | 5 + .../core/lib-esm/params/index.js.map | 13 + .../core/lib-esm/params/interface.d.ts | 596 + .../core/lib-esm/params/interface.js | 5 + .../core/lib-esm/params/interface.js.map | 13 + .../@uirouter/core/lib-esm/params/param.d.ts | 65 + .../@uirouter/core/lib-esm/params/param.js | 196 + .../core/lib-esm/params/param.js.map | 13 + .../core/lib-esm/params/paramType.d.ts | 66 + .../core/lib-esm/params/paramType.js | 140 + .../core/lib-esm/params/paramType.js.map | 13 + .../core/lib-esm/params/paramTypes.d.ts | 192 + .../core/lib-esm/params/paramTypes.js | 154 + .../core/lib-esm/params/paramTypes.js.map | 13 + .../core/lib-esm/params/stateParams.d.ts | 21 + .../core/lib-esm/params/stateParams.js | 42 + .../core/lib-esm/params/stateParams.js.map | 13 + .../@uirouter/core/lib-esm/path/index.d.ts | 3 + .../@uirouter/core/lib-esm/path/index.js | 4 + .../@uirouter/core/lib-esm/path/index.js.map | 13 + .../core/lib-esm/path/pathFactory.d.ts | 81 + .../core/lib-esm/path/pathFactory.js | 171 + .../core/lib-esm/path/pathFactory.js.map | 13 + .../@uirouter/core/lib-esm/path/pathNode.d.ts | 58 + .../@uirouter/core/lib-esm/path/pathNode.js | 75 + .../core/lib-esm/path/pathNode.js.map | 13 + .../@uirouter/core/lib-esm/resolve/index.d.ts | 4 + .../@uirouter/core/lib-esm/resolve/index.js | 5 + .../core/lib-esm/resolve/index.js.map | 13 + .../core/lib-esm/resolve/interface.d.ts | 196 + .../core/lib-esm/resolve/interface.js | 13 + .../core/lib-esm/resolve/interface.js.map | 13 + .../core/lib-esm/resolve/resolvable.d.ts | 69 + .../core/lib-esm/resolve/resolvable.js | 132 + .../core/lib-esm/resolve/resolvable.js.map | 13 + .../core/lib-esm/resolve/resolveContext.d.ts | 92 + .../core/lib-esm/resolve/resolveContext.js | 199 + .../lib-esm/resolve/resolveContext.js.map | 13 + .../@uirouter/core/lib-esm/router.d.ts | 107 + .../@uirouter/core/lib-esm/router.js | 182 + .../@uirouter/core/lib-esm/router.js.map | 13 + .../@uirouter/core/lib-esm/state/index.d.ts | 30 + .../@uirouter/core/lib-esm/state/index.js | 8 + .../@uirouter/core/lib-esm/state/index.js.map | 13 + .../core/lib-esm/state/interface.d.ts | 731 + .../@uirouter/core/lib-esm/state/interface.js | 1 + .../core/lib-esm/state/interface.js.map | 13 + .../core/lib-esm/state/stateBuilder.d.ts | 86 + .../core/lib-esm/state/stateBuilder.js | 277 + .../core/lib-esm/state/stateBuilder.js.map | 13 + .../core/lib-esm/state/stateMatcher.d.ts | 11 + .../core/lib-esm/state/stateMatcher.js | 61 + .../core/lib-esm/state/stateMatcher.js.map | 13 + .../core/lib-esm/state/stateObject.d.ts | 158 + .../core/lib-esm/state/stateObject.js | 112 + .../core/lib-esm/state/stateObject.js.map | 13 + .../core/lib-esm/state/stateQueueManager.d.ts | 29 + .../core/lib-esm/state/stateQueueManager.js | 90 + .../lib-esm/state/stateQueueManager.js.map | 13 + .../core/lib-esm/state/stateRegistry.d.ts | 122 + .../core/lib-esm/state/stateRegistry.js | 154 + .../core/lib-esm/state/stateRegistry.js.map | 13 + .../core/lib-esm/state/stateService.d.ts | 349 + .../core/lib-esm/state/stateService.js | 570 + .../core/lib-esm/state/stateService.js.map | 13 + .../core/lib-esm/state/targetState.d.ts | 104 + .../core/lib-esm/state/targetState.js | 147 + .../core/lib-esm/state/targetState.js.map | 13 + .../core/lib-esm/transition/hookBuilder.d.ts | 46 + .../core/lib-esm/transition/hookBuilder.js | 117 + .../lib-esm/transition/hookBuilder.js.map | 13 + .../core/lib-esm/transition/hookRegistry.d.ts | 93 + .../core/lib-esm/transition/hookRegistry.js | 157 + .../lib-esm/transition/hookRegistry.js.map | 13 + .../core/lib-esm/transition/index.d.ts | 22 + .../core/lib-esm/transition/index.js | 23 + .../core/lib-esm/transition/index.js.map | 13 + .../core/lib-esm/transition/interface.d.ts | 794 + .../core/lib-esm/transition/interface.js | 14 + .../core/lib-esm/transition/interface.js.map | 13 + .../lib-esm/transition/rejectFactory.d.ts | 41 + .../core/lib-esm/transition/rejectFactory.js | 88 + .../lib-esm/transition/rejectFactory.js.map | 13 + .../core/lib-esm/transition/transition.d.ts | 450 + .../core/lib-esm/transition/transition.js | 628 + .../core/lib-esm/transition/transition.js.map | 13 + .../transition/transitionEventType.d.ts | 20 + .../lib-esm/transition/transitionEventType.js | 26 + .../transition/transitionEventType.js.map | 13 + .../lib-esm/transition/transitionHook.d.ts | 94 + .../core/lib-esm/transition/transitionHook.js | 223 + .../lib-esm/transition/transitionHook.js.map | 13 + .../lib-esm/transition/transitionService.d.ts | 190 + .../lib-esm/transition/transitionService.js | 237 + .../transition/transitionService.js.map | 13 + .../@uirouter/core/lib-esm/url/index.d.ts | 10 + .../@uirouter/core/lib-esm/url/index.js | 6 + .../@uirouter/core/lib-esm/url/index.js.map | 13 + .../@uirouter/core/lib-esm/url/interface.d.ts | 513 + .../@uirouter/core/lib-esm/url/interface.js | 1 + .../core/lib-esm/url/interface.js.map | 13 + .../core/lib-esm/url/urlMatcher.d.ts | 178 + .../@uirouter/core/lib-esm/url/urlMatcher.js | 513 + .../core/lib-esm/url/urlMatcher.js.map | 13 + .../core/lib-esm/url/urlMatcherFactory.d.ts | 70 + .../core/lib-esm/url/urlMatcherFactory.js | 125 + .../core/lib-esm/url/urlMatcherFactory.js.map | 13 + .../@uirouter/core/lib-esm/url/urlRouter.d.ts | 117 + .../@uirouter/core/lib-esm/url/urlRouter.js | 313 + .../core/lib-esm/url/urlRouter.js.map | 13 + .../@uirouter/core/lib-esm/url/urlRule.d.ts | 123 + .../@uirouter/core/lib-esm/url/urlRule.js | 207 + .../@uirouter/core/lib-esm/url/urlRule.js.map | 13 + .../core/lib-esm/url/urlService.d.ts | 63 + .../@uirouter/core/lib-esm/url/urlService.js | 78 + .../core/lib-esm/url/urlService.js.map | 13 + .../@uirouter/core/lib-esm/vanilla.d.ts | 6 + .../@uirouter/core/lib-esm/vanilla.js | 7 + .../@uirouter/core/lib-esm/vanilla.js.map | 13 + .../lib-esm/vanilla/baseLocationService.d.ts | 48 + .../lib-esm/vanilla/baseLocationService.js | 41 + .../vanilla/baseLocationService.js.map | 13 + .../vanilla/browserLocationConfig.d.ts | 16 + .../lib-esm/vanilla/browserLocationConfig.js | 46 + .../vanilla/browserLocationConfig.js.map | 13 + .../lib-esm/vanilla/hashLocationService.d.ts | 9 + .../lib-esm/vanilla/hashLocationService.js | 39 + .../vanilla/hashLocationService.js.map | 13 + .../@uirouter/core/lib-esm/vanilla/index.d.ts | 19 + .../@uirouter/core/lib-esm/vanilla/index.js | 11 + .../core/lib-esm/vanilla/index.js.map | 13 + .../core/lib-esm/vanilla/injector.d.ts | 48 + .../core/lib-esm/vanilla/injector.js | 98 + .../core/lib-esm/vanilla/injector.js.map | 13 + .../core/lib-esm/vanilla/interface.d.ts | 27 + .../core/lib-esm/vanilla/interface.js | 1 + .../core/lib-esm/vanilla/interface.js.map | 13 + .../lib-esm/vanilla/memoryLocationConfig.d.ts | 22 + .../lib-esm/vanilla/memoryLocationConfig.js | 23 + .../vanilla/memoryLocationConfig.js.map | 13 + .../vanilla/memoryLocationService.d.ts | 14 + .../lib-esm/vanilla/memoryLocationService.js | 32 + .../vanilla/memoryLocationService.js.map | 13 + .../core/lib-esm/vanilla/plugins.d.ts | 9 + .../@uirouter/core/lib-esm/vanilla/plugins.js | 26 + .../core/lib-esm/vanilla/plugins.js.map | 13 + .../vanilla/pushStateLocationService.d.ts | 32 + .../vanilla/pushStateLocationService.js | 67 + .../vanilla/pushStateLocationService.js.map | 13 + .../@uirouter/core/lib-esm/vanilla/q.d.ts | 16 + .../@uirouter/core/lib-esm/vanilla/q.js | 53 + .../@uirouter/core/lib-esm/vanilla/q.js.map | 13 + .../@uirouter/core/lib-esm/vanilla/utils.d.ts | 26 + .../@uirouter/core/lib-esm/vanilla/utils.js | 51 + .../core/lib-esm/vanilla/utils.js.map | 13 + .../@uirouter/core/lib-esm/view/index.d.ts | 6 + .../@uirouter/core/lib-esm/view/index.js | 2 + .../@uirouter/core/lib-esm/view/index.js.map | 13 + .../core/lib-esm/view/interface.d.ts | 50 + .../@uirouter/core/lib-esm/view/interface.js | 1 + .../core/lib-esm/view/interface.js.map | 13 + .../@uirouter/core/lib-esm/view/view.d.ts | 154 + .../@uirouter/core/lib-esm/view/view.js | 283 + .../@uirouter/core/lib-esm/view/view.js.map | 13 + .../@uirouter/core/lib/common/common.d.ts | 376 + .../@uirouter/core/lib/common/common.js | 560 + .../@uirouter/core/lib/common/common.js.map | 13 + .../core/lib/common/coreservices.d.ts | 183 + .../@uirouter/core/lib/common/coreservices.js | 11 + .../core/lib/common/coreservices.js.map | 13 + .../@uirouter/core/lib/common/glob.d.ts | 63 + .../@uirouter/core/lib/common/glob.js | 83 + .../@uirouter/core/lib/common/glob.js.map | 13 + .../@uirouter/core/lib/common/hof.d.ts | 162 + .../@uirouter/core/lib/common/hof.js | 245 + .../@uirouter/core/lib/common/hof.js.map | 13 + .../@uirouter/core/lib/common/index.d.ts | 9 + .../@uirouter/core/lib/common/index.js | 15 + .../@uirouter/core/lib/common/index.js.map | 13 + .../@uirouter/core/lib/common/predicates.d.ts | 27 + .../@uirouter/core/lib/common/predicates.js | 47 + .../core/lib/common/predicates.js.map | 13 + .../@uirouter/core/lib/common/queue.d.ts | 15 + .../@uirouter/core/lib/common/queue.js | 46 + .../@uirouter/core/lib/common/queue.js.map | 13 + .../@uirouter/core/lib/common/strings.d.ts | 57 + .../@uirouter/core/lib/common/strings.js | 158 + .../@uirouter/core/lib/common/strings.js.map | 13 + .../@uirouter/core/lib/common/trace.d.ts | 112 + .../@uirouter/core/lib/common/trace.js | 239 + .../@uirouter/core/lib/common/trace.js.map | 13 + .../@uirouter/core/lib/globals.d.ts | 49 + .../@uirouter/core/lib/globals.js | 38 + .../@uirouter/core/lib/globals.js.map | 13 + .../core/lib/hooks/coreResolvables.d.ts | 2 + .../core/lib/hooks/coreResolvables.js | 18 + .../core/lib/hooks/coreResolvables.js.map | 13 + .../core/lib/hooks/ignoredTransition.d.ts | 2 + .../core/lib/hooks/ignoredTransition.js | 31 + .../core/lib/hooks/ignoredTransition.js.map | 13 + .../core/lib/hooks/invalidTransition.d.ts | 3 + .../core/lib/hooks/invalidTransition.js | 19 + .../core/lib/hooks/invalidTransition.js.map | 13 + .../@uirouter/core/lib/hooks/lazyLoad.d.ts | 13 + .../@uirouter/core/lib/hooks/lazyLoad.js | 97 + .../@uirouter/core/lib/hooks/lazyLoad.js.map | 13 + .../core/lib/hooks/onEnterExitRetain.d.ts | 4 + .../core/lib/hooks/onEnterExitRetain.js | 57 + .../core/lib/hooks/onEnterExitRetain.js.map | 13 + .../@uirouter/core/lib/hooks/redirectTo.d.ts | 2 + .../@uirouter/core/lib/hooks/redirectTo.js | 37 + .../core/lib/hooks/redirectTo.js.map | 13 + .../@uirouter/core/lib/hooks/resolve.d.ts | 3 + .../@uirouter/core/lib/hooks/resolve.js | 43 + .../@uirouter/core/lib/hooks/resolve.js.map | 13 + .../core/lib/hooks/updateGlobals.d.ts | 2 + .../@uirouter/core/lib/hooks/updateGlobals.js | 35 + .../core/lib/hooks/updateGlobals.js.map | 13 + .../@uirouter/core/lib/hooks/url.d.ts | 2 + .../@uirouter/core/lib/hooks/url.js | 25 + .../@uirouter/core/lib/hooks/url.js.map | 13 + .../@uirouter/core/lib/hooks/views.d.ts | 3 + .../@uirouter/core/lib/hooks/views.js | 47 + .../@uirouter/core/lib/hooks/views.js.map | 13 + .../@uirouter/core/lib/index.d.ts | 16 + .../node_modules/@uirouter/core/lib/index.js | 22 + .../@uirouter/core/lib/index.js.map | 13 + .../@uirouter/core/lib/interface.d.ts | 105 + .../@uirouter/core/lib/interface.js | 21 + .../@uirouter/core/lib/interface.js.map | 13 + .../@uirouter/core/lib/params/index.d.ts | 14 + .../@uirouter/core/lib/params/index.js | 10 + .../@uirouter/core/lib/params/index.js.map | 13 + .../@uirouter/core/lib/params/interface.d.ts | 596 + .../@uirouter/core/lib/params/interface.js | 7 + .../core/lib/params/interface.js.map | 13 + .../@uirouter/core/lib/params/param.d.ts | 65 + .../@uirouter/core/lib/params/param.js | 198 + .../@uirouter/core/lib/params/param.js.map | 13 + .../@uirouter/core/lib/params/paramType.d.ts | 66 + .../@uirouter/core/lib/params/paramType.js | 142 + .../core/lib/params/paramType.js.map | 13 + .../@uirouter/core/lib/params/paramTypes.d.ts | 192 + .../@uirouter/core/lib/params/paramTypes.js | 156 + .../core/lib/params/paramTypes.js.map | 13 + .../core/lib/params/stateParams.d.ts | 21 + .../@uirouter/core/lib/params/stateParams.js | 44 + .../core/lib/params/stateParams.js.map | 13 + .../@uirouter/core/lib/path/index.d.ts | 3 + .../@uirouter/core/lib/path/index.js | 9 + .../@uirouter/core/lib/path/index.js.map | 13 + .../@uirouter/core/lib/path/pathFactory.d.ts | 81 + .../@uirouter/core/lib/path/pathFactory.js | 173 + .../core/lib/path/pathFactory.js.map | 13 + .../@uirouter/core/lib/path/pathNode.d.ts | 58 + .../@uirouter/core/lib/path/pathNode.js | 77 + .../@uirouter/core/lib/path/pathNode.js.map | 13 + .../@uirouter/core/lib/resolve/index.d.ts | 4 + .../@uirouter/core/lib/resolve/index.js | 10 + .../@uirouter/core/lib/resolve/index.js.map | 13 + .../@uirouter/core/lib/resolve/interface.d.ts | 196 + .../@uirouter/core/lib/resolve/interface.js | 15 + .../core/lib/resolve/interface.js.map | 13 + .../core/lib/resolve/resolvable.d.ts | 69 + .../@uirouter/core/lib/resolve/resolvable.js | 134 + .../core/lib/resolve/resolvable.js.map | 13 + .../core/lib/resolve/resolveContext.d.ts | 92 + .../core/lib/resolve/resolveContext.js | 201 + .../core/lib/resolve/resolveContext.js.map | 13 + .../@uirouter/core/lib/router.d.ts | 107 + .../node_modules/@uirouter/core/lib/router.js | 184 + .../@uirouter/core/lib/router.js.map | 13 + .../@uirouter/core/lib/state/index.d.ts | 30 + .../@uirouter/core/lib/state/index.js | 13 + .../@uirouter/core/lib/state/index.js.map | 13 + .../@uirouter/core/lib/state/interface.d.ts | 731 + .../@uirouter/core/lib/state/interface.js | 3 + .../@uirouter/core/lib/state/interface.js.map | 13 + .../core/lib/state/stateBuilder.d.ts | 86 + .../@uirouter/core/lib/state/stateBuilder.js | 280 + .../core/lib/state/stateBuilder.js.map | 13 + .../core/lib/state/stateMatcher.d.ts | 11 + .../@uirouter/core/lib/state/stateMatcher.js | 63 + .../core/lib/state/stateMatcher.js.map | 13 + .../@uirouter/core/lib/state/stateObject.d.ts | 158 + .../@uirouter/core/lib/state/stateObject.js | 114 + .../core/lib/state/stateObject.js.map | 13 + .../core/lib/state/stateQueueManager.d.ts | 29 + .../core/lib/state/stateQueueManager.js | 92 + .../core/lib/state/stateQueueManager.js.map | 13 + .../core/lib/state/stateRegistry.d.ts | 122 + .../@uirouter/core/lib/state/stateRegistry.js | 156 + .../core/lib/state/stateRegistry.js.map | 13 + .../core/lib/state/stateService.d.ts | 349 + .../@uirouter/core/lib/state/stateService.js | 572 + .../core/lib/state/stateService.js.map | 13 + .../@uirouter/core/lib/state/targetState.d.ts | 104 + .../@uirouter/core/lib/state/targetState.js | 149 + .../core/lib/state/targetState.js.map | 13 + .../core/lib/transition/hookBuilder.d.ts | 46 + .../core/lib/transition/hookBuilder.js | 119 + .../core/lib/transition/hookBuilder.js.map | 13 + .../core/lib/transition/hookRegistry.d.ts | 93 + .../core/lib/transition/hookRegistry.js | 161 + .../core/lib/transition/hookRegistry.js.map | 13 + .../@uirouter/core/lib/transition/index.d.ts | 22 + .../@uirouter/core/lib/transition/index.js | 28 + .../core/lib/transition/index.js.map | 13 + .../core/lib/transition/interface.d.ts | 794 + .../core/lib/transition/interface.js | 16 + .../core/lib/transition/interface.js.map | 13 + .../core/lib/transition/rejectFactory.d.ts | 41 + .../core/lib/transition/rejectFactory.js | 89 + .../core/lib/transition/rejectFactory.js.map | 13 + .../core/lib/transition/transition.d.ts | 450 + .../core/lib/transition/transition.js | 630 + .../core/lib/transition/transition.js.map | 13 + .../lib/transition/transitionEventType.d.ts | 20 + .../lib/transition/transitionEventType.js | 28 + .../lib/transition/transitionEventType.js.map | 13 + .../core/lib/transition/transitionHook.d.ts | 94 + .../core/lib/transition/transitionHook.js | 225 + .../core/lib/transition/transitionHook.js.map | 13 + .../lib/transition/transitionService.d.ts | 190 + .../core/lib/transition/transitionService.js | 239 + .../lib/transition/transitionService.js.map | 13 + .../@uirouter/core/lib/url/index.d.ts | 10 + .../@uirouter/core/lib/url/index.js | 11 + .../@uirouter/core/lib/url/index.js.map | 13 + .../@uirouter/core/lib/url/interface.d.ts | 513 + .../@uirouter/core/lib/url/interface.js | 3 + .../@uirouter/core/lib/url/interface.js.map | 13 + .../@uirouter/core/lib/url/urlMatcher.d.ts | 178 + .../@uirouter/core/lib/url/urlMatcher.js | 515 + .../@uirouter/core/lib/url/urlMatcher.js.map | 13 + .../core/lib/url/urlMatcherFactory.d.ts | 70 + .../core/lib/url/urlMatcherFactory.js | 127 + .../core/lib/url/urlMatcherFactory.js.map | 13 + .../@uirouter/core/lib/url/urlRouter.d.ts | 117 + .../@uirouter/core/lib/url/urlRouter.js | 315 + .../@uirouter/core/lib/url/urlRouter.js.map | 13 + .../@uirouter/core/lib/url/urlRule.d.ts | 123 + .../@uirouter/core/lib/url/urlRule.js | 209 + .../@uirouter/core/lib/url/urlRule.js.map | 13 + .../@uirouter/core/lib/url/urlService.d.ts | 63 + .../@uirouter/core/lib/url/urlService.js | 80 + .../@uirouter/core/lib/url/urlService.js.map | 13 + .../@uirouter/core/lib/vanilla.d.ts | 6 + .../@uirouter/core/lib/vanilla.js | 12 + .../@uirouter/core/lib/vanilla.js.map | 13 + .../core/lib/vanilla/baseLocationService.d.ts | 48 + .../core/lib/vanilla/baseLocationService.js | 43 + .../lib/vanilla/baseLocationService.js.map | 13 + .../lib/vanilla/browserLocationConfig.d.ts | 16 + .../core/lib/vanilla/browserLocationConfig.js | 48 + .../lib/vanilla/browserLocationConfig.js.map | 13 + .../core/lib/vanilla/hashLocationService.d.ts | 9 + .../core/lib/vanilla/hashLocationService.js | 41 + .../lib/vanilla/hashLocationService.js.map | 13 + .../@uirouter/core/lib/vanilla/index.d.ts | 19 + .../@uirouter/core/lib/vanilla/index.js | 16 + .../@uirouter/core/lib/vanilla/index.js.map | 13 + .../@uirouter/core/lib/vanilla/injector.d.ts | 48 + .../@uirouter/core/lib/vanilla/injector.js | 100 + .../core/lib/vanilla/injector.js.map | 13 + .../@uirouter/core/lib/vanilla/interface.d.ts | 27 + .../@uirouter/core/lib/vanilla/interface.js | 3 + .../core/lib/vanilla/interface.js.map | 13 + .../lib/vanilla/memoryLocationConfig.d.ts | 22 + .../core/lib/vanilla/memoryLocationConfig.js | 25 + .../lib/vanilla/memoryLocationConfig.js.map | 13 + .../lib/vanilla/memoryLocationService.d.ts | 14 + .../core/lib/vanilla/memoryLocationService.js | 34 + .../lib/vanilla/memoryLocationService.js.map | 13 + .../@uirouter/core/lib/vanilla/plugins.d.ts | 9 + .../@uirouter/core/lib/vanilla/plugins.js | 29 + .../@uirouter/core/lib/vanilla/plugins.js.map | 13 + .../lib/vanilla/pushStateLocationService.d.ts | 32 + .../lib/vanilla/pushStateLocationService.js | 69 + .../vanilla/pushStateLocationService.js.map | 13 + .../@uirouter/core/lib/vanilla/q.d.ts | 16 + .../@uirouter/core/lib/vanilla/q.js | 55 + .../@uirouter/core/lib/vanilla/q.js.map | 13 + .../@uirouter/core/lib/vanilla/utils.d.ts | 26 + .../@uirouter/core/lib/vanilla/utils.js | 55 + .../@uirouter/core/lib/vanilla/utils.js.map | 13 + .../@uirouter/core/lib/view/index.d.ts | 6 + .../@uirouter/core/lib/view/index.js | 7 + .../@uirouter/core/lib/view/index.js.map | 13 + .../@uirouter/core/lib/view/interface.d.ts | 50 + .../@uirouter/core/lib/view/interface.js | 3 + .../@uirouter/core/lib/view/interface.js.map | 13 + .../@uirouter/core/lib/view/view.d.ts | 154 + .../@uirouter/core/lib/view/view.js | 285 + .../@uirouter/core/lib/view/view.js.map | 13 + .../@uirouter/core/migrate/migrate.json | 4 + .../@uirouter/core/migrate/migratewarn.js | 10 + .../node_modules/@uirouter/core/package.json | 167 + .../app/vendor/node_modules/amdefine/LICENSE | 58 + .../vendor/node_modules/amdefine/README.md | 171 + .../vendor/node_modules/amdefine/amdefine.js | 301 + .../vendor/node_modules/amdefine/intercept.js | 36 + .../vendor/node_modules/amdefine/package.json | 86 + .../angular-i18n/angular-locale_de-it.js | 143 + .../angular-locale_en-us-posix.js | 143 + .../angular-i18n/angular-locale_es-bz.js | 125 + .../angular-i18n/angular-locale_it-va.js | 143 + .../angular-i18n/angular-locale_mo.js | 143 + .../angular-i18n/angular-locale_nds-de.js | 143 + .../angular-i18n/angular-locale_nds-nl.js | 143 + .../angular-i18n/angular-locale_nds.js | 143 + .../angular-i18n/angular-locale_sh.js | 143 + .../vendor/node_modules/angular-i18n/de-it.js | 2 + .../node_modules/angular-i18n/en-us-posix.js | 2 + .../vendor/node_modules/angular-i18n/es-bz.js | 2 + .../vendor/node_modules/angular-i18n/it-va.js | 2 + .../vendor/node_modules/angular-i18n/mo.js | 2 + .../node_modules/angular-i18n/nds-de.js | 2 + .../node_modules/angular-i18n/nds-nl.js | 2 + .../vendor/node_modules/angular-i18n/nds.js | 2 + .../vendor/node_modules/angular-i18n/sh.js | 2 + .../closure/core/core-default-theme.css | 10 + .../closure/core/core-default-theme.min.css | 6 + .../modules/closure/swipe/swipe.css | 11 + .../modules/closure/swipe/swipe.min.css | 6 + .../modules/closure/truncate/truncate.css | 14 + .../modules/closure/truncate/truncate.js | 97 + .../modules/closure/truncate/truncate.min.css | 6 + .../modules/closure/truncate/truncate.min.js | 7 + .../modules/js/core/core-default-theme.css | 10 + .../js/core/core-default-theme.min.css | 6 + .../modules/js/swipe/swipe.css | 11 + .../modules/js/swipe/swipe.min.css | 6 + .../modules/js/truncate/bower.json | 7 + .../modules/js/truncate/truncate.css | 14 + .../modules/js/truncate/truncate.js | 98 + .../modules/js/truncate/truncate.min.css | 6 + .../modules/js/truncate/truncate.min.js | 7 + .../vendor/node_modules/clone-buffer/LICENSE | 21 + .../node_modules/clone-buffer/README.md | 47 + .../vendor/node_modules/clone-buffer/index.js | 28 + .../node_modules/clone-buffer/package.json | 117 + .../node_modules/clone-stats/LICENSE.md | 21 + .../vendor/node_modules/clone-stats/README.md | 17 + .../vendor/node_modules/clone-stats/index.js | 13 + .../node_modules/clone-stats/package.json | 95 + .../vendor/node_modules/clone-stats/test.js | 36 + .../app/vendor/node_modules/clone/.npmignore | 4 + public/app/vendor/node_modules/clone/LICENSE | 18 + .../app/vendor/node_modules/clone/README.md | 178 + .../app/vendor/node_modules/clone/clone.iml | 10 + public/app/vendor/node_modules/clone/clone.js | 251 + .../vendor/node_modules/clone/package.json | 192 + .../cloneable-readable/.npmignore | 33 + .../cloneable-readable/.travis.yml | 8 + .../node_modules/cloneable-readable/LICENSE | 21 + .../node_modules/cloneable-readable/README.md | 52 + .../cloneable-readable/example.js | 14 + .../node_modules/cloneable-readable/index.js | 110 + .../cloneable-readable/package.json | 102 + .../node_modules/cloneable-readable/test.js | 576 + .../vendor/node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 94 + .../vendor/node_modules/core-util-is/test.js | 68 + .../google-closure-compiler-js/.gitmodules | 3 + .../CONTRIBUTING.md | 24 + .../google-closure-compiler-js/LICENSE | 201 + .../google-closure-compiler-js/README.md | 167 + .../google-closure-compiler-js/build.js | 45 + .../google-closure-compiler-js/cmd.js | 121 + .../google-closure-compiler-js/compile.js | 38 + .../google-closure-compiler-js/index.js | 28 + .../google-closure-compiler-js/jscomp.js | 7902 ++ .../google-closure-compiler-js/lib/gulp.js | 127 + .../google-closure-compiler-js/lib/webpack.js | 92 + .../google-closure-compiler-js/logger.js | 87 + .../google-closure-compiler-js/package.json | 122 + .../google-closure-compiler-js/usage.txt | 116 + .../app/vendor/node_modules/inherits/LICENSE | 16 + .../vendor/node_modules/inherits/README.md | 42 + .../vendor/node_modules/inherits/inherits.js | 7 + .../node_modules/inherits/inherits_browser.js | 23 + .../vendor/node_modules/inherits/package.json | 98 + .../vendor/node_modules/isarray/.npmignore | 1 + .../vendor/node_modules/isarray/.travis.yml | 4 + .../app/vendor/node_modules/isarray/Makefile | 6 + .../app/vendor/node_modules/isarray/README.md | 60 + .../node_modules/isarray/component.json | 19 + .../app/vendor/node_modules/isarray/index.js | 5 + .../vendor/node_modules/isarray/package.json | 104 + .../app/vendor/node_modules/isarray/test.js | 20 + .../vendor/node_modules/minimist/.travis.yml | 8 + .../app/vendor/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../app/vendor/node_modules/minimist/index.js | 236 + .../vendor/node_modules/minimist/package.json | 105 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../vendor/node_modules/minimist/test/bool.js | 166 + .../vendor/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../vendor/node_modules/minimist/test/long.js | 31 + .../vendor/node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../node_modules/moment/locale/ar-dz.js | 59 + .../node_modules/moment/locale/ar-kw.js | 59 + .../node_modules/moment/locale/ar-ly.js | 126 + .../vendor/node_modules/moment/locale/bm.js | 59 + .../node_modules/moment/locale/de-ch.js | 78 + .../node_modules/moment/locale/es-us.js | 83 + .../node_modules/moment/locale/gom-latn.js | 122 + .../vendor/node_modules/moment/locale/gu.js | 124 + .../vendor/node_modules/moment/locale/kn.js | 126 + .../vendor/node_modules/moment/locale/mi.js | 64 + .../node_modules/moment/locale/nl-be.js | 88 + .../vendor/node_modules/moment/locale/sd.js | 98 + .../vendor/node_modules/moment/locale/tet.js | 68 + .../vendor/node_modules/moment/locale/ur.js | 99 + .../node_modules/moment/locale/uz-latn.js | 58 + .../vendor/node_modules/moment/locale/yo.js | 60 + .../node_modules/moment/locale/zh-hk.js | 105 + .../moment/src/lib/duration/clone.js | 6 + .../moment/src/lib/duration/valid.js | 36 + .../moment/src/lib/utils/is-number.js | 3 + .../node_modules/moment/src/lib/utils/mod.js | 3 + .../node_modules/moment/src/locale/ar-dz.js | 50 + .../node_modules/moment/src/locale/ar-kw.js | 49 + .../node_modules/moment/src/locale/ar-ly.js | 112 + .../node_modules/moment/src/locale/bm.js | 49 + .../node_modules/moment/src/locale/de-ch.js | 68 + .../node_modules/moment/src/locale/es-us.js | 73 + .../moment/src/locale/gom-latn.js | 112 + .../node_modules/moment/src/locale/gu.js | 114 + .../node_modules/moment/src/locale/kn.js | 116 + .../node_modules/moment/src/locale/mi.js | 54 + .../node_modules/moment/src/locale/nl-be.js | 79 + .../node_modules/moment/src/locale/sd.js | 88 + .../node_modules/moment/src/locale/tet.js | 58 + .../node_modules/moment/src/locale/ur.js | 89 + .../node_modules/moment/src/locale/uz-latn.js | 49 + .../node_modules/moment/src/locale/yo.js | 50 + .../node_modules/moment/src/locale/zh-hk.js | 95 + .../vendor/node_modules/nvd3/.eslintrc.json | 60 + .../node_modules/nvd3/build/nv.d3.js.map | 1 + .../nvd3/examples/sankeyChart.html | 168 + .../node_modules/nvd3/src/models/sankey.js | 327 + .../nvd3/src/models/sankeyChart.js | 235 + .../nvd3/test/mocha/sankey.coffee | 85 + .../process-nextick-args/.travis.yml | 12 + .../process-nextick-args/index.js | 43 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 84 + .../process-nextick-args/readme.md | 18 + .../node_modules/process-nextick-args/test.js | 24 + .../node_modules/readable-stream/.npmignore | 9 + .../node_modules/readable-stream/.travis.yml | 65 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 57 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 124 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1007 + .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 664 + .../lib/internal/streams/BufferList.js | 74 + .../lib/internal/streams/destroy.js | 72 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 139 + .../readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + .../node_modules/readable-stream/readable.js | 19 + .../node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + .../node_modules/readable-stream/writable.js | 8 + .../remove-trailing-separator/history.md | 17 + .../remove-trailing-separator/index.js | 17 + .../remove-trailing-separator/license | 3 + .../remove-trailing-separator/package.json | 100 + .../remove-trailing-separator/readme.md | 51 + .../vendor/node_modules/replace-ext/LICENSE | 21 + .../vendor/node_modules/replace-ext/README.md | 50 + .../vendor/node_modules/replace-ext/index.js | 18 + .../node_modules/replace-ext/package.json | 129 + .../node_modules/safe-buffer/.travis.yml | 7 + .../vendor/node_modules/safe-buffer/LICENSE | 21 + .../vendor/node_modules/safe-buffer/README.md | 584 + .../vendor/node_modules/safe-buffer/index.js | 62 + .../node_modules/safe-buffer/package.json | 104 + .../vendor/node_modules/safe-buffer/test.js | 101 + .../node_modules/source-list-map/README.md | 89 + .../source-list-map/lib/CodeNode.js | 31 + .../source-list-map/lib/MappingsContext.js | 24 + .../source-list-map/lib/SourceListMap.js | 90 + .../source-list-map/lib/SourceNode.js | 48 + .../source-list-map/lib/base64-vlq.js | 169 + .../lib/fromStringWithSourceMap.js | 99 + .../source-list-map/lib/helpers.js | 13 + .../node_modules/source-list-map/lib/index.js | 5 + .../node_modules/source-list-map/package.json | 92 + .../vendor/node_modules/source-map/README.md | 510 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 21 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 107 + .../source-map/lib/source-map/base64-vlq.js | 146 + .../source-map/lib/source-map/base64.js | 73 + .../lib/source-map/binary-search.js | 117 + .../source-map/lib/source-map/mapping-list.js | 86 + .../source-map/lib/source-map/quick-sort.js | 120 + .../lib/source-map/source-map-consumer.js | 1077 + .../lib/source-map/source-map-generator.js | 399 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 370 + .../node_modules/source-map/package.json | 234 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 48 + .../node_modules/string_decoder/README.md | 28 + .../string_decoder/lib/string_decoder.js | 272 + .../node_modules/string_decoder/package.json | 108 + .../vendor/node_modules/through2/.npmignore | 3 + .../vendor/node_modules/through2/LICENSE.html | 336 + .../vendor/node_modules/through2/LICENSE.md | 9 + .../vendor/node_modules/through2/README.md | 136 + .../vendor/node_modules/through2/package.json | 104 + .../vendor/node_modules/through2/through2.js | 96 + .../vendor/node_modules/typescript/.mailmap | 290 + .../vendor/node_modules/typescript/.npmignore | 21 + .../vendor/node_modules/typescript/AUTHORS.md | 278 + .../node_modules/typescript/CONTRIBUTING.md | 185 + .../typescript/CopyrightNotice.txt | 15 + .../node_modules/typescript/LICENSE.txt | 55 + .../vendor/node_modules/typescript/README.md | 98 + .../typescript/ThirdPartyNoticeText.txt | 35 + .../vendor/node_modules/typescript/bin/tsc | 2 + .../node_modules/typescript/bin/tsserver | 2 + .../node_modules/typescript/lib/README.md | 5 + .../typescript/lib/cancellationToken.js | 71 + .../lib/cs/diagnosticMessages.generated.json | 944 + .../lib/de/diagnosticMessages.generated.json | 935 + .../lib/es/diagnosticMessages.generated.json | 944 + .../lib/fr/diagnosticMessages.generated.json | 944 + .../lib/it/diagnosticMessages.generated.json | 944 + .../lib/ja/diagnosticMessages.generated.json | 944 + .../lib/ko/diagnosticMessages.generated.json | 944 + .../node_modules/typescript/lib/lib.d.ts | 19623 +++ .../node_modules/typescript/lib/lib.dom.d.ts | 15226 +++ .../typescript/lib/lib.dom.iterable.d.ts | 127 + .../typescript/lib/lib.es2015.collection.d.ts | 92 + .../typescript/lib/lib.es2015.core.d.ts | 539 + .../typescript/lib/lib.es2015.d.ts | 30 + .../typescript/lib/lib.es2015.generator.d.ts | 72 + .../typescript/lib/lib.es2015.iterable.d.ts | 487 + .../typescript/lib/lib.es2015.promise.d.ts | 223 + .../typescript/lib/lib.es2015.proxy.d.ts | 42 + .../typescript/lib/lib.es2015.reflect.d.ts | 35 + .../typescript/lib/lib.es2015.symbol.d.ts | 56 + .../lib/lib.es2015.symbol.wellknown.d.ts | 305 + .../lib/lib.es2016.array.include.d.ts | 118 + .../typescript/lib/lib.es2016.d.ts | 22 + .../typescript/lib/lib.es2016.full.d.ts | 15649 +++ .../typescript/lib/lib.es2017.d.ts | 25 + .../typescript/lib/lib.es2017.full.d.ts | 15653 +++ .../typescript/lib/lib.es2017.intl.d.ts | 30 + .../typescript/lib/lib.es2017.object.d.ts | 51 + .../lib/lib.es2017.sharedmemory.d.ts | 138 + .../typescript/lib/lib.es2017.string.d.ts | 47 + .../node_modules/typescript/lib/lib.es5.d.ts | 4104 + .../node_modules/typescript/lib/lib.es6.d.ts | 21419 +++ .../lib/lib.esnext.asynciterable.d.ts | 44 + .../typescript/lib/lib.esnext.d.ts | 22 + .../typescript/lib/lib.esnext.full.d.ts | 15650 +++ .../typescript/lib/lib.scripthost.d.ts | 322 + .../typescript/lib/lib.webworker.d.ts | 1930 + .../lib/pl/diagnosticMessages.generated.json | 944 + .../node_modules/typescript/lib/protocol.d.ts | 2188 + .../pt-br/diagnosticMessages.generated.json | 944 + .../lib/ru/diagnosticMessages.generated.json | 944 + .../lib/tr/diagnosticMessages.generated.json | 944 + .../vendor/node_modules/typescript/lib/tsc.js | 61872 +++++++++ .../node_modules/typescript/lib/tsserver.js | 88203 ++++++++++++ .../typescript/lib/tsserverlibrary.d.ts | 7648 ++ .../typescript/lib/tsserverlibrary.js | 104931 +++++++++++++++ .../typescript/lib/typescript.d.ts | 4630 + .../node_modules/typescript/lib/typescript.js | 97680 ++++++++++++++ .../typescript/lib/typescriptServices.d.ts | 4628 + .../typescript/lib/typescriptServices.js | 97680 ++++++++++++++ .../typescript/lib/typingsInstaller.js | 18768 +++ .../node_modules/typescript/lib/watchGuard.js | 28 + .../zh-cn/diagnosticMessages.generated.json | 944 + .../zh-tw/diagnosticMessages.generated.json | 944 + .../node_modules/typescript/package-lock.json | 5302 + .../node_modules/typescript/package.json | 166 + .../vendor/node_modules/typescript/yarn.lock | 3370 + .../node_modules/util-deprecate/History.md | 16 + .../node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 89 + public/app/vendor/node_modules/vinyl/LICENSE | 21 + .../app/vendor/node_modules/vinyl/README.md | 445 + public/app/vendor/node_modules/vinyl/index.js | 328 + .../node_modules/vinyl/lib/inspect-stream.js | 13 + .../node_modules/vinyl/lib/is-stream.js | 15 + .../node_modules/vinyl/lib/normalize.js | 9 + .../vendor/node_modules/vinyl/package.json | 136 + .../node_modules/webpack-core/.editorconfig | 15 + .../node_modules/webpack-core/.gitattributes | 1 + .../node_modules/webpack-core/.npmignore | 1 + .../node_modules/webpack-core/README.md | 16 + .../webpack-core/lib/CachedSource.js | 58 + .../webpack-core/lib/ConcatSource.js | 62 + .../lib/LineToLineMappedSource.js | 49 + .../webpack-core/lib/LoadersList.js | 96 + .../webpack-core/lib/ModuleBuildError.js | 39 + .../webpack-core/lib/ModuleError.js | 15 + .../webpack-core/lib/ModuleWarning.js | 15 + .../webpack-core/lib/NormalModuleMixin.js | 319 + .../webpack-core/lib/OptionsDefaulter.js | 70 + .../webpack-core/lib/OriginalSource.js | 87 + .../webpack-core/lib/PrefixSource.js | 73 + .../webpack-core/lib/RawSource.js | 36 + .../webpack-core/lib/ReplaceSource.js | 155 + .../node_modules/webpack-core/lib/Source.js | 36 + .../webpack-core/lib/SourceAndMapMixin.js | 28 + .../webpack-core/lib/SourceMapSource.js | 54 + .../webpack-core/lib/source-map.js | 5 + .../node_modules/webpack-core/package.json | 94 + .../app/vendor/node_modules/xtend/.jshintrc | 30 + .../app/vendor/node_modules/xtend/.npmignore | 1 + public/app/vendor/node_modules/xtend/LICENCE | 19 + public/app/vendor/node_modules/xtend/Makefile | 4 + .../app/vendor/node_modules/xtend/README.md | 32 + .../vendor/node_modules/xtend/immutable.js | 19 + .../app/vendor/node_modules/xtend/mutable.js | 17 + .../vendor/node_modules/xtend/package.json | 117 + public/app/vendor/node_modules/xtend/test.js | 83 + 968 files changed, 730355 insertions(+), 37 deletions(-) create mode 120000 public/app/vendor/node_modules/.bin/google-closure-compiler-js create mode 120000 public/app/vendor/node_modules/.bin/tsc create mode 120000 public/app/vendor/node_modules/.bin/tsserver create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/CHANGELOG.md create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/CONTRIBUTING.md create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/DOCS.md create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/ISSUE_TEMPLATE.md create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/LICENSE create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/README.md create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/artifacts.json create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/services.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/package.json create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.min.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.min.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/rollup.config.js create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/stats.html create mode 100644 public/app/vendor/node_modules/@uirouter/angularjs/yarn.lock create mode 100644 public/app/vendor/node_modules/@uirouter/core/CHANGELOG.md create mode 100644 public/app/vendor/node_modules/@uirouter/core/CONTRIBUTING.md create mode 100644 public/app/vendor/node_modules/@uirouter/core/LICENSE create mode 100644 public/app/vendor/node_modules/@uirouter/core/README.md create mode 100644 public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/artifacts.json create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/router.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/common.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/common.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/common.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/glob.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/hof.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/queue.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/strings.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/trace.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/globals.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/globals.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/globals.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/param.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/param.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/param.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/router.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/router.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/router.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/index.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/index.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/index.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/interface.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/view.d.ts create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/view.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/lib/view/view.js.map create mode 100644 public/app/vendor/node_modules/@uirouter/core/migrate/migrate.json create mode 100755 public/app/vendor/node_modules/@uirouter/core/migrate/migratewarn.js create mode 100644 public/app/vendor/node_modules/@uirouter/core/package.json create mode 100644 public/app/vendor/node_modules/amdefine/LICENSE create mode 100644 public/app/vendor/node_modules/amdefine/README.md create mode 100644 public/app/vendor/node_modules/amdefine/amdefine.js create mode 100644 public/app/vendor/node_modules/amdefine/intercept.js create mode 100644 public/app/vendor/node_modules/amdefine/package.json create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_de-it.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_en-us-posix.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_es-bz.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_it-va.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_mo.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_nds-de.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_nds-nl.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_nds.js create mode 100644 public/app/vendor/node_modules/angular-i18n/angular-locale_sh.js create mode 100644 public/app/vendor/node_modules/angular-i18n/de-it.js create mode 100644 public/app/vendor/node_modules/angular-i18n/en-us-posix.js create mode 100644 public/app/vendor/node_modules/angular-i18n/es-bz.js create mode 100644 public/app/vendor/node_modules/angular-i18n/it-va.js create mode 100644 public/app/vendor/node_modules/angular-i18n/mo.js create mode 100644 public/app/vendor/node_modules/angular-i18n/nds-de.js create mode 100644 public/app/vendor/node_modules/angular-i18n/nds-nl.js create mode 100644 public/app/vendor/node_modules/angular-i18n/nds.js create mode 100644 public/app/vendor/node_modules/angular-i18n/sh.js create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.js create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.js create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/truncate/bower.json create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.js create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.css create mode 100644 public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.js create mode 100644 public/app/vendor/node_modules/clone-buffer/LICENSE create mode 100644 public/app/vendor/node_modules/clone-buffer/README.md create mode 100644 public/app/vendor/node_modules/clone-buffer/index.js create mode 100644 public/app/vendor/node_modules/clone-buffer/package.json create mode 100644 public/app/vendor/node_modules/clone-stats/LICENSE.md create mode 100644 public/app/vendor/node_modules/clone-stats/README.md create mode 100644 public/app/vendor/node_modules/clone-stats/index.js create mode 100644 public/app/vendor/node_modules/clone-stats/package.json create mode 100644 public/app/vendor/node_modules/clone-stats/test.js create mode 100644 public/app/vendor/node_modules/clone/.npmignore create mode 100644 public/app/vendor/node_modules/clone/LICENSE create mode 100644 public/app/vendor/node_modules/clone/README.md create mode 100644 public/app/vendor/node_modules/clone/clone.iml create mode 100644 public/app/vendor/node_modules/clone/clone.js create mode 100644 public/app/vendor/node_modules/clone/package.json create mode 100644 public/app/vendor/node_modules/cloneable-readable/.npmignore create mode 100644 public/app/vendor/node_modules/cloneable-readable/.travis.yml create mode 100644 public/app/vendor/node_modules/cloneable-readable/LICENSE create mode 100644 public/app/vendor/node_modules/cloneable-readable/README.md create mode 100644 public/app/vendor/node_modules/cloneable-readable/example.js create mode 100644 public/app/vendor/node_modules/cloneable-readable/index.js create mode 100644 public/app/vendor/node_modules/cloneable-readable/package.json create mode 100644 public/app/vendor/node_modules/cloneable-readable/test.js create mode 100644 public/app/vendor/node_modules/core-util-is/LICENSE create mode 100644 public/app/vendor/node_modules/core-util-is/README.md create mode 100644 public/app/vendor/node_modules/core-util-is/float.patch create mode 100644 public/app/vendor/node_modules/core-util-is/lib/util.js create mode 100644 public/app/vendor/node_modules/core-util-is/package.json create mode 100644 public/app/vendor/node_modules/core-util-is/test.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/.gitmodules create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/CONTRIBUTING.md create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/LICENSE create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/README.md create mode 100755 public/app/vendor/node_modules/google-closure-compiler-js/build.js create mode 100755 public/app/vendor/node_modules/google-closure-compiler-js/cmd.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/compile.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/index.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/jscomp.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/lib/gulp.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/lib/webpack.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/logger.js create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/package.json create mode 100644 public/app/vendor/node_modules/google-closure-compiler-js/usage.txt create mode 100644 public/app/vendor/node_modules/inherits/LICENSE create mode 100644 public/app/vendor/node_modules/inherits/README.md create mode 100644 public/app/vendor/node_modules/inherits/inherits.js create mode 100644 public/app/vendor/node_modules/inherits/inherits_browser.js create mode 100644 public/app/vendor/node_modules/inherits/package.json create mode 100644 public/app/vendor/node_modules/isarray/.npmignore create mode 100644 public/app/vendor/node_modules/isarray/.travis.yml create mode 100644 public/app/vendor/node_modules/isarray/Makefile create mode 100644 public/app/vendor/node_modules/isarray/README.md create mode 100644 public/app/vendor/node_modules/isarray/component.json create mode 100644 public/app/vendor/node_modules/isarray/index.js create mode 100644 public/app/vendor/node_modules/isarray/package.json create mode 100644 public/app/vendor/node_modules/isarray/test.js create mode 100644 public/app/vendor/node_modules/minimist/.travis.yml create mode 100644 public/app/vendor/node_modules/minimist/LICENSE create mode 100644 public/app/vendor/node_modules/minimist/example/parse.js create mode 100644 public/app/vendor/node_modules/minimist/index.js create mode 100644 public/app/vendor/node_modules/minimist/package.json create mode 100644 public/app/vendor/node_modules/minimist/readme.markdown create mode 100644 public/app/vendor/node_modules/minimist/test/all_bool.js create mode 100644 public/app/vendor/node_modules/minimist/test/bool.js create mode 100644 public/app/vendor/node_modules/minimist/test/dash.js create mode 100644 public/app/vendor/node_modules/minimist/test/default_bool.js create mode 100644 public/app/vendor/node_modules/minimist/test/dotted.js create mode 100644 public/app/vendor/node_modules/minimist/test/kv_short.js create mode 100644 public/app/vendor/node_modules/minimist/test/long.js create mode 100644 public/app/vendor/node_modules/minimist/test/num.js create mode 100644 public/app/vendor/node_modules/minimist/test/parse.js create mode 100644 public/app/vendor/node_modules/minimist/test/parse_modified.js create mode 100644 public/app/vendor/node_modules/minimist/test/short.js create mode 100644 public/app/vendor/node_modules/minimist/test/stop_early.js create mode 100644 public/app/vendor/node_modules/minimist/test/unknown.js create mode 100644 public/app/vendor/node_modules/minimist/test/whitespace.js create mode 100644 public/app/vendor/node_modules/moment/locale/ar-dz.js create mode 100644 public/app/vendor/node_modules/moment/locale/ar-kw.js create mode 100644 public/app/vendor/node_modules/moment/locale/ar-ly.js create mode 100644 public/app/vendor/node_modules/moment/locale/bm.js create mode 100644 public/app/vendor/node_modules/moment/locale/de-ch.js create mode 100644 public/app/vendor/node_modules/moment/locale/es-us.js create mode 100644 public/app/vendor/node_modules/moment/locale/gom-latn.js create mode 100644 public/app/vendor/node_modules/moment/locale/gu.js create mode 100644 public/app/vendor/node_modules/moment/locale/kn.js create mode 100644 public/app/vendor/node_modules/moment/locale/mi.js create mode 100644 public/app/vendor/node_modules/moment/locale/nl-be.js create mode 100644 public/app/vendor/node_modules/moment/locale/sd.js create mode 100644 public/app/vendor/node_modules/moment/locale/tet.js create mode 100644 public/app/vendor/node_modules/moment/locale/ur.js create mode 100644 public/app/vendor/node_modules/moment/locale/uz-latn.js create mode 100644 public/app/vendor/node_modules/moment/locale/yo.js create mode 100644 public/app/vendor/node_modules/moment/locale/zh-hk.js create mode 100644 public/app/vendor/node_modules/moment/src/lib/duration/clone.js create mode 100644 public/app/vendor/node_modules/moment/src/lib/duration/valid.js create mode 100644 public/app/vendor/node_modules/moment/src/lib/utils/is-number.js create mode 100644 public/app/vendor/node_modules/moment/src/lib/utils/mod.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/ar-dz.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/ar-kw.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/ar-ly.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/bm.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/de-ch.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/es-us.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/gom-latn.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/gu.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/kn.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/mi.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/nl-be.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/sd.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/tet.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/ur.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/uz-latn.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/yo.js create mode 100644 public/app/vendor/node_modules/moment/src/locale/zh-hk.js create mode 100644 public/app/vendor/node_modules/nvd3/.eslintrc.json create mode 100644 public/app/vendor/node_modules/nvd3/build/nv.d3.js.map create mode 100644 public/app/vendor/node_modules/nvd3/examples/sankeyChart.html create mode 100644 public/app/vendor/node_modules/nvd3/src/models/sankey.js create mode 100644 public/app/vendor/node_modules/nvd3/src/models/sankeyChart.js create mode 100644 public/app/vendor/node_modules/nvd3/test/mocha/sankey.coffee create mode 100644 public/app/vendor/node_modules/process-nextick-args/.travis.yml create mode 100644 public/app/vendor/node_modules/process-nextick-args/index.js create mode 100644 public/app/vendor/node_modules/process-nextick-args/license.md create mode 100644 public/app/vendor/node_modules/process-nextick-args/package.json create mode 100644 public/app/vendor/node_modules/process-nextick-args/readme.md create mode 100644 public/app/vendor/node_modules/process-nextick-args/test.js create mode 100644 public/app/vendor/node_modules/readable-stream/.npmignore create mode 100644 public/app/vendor/node_modules/readable-stream/.travis.yml create mode 100644 public/app/vendor/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 public/app/vendor/node_modules/readable-stream/GOVERNANCE.md create mode 100644 public/app/vendor/node_modules/readable-stream/LICENSE create mode 100644 public/app/vendor/node_modules/readable-stream/README.md create mode 100644 public/app/vendor/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 public/app/vendor/node_modules/readable-stream/duplex-browser.js create mode 100644 public/app/vendor/node_modules/readable-stream/duplex.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 public/app/vendor/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 public/app/vendor/node_modules/readable-stream/package.json create mode 100644 public/app/vendor/node_modules/readable-stream/passthrough.js create mode 100644 public/app/vendor/node_modules/readable-stream/readable-browser.js create mode 100644 public/app/vendor/node_modules/readable-stream/readable.js create mode 100644 public/app/vendor/node_modules/readable-stream/transform.js create mode 100644 public/app/vendor/node_modules/readable-stream/writable-browser.js create mode 100644 public/app/vendor/node_modules/readable-stream/writable.js create mode 100644 public/app/vendor/node_modules/remove-trailing-separator/history.md create mode 100644 public/app/vendor/node_modules/remove-trailing-separator/index.js create mode 100644 public/app/vendor/node_modules/remove-trailing-separator/license create mode 100644 public/app/vendor/node_modules/remove-trailing-separator/package.json create mode 100644 public/app/vendor/node_modules/remove-trailing-separator/readme.md create mode 100755 public/app/vendor/node_modules/replace-ext/LICENSE create mode 100644 public/app/vendor/node_modules/replace-ext/README.md create mode 100644 public/app/vendor/node_modules/replace-ext/index.js create mode 100644 public/app/vendor/node_modules/replace-ext/package.json create mode 100644 public/app/vendor/node_modules/safe-buffer/.travis.yml create mode 100644 public/app/vendor/node_modules/safe-buffer/LICENSE create mode 100644 public/app/vendor/node_modules/safe-buffer/README.md create mode 100644 public/app/vendor/node_modules/safe-buffer/index.js create mode 100644 public/app/vendor/node_modules/safe-buffer/package.json create mode 100644 public/app/vendor/node_modules/safe-buffer/test.js create mode 100644 public/app/vendor/node_modules/source-list-map/README.md create mode 100644 public/app/vendor/node_modules/source-list-map/lib/CodeNode.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/MappingsContext.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/SourceListMap.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/SourceNode.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/base64-vlq.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/fromStringWithSourceMap.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/helpers.js create mode 100644 public/app/vendor/node_modules/source-list-map/lib/index.js create mode 100644 public/app/vendor/node_modules/source-list-map/package.json create mode 100644 public/app/vendor/node_modules/source-map/README.md create mode 100644 public/app/vendor/node_modules/source-map/build/assert-shim.js create mode 100644 public/app/vendor/node_modules/source-map/build/mini-require.js create mode 100644 public/app/vendor/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 public/app/vendor/node_modules/source-map/build/prefix-utils.jsm create mode 100644 public/app/vendor/node_modules/source-map/build/suffix-browser.js create mode 100644 public/app/vendor/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 public/app/vendor/node_modules/source-map/build/suffix-utils.jsm create mode 100644 public/app/vendor/node_modules/source-map/build/test-prefix.js create mode 100644 public/app/vendor/node_modules/source-map/build/test-suffix.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/array-set.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/base64.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/quick-sort.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/source-node.js create mode 100644 public/app/vendor/node_modules/source-map/lib/source-map/util.js create mode 100644 public/app/vendor/node_modules/source-map/package.json create mode 100644 public/app/vendor/node_modules/string_decoder/.npmignore create mode 100644 public/app/vendor/node_modules/string_decoder/LICENSE create mode 100644 public/app/vendor/node_modules/string_decoder/README.md create mode 100644 public/app/vendor/node_modules/string_decoder/lib/string_decoder.js create mode 100644 public/app/vendor/node_modules/string_decoder/package.json create mode 100644 public/app/vendor/node_modules/through2/.npmignore create mode 100644 public/app/vendor/node_modules/through2/LICENSE.html create mode 100644 public/app/vendor/node_modules/through2/LICENSE.md create mode 100644 public/app/vendor/node_modules/through2/README.md create mode 100644 public/app/vendor/node_modules/through2/package.json create mode 100644 public/app/vendor/node_modules/through2/through2.js create mode 100644 public/app/vendor/node_modules/typescript/.mailmap create mode 100644 public/app/vendor/node_modules/typescript/.npmignore create mode 100644 public/app/vendor/node_modules/typescript/AUTHORS.md create mode 100644 public/app/vendor/node_modules/typescript/CONTRIBUTING.md create mode 100644 public/app/vendor/node_modules/typescript/CopyrightNotice.txt create mode 100644 public/app/vendor/node_modules/typescript/LICENSE.txt create mode 100644 public/app/vendor/node_modules/typescript/README.md create mode 100644 public/app/vendor/node_modules/typescript/ThirdPartyNoticeText.txt create mode 100755 public/app/vendor/node_modules/typescript/bin/tsc create mode 100755 public/app/vendor/node_modules/typescript/bin/tsserver create mode 100644 public/app/vendor/node_modules/typescript/lib/README.md create mode 100644 public/app/vendor/node_modules/typescript/lib/cancellationToken.js create mode 100644 public/app/vendor/node_modules/typescript/lib/cs/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/de/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/es/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/fr/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/it/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/ja/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/ko/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.dom.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.dom.iterable.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.collection.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.core.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.generator.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.iterable.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.promise.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.proxy.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.reflect.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.symbol.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2016.array.include.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2016.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2016.full.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.full.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.intl.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.object.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es2017.string.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es5.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.es6.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.esnext.asynciterable.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.esnext.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.esnext.full.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.scripthost.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/lib.webworker.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/pl/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/protocol.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/ru/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/tr/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/tsc.js create mode 100644 public/app/vendor/node_modules/typescript/lib/tsserver.js create mode 100644 public/app/vendor/node_modules/typescript/lib/tsserverlibrary.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/tsserverlibrary.js create mode 100644 public/app/vendor/node_modules/typescript/lib/typescript.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/typescript.js create mode 100644 public/app/vendor/node_modules/typescript/lib/typescriptServices.d.ts create mode 100644 public/app/vendor/node_modules/typescript/lib/typescriptServices.js create mode 100644 public/app/vendor/node_modules/typescript/lib/typingsInstaller.js create mode 100644 public/app/vendor/node_modules/typescript/lib/watchGuard.js create mode 100644 public/app/vendor/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json create mode 100644 public/app/vendor/node_modules/typescript/package-lock.json create mode 100644 public/app/vendor/node_modules/typescript/package.json create mode 100644 public/app/vendor/node_modules/typescript/yarn.lock create mode 100644 public/app/vendor/node_modules/util-deprecate/History.md create mode 100644 public/app/vendor/node_modules/util-deprecate/LICENSE create mode 100644 public/app/vendor/node_modules/util-deprecate/README.md create mode 100644 public/app/vendor/node_modules/util-deprecate/browser.js create mode 100644 public/app/vendor/node_modules/util-deprecate/node.js create mode 100644 public/app/vendor/node_modules/util-deprecate/package.json create mode 100644 public/app/vendor/node_modules/vinyl/LICENSE create mode 100644 public/app/vendor/node_modules/vinyl/README.md create mode 100644 public/app/vendor/node_modules/vinyl/index.js create mode 100644 public/app/vendor/node_modules/vinyl/lib/inspect-stream.js create mode 100644 public/app/vendor/node_modules/vinyl/lib/is-stream.js create mode 100644 public/app/vendor/node_modules/vinyl/lib/normalize.js create mode 100644 public/app/vendor/node_modules/vinyl/package.json create mode 100644 public/app/vendor/node_modules/webpack-core/.editorconfig create mode 100644 public/app/vendor/node_modules/webpack-core/.gitattributes create mode 100644 public/app/vendor/node_modules/webpack-core/.npmignore create mode 100644 public/app/vendor/node_modules/webpack-core/README.md create mode 100644 public/app/vendor/node_modules/webpack-core/lib/CachedSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/ConcatSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/LineToLineMappedSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/LoadersList.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/ModuleBuildError.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/ModuleError.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/ModuleWarning.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/NormalModuleMixin.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/OptionsDefaulter.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/OriginalSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/PrefixSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/RawSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/ReplaceSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/Source.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/SourceAndMapMixin.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/SourceMapSource.js create mode 100644 public/app/vendor/node_modules/webpack-core/lib/source-map.js create mode 100644 public/app/vendor/node_modules/webpack-core/package.json create mode 100644 public/app/vendor/node_modules/xtend/.jshintrc create mode 100644 public/app/vendor/node_modules/xtend/.npmignore create mode 100644 public/app/vendor/node_modules/xtend/LICENCE create mode 100644 public/app/vendor/node_modules/xtend/Makefile create mode 100644 public/app/vendor/node_modules/xtend/README.md create mode 100644 public/app/vendor/node_modules/xtend/immutable.js create mode 100644 public/app/vendor/node_modules/xtend/mutable.js create mode 100644 public/app/vendor/node_modules/xtend/package.json create mode 100644 public/app/vendor/node_modules/xtend/test.js diff --git a/.gitignore b/.gitignore index c23999f9..dcce5108 100644 --- a/.gitignore +++ b/.gitignore @@ -1,37 +1 @@ -*.gem -*.rbc -/.config -/coverage/ -/InstalledFiles -/pkg/ -/spec/reports/ -/test/tmp/ -/test/version_tmp/ -/tmp/ - -## Specific to RubyMotion: -.dat* -.repl_history -#build/ - -## Documentation cache and generated files: -/.yardoc/ -/_yardoc/ -/doc/ -/rdoc/ - -## Environment normalisation: -/.bundle/ -/lib/bundler/man/ - -# for a library or gem, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# Gemfile.lock -# .ruby-version -# .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc -/thin.* -/bundle/ -vendor/ +.bundle/ diff --git a/public/app/vendor/node_modules/.bin/google-closure-compiler-js b/public/app/vendor/node_modules/.bin/google-closure-compiler-js new file mode 120000 index 00000000..947d2117 --- /dev/null +++ b/public/app/vendor/node_modules/.bin/google-closure-compiler-js @@ -0,0 +1 @@ +../google-closure-compiler-js/cmd.js \ No newline at end of file diff --git a/public/app/vendor/node_modules/.bin/tsc b/public/app/vendor/node_modules/.bin/tsc new file mode 120000 index 00000000..0863208a --- /dev/null +++ b/public/app/vendor/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/public/app/vendor/node_modules/.bin/tsserver b/public/app/vendor/node_modules/.bin/tsserver new file mode 120000 index 00000000..f8f8f1a0 --- /dev/null +++ b/public/app/vendor/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/CHANGELOG.md b/public/app/vendor/node_modules/@uirouter/angularjs/CHANGELOG.md new file mode 100644 index 00000000..b529fd0a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/CHANGELOG.md @@ -0,0 +1,1600 @@ +## 1.0.10 (2017-10-18) +[Compare `@uirouter/angularjs` versions 1.0.9 and 1.0.10](https://github.com/angular-ui/ui-router/compare/1.0.9...1.0.10) + +### Bug Fixes + +* **artifactory:** Add trailing newline to package.json to work around artifactory issue ([#3551](https://github.com/angular-ui/ui-router/issues/3551)) ([d09a345](https://github.com/angular-ui/ui-router/commit/d09a345)), closes [#3550](https://github.com/angular-ui/ui-router/issues/3550) + +## 1.0.9 (2017-10-17) +[Compare `@uirouter/angularjs` versions 1.0.8 and 1.0.9](https://github.com/angular-ui/ui-router/compare/1.0.8...1.0.9) + + +### Updated `@uirouter/core` from 5.0.10 to 5.0.11 +[Compare `@uirouter/core` versions 5.0.10 and 5.0.11](https://github.com/ui-router/core/compare/5.0.10...5.0.11) + +### Bug Fixes + +* **ie9:** make console.bind work in ie9 ([#85](https://github.com/ui-router/core/issues/85)) ([318214b](https://github.com/ui-router/core/commit/318214b)) + +## 1.0.8 (2017-10-07) +[Compare `@uirouter/angularjs` versions 1.0.7 and 1.0.8](https://github.com/angular-ui/ui-router/compare/1.0.7...1.0.8) + + +## 5.0.10 (2017-10-07) +[Compare `@uirouter/core` versions 5.0.8 and 5.0.10](https://github.com/ui-router/core/compare/5.0.8...5.0.10) + +### Bug Fixes + +* **angular/cli:** Use package.json fields: 'typings', 'main', 'jsnext:main' ([74143d9](https://github.com/ui-router/core/commit/74143d9)) +* **isomorphic:** Remove use of CustomEvent. Detect root scope (global/window/self) for nodejs, browser, or web-worker. ([2d206ba](https://github.com/ui-router/core/commit/2d206ba)) +* **typings:** Use StateObject for parameter to hook criteria functions ([5b58566](https://github.com/ui-router/core/commit/5b58566)) + + +### Features + +* **TransitionHook:** Add hook registration option `invokeLimit` to limit the number of times a hook is invoked before being auto-deregistered. ([2cb17ef](https://github.com/ui-router/core/commit/2cb17ef)) + + + +## 1.0.7 (2017-09-30) +[Compare `@uirouter/angularjs` versions 1.0.6 and 1.0.7](https://github.com/angular-ui/ui-router/compare/1.0.6...1.0.7) + +### Bug Fixes + +* **typings:** Allow views: { foo: 'string' } in Ng1StateDeclaration ([2f7a3f2](https://github.com/angular-ui/ui-router/commit/2f7a3f2)) + +### Updated `@uirouter/core` from 5.0.6 to 5.0.8 (2017-09-30) +[Compare `@uirouter/core` versions 5.0.6 and 5.0.8](https://github.com/ui-router/core/compare/5.0.6...5.0.8) + +### Bug Fixes + +* **bundle:** Rollup: Do not warn on THIS_IS_UNDEFINED ([a4581b1](https://github.com/ui-router/core/commit/a4581b1)) +* **globals:** Use shallow copy to update the globals.params / $state.params object ([e883afc](https://github.com/ui-router/core/commit/e883afc)) +* **Injector:** When getting tokens from native injector, only throw on undefined (not on falsey values) ([ada9ca2](https://github.com/ui-router/core/commit/ada9ca2)) +* **redirectTo:** Fix typings for redirectTo. Allow a function that returns a target state or a promise for one. ([3904487](https://github.com/ui-router/core/commit/3904487)) +* **trace:** Fall back to console.log if .table is unavailable (IE) ([c8110fc](https://github.com/ui-router/core/commit/c8110fc)) +* **trace:** Support tracing of object-parameters with circular references ([2f1ae9a](https://github.com/ui-router/core/commit/2f1ae9a)) +* **url:** Add CustomEvent polyfill for IE ([a50db21](https://github.com/ui-router/core/commit/a50db21)) +* **vanilla:** fix base path handling for vanilla push state ([ad61d74](https://github.com/ui-router/core/commit/ad61d74)) +* **vanilla:** Use `self` instead of `window` for webworker compat ([a4629ee](https://github.com/ui-router/core/commit/a4629ee)) + + +### Features + +* **TargetState:** Add builder methods .withState, .withParams, and .withOptions ([6b93142](https://github.com/ui-router/core/commit/6b93142)) + + + +## `@uirouter/angularjs` 1.0.6 (2017-08-12) +[Compare `@uirouter/angularjs` versions 1.0.5 and 1.0.6](https://github.com/angular-ui/ui-router/compare/1.0.5...1.0.6) + +### Bug Fixes + +* **sourcemaps:** Embed sources inline into sourcemaps ([4baa430](https://github.com/angular-ui/ui-router/commit/4baa430)) + + + +## Changes in `@uirouter/core` between versions [5.0.5 and 5.0.6](https://github.com/ui-router/core/compare/5.0.5...5.0.6) (2017-08-12) + + +### Bug Fixes + +* **sourceMaps:** Embed typescript sources in sourcemaps ([10558a3](https://github.com/ui-router/core/commit/10558a3)) +* **typescript:** Fix strictNullCheck type error ([0ae585e](https://github.com/ui-router/core/commit/0ae585e)) +* **urlRouter:** Fix absolute 'href' generation by using location.hostname (not location.host) ([a28b68a](https://github.com/ui-router/core/commit/a28b68a)) +* **urlService:** Fix priority sorting of URL rules ([73a1fe0](https://github.com/ui-router/core/commit/73a1fe0)) + + + + +## [1.0.5](https://github.com/angular-ui/ui-router/compare/1.0.4...1.0.5) (2017-06-29) + +Updated to @uirouter/core 5.0.5 and addressed typescript 2.4 breaking changes + +## Changes in `@uirouter/core` between versions [5.0.3 and 5.0.5](https://github.com/ui-router/core/compare/5.0.3...5.0.5) (2017-06-29) + + +### Bug Fixes + +* **future:** Allow future states to specify a `parent:` ([828fe1b](https://github.com/ui-router/core/commit/828fe1b)) +* **typescript:** Update to typescript 2.4 ([ce1669b](https://github.com/ui-router/core/commit/ce1669b)) +* **view:** only sync views which are of the same name *and type* ([c48da4a](https://github.com/ui-router/core/commit/c48da4a)) + + +### Features + +* **invalidTransition:** Better error messaging when param values are invalid ([2a15d1a](https://github.com/ui-router/core/commit/2a15d1a)) +* **trace:** Trace view synchronization. Allow trace.enable(...string) ([284392d](https://github.com/ui-router/core/commit/284392d)) +* **urlMatcher:** add support for multiline urls ([5b11ce0](https://github.com/ui-router/core/commit/5b11ce0)) + + + + +## [1.0.4](https://github.com/angular-ui/ui-router/compare/1.0.3...1.0.4) (2017-06-09) + + +### Bug Fixes + +* **bundle:** work around rollup bug https://github.com/rollup/rollup/issues/1322 ([befb50a](https://github.com/angular-ui/ui-router/commit/befb50a)) +* **uiSrefActive:** Avoid "Possibly unhandled rejection" in console ([5c09e28](https://github.com/angular-ui/ui-router/commit/5c09e28)) + + + +### @uirouter/core changes +## [5.0.4](https://github.com/ui-router/core/compare/5.0.3...5.0.4) (2017-06-09) + + +### Bug Fixes + +* **future:** Allow future states to specify a `parent:` ([828fe1b](https://github.com/ui-router/core/commit/828fe1b)) +* **view:** only sync views which are of the same name *and type* ([c48da4a](https://github.com/ui-router/core/commit/c48da4a)) + + +### Features + +* **invalidTransition:** Better error messaging when param values are invalid ([2a15d1a](https://github.com/ui-router/core/commit/2a15d1a)) +* **trace:** Trace view synchronization. Allow trace.enable(...string) ([284392d](https://github.com/ui-router/core/commit/284392d)) + + + + +## [1.0.3](https://github.com/angular-ui/ui-router/compare/1.0.1...1.0.3) (2017-05-07) + + +### Bug Fixes + +* **templateFactory:** Do not prepend x- to attribute names unless necessary. ([e573f06](https://github.com/angular-ui/ui-router/commit/e573f06)) + + +### Features + +* **build:** Publish non-monolithic @uirouter/angularjs UMD bundle `ui-router-angularjs.js` ([8db3696](https://github.com/angular-ui/ui-router/commit/8db3696)) + ** Note: this change is necessary to properly support plugins which depend on @uirouter/core + + + +### @uirouter/core changes +## [5.0.3](https://github.com/ui-router/core/compare/5.0.1...5.0.3) (2017-05-07) + + +### Bug Fixes + +* **common:** Fix implementation of 'pick' -- use hasOwnProperty ([09848a4](https://github.com/ui-router/core/commit/09848a4)) +* **common:** Re-fix implementation of 'pick' using for .. in ([f2da7f4](https://github.com/ui-router/core/commit/f2da7f4)) + + +### Features + +* **build:** Build and distribute @uirouter/core UMD bundles ([0a8da85](https://github.com/ui-router/core/commit/0a8da85)) + + + + +## [1.0.1](https://github.com/angular-ui/ui-router/compare/1.0.0...1.0.1) (2017-05-04) + + +### Bug Fixes + +* **routeToComponent:** Do not prefix component element with `x-` unless necessary. ([60b9ef9](https://github.com/angular-ui/ui-router/commit/60b9ef9)) + + + +# [1.0.0](https://github.com/angular-ui/ui-router/compare/1.0.0-rc.1...1.0.0) (2017-04-30) + + +# NOTICE: The npm package is renamed from `angular-ui-router` to `@uirouter/angularjs` + + +### Bug Fixes + +* **noImplicitAny:** move noimplicitany compliance test file to correct location ([ec6e5e4](https://github.com/angular-ui/ui-router/commit/ec6e5e4)) +* **onEnter:** Fix typescript typing for onEnter/onRetain/onExit ([df6ee24](https://github.com/angular-ui/ui-router/commit/df6ee24)) +* **routeToComponent:** Bind resolves that start with data- or x- ([4559c32](https://github.com/angular-ui/ui-router/commit/4559c32)) +* **StateRegistry:** Allow stateRegistry.register() to take a Ng1StateDeclaration ([cc88525](https://github.com/angular-ui/ui-router/commit/cc88525)), closes [#3345](https://github.com/angular-ui/ui-router/issues/3345) +* **uiCanExit:** Only process uiCanExit hook once during redirects ([7a086ee](https://github.com/angular-ui/ui-router/commit/7a086ee)) +* **uiSref:** replace angular.copy with extend (PR [#3330](https://github.com/angular-ui/ui-router/issues/3330)) ([20d1fcd](https://github.com/angular-ui/ui-router/commit/20d1fcd)), closes [#3189](https://github.com/angular-ui/ui-router/issues/3189) +* **UrlRouterProvider:** export `UrlRouterProvider` symbol for use with .d.ts typings ([d71bad0](https://github.com/angular-ui/ui-router/commit/d71bad0)), closes [#3296](https://github.com/angular-ui/ui-router/issues/3296) +* **view:** Allow targeting nested named ui-view by simple ui-view name ([8fe5b1f](https://github.com/angular-ui/ui-router/commit/8fe5b1f)) +* **views:** Allow same views object to be reused in multiple states ([66103fc](https://github.com/angular-ui/ui-router/commit/66103fc)), closes [#3353](https://github.com/angular-ui/ui-router/issues/3353) +* **views:** Better validation of view declarations (throw when there are state-level and view-level conflicts) ([7573156](https://github.com/angular-ui/ui-router/commit/7573156)) + + +### Features + +* **uiSref:** Bind ui-sref to other DOM events (PR [#3343](https://github.com/angular-ui/ui-router/issues/3343)) ([193ac2e](https://github.com/angular-ui/ui-router/commit/193ac2e)), closes [#3169](https://github.com/angular-ui/ui-router/issues/3169) +* **uiSref:** switch custom events prop from `event:` to `events:` ([d3942a6](https://github.com/angular-ui/ui-router/commit/d3942a6)) + + +UI-Router for AngularJS version 1.0.0 updates `ui-router-core@3.1.0` to `@uirouter/core@5.0.1`. +Please keep reading to see if the breaking changes from core between 3.1.0 and 5.0.1 affect you. + +### `@uirouter/core` changes +# [diff to 3.1.0](https://github.com/ui-router/core/compare/3.1.0...5.0.1) (2017-04-30) + +### Bug Fixes + +* **BrowserLocationConfig:** fixed protocol + port value ([#38](https://github.com/ui-router/core/issues/38)) ([5559382](https://github.com/ui-router/core/commit/5559382)) +* **lazyLoad:** Allow `lazyLoad` stateBuilder: Get lazyLoad fn from internal State object, not StateDeclaration ([9313880](https://github.com/ui-router/core/commit/9313880)) +* **lazyLoad:** Wait for future state to be replaced before registering lazy children ([4bdce47](https://github.com/ui-router/core/commit/4bdce47)) +* **noImplicitAny:** Fix noimplicitany compliance ([1a6cdfc](https://github.com/ui-router/core/commit/1a6cdfc)) +* **pushStateLocation:** call listeners in url() ([#24](https://github.com/ui-router/core/issues/24)) ([7c90911](https://github.com/ui-router/core/commit/7c90911)), closes [#23](https://github.com/ui-router/core/issues/23) +* **redirect:** Do not update URL after redirect with { location: false } ([652a760](https://github.com/ui-router/core/commit/652a760)) +* **resolve:** Allow resolve's state context to be injected as `$state$` ([a06948b](https://github.com/ui-router/core/commit/a06948b)) +* **tfs:** Rename $q.ts and $injector.ts files, removing leading dollar signs ([cb653ee](https://github.com/ui-router/core/commit/cb653ee)) +* **trace:** Re-add transitionStart trace ([b019036](https://github.com/ui-router/core/commit/b019036)) +* **transitionHook:** Do not process transition hooks after router has been disposed. ([666c6d7](https://github.com/ui-router/core/commit/666c6d7)) +* **TransitionHook:** Transition hooks no longer expose the internal StateObject ([2b0e48b](https://github.com/ui-router/core/commit/2b0e48b)) +* **typings:** Allow strictNullChecks for HookMatchCriteria ([d92d4d5](https://github.com/ui-router/core/commit/d92d4d5)) +* **ui-sref:** Improve performance of generating hrefs ([c3967bd](https://github.com/ui-router/core/commit/c3967bd)) +* **view:** Do not throw when uiView doesn't have a state context ([f76ee2a](https://github.com/ui-router/core/commit/f76ee2a)) +* **view:** Update views in order of ui-view depth and also by state depth ([46dea2b](https://github.com/ui-router/core/commit/46dea2b)) + + +### Features + +* **abort:** Add API to manually abort/cancel a transition ([39f8a53](https://github.com/ui-router/core/commit/39f8a53)) +* **common:** Perf improvements in hot functions: ([4193244](https://github.com/ui-router/core/commit/4193244)) +* **core:** Export all vanilla.* code from `ui-router-core` ([f3392d1](https://github.com/ui-router/core/commit/f3392d1)) +* **core:** Switch to [@uirouter](https://github.com/uirouter)/core npm module ([e3f389f](https://github.com/ui-router/core/commit/e3f389f)) +* **decorators:** Add state, resolve and resolve data decorators ([642df0b](https://github.com/ui-router/core/commit/642df0b)) +* **defaultErrorHandler:** Do not invoke default error handler for ABORTED transitions ([b07a24b](https://github.com/ui-router/core/commit/b07a24b)) +* **globals:** Removed `UIRouterGlobals` interface. Renamed `Globals` class to `UIRouterGlobals` ([8719334](https://github.com/ui-router/core/commit/8719334)) +* **Globals:** implement Disposable and delete global transition data ([a794018](https://github.com/ui-router/core/commit/a794018)) +* **onBefore:** Run onBefore hooks asynchronously. ([30b82aa](https://github.com/ui-router/core/commit/30b82aa)) +* **onEnter/Exit/Retain:** Use onExit/onEnter/onRetain from 56955state(), not state.self ([bc1f554](https://github.com/ui-router/core/commit/bc1f554)) +* **Rejection:** Add $id to ease debugging of transition rejections ([d456d54](https://github.com/ui-router/core/commit/d456d54)) +* **State:** Support registration of ES6 state classes (as opposed to object literals) ([3a5d055](https://github.com/ui-router/core/commit/3a5d055)) +* **State:** Switch Internal State Object to prototypally inherit from the State Declaration ([027c995](https://github.com/ui-router/core/commit/027c995)), closes [#34](https://github.com/ui-router/core/issues/34) +* **StateObject:** Rename internal `State` object to `StateObject` ([feceaf9](https://github.com/ui-router/core/commit/feceaf9)) +* **StateRegistry:** improve perf for: `.register()` and `StateMatcher.find()` misses ([fdb3ab9](https://github.com/ui-router/core/commit/fdb3ab9)) +* **transition:** Ignore duplicate transitions (double clicks) ([bd1bd0b](https://github.com/ui-router/core/commit/bd1bd0b)) +* **transition:** Improve supersede logic: Do not supersede if the new trans is aborted before onStart ([3141a8f](https://github.com/ui-router/core/commit/3141a8f)) +* **transition:** Run hooks synchronously in current stack, when possible ([953e618](https://github.com/ui-router/core/commit/953e618)) +* **Transition:** deprecate `Transition.is()` which was never implemented ([1edff4b](https://github.com/ui-router/core/commit/1edff4b)) +* **Transition:** Normalize all transition errors to a Rejection. ([a7464bb](https://github.com/ui-router/core/commit/a7464bb)) +* **UIRouter:** Add `trace` global to the `UIRouter` object ([48c5af6](https://github.com/ui-router/core/commit/48c5af6)) +* **UrlService:** (`UrlRouter`) improve perf of registering Url Rules and sorting Url Rules ([64fbfff](https://github.com/ui-router/core/commit/64fbfff)) +* **UrlService:** Add `rules.initial("/home")` to config initial state (like otherwise) ([bbe4209](https://github.com/ui-router/core/commit/bbe4209)) +* **View:** Allow targeting views on own state using `viewname@.` (normalizeUIViewTarget) ([7078216](https://github.com/ui-router/core/commit/7078216)), closes [#25](https://github.com/ui-router/core/issues/25) + + +### BREAKING CHANGES + +## **TransitionHook:** Transition hooks no longer expose the internal `State` object (now named `StateObject`) + +#### Before: + +```js +import { State } from "ui-router-core"; +const match = { to: (state: State) => state.data.auth }; +transitionsvc.onEnter(match, (trans: Transition, state: State) => { + // state is the internal State object + if (state.includes["foo"]) { // internal ui-router API + return false; + } +} +``` + +#### Now: + +```js +import { StateDeclaration } from "ui-router-core"; +const match = { to: (state: StateDeclaration) => state.data.auth }; +transitionsvc.onEnter(match, (trans: Transition, state: StateDeclaration) => { + // state === the state object you registered + // Access internal ui-router API using $$state() + if (state.$$state().includes["foo"]) { + return false; + } +} +``` + +#### Motivation: + +The `State` object (now named `StateObject`) is an internal API and should not be exposed via any public APIs. +If you depend on the internal APIs, you can still access the internal object by calling `state.$$state()`. + +#### BC Likelihood + +How likely is this BC to affect me? + +Medium: You will likely be affected you 1) have transition hooks, 2) are using typescript and/or 3) use the internal ui-router State API. + +#### BC Severity + +How severe is this BC? + +Low: Access to the internal api is still available using `$$state()`. + + +## **StateObject:** Renamed internal API `State` object to `StateObject` + +#### Before: + +``` +import {State} from "ui-router-core"; +``` + +- #### Now: + +``` +import {StateObject} from "ui-router-core"; +``` + +#### Motivation: + +We'd like to use the `State` name/symbol as a public API. +It will likely be an ES7/TS decorator for ES6/TS state definition classes, i.e: + +```js +@State("foo") +export class FooState implements StateDeclaration { + url = "/foo"; + component = FooComponent; + + @Resolve({ deps: [FooService] }) + fooData(fooService) { + return fooService.getFoos(); + } +} +``` + +#### BC Likelihood + +How likely is this to affect me? + +Low: This only affects code that imports the internal API symbol `State`. +You will likely be affected you 1) import that symbol, 2) are using typescript and 3) explicitly +typed a variable such as `let internalStateObject = state.$$state();` + +#### BC Severity + +How severe is this change? + +Low: Find all places where `State` is imported and rename to `StateObject` + + +## **Transition:** All Transition errors are now wrapped in a Rejection object. + +#### Before: + +Previously, if a transition hook returned a rejected promise: +```js +.onStart({}, () => Promise.reject('reject transition')); +``` + +In `onError` or `transtion.promise.catch()`, the raw rejection was returned: +```js +.onError({}, (trans, err) => err === 'reject transition') +``` + +#### Now: + +Now, the error is wrapped in a Rejection object. + +- The detail (thrown error or rejected value) is still available as `.detail`. + +```js +.onError({}, (trans, err) => + err instanceof Rejection && err.detail === 'reject transition') +``` + +- The Rejection object indicates the `.type` of transition rejection (ABORTED, ERROR, SUPERSEDED and/or redirection). +```js +.onError({}, (trans, err) => { + err.type === RejectType.ABORTED === 3 +}); +``` + +#### Motivation: + +Errors *thrown from* a hook and rejection values *returned from* a hook can now be processed in the same way. + +#### BC Likelihood + +How likely is this to affect me? + +Medium: apps which have onError handlers for rejected values + +#### BC Severity + +How severe is this change? + +Low: Find all error handlers (or .catch/.then chains) that do not understand Rejection. Add `err.detail` processing. + + + +## **onBefore:** `onBefore` hooks are now run asynchronously like all the other hooks. + +#### Old behavior + +Previously, the `onBefore` hooks were run in the same stackframe as `transitionTo`. +If they threw an error, it could be caught using try/catch. + +```js +transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); +try { + stateService.go('foo'); +} catch (error) { + // handle error +} +``` + +#### New behavior + +Now, `onBefore` hooks are processed asynchronously. +To handle errors, use any of the async error handling paradigms: + +- Chain off the promise + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + stateService.go('foo').catch(error => { //handle error }); + ``` +- Define an error handler + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + transitionService.onError({ to: 'foo' }), () => { // handle error }); + stateService.go('foo'); + ``` +- Use the global defaultErrorHandler + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + stateService.go('foo'); + stateService.defaultErrorHandler(error => { // global error handler }); + ``` + +#### Motivation + +Why introduce a BC? + +- No subtle behavior differences by hook type +- Simpler code and mental model +- Fewer edge cases to account for + +#### BC Liklihood + +How likely is this to affect my app? + +Very Low: Apps that registered onBefore hooks and depend on +synchronous execution are affected. + +#### BC Severity + +How severe is this BC? + +Low: Switch to asynchronous handling, such as chaining off the +transition promise + + +## **defaultErrorHandler:** ABORTED transitions do not invoke the `defaultErrorHandler` + +Returning `false` from a transition hook will abort the transition. + +#### Old behavior + +Previously, this case was considered an error and was logged by +`defaultErrorHandler`. +After your feedback, we agree that this is not typically an error. + +#### New behavior + +Now, aborted transitions do not trigger the `defaultErrorHandler` + +#### Motivation: + +> Why introduce a BC? + +Most users do not consider ABORT to be an error. The default error +handler should match this assumption. + +#### BC liklihood + +> How likely am I to be affected? + +Low: Most users do not consider ABORT to be an error. For most users +this will not be a BC. + +#### BC severity + +> How severe is this BC? + +Low: Users who want to handle all transition rejections can +register a `.onError` handler and filter/process accordingly. + + +## **globals:** This change will likely only affect a small subset of typescript users and probably only those using `ui-router-ng2`. + +If you're injecting the `Globals` class somewhere, e.g.: +``` +@Injectable() +class MyService { + _globals: UIRouterGlobals; + constructor(globals: Globals) { + this._globals = globals; + } +} +``` +you should now inject `UIRouterGlobals`, e.g.: +``` +@Injectable() +class MyService { + constructor(public globals: UIRouterGlobals) { } +} +``` + +Likewise, if you were casting the `UIRouter.globals` object as a `UIRouterGlobals`, it is no longer necessary: + +```js +function myHook(trans: Transition) { + let globals: UIRouterGlobals = trans.router.globals; // cast is no longer necessary +} +``` + +Closes https://github.com/ui-router/core/issues/31 + + + + +# [1.0.0-rc.1](https://github.com/angular-ui/ui-router/compare/1.0.0-beta.3...v1.0.0-rc.1) (2017-01-09) + + +### Bug Fixes + +* Post-process .d.ts files to make them compatible with TS 1.8 ([c8162ee](https://github.com/angular-ui/ui-router/commit/c8162ee)), closes [#3070](https://github.com/angular-ui/ui-router/issues/3070) +* **$stateChangeSuccess:** fire polyfill `$stateChangeSuccess` right after global state are updated ([3984f9b](https://github.com/angular-ui/ui-router/commit/3984f9b)), closes [#3144](https://github.com/angular-ui/ui-router/issues/3144) +* **$viewContentLoading:** Add $viewContentLoading event back ([c346a28](https://github.com/angular-ui/ui-router/commit/c346a28)) +* **build:** Use global `angular` reference if require('angular') is falsey or empty ([2982613](https://github.com/angular-ui/ui-router/commit/2982613)), closes [#3113](https://github.com/angular-ui/ui-router/issues/3113) +* **component:** Do not throw err when component has `&` binding ([b5c731d](https://github.com/angular-ui/ui-router/commit/b5c731d)), closes [#3099](https://github.com/angular-ui/ui-router/issues/3099) +* **Ng1ViewDeclaration:** Make controllerProvider IInjectable ([#3056](https://github.com/angular-ui/ui-router/issues/3056)) ([a3136ae](https://github.com/angular-ui/ui-router/commit/a3136ae)), closes [#3044](https://github.com/angular-ui/ui-router/issues/3044) +* **ng2.uiSrefActive:** Allow ng-if on nested uiSrefs ([e3051f5](https://github.com/angular-ui/ui-router/commit/e3051f5)), closes [#3046](https://github.com/angular-ui/ui-router/issues/3046) +* **onExit:** inject resolve values using the "from path" ([c91b65a](https://github.com/angular-ui/ui-router/commit/c91b65a)) +* **onExit:** inject the current transition as `$transition$` ([c91b65a](https://github.com/angular-ui/ui-router/commit/c91b65a)), closes [#3081](https://github.com/angular-ui/ui-router/issues/3081) +* **package:** use engines: node: >=4.0.0 ([6801b0c](https://github.com/angular-ui/ui-router/commit/6801b0c)), closes [#3086](https://github.com/angular-ui/ui-router/issues/3086) +* **Resolve:** Fix NOWAIT resolve injection into controllers and bindings to components. ([cb57ce9](https://github.com/angular-ui/ui-router/commit/cb57ce9)) +* **typings:** Change Ng1ViewDeclaration.controller type to IInjectable|string ([d2b5d84](https://github.com/angular-ui/ui-router/commit/d2b5d84)), closes [#3089](https://github.com/angular-ui/ui-router/issues/3089) +* **typings:** Change Ng1ViewDeclaration.controller type to IInjectable|string ([8e91dc9](https://github.com/angular-ui/ui-router/commit/8e91dc9)) +* **ui-sref:** Update `ui-sref/state` href when states are added/removed ([389dfd5](https://github.com/angular-ui/ui-router/commit/389dfd5)) +* **ui-sref:** Update params-only sref when state changes ([3c1bd0e](https://github.com/angular-ui/ui-router/commit/3c1bd0e)), closes [#1031](https://github.com/angular-ui/ui-router/issues/1031) [#2541](https://github.com/angular-ui/ui-router/issues/2541) +* **ui-sref:** Use either .on or .bind for click handlers ([b00f044](https://github.com/angular-ui/ui-router/commit/b00f044)), closes [#3035](https://github.com/angular-ui/ui-router/issues/3035) +* **ui-sref-active:** Add CSS class immediately (avoid delay) ([27eb5e9](https://github.com/angular-ui/ui-router/commit/27eb5e9)), closes [#2503](https://github.com/angular-ui/ui-router/issues/2503) +* **ui-sref-active:** Avoid add/remove class race condition ([126a4ad](https://github.com/angular-ui/ui-router/commit/126a4ad)) +* **ui-sref-active:** Use `$scope.$evalAsync` to apply css class ([6a9d9ae](https://github.com/angular-ui/ui-router/commit/6a9d9ae)), closes [#2503](https://github.com/angular-ui/ui-router/issues/2503) [#1997](https://github.com/angular-ui/ui-router/issues/1997) [#2503](https://github.com/angular-ui/ui-router/issues/2503) [#1997](https://github.com/angular-ui/ui-router/issues/1997) +* **ui-state:** Process ui-state links relative to where they are created ([cae4dc4](https://github.com/angular-ui/ui-router/commit/cae4dc4)) +* **ui-state:** Support one time bindings in ng 1.3 ([389dfd5](https://github.com/angular-ui/ui-router/commit/389dfd5)), closes [#3131](https://github.com/angular-ui/ui-router/issues/3131) [#3054](https://github.com/angular-ui/ui-router/issues/3054) +* **uiView:** do not leave initial view scope undestroyed ([#3164](https://github.com/angular-ui/ui-router/issues/3164)) ([37d6f9a](https://github.com/angular-ui/ui-router/commit/37d6f9a)), closes [#1896](https://github.com/angular-ui/ui-router/issues/1896) + + +### Features + +* bundle using rollupjs for smaller bundle and faster init times ([a4b5500](https://github.com/angular-ui/ui-router/commit/a4b5500)) +* Deprecate public use of `$urlRouter` and `$urlMatcherFactory` in favor of `$urlService` ([6ee7f21](https://github.com/angular-ui/ui-router/commit/6ee7f21)) +* Move imperative `$resolve` service out of main bundle ([cae6d03](https://github.com/angular-ui/ui-router/commit/cae6d03)) +* remove component.json ([af736c4](https://github.com/angular-ui/ui-router/commit/af736c4)) +* Use angular 1.3+ `$templateRequest` service to fetch templates ([7e1f36e](https://github.com/angular-ui/ui-router/commit/7e1f36e)), closes [#3193](https://github.com/angular-ui/ui-router/issues/3193) [#1882](https://github.com/angular-ui/ui-router/issues/1882) +* **$uiRouter:** expose router instance at config-time as `$uiRouterProvider.router` ([9d2661c](https://github.com/angular-ui/ui-router/commit/9d2661c)) +* **injectables:** Expose `$uiRouterProvider`, `$uiRouterGlobals`, and `$stateRegistry` injectables ([7fa72a6](https://github.com/angular-ui/ui-router/commit/7fa72a6)) +* **ui-sref-active:** improve performance by reducing $watches ([126a4ad](https://github.com/angular-ui/ui-router/commit/126a4ad)) +* **ui-view:** Route-to-component: Wire component "&" bindings ([af95206](https://github.com/angular-ui/ui-router/commit/af95206)), closes [#3239](https://github.com/angular-ui/ui-router/issues/3239) [#3111](https://github.com/angular-ui/ui-router/issues/3111) +* **UrlService:** Create UrlService API (facade) for easier access to URL based APIs ([6ee7f21](https://github.com/angular-ui/ui-router/commit/6ee7f21)) +* **view:** A view without anything to render defaults to `` ([7d28fdd](https://github.com/angular-ui/ui-router/commit/7d28fdd)), closes [#3178](https://github.com/angular-ui/ui-router/issues/3178) +* **view:** Route a view to a directive using `componentProvider` ([#3165](https://github.com/angular-ui/ui-router/issues/3165)) ([090d2e3](https://github.com/angular-ui/ui-router/commit/090d2e3)) + + +### BREAKING CHANGES + +# BREAKING CHANGE: Deprecate public use of `$urlRouter` and `$urlMatcherFactory` in favor of `$urlService` + +The `UrlService` combines the commonly used URL APIs in a single place. +The service may be injected in a run block as `$urlService`, or in a config block as `$urlServiceProvider`. + +The service object has two nested API objects, `rules` and `config`. An example usage is `$urlService.rules.otherwise('/home')` + +The existing API for `$urlRouter` and `$urlMatcherFactory` will continue to function as before, but are now considered an "internal API".\ +The new `$urlService` is a facade which delegates to the appropriate internal APIs. + +# BREAKING CHANGE: Use angular 1.3+ `$templateRequest` service to fetch templates + +We now fetch templates using `$templateRequest` when it is available (angular 1.3+). +You can revert to previous template fetching behavior using `$http` by configuring the ui-router `$templateFactoryProvider`. + +```js +.config(function($templateFactoryProvider) { + $templateFactoryProvider.shouldUnsafelyUseHttp(true); +}); +``` + +There are security ramifications to using `$http` to fetch templates. +Read +[Impact on loading templates](https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates) +for more details + +# BREAKING CHANGE: Move imperative `$resolve` service out of main bundle + +The `$resolve` service's `.resolve()` method can be used to perform async dependency injection imperatively. + +The code has been moved out of the main angular-ui-router codebase and is now opt-in. +For prebuilt bundle users, add `release/legacy/resolveService.js` to your project. +For self-bundlers (e.g., webpack), add `angular-ui-router/lib/legacy/resolveService` as an `import` or `require()`. + +It's unlikely you use this service. +Its most common usage is with the UI-Bootstrap `$modal` service. + +# BREAKING CHANGE: remove component.json + + + + +## ui-router-core changes + +This release of angular-ui-router (1.0.0-rc.1) updates ui-router-core to 3.1.0 +These are the changes in ui-router-core from 1.0.0-beta.3 to 3.1.0 + +# [3.1.0](https://github.com/ui-router/core/compare/1.0.0-beta.3...3.1.0) (2017-01-09) + + +### Bug Fixes + +* **lazyLoad:** Sync by URL after nested lazy load triggered by URL ([1c6220c](https://github.com/ui-router/core/commit/1c6220c)) +* **lazyLoad:** Use UrlService.match() to retry url sync after successful lazy load triggered by url ([8c2461d](https://github.com/ui-router/core/commit/8c2461d)), closes [#19](https://github.com/ui-router/core/issues/19) +* **Ng1ViewDeclaration:** Make controllerProvider IInjectable ([#3056](https://github.com/ui-router/core/issues/3056)) ([a3136ae](https://github.com/ui-router/core/commit/a3136ae)), closes [#3044](https://github.com/ui-router/core/issues/3044) +* **ng2.uiSrefActive:** Allow ng-if on nested uiSrefs ([e3051f5](https://github.com/ui-router/core/commit/e3051f5)), closes [#3046](https://github.com/ui-router/core/issues/3046) +* **onBefore:** Skip remaining hooks after the ([#2](https://github.com/ui-router/core/issues/2)) ([8a45d04](https://github.com/ui-router/core/commit/8a45d04)) +* **param:** `params: { foo: { raw: true } }` overrides `ParamType.raw` ([aefeabf](https://github.com/ui-router/core/commit/aefeabf)) +* **Param:** Mark all query parameters as optional ([7334d98](https://github.com/ui-router/core/commit/7334d98)) +* **params:** Check for null in `int` param type `is()` check ([aa551e4](https://github.com/ui-router/core/commit/aa551e4)), closes [#3197](https://github.com/ui-router/core/issues/3197) +* **redirect:** Do not allow `onBefore` hooks to cause infinite redirect loops ([5c5f7eb](https://github.com/ui-router/core/commit/5c5f7eb)), closes [#6](https://github.com/ui-router/core/issues/6) +* **redirectTo:** Do not puke when redirectTo returns undefined ([bde9c0f](https://github.com/ui-router/core/commit/bde9c0f)) +* **redirectTo:** fix TS type signature of `redirectTo` ([2c059c4](https://github.com/ui-router/core/commit/2c059c4)) +* **StateQueueManager:** Compare parsed url parameters using typed parameters ([beca1f5](https://github.com/ui-router/core/commit/beca1f5)) +* **StateRegistry:** Fix error message: State '' is already defined ([f5bd96b](https://github.com/ui-router/core/commit/f5bd96b)) +* **StateService:** Compare typed parameters in .is() and .includes() ([b1a5155](https://github.com/ui-router/core/commit/b1a5155)) +* **TargetState:** Narrow `name()` return type to `String` ([a02f4a7](https://github.com/ui-router/core/commit/a02f4a7)) +* **Transition:** Use { location: replace } when redirecting a transtition in response to a URL sync ([23e2b78](https://github.com/ui-router/core/commit/23e2b78)) +* **typescript:** Emit TS 1.8 compatible .d.ts files ([65badf4](https://github.com/ui-router/core/commit/65badf4)) +* **typings:** Allow urlRouter.rule to return void ([0b78bdf](https://github.com/ui-router/core/commit/0b78bdf)) +* **ui-sref:** Use either .on or .bind for click handlers ([b00f044](https://github.com/ui-router/core/commit/b00f044)), closes [#3035](https://github.com/ui-router/core/issues/3035) +* **UrlRouter:** Use { location: 'replace' } whenever a url redirect happens ([6cf9b8f](https://github.com/ui-router/core/commit/6cf9b8f)) +* **UrlService:** Wire urlMatcherFactory and urlRouter functions ([a7b58d6](https://github.com/ui-router/core/commit/a7b58d6)) +* **vanilla:** vanilla locations: do not parse "empty string" query key parameter ([f949480](https://github.com/ui-router/core/commit/f949480)) +* **view:** Load view prerequisites in `onFinish` ([cc85e76](https://github.com/ui-router/core/commit/cc85e76)) +* **view.load:** Allow view.load to return synchronously ([8619cf9](https://github.com/ui-router/core/commit/8619cf9)) + + +### Features + +* (CoreServices) Move `location` and `locationConfig` from `services` to `UIRouter.locationService` and `UIRouter.locationConfig`. ([029fb00](https://github.com/ui-router/core/commit/029fb00)) +* Built-in `string` parameter type no longer encodes slashes as `~2F` nor tildes as `~~` ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* Create router.dispose() to dispose a router instance and resources. ([0690917](https://github.com/ui-router/core/commit/0690917)) +* Hook errors are all normalized to a "Rejection" type. To access the detail of the error thrown (`throw "Error 123"`), use `.detail`, i.e.: ([f486ced](https://github.com/ui-router/core/commit/f486ced)) +* Move `html5Mode` and `hashPrefix` from `LocationServices` to `LocationConfig` interface ([9d316a7](https://github.com/ui-router/core/commit/9d316a7)) +* move `ViewService.viewConfigFactory` and `rootContext` to `_pluginapi.*` ([65badf4](https://github.com/ui-router/core/commit/65badf4)) +* Move html5Mode and hashPrefix to LocationServices from LocationConfig ([f7ac2bb](https://github.com/ui-router/core/commit/f7ac2bb)) +* Order URL Matching Rules by priority, not registration order ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* Path/Query parameters no longer default to `string` param type ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* Previously, a state with a `lazyLoad` function was considered a future state. ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)) +* Remove `getResolveValue` and `getResolvable` methods from `Transition` in favor of `injector().get()` and `injector().getAsync()` ([111d259](https://github.com/ui-router/core/commit/111d259)) +* Replace `LocationServices.setUrl` with `LocationServices.url` ([4c39dcb](https://github.com/ui-router/core/commit/4c39dcb)) +* Replace UrlRouterProvider/UrlRouter with just UrlRouter ([fddd1e2](https://github.com/ui-router/core/commit/fddd1e2)) +* **assertMap:** Add a [].map() helper that asserts that each element is truthy ([f044f53](https://github.com/ui-router/core/commit/f044f53)) +* **futureState:** States with a `.**` name suffix (i.e., `foo.**`) are considered future states ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)) +* **hash:** Change the hash parameter type (`'#'`) to `inherit: false` so it is cleared out when another transition occurs. ([849f84f](https://github.com/ui-router/core/commit/849f84f)), closes [#3245](https://github.com/ui-router/core/issues/3245) [#3218](https://github.com/ui-router/core/issues/3218) [#3017](https://github.com/ui-router/core/issues/3017) +* **HookBuilder:** Allow custom hook types (to be defined by a plugin) ([3f146e6](https://github.com/ui-router/core/commit/3f146e6)) +* **lazyLoad:** Created `StateService.lazyLoad` method to imperatively lazy load a state ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)), closes [#8](https://github.com/ui-router/core/issues/8) +* **lazyLoad:** Exported/exposed the `lazyLoadState` function ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)) +* **lazyLoad:** the `lazyLoad` hook can be used to lazy load anything (component code, etc) ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)), closes [#4](https://github.com/ui-router/core/issues/4) +* **LocationServices:** Add a `parts()` method which returns the URL parts as an object ([32e64f0](https://github.com/ui-router/core/commit/32e64f0)) +* **onCreate:** Add onCreate transition hook ([f486ced](https://github.com/ui-router/core/commit/f486ced)) +* **params:** Add `path` and `query` param types ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* **params:** add option to use generic type for Transition.params ([#17](https://github.com/ui-router/core/issues/17)) ([eb12ec8](https://github.com/ui-router/core/commit/eb12ec8)), closes [#16](https://github.com/ui-router/core/issues/16) +* **Params:** Allow `inherit: false` specified per parameter or type ([849f84f](https://github.com/ui-router/core/commit/849f84f)) +* **plugin:** Allow all plugins to be gotted. ([e324973](https://github.com/ui-router/core/commit/e324973)) +* **plugin:** Allow registration by ES6 class, JS constructor fn, JS factory fn ([b9f4541](https://github.com/ui-router/core/commit/b9f4541)) +* **plugin:** Create plugin API ([36a5215](https://github.com/ui-router/core/commit/36a5215)), closes [#7](https://github.com/ui-router/core/issues/7) +* **Resolve:** implement NOWAIT policy: Do not wait for resolves before completing a transition. ([05d4c73](https://github.com/ui-router/core/commit/05d4c73)), closes [#3243](https://github.com/ui-router/core/issues/3243) [#2691](https://github.com/ui-router/core/issues/2691) +* **State:** add .parameters() option for filtering to matching keys ([beca1f5](https://github.com/ui-router/core/commit/beca1f5)) +* **transition:** Allow plugins to define own transition events like `onEnter` ([0dc2c19](https://github.com/ui-router/core/commit/0dc2c19)) +* **transition:** Create ([2673406](https://github.com/ui-router/core/commit/2673406)) +* **Transition:** Add Transition.originalTransition() to return the initial transition in a chain of redirects ([4fe39e3](https://github.com/ui-router/core/commit/4fe39e3)) +* **Transition:** Allow `injector()` to retrieve resolves for the exiting states/path ([df502e8](https://github.com/ui-router/core/commit/df502e8)) +* **Transition:** Allow a plain object `ResolvableLiteral` in `Transition.addResolvable` ([ad9ae81](https://github.com/ui-router/core/commit/ad9ae81)) +* **Transition:** Make Transition.params() immutable to avoid confusion about mutability ([0162212](https://github.com/ui-router/core/commit/0162212)) +* **Transition:** Support treechange paths in API for Resolve+transition ([beedc82](https://github.com/ui-router/core/commit/beedc82)) +* **UrlMatcher:** Add comparison function by UrlMatcher specificity ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* **UrlRouter:** sort url rules by specificity, not by registration order. ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* **UrlService:** allow eager or lazy binding of location objects during construction ([7e0a8af](https://github.com/ui-router/core/commit/7e0a8af)) +* **UrlServices:** Add `match()`: given a URL, return the best matching Url Rule ([32e64f0](https://github.com/ui-router/core/commit/32e64f0)) +* **vanilla:** Implement in-memory-only location api ([f64aace](https://github.com/ui-router/core/commit/f64aace)) + + +### BREAKING CHANGES + +# BREAKING CHANGE: Remove `getResolveValue` and `getResolvable` methods from `Transition` in favor of `injector().get()` and `injector().getAsync()` + +In beta.3, the Transition APIs: `injector()`, `getResolvable`, and `getResolveValue` duplicated functionality. + +Instead of: +```js +trans.getResolveValue('myResolve'); +``` +use: +```js +trans.injector().get('myResolve') +``` +# BREAKING CHANGE: Hook errors are all normalized to a "Rejection" type. To access the detail of the error thrown (`throw "Error 123"`), use `.detail`, i.e.: +### Before +```js +$state.go('foo').catch(err => { if (err === "Error 123") .. }); +``` +### New way +```js +$state.go('foo').catch(err => { if (err.detail === "Error 123") .. }); +``` +# BREAKING CHANGE: Replace `LocationServices.setUrl` with `LocationServices.url` + +This makes `url()` a getter/setter. It also adds the optional `state` parameter to pass through to the browser history when using pushstate. +End users should not notice this change, but plugin authors may. +# BREAKING CHANGE: Replace UrlRouterProvider/UrlRouter with just UrlRouter + +The configuration functions from the provider object have been integrated into the normal UrlRouter object. +The `UIRouter` object no longer has a `uriRouterProvider`, but the equivalent functions can be found on `uiRouter` + +One difference between the old functions on `urlRouterProvider` and the new ones on `uriRouter` is that new functions do not accept injectable functions. +# BREAKING CHANGE: Built-in `string` parameter type no longer encodes slashes as `~2F` nor tildes as `~~` + +Previously, the `string` parameter type pre-encoded tilde chars (`~`) as two tilde chars (`~~`) and slashes (`/`) as `~2F`. + +Now, the `string` parameter type does not pre-encode slashes nor tildes. +If you rely on the previous encoding, create a custom parameter type that implements the behavior: + +```js +urlMatcherFactory.type('tildes', { + encode: (val: any) => + val != null ? val.toString().replace(/(~|\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val; + decode: (val: string) => + val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val; + pattern: /[^/]*/ +}); +``` +# BREAKING CHANGE: Path/Query parameters no longer default to `string` param type + +Previously, if a url parameter's type was not specified (in either the path or query), it defaulted to the `string` type. + +Now, path parameters default to the new `path` type and query parameters default to the new `query` type. + +**In Angular 1 only**, the new `path` parameter type retains the old behavior of pre-encoding `~` to `~~` and `/` to `~2F` +# BREAKING CHANGE: Order URL Matching Rules by priority, not registration order + +URL Rules can come from registered states' `.url`s, calling `.when()`, or calling `.rule()`. +It's possible that two or more URL Rules could match the URL. + +### Previously + +Previously, url rules were matched in the order in which they were registered. +The rule which was registered first would handle the URL change. + +### Now + +Now, the URL rules are sorted according to a sort function. +More specific rules are preferred over less specific rules + +### Why + +It's possible to have multiple url rules that match a given URL. +Consider the following states: + + - `{ name: 'books', url: '/books/index' }''` + - `{ name: 'book', url: '/books/:bookId' }''` + +Both states match when the url is `/books/index`. +Additionally, you might have some custom url rewrite rules such as: + + `.when('/books/list', '/books/index')`. + +The `book` state also matches when the rewrite rule is matched. + +Previously, we simply used the first rule that matched. However, now that lazy loading is officially supported, it can be difficult for developers to ensure the rules are registered in the right order. + +Instead, we now prioritize url rules by how specific they are. More specific rules are matched earlier than less specific rules. +We split the path on `/`. A static segment (such as `index` in the example) is more specific than a parameter (such as`:bookId`). + +### More Details + +The built-in rule sorting function (see `UrlRouter.defaultRuleSortFn`) sorts rules in this order: + +- Explicit priority: `.when('/foo', '/bar', { priority: 1 })` (default priority is 0) +- Rule Type: + - UrlMatchers first (registered states and `.when(string, ...)`) + - then regular Expressions (`.when(regexp, ...)`) + - finally, everything else (`.rule()`) +- UrlMatcher specificity: static path segments are more specific than variables (see `UrlMatcher.compare`) +- Registration order (except for UrlMatcher based rules) + +For complete control, a custom sort function can be registered with `UrlService.rules.sort(sortFn)` + +### Query params + +Because query parameters are optional, they are not considered during sorting. +For example, both these rules will match when the url is `'/foo/bar'`: + +``` +.when('/foo/bar', doSomething); +.when('/foo/bar?queryparam', doSomethingElse); +``` + +To choose the most specific rule, we match both rules, then choose the rule with the "best ratio" of matched optional parameters (see `UrlRuleFactory.fromUrlMatcher`) + +This allows child states to be defined with only query params for a URL. +The state only activates when the query parameter is present. + +``` +.state('parent', { url: '/parent' }); +.state('parent.child', { url: '?queryParam' }); +``` + +## Restoring the previous behavior + +For backwards compatibility, register a sort function which sorts by the registration order: + +```js +myApp.config(function ($urlServiceProvider) { + + function sortByRegistrationOrder(a, b) { + return a.$id - b.$id; + } + + $urlServiceProvider.rules.sort(sortByRegistrationOrder); + +}); +``` +# BREAKING CHANGE: Move `html5Mode` and `hashPrefix` from `LocationServices` to `LocationConfig` interface + +### End users should not notice + +# BREAKING CHANGE: move `ViewService.viewConfigFactory` and `rootContext` to `_pluginapi.*` +This BC happened in commit 6c42285 + +# BREAKING CHANGE: Move html5Mode and hashPrefix to LocationServices from LocationConfig + +# BREAKING CHANGE: Previously, a state with a `lazyLoad` function was considered a future state. +Now, a state whose name ends with `.**` (i.e., a glob pattern which matches all children) is a future state. + +### All future states should be given a name that ends in `.**`. + +Change your future states from: +``` +{ name: 'future', url: '/future', lazyLoad: () => ... } +``` +to: +``` +{ name: 'future.**', url: '/future', lazyLoad: () => ... } +``` +# BREAKING CHANGE: (CoreServices) Move `location` and `locationConfig` from `services` to `UIRouter.locationService` and `UIRouter.locationConfig`. + +The core `services` object is a mutable object which each framework was monkey patching. +This change removes the requirement to monkey patch a global mutable object. +Instead, framework implementors should pass the `LocationServices` and `LocationConfig` implementations into the `UIRouter` constructor. + +### End Users + +End users who were accessing `services.location` or `services.locationConfig` should access these off the `UIRouter` instance instead. + + + + + + +# [1.0.0-beta.3 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-beta.2...1.0.0-beta.3) (2016-09-23) + +[Read more on the blog](https://ui-router.github.io/blog/uirouter-1.0.0-beta.3/) + +This release adds Angular 2.0.0 final support. +It changes the NgModule mechanism to use `UIRouterModule.forRoot()` and `UIRouterModule.forChild()`. +See the blog and the breaking changes section. + +### Bug Fixes + +This release fixes bugs for both ng1 and ng2 + +* **common:** Remove `url()` from LocationService interface ([#2990](https://github.com/angular-ui/ui-router/issues/2990)) ([d6c2580](https://github.com/angular-ui/ui-router/commit/d6c2580)) +* **lazyLoad:** Always delete the lazy load promise after it settles. ([dd2f101](https://github.com/angular-ui/ui-router/commit/dd2f101)) +* **ng1.StateProvider:** Export StateProvider class so type can be used ([167770d](https://github.com/angular-ui/ui-router/commit/167770d)) +* **ng1.uiView:** Remove deprecated jquery functions bind/unbind in favor of on/off ([60ebd44](https://github.com/angular-ui/ui-router/commit/60ebd44)) +* **ng2:** Angular 2.0.0 final compatibility ([7c54b75](https://github.com/angular-ui/ui-router/commit/7c54b75)), closes [#2991](https://github.com/angular-ui/ui-router/issues/2991) +* **ng2.NgModule:** Allow apps with no forChild modules ([d3bd332](https://github.com/angular-ui/ui-router/commit/d3bd332)), closes [#3009](https://github.com/angular-ui/ui-router/issues/3009) +* **ng2.uiView:** Use ReflectorReader to get component inputs +* **resolve:** Don't re-resolve data when redirected to same state, but only dynamic params changed. ([98cd2d2](https://github.com/angular-ui/ui-router/commit/98cd2d2)), closes [#3033](https://github.com/angular-ui/ui-router/issues/3033) +* **trace:** Show function definition during logging of trace.enable('HOOK') ([190d122](https://github.com/angular-ui/ui-router/commit/190d122)) +* **transition:** Fail a transition if a new one has started while resolves are loading ([bc87d9e](https://github.com/angular-ui/ui-router/commit/bc87d9e)), closes [#2972](https://github.com/angular-ui/ui-router/issues/2972) +* **urlMatcherFactory:** fix tilde edge case with "string" encoding ([#3018](https://github.com/angular-ui/ui-router/issues/3018)) ([a201906](https://github.com/angular-ui/ui-router/commit/a201906)) +* **viewService:** Allow root ui-view to be wrapped in ng-if ([32f718a](https://github.com/angular-ui/ui-router/commit/32f718a)), closes [#3004](https://github.com/angular-ui/ui-router/issues/3004) + +### Features + +* **StateBuilder:** Calculate parent state name when ends in two wildcards `**` ([b4621f3](https://github.com/angular-ui/ui-router/commit/b4621f3)) + + +### BREAKING CHANGES + +#### BC in Core +* Remove `UIInjector.native` infavor of `UIInjector.getNative()` ([d11b7dc](https://github.com/angular-ui/ui-router/commit/d11b7dc)) +* Remove `stateProvider` from ui-router-core. Use `stateRegistry` and `stateService` in 88c6494 +* We now enforce states with an explicit `parent:` may NOT ALSO specify a parent state in their name (i.e., `parent.child`) + +#### BC in Angular 2 + +Major breaking changes for Angular 2 bootstrap between beta.2 and beta.3 + +- Removed `@UIRouterModule` decorator. +- Added `UIRouterModule.forRoot()` and `UIRouterModule.forChild()` factory methods +- See https://ui-router.github.io/docs/latest/classes/ng2.uiroutermodule.html + +@NgModule({ + imports: [ + UIRouterModule.forRoot({ + states: INITIAL_STATES, + useHash: true, + configClass: MyUIRouterConfig + }), + BrowserModule, + FeatureModule, + ], + declarations: INITIAL_COMPONENTS +}) +class RootAppModule {} + +@NgModule({ + imports: [ + UIRouterModule.forChild({ + states: FEATURE_STATES, + configClass: FeatureConfig + }), + CommonModule, + ], + declarations: FEATURE_COMPONENTS +}) + + + +# [1.0.0-beta.2 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-beta.1...1.0.0-beta.2) (2016-09-09) + +[Read more on the blog](https://ui-router.github.io/blog/uirouter-1.0.0-beta.2/) + +### Features + +#### Core + +* **lazyLoad:** Add state.lazyLoad hook to lazy load a tree of states ([bef5257](https://github.com/angular-ui/ui-router/commit/bef5257)) ([8ecb6c6](https://github.com/angular-ui/ui-router/commit/8ecb6c6)), closes [#146](https://github.com/angular-ui/ui-router/issues/146) [#2739](https://github.com/angular-ui/ui-router/issues/2739) +* **StateRegistry:** Add `deregister` method. ([44579ec](https://github.com/angular-ui/ui-router/commit/44579ec)), closes [#1095](https://github.com/angular-ui/ui-router/issues/1095) [#2711](https://github.com/angular-ui/ui-router/issues/2711) +* **redirectTo:** Process `redirectTo` property of a state as a redirect string/object/hook function ([6becb12](https://github.com/angular-ui/ui-router/commit/6becb12)), closes [#27](https://github.com/angular-ui/ui-router/issues/27) [#948](https://github.com/angular-ui/ui-router/issues/948) +* **redirect:** Error after 20+ redirected transitions ([88052bf](https://github.com/angular-ui/ui-router/commit/88052bf)) +* **rejectFactory:** separate transition aborted and transition errored reject types ([55995fd](https://github.com/angular-ui/ui-router/commit/55995fd)) +* **Resolve:** support ng2-like provide object literals ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Resolve:** Switch state.resolve to be an array of Resolvables ([6743a60](https://github.com/angular-ui/ui-router/commit/6743a60)) +* **Transition:** Add the transition source (url/sref) to TransitionOptions ([5d42d79](https://github.com/angular-ui/ui-router/commit/5d42d79)) +* **Transition:** Added `getResolvable(token)` method ([3aee2b7](https://github.com/angular-ui/ui-router/commit/3aee2b7)) +* **Transition:** expose the current `UiRouter` object as a public property ([52f1308](https://github.com/angular-ui/ui-router/commit/52f1308)) +* **Transition:** expose the transition rejection reason as `Transition.error()` ([7a9e383](https://github.com/angular-ui/ui-router/commit/7a9e383)), closes [#2866](https://github.com/angular-ui/ui-router/issues/2866) +* **Transition:** Expose the transition's TargetState as targetState() ([f06f6b6](https://github.com/angular-ui/ui-router/commit/f06f6b6)) +* **urlRouter:** Allow a rule to be deleted. ([55f3d3d](https://github.com/angular-ui/ui-router/commit/55f3d3d)) + +#### ng2 +* **ng2.rx:** Added RxJS Observables for transitions and states: ([2a2f381](https://github.com/angular-ui/ui-router/commit/2a2f381)) +* **ng2:** Add [@UIRouterModule](https://github.com/UIRouterModule) decorator ([e7bedc2](https://github.com/angular-ui/ui-router/commit/e7bedc2)), closes [#2922](https://github.com/angular-ui/ui-router/issues/2922) +* **ng2:** Improve ng2 bootstrap flexibility with provideUIRouter() provider factory function ([bc17066](https://github.com/angular-ui/ui-router/commit/bc17066)), closes [#2958](https://github.com/angular-ui/ui-router/issues/2958) +* **ng2.UrlRouter:** Implement { location: replace } ([b8c6146](https://github.com/angular-ui/ui-router/commit/b8c6146)), closes [#2850](https://github.com/angular-ui/ui-router/issues/2850) +* **ng2.NgModule:** Add module's states to DI using UIROUTER_STATES_TOKEN ([0cb628e](https://github.com/angular-ui/ui-router/commit/0cb628e)) +* **ng2.stateRegistry:** Automatically register states defined on a UIRouterModule ([58a3c84](https://github.com/angular-ui/ui-router/commit/58a3c84)) +* **ng2.UIView:** Use merged NgModule/ParentComp to inject routed component ([37241e7](https://github.com/angular-ui/ui-router/commit/37241e7)) +* **ng2.upgrade:** Enable ng1-to-ng2 ([0bf4eb4](https://github.com/angular-ui/ui-router/commit/0bf4eb4)) +* **uiView:** Support Components loaded via AppModule ([696148f](https://github.com/angular-ui/ui-router/commit/696148f)) + + +### Bug Fixes + +#### Core + +* **defaultErrorHandler:** Invoke handler when a transition is Canceled. ([4fcccd8](https://github.com/angular-ui/ui-router/commit/4fcccd8)), closes [#2924](https://github.com/angular-ui/ui-router/issues/2924) +* **defaultErrorHandler:** log Error and Error.stack by default ([e102a85](https://github.com/angular-ui/ui-router/commit/e102a85)) +* **defaultErrorHandler:** Reduce console.error noise when redirected ([8c0344f](https://github.com/angular-ui/ui-router/commit/8c0344f)) +* **common:** Add concrete import to interface.ts to fix unit tests ([2d16740](https://github.com/angular-ui/ui-router/commit/2d16740)) +* **redirect:** fix bug where redirected transitions with reload: true got wrong resolve values copied ([bd0e3a3](https://github.com/angular-ui/ui-router/commit/bd0e3a3)) +* **redirectTo:** fix redirectTo definition (interface) ([eff7195](https://github.com/angular-ui/ui-router/commit/eff7195)), closes [#2871](https://github.com/angular-ui/ui-router/issues/2871) +* **Rejection:** Silence "Error: Uncaught (in Exception)" ([38432f4](https://github.com/angular-ui/ui-router/commit/38432f4)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **Resolve:** prevent RXWAIT from waiting for the observable to complete ([a02caf3](https://github.com/angular-ui/ui-router/commit/a02caf3)) +* **ResolvePolicy:** Fix resolve policy config loading ([4440811](https://github.com/angular-ui/ui-router/commit/4440811)), closes [#2945](https://github.com/angular-ui/ui-router/issues/2945) +* **stateService:** change reloadState parameter in reload function is optional ([#2973](https://github.com/angular-ui/ui-router/issues/2973)) ([839dc4a](https://github.com/angular-ui/ui-router/commit/839dc4a)) +* **StateService:** remove jQuery deprecated feature ([fa40acc](https://github.com/angular-ui/ui-router/commit/fa40acc)) +* **trace:** make TRANSITION trace less noisy when a transition is redirected ([a65c58f](https://github.com/angular-ui/ui-router/commit/a65c58f)) +* **Trace:** Fix error in console after $trace.enable() ([013c77a](https://github.com/angular-ui/ui-router/commit/013c77a)), closes [#2752](https://github.com/angular-ui/ui-router/issues/2752) +* **transitionHook:** Prevent queued hookFn to be called if deregistered ([#2939](https://github.com/angular-ui/ui-router/issues/2939)) ([39e1ba7](https://github.com/angular-ui/ui-router/commit/39e1ba7)), closes [#2928](https://github.com/angular-ui/ui-router/issues/2928) +* **typescript:** Make UI-Router `noImplicitAny` safe. ([0769bc2](https://github.com/angular-ui/ui-router/commit/0769bc2)), closes [#2693](https://github.com/angular-ui/ui-router/issues/2693) +* **typescript:** Remove angular1 specific types from ui-router-core methods ([30124bd](https://github.com/angular-ui/ui-router/commit/30124bd)), closes [#2693](https://github.com/angular-ui/ui-router/issues/2693) + + +#### ng1 + +* **ng1.stateService:** Coerce 'null' `params` value to empty object ([f674151](https://github.com/angular-ui/ui-router/commit/f674151)), closes [#2952](https://github.com/angular-ui/ui-router/issues/2952) +* **ng1.uiSref:** Allow nested UISrefs by stopping event propagation on-click ([b4a2499](https://github.com/angular-ui/ui-router/commit/b4a2499)), closes [#2962](https://github.com/angular-ui/ui-router/issues/2962) +* **ng1.uiSrefActive:** update sref-active after existing transition-in-progress completes ([0994c71](https://github.com/angular-ui/ui-router/commit/0994c71)), closes [#2908](https://github.com/angular-ui/ui-router/issues/2908) +* **uiSref, uiState:** added click unbind to prevent memory leaks ([79d501e](https://github.com/angular-ui/ui-router/commit/79d501e)) +* **uiView:** separate $uiView and $uiViewAnim element.data() ([a94117d](https://github.com/angular-ui/ui-router/commit/a94117d)), closes [#2763](https://github.com/angular-ui/ui-router/issues/2763) + +#### ng2 + +* **ng2.pushState:** Properly match urls when base path set ([b9be2dc](https://github.com/angular-ui/ui-router/commit/b9be2dc)), closes [#2745](https://github.com/angular-ui/ui-router/issues/2745) +* **ng2.UIRouterConfig:** Allow new UIRouter() to finish before configuring it ([a151f71](https://github.com/angular-ui/ui-router/commit/a151f71)) +* **ng2.uiSrefActive:** Allow uiSrefActive on ancestor element. ([874fc07](https://github.com/angular-ui/ui-router/commit/874fc07)), closes [#2950](https://github.com/angular-ui/ui-router/issues/2950) +* **ng2.uiSrefActive:** don't puke on sref to invalid target state ([c9b6570](https://github.com/angular-ui/ui-router/commit/c9b6570)) +* **ng2.UISrefActive:** Use [@ContentChildren](https://github.com/ContentChildren) to query for the nested UISref ([999c42a](https://github.com/angular-ui/ui-router/commit/999c42a)), closes [#2950](https://github.com/angular-ui/ui-router/issues/2950) +* **ng2.UiView:** fix input resolve binding ([4f53f81](https://github.com/angular-ui/ui-router/commit/4f53f81)) +* **ng2.UIView:** Make routed to component appear *inside* UIView, not next to it. ([558fc80](https://github.com/angular-ui/ui-router/commit/558fc80)) + +### BREAKING CHANGES: + +1) State Glob patterns have been changed slightly. + +Previously, a single wildcard `foo.*` could match "missing segments" on the end of a state name. +For example, `foo.*` would match the state `foo`. +Likewise, `foo.*.*.*` would also match the `foo` state. + +Now, a single wildcard matches exactly one segment. +`foo.*` will match `foo.bar` and `foo.baz`, but neither `foo` nor `foo.bar.baz`. + +If you previously relied on the single wildcard to match missing segments, use a double wildcard, `foo.**`. + +Double wildcards match 0 or more segments. + +[Read more about Glob matching](https://ui-router.github.io/docs/latest/classes/common.glob.html) + +2) (obscure) Angular 1 DI token `ng1UIRouter` renamed to `$uiRouter` + +3) (obscure) Renamed `Transition.previous()` to `Transition.redirectedFrom()` + + + +# [1.0.0-beta.1 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.5...1.0.0-beta.1) (2016-06-30) + +# UI-Router 1.0 is in beta + +## UI-Router has a new home! + +https://ui-router.github.io/new-ui-router-site/ + + +# BREAKING CHANGES + +These breaking changes are for users upgrading from a previous alpha, not from 0.x legacy series. +This list is extensive, but typical users won't be affected by most of these changes. + +The most common breaks will be #1 and #2 + +1) BC-BREAK: renamed all Ui* (lowercase 'i') symbols to UI* (uppercase 'I') for more consistent naming. + - UiView -> UIView + - UiSref -> UISref (and related directives) + - UiInjector -> UIInjector + +2) BC-BREAK: Transition Hooks are no longer injected (onBefore/onStart/onExit/onRetain/onEnter/onFinish/onSuccess/onError) + + Previously, a hook like `['$state', ($state) => $state.target('foo')]` would get `$state` injected. + Now, all hooks receive two parameters: + - transition: the current Transition, which has an `injector()` function + - state: for onEnter/onRetain/onExit hooks only, the State which the hook is being run for. This value will be null for onBefore/onStart/onFinish/onSuccess/onError hooks. + + Refactor your hooks + from: `['$state', 'mySvc', ($state, mySvc) => mySvc.foo() ? $state.target('foo')] : true` + to: `(trans) => trans.injector().get('mySvc').foo() ? trans.router.stateService.target('foo') : true` + + Note: for backwards compatiblity, angular 1 onEnter/onExit/onRetain hooks are still injected + +3) BC-BREAK: - The (internal API) State object's .resolve property is now an array of Resolvables, built from your state definitions by the StateBuilder + +4) BC-BREAK: - Removed the default resolve called `$resolve$`, which was added in a previous alpha + +5) BC-BREAK: - `Transition.addResolves()`  replaced with `Transition.addResolvable()` + +6) BC-BREAK: remove `ResolveContext.getResolvables()` in favor of `.getToken()`` and `.getResolvable()` + +7) BC-BREAK: remove `ResolveContext.invokeLater()` and `.invokeNow()` + +8) BC-BREAK: remove support for `JIT` resolves. This also eliminated the need for the `loadAllControllerLocals` hook which was also removed + +9) BC-BREAK: Replaced `ViewConfig.node` with `ViewConfig.path`. Angular 1's `$(element).data('$uiView')` is affected. + Previously the .node was the node for the view. Now the last element in the path is the node for the view. + +10) BC-BREAK: Nodes no longer have (stateful) `.resolveContext` properties. Instead, a new ResolveContext is wrapped over a Path of Nodes.  Removed `PathFactory.bindResolveContexts()`. + +11) BC-BREAK: ResolveContext.resolvePath returns a promise for resolved data as an array of tuples, instead of a promise for an object of resolved data.  Removed `ResolveContext.resolvePathElement()`. + +12) BC-BREAK: Removed ResolvePolicy enum in favor of the ResolvePolicy interface `{ when: "", async: "" }` + +13) BC-BREAK: renamed `ResolveContext.isolateRootTo` to `subContext` + +14) BC-BREAK: rename `UIRouterGlobals` class to `Globals`; add `UIRouterGlobals` back as an interface + +15) BC-BREAK: Moved `defaultErrorHandler` from `TransitionService` to `StateService` + + + + +### Features + +* **Resolve:** Switch state.resolve to be an array of Resolvables ([6743a60](https://github.com/angular-ui/ui-router/commit/6743a60)) +* **Resolve:** support ng2-like provide object literals. Support injection of arbitrary tokens, not just strings. ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Resolve:** support ng2-like provide object literals ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Transition:** expose the current `UiRouter` object as a public property ([52f1308](https://github.com/angular-ui/ui-router/commit/52f1308)) +* **redirectTo:** Process `redirectTo` property of a state as a redirect string/object/hook function ([6becb12](https://github.com/angular-ui/ui-router/commit/6becb12)), closes [#27](https://github.com/angular-ui/ui-router/issues/27) [#948](https://github.com/angular-ui/ui-router/issues/948) +* **rejectFactory:** separate transition aborted and transition errored reject types ([55995fd](https://github.com/angular-ui/ui-router/commit/55995fd)) +* **ParamType:** allow a custom parameter Type to specify a default value for a parameter's `dynamic` property +* **Resolvable:** Added a new Resolve Policy 'RXWAIT'. If an Observable is returned, pass the observable as the value, but also wait for it to emit its first value + +### Bug Fixes + +* **ng2.pushState:** Properly match urls when base path set ([b9be2dc](https://github.com/angular-ui/ui-router/commit/b9be2dc)), closes [#2745](https://github.com/angular-ui/ui-router/issues/2745) +* **ng2.UIRouterConfig:** Allow new UIRouter() to finish before configuring it ([a151f71](https://github.com/angular-ui/ui-router/commit/a151f71)) +* **ng2.UiView:** fix input resolve binding ([4f53f81](https://github.com/angular-ui/ui-router/commit/4f53f81)) +* **ng2.UIView:** Make routed to component appear *inside* UIView, not next to it. ([558fc80](https://github.com/angular-ui/ui-router/commit/558fc80)) +* **redirect:** fix bug where redirected transitions with reload: true got wrong resolve values copied ([bd0e3a3](https://github.com/angular-ui/ui-router/commit/bd0e3a3)) +* **Rejection:** Silence "Error: Uncaught (in Exception)" ([38432f4](https://github.com/angular-ui/ui-router/commit/38432f4)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **Trace:** Fix error in console after $trace.enable() ([013c77a](https://github.com/angular-ui/ui-router/commit/013c77a)), closes [#2752](https://github.com/angular-ui/ui-router/issues/2752) +* **ng2.UIView:** Trigger change detection once for routed components + + + + + +# [1.0.0-alpha.5 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.4...1.0.0-alpha.5) (2016-05-13) + + +### Bug Fixes + +## Core +* **attachRoute:** Do not update URL after syncing from url([8742511](https://github.com/angular-ui/ui-router/commit/8742511)), closes [#2730](https://github.com/angular-ui/ui-router/issues/2730) +* **common:** only use window if available([32ff988](https://github.com/angular-ui/ui-router/commit/32ff988)) +* **coreservices:** Use Promise.reject()/resolve()/all()([62b2ebc](https://github.com/angular-ui/ui-router/commit/62b2ebc)), closes [#2683](https://github.com/angular-ui/ui-router/issues/2683) +* **paramTypes.hash:** Update hash for each transition([79d4fd7](https://github.com/angular-ui/ui-router/commit/79d4fd7)), closes [#2742](https://github.com/angular-ui/ui-router/issues/2742) +* **Rejection:** Dont log an ignored trans as console.error([7522c26](https://github.com/angular-ui/ui-router/commit/7522c26)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **resolve:** Fix regression; Allow resolve values to be service names([a34fd3b](https://github.com/angular-ui/ui-router/commit/a34fd3b)), closes [#2588](https://github.com/angular-ui/ui-router/issues/2588) +* **StateQueueManager:** Do not throw on orphan states.([95ae0cf](https://github.com/angular-ui/ui-router/commit/95ae0cf)), closes [#2546](https://github.com/angular-ui/ui-router/issues/2546) +* **TransitionManager:** Update url even when the Transition is ignored.([f9c3e3c](https://github.com/angular-ui/ui-router/commit/f9c3e3c)), closes [#2723](https://github.com/angular-ui/ui-router/issues/2723) + +## ng1 +* **ng1.component:** Allow route-to-component "@" and optional bindings([71b3393](https://github.com/angular-ui/ui-router/commit/71b3393)), closes [#2708](https://github.com/angular-ui/ui-router/issues/2708) +* **view:** only run ng1 route-to-component code if component: is a string([ec1c534](https://github.com/angular-ui/ui-router/commit/ec1c534)) + +## ng2 +* **ng2.uiSrefStatus:** Avoid "dehydrated detector" error([9111727](https://github.com/angular-ui/ui-router/commit/9111727)), closes [#2684](https://github.com/angular-ui/ui-router/issues/2684) +* **ng2.uiView:** Fix "Invalid left-hand in assignment"([3f711a1](https://github.com/angular-ui/ui-router/commit/3f711a1)) +* **build:** declare external dep on `angular/core` in webpack bundle([adfbde3](https://github.com/angular-ui/ui-router/commit/adfbde3)), closes [#2687](https://github.com/angular-ui/ui-router/issues/2687) + + + +### Features + +## ng2 +* **ng2.uiView:** bind resolve data to input[] and [@Input](https://github.com/Input)(), process bindings:([f6dae28](https://github.com/angular-ui/ui-router/commit/f6dae28)) +* **ng2.urlRouter:** HTML5 PushState support([9842fb7](https://github.com/angular-ui/ui-router/commit/9842fb7)), closes [#2688](https://github.com/angular-ui/ui-router/issues/2688) +* **ng2.UIRouter:** update to ng2 beta.17([45c0758](https://github.com/angular-ui/ui-router/commit/45c0758)) +* **ng2.UIRouter:** Update ui-router for ng2 rc.1([3219406](https://github.com/angular-ui/ui-router/commit/3219406)), closes [#2722](https://github.com/angular-ui/ui-router/issues/2722) + + + + +# [1.0.0-alpha.4 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.3...1.0.0-alpha.4) (2016-04-06) + +### Bug Fixes + +* **ng2.uiView:** Fix "Invalid left-hand in assignment" ([3f711a1](https://github.com/angular-ui/ui-router/commit/3f711a1)) +* **view:** only run ng1 route-to-component code if component: is a string ([ec1c534](https://github.com/angular-ui/ui-router/commit/ec1c534)) + +### Features + +* **uiView:** add support for hybrid ng1/ng2 ui-router apps via ng-upgrade and http://github.com/ui-router/ng1-to-ng2 +* **ng2.uiView:** bind resolve data to input[] and @Input(), process bindings: ([f6dae28](https://github.com/angular-ui/ui-router/commit/f6dae28)) + + + + +# [1.0.0-alpha.2](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.1...v1.0.0-alpha.2) (2016-04-03) + +Changes between 1.0.0-alpha.1 and 1.0.0-alpha.2 + +## Angular 2 +This is the first release with angular 2 support. See http://github.com/ui-router/quickstart-ng2 for a small ui-router-ng2 app + +### Bug Fixes + +* **ViewHooks:** Avoid calling $onInit if angular 1.5 will call it for us ([d42b617](https://github.com/angular-ui/ui-router/commit/d42b617)), closes [#2660](https://github.com/angular-ui/ui-router/issues/2660) +* **ViewHooks:** Fix problem with injecting uiCanExit ([76ab22d](https://github.com/angular-ui/ui-router/commit/76ab22d)), closes [#2661](https://github.com/angular-ui/ui-router/issues/2661) +* **view:** temporary sanity check that a node exists ([1c0edeb](https://github.com/angular-ui/ui-router/commit/1c0edeb)), closes [#2657](https://github.com/angular-ui/ui-router/issues/2657) +* **justjs.$q:** Fix $q.all([..]) and $q.all({...}) ([b1624c6](https://github.com/angular-ui/ui-router/commit/b1624c6)) +* **ng2.uiSref:** Fix anchor href generation ([98b5b42](https://github.com/angular-ui/ui-router/commit/98b5b42)) +* **ng2.uiSrefStatus:** calculate target state parameters ([46cdf4c](https://github.com/angular-ui/ui-router/commit/46cdf4c)) +* **ng2.uiView:** Dispose prev comp on empty viewconfig ([f28e0c3](https://github.com/angular-ui/ui-router/commit/f28e0c3)) + +### Features + +* **UIRouterConfig:** Define UIRouterConfig class for router bootstrap ([c16b9e6](https://github.com/angular-ui/ui-router/commit/c16b9e6)) +* **UIRouterGlobals:** Create UIRouterGlobals ([0eb7406](https://github.com/angular-ui/ui-router/commit/0eb7406)), closes [#2525](https://github.com/angular-ui/ui-router/issues/2525) +* **ui-router-ng2:** Update providers and viewsBuilder to match new 1.0 API ([ff54d61](https://github.com/angular-ui/ui-router/commit/ff54d61)) +* **ng2.uiSrefActive:** Implement uiSrefStatus, uiSrefActive, uiSrefActiveEq ([fcb15c5](https://github.com/angular-ui/ui-router/commit/fcb15c5)) + + + + +# [1.0.0-alpha.1 commits](https://github.com/angular-ui/ui-router/compare/1.0.0alpha0...1.0.0-alpha.1) (2016-03-27) + +## We will maintain a list of [Known BC from 0.2.x to 1.0 final](https://github.com/angular-ui/ui-router/issues/2219) to help people upgrade to the 1.0 release. + +## Bug fixes and features since 1.0.0alpha0 + +### Bug Fixes + +* **date:** Compare dates only using year, month, date ([7a68ade](https://github.com/angular-ui/ui-router/commit/7a68ade)), closes [#2484](https://github.com/angular-ui/ui-router/issues/2484) +* **params:** Clone all properties of a Node. Introduce applyRawParams() ([88c624d](https://github.com/angular-ui/ui-router/commit/88c624d)) +* **RejectFactory:** stringify rejections with circular dependency-aware stringify ([199db79](https://github.com/angular-ui/ui-router/commit/199db79)), closes [#2538](https://github.com/angular-ui/ui-router/issues/2538) +* **src/resolve:** use injector's strictDi value in calls to .annotate ([4c5b5d8](https://github.com/angular-ui/ui-router/commit/4c5b5d8)) +* **stateQueueManager:** Use `location: true` for url-matched transitions ([25e0c04](https://github.com/angular-ui/ui-router/commit/25e0c04)), closes [#2455](https://github.com/angular-ui/ui-router/issues/2455) +* **stateService:** Process reload: in the StateService.target() ([081da32](https://github.com/angular-ui/ui-router/commit/081da32)), closes [#2537](https://github.com/angular-ui/ui-router/issues/2537) +* **Transition:** Do not reuse resolves for reloaded state during redirect ([0c123c3](https://github.com/angular-ui/ui-router/commit/0c123c3)), closes [#2539](https://github.com/angular-ui/ui-router/issues/2539) +* **Transition:** Reject Transition promise when onBefore error ([4b6d56f](https://github.com/angular-ui/ui-router/commit/4b6d56f)), closes [#2561](https://github.com/angular-ui/ui-router/issues/2561) +* **Transition:** Reset URL to current state after aborted transition ([3a1308b](https://github.com/angular-ui/ui-router/commit/3a1308b)), closes [#2611](https://github.com/angular-ui/ui-router/issues/2611) +* **transition/transitionService:** uses console.error to log error in default error handler ([43a8fc5](https://github.com/angular-ui/ui-router/commit/43a8fc5)) +* **ui-sref:** update ui-sref-active/eq info when params change ([dcbaebf](https://github.com/angular-ui/ui-router/commit/dcbaebf)), closes [#2554](https://github.com/angular-ui/ui-router/issues/2554) +* **ui-state:** update ui-sref-active/eq info ([025ebc8](https://github.com/angular-ui/ui-router/commit/025ebc8)), closes [#2488](https://github.com/angular-ui/ui-router/issues/2488) +* **UrlMatcher:** Format parent/child UrlMatchers properly ([86e07ef](https://github.com/angular-ui/ui-router/commit/86e07ef)), closes [##2504](https://github.com/#/issues/2504) +* **UrlMatcher:** isOptional always false for empty parameter ([4e85db4](https://github.com/angular-ui/ui-router/commit/4e85db4)) + +### Features + +* **params:** Add uiOnParamsChanged controller callback ([961c96d](https://github.com/angular-ui/ui-router/commit/961c96d)), closes [#2608](https://github.com/angular-ui/ui-router/issues/2608) [#2470](https://github.com/angular-ui/ui-router/issues/2470) [#2391](https://github.com/angular-ui/ui-router/issues/2391) [#1967](https://github.com/angular-ui/ui-router/issues/1967) +* **resolve:** Allow all resolved data for a node to be injected as `$resolve$` ([e432c27](https://github.com/angular-ui/ui-router/commit/e432c27)) +* **state:** Expose the internal state API via `$$state()` ([92053f1](https://github.com/angular-ui/ui-router/commit/92053f1)), closes [#13](https://github.com/angular-ui/ui-router/issues/13) +* **ui-router-ng2:** Initial angular2 support ([217de70](https://github.com/angular-ui/ui-router/commit/217de70)) +* **uiCanExit:** Add controller lifecycle hook "uiCanExit" ([afcfe95](https://github.com/angular-ui/ui-router/commit/afcfe95)) +* **uiView:** Expose the resolved data for a state as $scope.$resolve ([0f6aea6](https://github.com/angular-ui/ui-router/commit/0f6aea6)), closes [#2175](https://github.com/angular-ui/ui-router/issues/2175) [#2547](https://github.com/angular-ui/ui-router/issues/2547) +* **uiView:** Fire the $onInit hook ([c8afc38](https://github.com/angular-ui/ui-router/commit/c8afc38)), closes [#2559](https://github.com/angular-ui/ui-router/issues/2559) +* **uiView:** Put $animate promises on element.data('$uiView') ([a5578de](https://github.com/angular-ui/ui-router/commit/a5578de)), closes [#2562](https://github.com/angular-ui/ui-router/issues/2562) [#2579](https://github.com/angular-ui/ui-router/issues/2579) +* **view:** Route a view to a directive using `component:` ([1552032](https://github.com/angular-ui/ui-router/commit/1552032)), closes [#2627](https://github.com/angular-ui/ui-router/issues/2627) + + + +## Other commits + +Many of these commits are merged from 0.2.x `legacy` branch + +* **uiSrefActive:** allow multiple classes ([120d7ad](https://github.com/angular-ui/ui-router/commit/120d7ad)), closes [#2481](https://github.com/angular-ui/ui-router/issues/2481) [#2482](https://github.com/angular-ui/ui-router/issues/2482) +* **justjs:** provide naive implementation of most of the coreservices api ([426f134](https://github.com/angular-ui/ui-router/commit/426f134)) +* **resolve:** add $resolve service back to 1.0 ([70c6659](https://github.com/angular-ui/ui-router/commit/70c6659)) +* **uiSrefActive:** allow active & active-eq on same element ([d9a676b](https://github.com/angular-ui/ui-router/commit/d9a676b)), closes [#1997](https://github.com/angular-ui/ui-router/issues/1997) +* **uiSrefActive:** provide a ng-{class,style} like interface ([a9ff6fe](https://github.com/angular-ui/ui-router/commit/a9ff6fe)), closes [#1431](https://github.com/angular-ui/ui-router/issues/1431) +* **uiSrefActive:** Added support for multiple nested uiSref directives ([b184494](https://github.com/angular-ui/ui-router/commit/b184494)) +* **uiState:** add ui-state directive ([3831af1](https://github.com/angular-ui/ui-router/commit/3831af1)), closes [#395](https://github.com/angular-ui/ui-router/issues/395) [#900](https://github.com/angular-ui/ui-router/issues/900) [#1932](https://github.com/angular-ui/ui-router/issues/1932) +* **urlMatcher:** add support for optional spaces ([4b7f304](https://github.com/angular-ui/ui-router/commit/4b7f304)) +* **urlMatcher:** Add param only type names ([6a371f9](https://github.com/angular-ui/ui-router/commit/6a371f9)) +* **$IncludedByStateFilter:** add parameters to $IncludedByStateFilter ([963f6e7](https://github.com/angular-ui/ui-router/commit/963f6e7)), closes [#1735](https://github.com/angular-ui/ui-router/issues/1735) +* **$state:** make state data inheritance prototypical ([c4fec8c](https://github.com/angular-ui/ui-router/commit/c4fec8c)) +* **$state:** Inject templateProvider with resolved values ([afa20f2](https://github.com/angular-ui/ui-router/commit/afa20f2)) +* **$state:** added 'state' to state reload method (feat no.1612) ([b8f0457](https://github.com/angular-ui/ui-router/commit/b8f0457)) +* **$state:** broadcast $stateChangeCancel event when event.preventDefault() is called in $sta ([ecefb75](https://github.com/angular-ui/ui-router/commit/ecefb75)) +* **$state:** inject resolve params into controllerProvider ([b380c22](https://github.com/angular-ui/ui-router/commit/b380c22)), closes [#1131](https://github.com/angular-ui/ui-router/issues/1131) +* **$state:** support URLs with #fragments ([3da0a17](https://github.com/angular-ui/ui-router/commit/3da0a17)) +* **$uiViewScroll:** change function to return promise ([c2a9a31](https://github.com/angular-ui/ui-router/commit/c2a9a31)), closes [#1702](https://github.com/angular-ui/ui-router/issues/1702) + + + + +### 0.2.18 (2016-02-07) + +This is a maintenance release which fixes a few known bugs introduced in 0.2.16. + +#### Bug Fixes + +* **$urlRouter:** revert BC: resolve clashing of routes This reverts commit b5c57c8ec2e14e17e75104 ([2f1ebefc](https://github.com/angular-ui/ui-router/commit/2f1ebefc242ff48960e0bf63da359296a38f6852), closes [#2501](https://github.com/angular-ui/ui-router/issues/2501)) +* **uiState:** Corrected typo for 'ref' variable (#2488, #2508) ([b8f3c144](https://github.com/angular-ui/ui-router/commit/b8f3c144b913e620f177b78f3b4f52afa61d41a6)) +* **$urlMatcherFactory:** Fix to make the YUI Javascript compressor work ([ad9c41d2](https://github.com/angular-ui/ui-router/commit/ad9c41d2e723d50e30dd3452fbd274b7057dc3d9)) +* **stateBuilder:** fix non-url params on a state without a url. The parameters are now applied when ([d6d8c332](https://github.com/angular-ui/ui-router/commit/d6d8c3322c4dde8bb5b8dde25f9fcda49e9c4c81), closes [#2025](https://github.com/angular-ui/ui-router/issues/2025)) +* **ui-view:** (ui-view) use static renderer when no animation is present for a ui-view ([2523bbdb](https://github.com/angular-ui/ui-router/commit/2523bbdb5542483a489c22804f1751b8b9f71703), closes [#2485](https://github.com/angular-ui/ui-router/issues/2485)). This allows a ui-view scope to be destroyed when switching states, before the next view is initialized. + + +#### Features + +* **ui-view:** Add noanimation attribute to specify static renderer. ([2523bbdb](https://github.com/angular-ui/ui-router/commit/2523bbdb5542483a489c22804f1751b8b9f71703), closes [#2485](https://github.com/angular-ui/ui-router/issues/2485)). This allows a ui-view scope to be destroyed before the next ui-view is initialized, when ui-view animation is not present. + + + +### 0.2.17 (2016-01-25) + + +#### Bug Fixes + +* **uiSrefActive:** allow multiple classes ([a89114a0](https://github.com/angular-ui/ui-router/commit/a89114a083813c1a7280c48fc18e626caa5a31f4), closes [#2481](https://github.com/angular-ui/ui-router/issues/2481), [#2482](https://github.com/angular-ui/ui-router/issues/2482)) + + + +### 0.2.16 (2016-01-24) + + +#### Bug Fixes + +* **$state:** + * statechangeCancel: Avoid infinite digest in .otherwise/redirect case. Don't clobber url if a new transition has started. Closes #222 ([e00aa695](https://github.com/angular-ui/ui-router/commit/e00aa695e41ddc5ebd5d2b226aa0917a751b11aa), closes [#2238](https://github.com/angular-ui/ui-router/issues/2238)) + * transitionTo: Allow hash (#) value to be read as toParams['#'] in events. Re-add the saved hash before broadcasting $stateChangeStart event. ([8c1bf30d](https://github.com/angular-ui/ui-router/commit/8c1bf30d2a3b78ba40b330f12d854c885d6cc117)) +* **$stateParams:** Fix for testing: reset service instance between tests ([2aeb0c4b](https://github.com/angular-ui/ui-router/commit/2aeb0c4b205baf6cfa2ef25bb986bb160dc13bf9)) +* **$urlRouter:** + * Sort URL rules by specificity. Potential minor BC if apps were relying on rule registration order. ([b5c57c8e](https://github.com/angular-ui/ui-router/commit/b5c57c8ec2e14e17e75104c1424654f126ea4011)) + * Use $sniffer for pushstate compat check ([c219e801](https://github.com/angular-ui/ui-router/commit/c219e801797f340ef9c5c919ab890ef003a7a042)) +* **UrlMatcher:** + * Properly encode/decode slashes in parameters Closes #2172 Closes #2250 Closes #1 ([02e98660](https://github.com/angular-ui/ui-router/commit/02e98660a80dfd1ca4b113dd24ee304af91e9f8c), closes [#2339](https://github.com/angular-ui/ui-router/issues/2339)) + * Array types: Fix default value for array query parameters. Pass empty arrays through in handler. ([20d6e243](https://github.com/angular-ui/ui-router/commit/20d6e243f1745ddbf257217245a1dc22eabe13da), closes [#2222](https://github.com/angular-ui/ui-router/issues/2222)) + * Remove trailing slash, if parameter is optional and was squashed from URL ([77fa11bf](https://github.com/angular-ui/ui-router/commit/77fa11bf0787d0f6da97ab0003ab29afb7411391), closes [#1902](https://github.com/angular-ui/ui-router/issues/1902)) + * Allow a parameter declaration to configure the parameter type by name. closes #2294 ([e4010249](https://github.com/angular-ui/ui-router/commit/e40102492d40fe1cf6ba14d955fcc9f345c16458)) + * include the slash when recognizing squashed params in url ([b5130bb1](https://github.com/angular-ui/ui-router/commit/b5130bb1215e15f832ea6daa670410b9a950c0d4), closes [#2064](https://github.com/angular-ui/ui-router/issues/2064)) + * Allow url query param names to contain periods ([d31b3337](https://github.com/angular-ui/ui-router/commit/d31b3337cc2ce71d87c92fdded629e46558d0b49)) +* **reloadOnSearch:** Update `locals.globals.$stateParams` when reloadOnSearch=false ([350d3e87](https://github.com/angular-ui/ui-router/commit/350d3e87783a2263fd7d23913da34f1268c3300b), closes [#2356](https://github.com/angular-ui/ui-router/issues/2356)) +* **ui-view:** + * fix $animate usage for ng 1.4+ ([9b6d9a2d](https://github.com/angular-ui/ui-router/commit/9b6d9a2d0ce4ae08384165cb517bddea59b67892)) + * change $viewContentLoading to pair with $viewContentLoaded ([f9b43d66](https://github.com/angular-ui/ui-router/commit/f9b43d66833f0e17de41fd8d1cc3b491e3ba4a0e), closes [#685](https://github.com/angular-ui/ui-router/issues/685)) + * $destroy event is triggered before animation ends ([1be13795](https://github.com/angular-ui/ui-router/commit/1be13795686ab78abb2d5094bc8addcacb928975)) +* **uiSref:** + * Ensure URL once param checks pass ([9dc31c54](https://github.com/angular-ui/ui-router/commit/9dc31c5465328e5666468b0c2319ce205f4b72f8), closes [#2091](https://github.com/angular-ui/ui-router/issues/2091)) + * uiSrefActive: update the active classes after linking directive ([7c914030](https://github.com/angular-ui/ui-router/commit/7c914030f13e05e45a941c1b723cb785db729890)) + + +#### Features + +* **$IncludedByStateFilter:** add parameters to $IncludedByStateFilter ([963f6e71](https://github.com/angular-ui/ui-router/commit/963f6e71633b9c3a266f3991d79089b7d14786b4), closes [#1735](https://github.com/angular-ui/ui-router/issues/1735)) +* **isStateFilter:** Include optional state params. ([71d74699](https://github.com/angular-ui/ui-router/commit/71d7469987ee9ca86a41c8c6393ccd5d8913c3d6)) +* **$state:** make state data inheritance prototypical ([c4fec8c7](https://github.com/angular-ui/ui-router/commit/c4fec8c7998113902af4152d716c42dada6eb465)) +* **$stateChangeStart:** Add options to event ([a1f07559](https://github.com/angular-ui/ui-router/commit/a1f07559ec74e10ff80bc4be81f287e3772b8fcb)) +* **UrlMatcher:** Add param only type names ([6a371f9b](https://github.com/angular-ui/ui-router/commit/6a371f9b70e37a82eb324122879e4473c3f6d526)) +* **uiSrefActive:** + * provide a ng-{class,style} like interface ([a9ff6feb](https://github.com/angular-ui/ui-router/commit/a9ff6febb469e0d5cd49054216c4472df7a6259d)) + * allow active & active-eq on same element ([d9a676ba](https://github.com/angular-ui/ui-router/commit/d9a676ba2c4d9e954be224c60496bcb38f6074e3)) +* **uiState:** add ui-state directive ([3831af1d](https://github.com/angular-ui/ui-router/commit/3831af1dc71b601351e6694af0665a77297f8f7f), closes [#395](https://github.com/angular-ui/ui-router/issues/395), [#900](https://github.com/angular-ui/ui-router/issues/900), [#1932](https://github.com/angular-ui/ui-router/issues/1932)) +* **urlMatcher:** add support for optional spaces in params ([4b7f3046](https://github.com/angular-ui/ui-router/commit/4b7f304617f0b3590b532103b5c2fb526c98a9e4)) + + + +### 0.2.15 (2015-05-19) + + +#### Bug Fixes + +* **$state:** reloadOnSearch should not affect non-search param changes. ([6ca0d770](https://github.com/angular-ui/ui-router/commit/6ca0d7704cf7de9c6e6b7bb64df2f9c68fe081cc), closes [#1079](https://github.com/angular-ui/ui-router/issues/1079)) +* **urlMatcherFactory:** Revert to 0.2.13 behavior where all string parameters are considered optional fi ([495a02c3](https://github.com/angular-ui/ui-router/commit/495a02c3cbde501c1c149bce137806669209bc29), closes [#1963](https://github.com/angular-ui/ui-router/issues/1963)) +* **urlRouter:** allow .when() to redirect, even after a successful $state.go() - This partially ([48aeaff6](https://github.com/angular-ui/ui-router/commit/48aeaff645baf3f42f5a8940ebd97563791ad9f8), closes [#1584](https://github.com/angular-ui/ui-router/issues/1584)) + + +#### Features + +* **$state:** Inject templateProvider with resolved values ([afa20f22](https://github.com/angular-ui/ui-router/commit/afa20f22373b7176b26daa7e1099750c4254a354)) + + + +### 0.2.14 (2015-04-23) + + +#### Bug Fixes + +* **$StateRefDirective:** resolve missing support for svg anchor elements #1667 ([0149a7bb](https://github.com/angular-ui/ui-router/commit/0149a7bb38b7af99388a1ad7cc9909a7b7c4439d)) +* **$urlMatcherFactory:** + * regex params should respect case-sensitivity ([1e10519f](https://github.com/angular-ui/ui-router/commit/1e10519f3be6bbf0cefdcce623cd2ade06e649e5), closes [#1671](https://github.com/angular-ui/ui-router/issues/1671)) + * unquote all dashes from array params ([06664d33](https://github.com/angular-ui/ui-router/commit/06664d330f882390655dcfa83e10276110d0d0fa)) + * add Type.$normalize function ([b0c6aa23](https://github.com/angular-ui/ui-router/commit/b0c6aa2350fdd3ce8483144774adc12f5a72b7e9)) + * make optional params regex grouping optional ([06f73794](https://github.com/angular-ui/ui-router/commit/06f737945e83e668d09cfc3bcffd04a500ff1963), closes [#1576](https://github.com/angular-ui/ui-router/issues/1576)) +* **$state:** allow about.*.** glob patterns ([e39b27a2](https://github.com/angular-ui/ui-router/commit/e39b27a2cb7d88525c446a041f9fbf1553202010)) +* **uiSref:** + * use Object's toString instead of Window's toString ([2aa7f4d1](https://github.com/angular-ui/ui-router/commit/2aa7f4d139dbd5b9fcc4afdcf2ab6642c87f5671)) + * add absolute to allowed transition options ([ae1b3c4e](https://github.com/angular-ui/ui-router/commit/ae1b3c4eedc37983400d830895afb50457c63af4)) +* **uiSrefActive:** Apply active classes on lazy loaded states ([f0ddbe7b](https://github.com/angular-ui/ui-router/commit/f0ddbe7b4a91daf279c3b7d0cee732bb1f3be5b4)) +* **uiView:** add `$element` to locals for view controller ([db68914c](https://github.com/angular-ui/ui-router/commit/db68914cd6c821e7dec8155bd33142a3a97f5453)) + + +#### Features + +* **$state:** + * support URLs with #fragments ([3da0a170](https://github.com/angular-ui/ui-router/commit/3da0a17069e27598c0f9d9164e104dd5ce05cdc6)) + * inject resolve params into controllerProvider ([b380c223](https://github.com/angular-ui/ui-router/commit/b380c223fe12e2fde7582c0d6b1ed7b15a23579b), closes [#1131](https://github.com/angular-ui/ui-router/issues/1131)) + * added 'state' to state reload method (feat no.1612) - modiefied options.reload ([b8f04575](https://github.com/angular-ui/ui-router/commit/b8f04575a8557035c1858c4d5c8dbde3e1855aaa)) + * broadcast $stateChangeCancel event when event.preventDefault() is called in $sta ([ecefb758](https://github.com/angular-ui/ui-router/commit/ecefb758cb445e41620b62a272aafa3638613d7a)) +* **$uiViewScroll:** change function to return promise ([c2a9a311](https://github.com/angular-ui/ui-router/commit/c2a9a311388bb212e5a2e820536d1d739f829ccd), closes [#1702](https://github.com/angular-ui/ui-router/issues/1702)) +* **uiSrefActive:** Added support for multiple nested uiSref directives ([b1844948](https://github.com/angular-ui/ui-router/commit/b18449481d152b50705abfce2493a444eb059fa5)) + + + +### 0.2.13 (2014-11-20) + +This release primarily fixes issues reported against 0.2.12 + +#### Bug Fixes + +* **$state:** fix $state.includes/.is to apply param types before comparisions fix(uiSref): ma ([19715d15](https://github.com/angular-ui/ui-router/commit/19715d15e3cbfff724519e9febedd05b49c75baa), closes [#1513](https://github.com/angular-ui/ui-router/issues/1513)) + * Avoid re-synchronizing from url after .transitionTo ([b267ecd3](https://github.com/angular-ui/ui-router/commit/b267ecd348e5c415233573ef95ebdbd051875f52), closes [#1573](https://github.com/angular-ui/ui-router/issues/1573)) +* **$urlMatcherFactory:** + * Built-in date type uses local time zone ([d726bedc](https://github.com/angular-ui/ui-router/commit/d726bedcbb5f70a5660addf43fd52ec730790293)) + * make date type fn check .is before running ([aa94ce3b](https://github.com/angular-ui/ui-router/commit/aa94ce3b86632ad05301530a2213099da73a3dc0), closes [#1564](https://github.com/angular-ui/ui-router/issues/1564)) + * early binding of array handler bypasses type resolution ([ada4bc27](https://github.com/angular-ui/ui-router/commit/ada4bc27df5eff3ba3ab0de94a09bd91b0f7a28c)) + * add 'any' Type for non-encoding non-url params ([3bfd75ab](https://github.com/angular-ui/ui-router/commit/3bfd75ab445ee2f1dd55275465059ed116b10b27), closes [#1562](https://github.com/angular-ui/ui-router/issues/1562)) + * fix encoding slashes in params ([0c983a08](https://github.com/angular-ui/ui-router/commit/0c983a08e2947f999683571477debd73038e95cf), closes [#1119](https://github.com/angular-ui/ui-router/issues/1119)) + * fix mixed path/query params ordering problem ([a479fbd0](https://github.com/angular-ui/ui-router/commit/a479fbd0b8eb393a94320973e5b9a62d83912ee2), closes [#1543](https://github.com/angular-ui/ui-router/issues/1543)) +* **ArrayType:** + * specify empty array mapping corner case ([74aa6091](https://github.com/angular-ui/ui-router/commit/74aa60917e996b0b4e27bbb4eb88c3c03832021d), closes [#1511](https://github.com/angular-ui/ui-router/issues/1511)) + * fix .equals for array types ([5e6783b7](https://github.com/angular-ui/ui-router/commit/5e6783b77af9a90ddff154f990b43dbb17eeda6e), closes [#1538](https://github.com/angular-ui/ui-router/issues/1538)) +* **Param:** fix default value shorthand declaration ([831d812a](https://github.com/angular-ui/ui-router/commit/831d812a524524c71f0ee1c9afaf0487a5a66230), closes [#1554](https://github.com/angular-ui/ui-router/issues/1554)) +* **common:** fixed the _.filter clone to not create sparse arrays ([750f5cf5](https://github.com/angular-ui/ui-router/commit/750f5cf5fd91f9ada96f39e50d39aceb2caf22b6), closes [#1563](https://github.com/angular-ui/ui-router/issues/1563)) +* **ie8:** fix calls to indexOf and filter ([dcb31b84](https://github.com/angular-ui/ui-router/commit/dcb31b843391b3e61dee4de13f368c109541813e), closes [#1556](https://github.com/angular-ui/ui-router/issues/1556)) + + +#### Features + +* add json parameter Type ([027f1fcf](https://github.com/angular-ui/ui-router/commit/027f1fcf9c0916cea651e88981345da6f9ff214a)) + + + +### 0.2.12 (2014-11-13) + +#### Bug Fixes + +* **$resolve:** use resolve fn result, not parent resolved value of same name ([67f5e00c](https://github.com/angular-ui/ui-router/commit/67f5e00cc9aa006ce3fe6cde9dff261c28eab70a), closes [#1317], [#1353]) +* **$state:** + * populate default params in .transitionTo. ([3f60fbe6](https://github.com/angular-ui/ui-router/commit/3f60fbe6d65ebeca8d97952c05aa1d269f1b7ba1), closes [#1396]) + * reload() now reinvokes controllers ([73443420](https://github.com/angular-ui/ui-router/commit/7344342018847902594dc1fc62d30a5c30f01763), closes [#582]) + * do not emit $viewContentLoading if notify: false ([74255feb](https://github.com/angular-ui/ui-router/commit/74255febdf48ae082a02ca1e735165f2c369a463), closes [#1387](https://github.com/angular-ui/ui-router/issues/1387)) + * register states at config-time ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) + * handle parent.name when parent is obj ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) +* **$urlMatcherFactory:** + * register types at config ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a), closes [#1476]) + * made path params default value "" for backwards compat ([8f998e71](https://github.com/angular-ui/ui-router/commit/8f998e71e43a0b31293331c981f5db0f0097b8ba)) + * Pre-replace certain param values for better mapping ([6374a3e2](https://github.com/angular-ui/ui-router/commit/6374a3e29ab932014a7c77d2e1ab884cc841a2e3)) + * fixed ParamSet.$$keys() ordering ([9136fecb](https://github.com/angular-ui/ui-router/commit/9136fecbc2bfd4fda748a9914f0225a46c933860)) + * empty string policy now respected in Param.value() ([db12c85c](https://github.com/angular-ui/ui-router/commit/db12c85c16f2d105415f9bbbdeb11863f64728e0)) + * "string" type now encodes/decodes slashes ([3045e415](https://github.com/angular-ui/ui-router/commit/3045e41577a8b8b8afc6039f42adddf5f3c061ec), closes [#1119]) + * allow arrays in both path and query params ([fdd2f2c1](https://github.com/angular-ui/ui-router/commit/fdd2f2c191c4a67c874fdb9ec9a34f8dde9ad180), closes [#1073], [#1045], [#1486], [#1394]) + * typed params in search ([8d4cab69](https://github.com/angular-ui/ui-router/commit/8d4cab69dd67058e1a716892cc37b7d80a57037f), closes [#1488](https://github.com/angular-ui/ui-router/issues/1488)) + * no longer generate unroutable urls ([cb9fd9d8](https://github.com/angular-ui/ui-router/commit/cb9fd9d8943cb26c7223f6990db29c82ae8740f8), closes [#1487](https://github.com/angular-ui/ui-router/issues/1487)) + * handle optional parameter followed by required parameter in url format. ([efc72106](https://github.com/angular-ui/ui-router/commit/efc72106ddcc4774b48ea176a505ef9e95193b41)) + * default to parameter string coersion. ([13a468a7](https://github.com/angular-ui/ui-router/commit/13a468a7d54c2fb0751b94c0c1841d580b71e6dc), closes [#1414](https://github.com/angular-ui/ui-router/issues/1414)) + * concat respects strictMode/caseInsensitive ([dd72e103](https://github.com/angular-ui/ui-router/commit/dd72e103edb342d9cf802816fe127e1bbd68fd5f), closes [#1395]) +* **ui-sref:** + * Allow sref state options to take a scope object ([b5f7b596](https://github.com/angular-ui/ui-router/commit/b5f7b59692ce4933e2d63eb5df3f50a4ba68ccc0)) + * replace raw href modification with attrs. ([08c96782](https://github.com/angular-ui/ui-router/commit/08c96782faf881b0c7ab00afc233ee6729548fa0)) + * nagivate to state when url is "" fix($state.href): generate href for state with ([656b5aab](https://github.com/angular-ui/ui-router/commit/656b5aab906e5749db9b5a080c6a83b95f50fd91), closes [#1363](https://github.com/angular-ui/ui-router/issues/1363)) + * Check that state is defined in isMatch() ([92aebc75](https://github.com/angular-ui/ui-router/commit/92aebc7520f88babdc6e266536086e07263514c3), closes [#1314](https://github.com/angular-ui/ui-router/issues/1314), [#1332](https://github.com/angular-ui/ui-router/issues/1332)) +* **uiView:** + * allow inteprolated ui-view names ([81f6a19a](https://github.com/angular-ui/ui-router/commit/81f6a19a432dac9198fd33243855bfd3b4fea8c0), closes [#1324](https://github.com/angular-ui/ui-router/issues/1324)) + * Made anim work with angular 1.3 ([c3bb7ad9](https://github.com/angular-ui/ui-router/commit/c3bb7ad903da1e1f3c91019cfd255be8489ff4ef), closes [#1367](https://github.com/angular-ui/ui-router/issues/1367), [#1345](https://github.com/angular-ui/ui-router/issues/1345)) +* **urlRouter:** html5Mode accepts an object from angular v1.3.0-rc.3 ([7fea1e9d](https://github.com/angular-ui/ui-router/commit/7fea1e9d0d8c6e09cc6c895ecb93d4221e9adf48)) +* **stateFilters:** mark state filters as stateful. ([a00b353e](https://github.com/angular-ui/ui-router/commit/a00b353e3036f64a81245c4e7898646ba218f833), closes [#1479]) +* **ui-router:** re-add IE8 compatibility for map/filter/keys ([8ce69d9f](https://github.com/angular-ui/ui-router/commit/8ce69d9f7c886888ab53eca7e53536f36b428aae), closes [#1518], [#1383]) +* **package:** point 'main' to a valid filename ([ac903350](https://github.com/angular-ui/ui-router/commit/ac9033501debb63364539d91fbf3a0cba4579f8e)) +* **travis:** make CI build faster ([0531de05](https://github.com/angular-ui/ui-router/commit/0531de052e414a8d839fbb4e7635e923e94865b3)) + + +#### Features + +##### Default and Typed params + +This release includes a lot of bug fixes around default/optional and typed parameters. As such, 0.2.12 is the first release where we recommend those features be used. + +* **$state:** + * add state params validation ([b1379e6a](https://github.com/angular-ui/ui-router/commit/b1379e6a4d38f7ed7436e05873932d7c279af578), closes [#1433](https://github.com/angular-ui/ui-router/issues/1433)) + * is/includes/get work on relative stateOrName ([232e94b3](https://github.com/angular-ui/ui-router/commit/232e94b3c2ca2c764bb9510046e4b61690c87852)) + * .reload() returns state transition promise ([639e0565](https://github.com/angular-ui/ui-router/commit/639e0565dece9d5544cc93b3eee6e11c99bd7373)) +* **$templateFactory:** request templateURL as text/html ([ccd60769](https://github.com/angular-ui/ui-router/commit/ccd6076904a4b801d77b47f6e2de4c06ce9962f8), closes [#1287]) +* **$urlMatcherFactory:** Made a Params and ParamSet class ([0cc1e6cc](https://github.com/angular-ui/ui-router/commit/0cc1e6cc461a4640618e2bb594566551c54834e2)) + + + + +### 0.2.11 (2014-08-26) + + +#### Bug Fixes + +* **$resolve:** Resolves only inherit from immediate parent fixes #702 ([df34e20c](https://github.com/angular-ui/ui-router/commit/df34e20c576299e7a3c8bd4ebc68d42341c0ace9)) +* **$state:** + * change $state.href default options.inherit to true ([deea695f](https://github.com/angular-ui/ui-router/commit/deea695f5cacc55de351ab985144fd233c02a769)) + * sanity-check state lookups ([456fd5ae](https://github.com/angular-ui/ui-router/commit/456fd5aec9ea507518927bfabd62b4afad4cf714), closes [#980](https://github.com/angular-ui/ui-router/issues/980)) + * didn't comply to inherit parameter ([09836781](https://github.com/angular-ui/ui-router/commit/09836781f126c1c485b06551eb9cfd4fa0f45c35)) + * allow view content loading broadcast ([7b78edee](https://github.com/angular-ui/ui-router/commit/7b78edeeb52a74abf4d3f00f79534033d5a08d1a)) +* **$urlMatcherFactory:** + * detect injected functions ([91f75ae6](https://github.com/angular-ui/ui-router/commit/91f75ae66c4d129f6f69e53bd547594e9661f5d5)) + * syntax ([1ebed370](https://github.com/angular-ui/ui-router/commit/1ebed37069bae8614d41541d56521f5c45f703f3)) +* **UrlMatcher:** + * query param function defaults ([f9c20530](https://github.com/angular-ui/ui-router/commit/f9c205304f10d8a4ebe7efe9025e642016479a51)) + * don't decode default values ([63607bdb](https://github.com/angular-ui/ui-router/commit/63607bdbbcb432d3fb37856a1cb3da0cd496804e)) +* **travis:** update Node version to fix build ([d6b95ef2](https://github.com/angular-ui/ui-router/commit/d6b95ef23d9dacb4eba08897f5190a0bcddb3a48)) +* **uiSref:** + * Generate an href for states with a blank url. closes #1293 ([691745b1](https://github.com/angular-ui/ui-router/commit/691745b12fa05d3700dd28f0c8d25f8a105074ad)) + * should inherit params by default ([b973dad1](https://github.com/angular-ui/ui-router/commit/b973dad155ad09a7975e1476bd096f7b2c758eeb)) + * cancel transition if preventDefault() has been called ([2e6d9167](https://github.com/angular-ui/ui-router/commit/2e6d9167d3afbfbca6427e53e012f94fb5fb8022)) +* **uiView:** Fixed infinite loop when is called .go() from a controller. ([e13988b8](https://github.com/angular-ui/ui-router/commit/e13988b8cd6231d75c78876ee9d012cc87f4a8d9), closes [#1194](https://github.com/angular-ui/ui-router/issues/1194)) +* **docs:** + * Fixed link to milestones ([6c0ae500](https://github.com/angular-ui/ui-router/commit/6c0ae500cc238ea9fc95adcc15415c55fc9e1f33)) + * fix bug in decorator example ([4bd00af5](https://github.com/angular-ui/ui-router/commit/4bd00af50b8b88a49d1545a76290731cb8e0feb1)) + * Removed an incorrect semi-colon ([af97cef8](https://github.com/angular-ui/ui-router/commit/af97cef8b967f2e32177e539ef41450dca131a7d)) + * Explain return value of rule as function ([5e887890](https://github.com/angular-ui/ui-router/commit/5e8878900a6ffe59a81aed531a3925e34a297377)) + + +#### Features + +* **$state:** + * allow parameters to pass unharmed ([8939d057](https://github.com/angular-ui/ui-router/commit/8939d0572ab1316e458ef016317ecff53131a822)) + * **BREAKING CHANGE**: state parameters are no longer automatically coerced to strings, and unspecified parameter values are now set to undefined rather than null. + * allow prevent syncUrl on failure ([753060b9](https://github.com/angular-ui/ui-router/commit/753060b910d5d2da600a6fa0757976e401c33172)) +* **typescript:** Add typescript definitions for component builds ([521ceb3f](https://github.com/angular-ui/ui-router/commit/521ceb3fd7850646422f411921e21ce5e7d82e0f)) +* **uiSref:** extend syntax for ui-sref ([71cad3d6](https://github.com/angular-ui/ui-router/commit/71cad3d636508b5a9fe004775ad1f1adc0c80c3e)) +* **uiSrefActive:** + * Also activate for child states. ([bf163ad6](https://github.com/angular-ui/ui-router/commit/bf163ad6ce176ce28792696c8302d7cdf5c05a01), closes [#818](https://github.com/angular-ui/ui-router/issues/818)) + * **BREAKING CHANGE** Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance. + + * uiSrefActiveEq: new directive with old ui-sref-active behavior +* **$urlRouter:** + * defer URL change interception ([c72d8ce1](https://github.com/angular-ui/ui-router/commit/c72d8ce11916d0ac22c81b409c9e61d7048554d7)) + * force URLs to have valid params ([d48505cd](https://github.com/angular-ui/ui-router/commit/d48505cd328d83e39d5706e085ba319715f999a6)) + * abstract $location handling ([08b4636b](https://github.com/angular-ui/ui-router/commit/08b4636b294611f08db35f00641eb5211686fb50)) +* **$urlMatcherFactory:** + * fail on bad parameters ([d8f124c1](https://github.com/angular-ui/ui-router/commit/d8f124c10d00c7e5dde88c602d966db261aea221)) + * date type support ([b7f074ff](https://github.com/angular-ui/ui-router/commit/b7f074ff65ca150a3cdbda4d5ad6cb17107300eb)) + * implement type support ([450b1f0e](https://github.com/angular-ui/ui-router/commit/450b1f0e8e03c738174ff967f688b9a6373290f4)) +* **UrlMatcher:** + * handle query string arrays ([9cf764ef](https://github.com/angular-ui/ui-router/commit/9cf764efab45fa9309368688d535ddf6e96d6449), closes [#373](https://github.com/angular-ui/ui-router/issues/373)) + * injectable functions as defaults ([00966ecd](https://github.com/angular-ui/ui-router/commit/00966ecd91fb745846039160cab707bfca8b3bec)) + * default values & type decoding for query params ([a472b301](https://github.com/angular-ui/ui-router/commit/a472b301389fbe84d1c1fa9f24852b492a569d11)) + * allow shorthand definitions ([5b724304](https://github.com/angular-ui/ui-router/commit/5b7243049793505e44b6608ea09878c37c95b1f5)) + * validates whole interface ([32b27db1](https://github.com/angular-ui/ui-router/commit/32b27db173722e9194ef1d5c0ea7d93f25a98d11)) + * implement non-strict matching ([a3e21366](https://github.com/angular-ui/ui-router/commit/a3e21366bee0475c9795a1ec76f70eec41c5b4e3)) + * add per-param config support ([07b3029f](https://github.com/angular-ui/ui-router/commit/07b3029f4d409cf955780113df92e36401b47580)) + * **BREAKING CHANGE**: the `params` option in state configurations must now be an object keyed by parameter name. + +### 0.2.10 (2014-03-12) + + +#### Bug Fixes + +* **$state:** use $browser.baseHref() when generating urls with .href() ([cbcc8488](https://github.com/angular-ui/ui-router/commit/cbcc84887d6b6d35258adabb97c714cd9c1e272d)) +* **bower.json:** JS files should not be ignored ([ccdab193](https://github.com/angular-ui/ui-router/commit/ccdab193315f304eb3be5f5b97c47a926c79263e)) +* **dev:** karma:background task is missing, can't run grunt:dev. ([d9f7b898](https://github.com/angular-ui/ui-router/commit/d9f7b898e8e3abb8c846b0faa16a382913d7b22b)) +* **sample:** Contacts menu button not staying active when navigating to detail states. Need t ([2fcb8443](https://github.com/angular-ui/ui-router/commit/2fcb84437cb43ade12682a92b764f13cac77dfe7)) +* **uiSref:** support mock-clicks/events with no data ([717d3ff7](https://github.com/angular-ui/ui-router/commit/717d3ff7d0ba72d239892dee562b401cdf90e418)) +* **uiView:** + * Do NOT autoscroll when autoscroll attr is missing ([affe5bd7](https://github.com/angular-ui/ui-router/commit/affe5bd785cdc3f02b7a9f64a52e3900386ec3a0), closes [#807](https://github.com/angular-ui/ui-router/issues/807)) + * Refactoring uiView directive to copy ngView logic ([548fab6a](https://github.com/angular-ui/ui-router/commit/548fab6ab9debc9904c5865c8bc68b4fc3271dd0), closes [#857](https://github.com/angular-ui/ui-router/issues/857), [#552](https://github.com/angular-ui/ui-router/issues/552)) + + +#### Features + +* **$state:** includes() allows glob patterns for state matching. ([2d5f6b37](https://github.com/angular-ui/ui-router/commit/2d5f6b37191a3135f4a6d9e8f344c54edcdc065b)) +* **UrlMatcher:** Add support for case insensitive url matching ([642d5247](https://github.com/angular-ui/ui-router/commit/642d524799f604811e680331002feec7199a1fb5)) +* **uiSref:** add support for transition options ([2ed7a728](https://github.com/angular-ui/ui-router/commit/2ed7a728cee6854b38501fbc1df6139d3de5b28a)) +* **uiView:** add controllerAs config with function ([1ee7334a](https://github.com/angular-ui/ui-router/commit/1ee7334a73efeccc9b95340e315cdfd59944762d)) + + +### 0.2.9 (2014-01-17) + + +This release is identical to 0.2.8. 0.2.8 was re-tagged in git to fix a problem with bower. + + +### 0.2.8 (2014-01-16) + + +#### Bug Fixes + +* **$state:** allow null to be passed as 'params' param ([094dc30e](https://github.com/angular-ui/ui-router/commit/094dc30e883e1bd14e50a475553bafeaade3b178)) +* **$state.go:** param inheritance shouldn't inherit from siblings ([aea872e0](https://github.com/angular-ui/ui-router/commit/aea872e0b983cb433436ce5875df10c838fccedb)) +* **bower.json:** fixes bower.json ([eed3cc4d](https://github.com/angular-ui/ui-router/commit/eed3cc4d4dfef1d3ef84b9fd063127538ebf59d3)) +* **uiSrefActive:** annotate controller injection ([85921422](https://github.com/angular-ui/ui-router/commit/85921422ff7fb0effed358136426d616cce3d583), closes [#671](https://github.com/angular-ui/ui-router/issues/671)) +* **uiView:** + * autoscroll tests pass on 1.2.4 & 1.1.5 ([86eacac0](https://github.com/angular-ui/ui-router/commit/86eacac09ca5e9000bd3b9c7ba6e2cc95d883a3a)) + * don't animate initial load ([83b6634d](https://github.com/angular-ui/ui-router/commit/83b6634d27942ca74766b2b1244a7fc52c5643d9)) + * test pass against 1.0.8 and 1.2.4 ([a402415a](https://github.com/angular-ui/ui-router/commit/a402415a2a28b360c43b9fe8f4f54c540f6c33de)) + * it should autoscroll when expr is missing. ([8bb9e27a](https://github.com/angular-ui/ui-router/commit/8bb9e27a2986725f45daf44c4c9f846385095aff)) + + +#### Features + +* **uiSref:** add target attribute behaviour ([c12bf9a5](https://github.com/angular-ui/ui-router/commit/c12bf9a520d30d70294e3d82de7661900f8e394e)) +* **uiView:** + * merge autoscroll expression test. ([b89e0f87](https://github.com/angular-ui/ui-router/commit/b89e0f871d5cc35c10925ede986c10684d5c9252)) + * cache and test autoscroll expression ([ee262282](https://github.com/angular-ui/ui-router/commit/ee2622828c2ce83807f006a459ac4e11406d9258)) diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/CONTRIBUTING.md b/public/app/vendor/node_modules/@uirouter/angularjs/CONTRIBUTING.md new file mode 100644 index 00000000..f4896914 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/CONTRIBUTING.md @@ -0,0 +1,113 @@ + +# Report an Issue + +Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure +it hasn't already been reported. You can [search through existing issues](https://github.com/angular-ui/ui-router/search?q=wat%3F&type=Issues) +to see if someone's reported one similar to yours. + +If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code +as possible: the more minimalist, the faster we can debug it). + +Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem, +and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to +that plunkr you created! + +**Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure +is a bug, it's best to talk it out on +[StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This +keeps development streamlined, and helps us focus on building great software. + + +Issues only! | +-------------| +Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). | + +#### Purple Labels +A purple label means that **you** need to take some further action. + - ![Not Actionable - Need Info](https://angular-ui.github.io/ui-router/ngdoc_assets/incomplete.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue. + - ![Plunkr Please](https://angular-ui.github.io/ui-router/ngdoc_assets/example.png): Please [create a plunkr](http://bit.ly/UIR-Plunk) + - ![StackOverflow](https://angular-ui.github.io/ui-router/ngdoc_assets/so.png): We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why. + +If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately. + +# Contribute + +**(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine. + +**(2)** Check out the [roadmap](https://github.com/angular-ui/ui-router/milestones) to see where the project is headed, and if your feature idea fits with where we're headed. + +**(3)** If you're not sure, [open an RFC](https://github.com/angular-ui/ui-router/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea. + +**(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules: + +- *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests +- Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one +- Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release. +- Changes should always respect the coding style of the project + + + +# Developing + +UI-Router uses npm and Rollup. + +## Fetch the source code + +The code for Angular UI-Router is split into two source repositories: + +* [UI-Router Core](https://github.com/ui-router/core) (`@uirouter/core` on npm) +* [UI-Router for Angular 1](https://github.com/angular-ui/ui-router) (`@ui-router/angularjs` on npm) + +Clone both repositories into directories next to each other. + +``` +mkdir uirouter +cd uirouter +git clone https://github.com/angular-ui/ui-router.git angularjs +git clone https://github.com/ui-router/core.git core +``` + +## Install dependencies + +Use `npm` to install the development dependencies for each repository. + +``` +cd core +npm install +cd ../angularjs +npm install +cd .. +``` + +## Link the directories + +This step is necessary if you need to modify any code in `@uirouter/core`. +Using `npm`, link `@uirouter/core` into `@uirouter/angularjs` + +``` +cd core +npm link +cd ../angularjs +npm link '@uirouter/core' +``` + +After executing these steps, `@uirouter/angularjs` will be depend on your local copy of `@uirouter/core` instead of the version listed in `package.json`. + +## Develop + +These scripts may be run in the `angularjs` directory: + +* `npm run build`: Compiles TypeScript source +* `npm run package`: Compiles TypeScript source and creates the Rollup bundles. +* `npm test`: Runs the test suite (against Angular 1.2 through 1.5). +* `npm run watch`: Continuously compiles the source and runs the test suite (when either source or tests change). + +Scripts of the same name (in the `core` directory) can be used. + +* `npm run build`: Compiles `@uirouter/core` TypeScript source +* `npm test`: Runs the `@uirouter/core` test suite +* `npm run watch`: Continuously compiles the source and runs the `@uirouter/core` test suite (when core source or tests change). + +If you've followed the [linking instructions](#link-the-directories), it's useful to run both +`npm run watch` tasks (each task from `@uirouter/core` *and* `@uirouter/angularjs`). +This ensures that changes to either `@uirouter/core` and `@uirouter/angularjs` compile successfully and are run against their test suites. diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/DOCS.md b/public/app/vendor/node_modules/@uirouter/angularjs/DOCS.md new file mode 100644 index 00000000..a532665a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/DOCS.md @@ -0,0 +1,48 @@ +# [UI Router for Angular 1](https://ui-router.github.io/ng1/docs/latest) + +#### The de-facto solution to flexible routing in angular 1 + +
+ + + +[![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router) + +
+ + +Angular UI-Router is a client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application) +routing framework for [AngularJS](http://angularjs.org). + +**[View on Github](http://github.com/angular-ui/ui-router) |** +**[Tutorials](https://ui-router.github.io/ng1/tutorials/)** | +**[Guides](https://ui-router.github.io/guide) |** +**[Sample App](http://ui-router.github.io/resources/sampleapp/) |** +**[Wiki](https://github.com/angular-ui/ui-router/wiki) |** +**[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions)** + +#### API Documentation Organization + +The documentation is arranged according to API concern, such as `url`, `resolve`, and `core`. +For a list of services and objects that can be injectable, see the [`injectables` section](./injectables.html). + +By default, only the public UI-Router API is shown. +To view both public API and the internal APIs, check the "Internal UI-Router API" checkbox. + +#### Typescript + +UI-Router is written in Typescript. +The API documentation is generated using [TypeDoc](https://github.com/TypeStrong/typedoc). +The documentation reflects the Typescript classes, interfaces, and parameter types information embedded in the source code. + +#### Contributing + +Angular UI-Router depends on the framework agnostic `@uirouter/core`. +To contribute to the documentation, please submit a PR to either +[@uirouter/angularjs](http://github.com/angular-ui/ui-router) +or +[@uirouter/core](http://github.com/ui-router/core). +To find where a specific piece of documentation is written, follow the links that say: + > _Defined in ui-router/somedir/somefile.ts_ + + diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/ISSUE_TEMPLATE.md b/public/app/vendor/node_modules/@uirouter/angularjs/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..764b85b6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/ISSUE_TEMPLATE.md @@ -0,0 +1,53 @@ +This issue tracker is for Bug Reports and Feature Requests only. +Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details. + +This is a: + +- [ ] Bug Report +- [ ] Feature Request +- [ ] General Query + +My version of UI-Router is: (version) + + + +# Bug Report + +#### Current Behavior: + +(current behavior here) + +#### Expected Behavior: + +(expected behavior here) + +#### Link to Plunker that reproduces the issue: + +http://bit.ly/UIR-Plunk + + + + +# Feature Request + +(feature request here) + + + + +# General Query + +Please direct general implementation questions to StackOverflow: +http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router + +Please review the Sample Application which highlights common approaches: +https://github.com/ui-router/sample-app-ng1 + +- [ ] I have already asked my question on StackOverflow and nobody could answer the question + +- [ ] I have already reviewed the sample application for examples of common approaches + +- [ ] I believe my question can only be answered by the UI-Router maintainers + + +(general query here) diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/LICENSE b/public/app/vendor/node_modules/@uirouter/angularjs/LICENSE new file mode 100644 index 00000000..6413b092 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2015 The AngularUI Team, Karsten Sperling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/README.md b/public/app/vendor/node_modules/@uirouter/angularjs/README.md new file mode 100644 index 00000000..a64087de --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/README.md @@ -0,0 +1,56 @@ +# AngularUI Router  [![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router) + +**Note: this is the Angular 1.x source for UI-Router version 1.0. If you are looking for the source for UI-Router +version 0.2.x, it can be found [here](https://github.com/angular-ui/ui-router/tree/legacy)** + +--- + + +#### The de-facto solution to flexible routing in angular +--- +**[Tutorials](https://ui-router.github.io/tutorials/)** | +**[API Docs](https://ui-router.github.io/docs/latest/)** | +**[Download stable](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.js)** (or **[Minified](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.min.js)**) **|** +**[Guide](https://github.com/angular-ui/ui-router/wiki) |** +**[Sample App](http://ui-router.github.io/resources/sampleapp/) |** +**[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |** +**[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |** +**[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |** +**[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |** + +--- + +Angular UI-Router is a client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application) +routing framework for [AngularJS](http://angularjs.org). + +Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows +changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a +location deep within the SPA. + +UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a +[*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine) to manage the transitions between those +application states in a transaction-like manner. + +## Get Started + + +- [UI-Router for Angular 1](https://ui-router.github.io/ng1) +- [UI-Router for Angular 2](https://ui-router.github.io/ng2) +- [UI-Router for React](https://ui-router.github.io/react) + +## Resources + +* [In-Depth Guide](https://github.com/angular-ui/ui-router/wiki) +* [Slides comparing ngRoute to ui-router](http://slid.es/timkindberg/ui-router#/) +* [UI-Router Extras / Addons for legacy (0.x)](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen) + +### Videos + +* [Introduction Video](https://egghead.io/lessons/angularjs-introduction-ui-router) (egghead.io) +* [Tim Kindberg on Angular UI-Router](https://www.youtube.com/watch?v=lBqiZSemrqg) +* [Activating States](https://egghead.io/lessons/angularjs-ui-router-activating-states) (egghead.io) +* [Learn Angular.js using UI-Router](http://youtu.be/QETUuZ27N0w) (LearnCode.academy) + +## Reporting issues and Contributing + +Please read our [Contributor guidelines](CONTRIBUTING.md) before reporting an issue or creating a pull request. diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/artifacts.json b/public/app/vendor/node_modules/@uirouter/angularjs/artifacts.json new file mode 100644 index 00000000..efbce402 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/artifacts.json @@ -0,0 +1,8 @@ +{ + "ARTIFACTS": [ + "lib", + "lib-esm", + "release", + "package.json" + ] +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.d.ts new file mode 100644 index 00000000..a58640ee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.d.ts @@ -0,0 +1 @@ +export declare const ng: any; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js new file mode 100644 index 00000000..af11d370 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js @@ -0,0 +1,4 @@ +import * as ng_from_import from "angular"; +var ng_from_global = angular; +export var ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global; +//# sourceMappingURL=angular.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js.map new file mode 100644 index 00000000..df8e4a43 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/angular.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "angular.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/angular.ts" + ], + "names": [], + "mappings": "AAKA,OAAO,KAAK,cAAc,MAAM,SAAS,CAAC;AAC1C,IAAI,cAAc,GAAG,OAAO,CAAC;AAE7B,MAAM,CAAC,IAAM,EAAE,GAAG,CAAC,cAAc,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC", + "sourcesContent": [ + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.d.ts new file mode 100644 index 00000000..0e3fe8d5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.d.ts @@ -0,0 +1,3 @@ +/** @hidden Used for typedoc */ +export interface ng1_directive { +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js new file mode 100644 index 00000000..e5f6cf7f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js @@ -0,0 +1,569 @@ +/** + * # Angular 1 Directives + * + * These are the directives included in UI-Router for Angular 1. + * These directives are used in templates to create viewports and link/navigate to states. + * + * @ng1api + * @preferred + * @module directives + */ /** for typedoc */ +import { ng as angular } from "../angular"; +import { extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom } from "@uirouter/core"; +/** @hidden */ +function parseStateRef(ref) { + var paramsOnly = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (paramsOnly) + ref = '(' + paramsOnly[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/); + if (!parsed || parsed.length !== 4) + throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1] || null, paramExpr: parsed[3] || null }; +} +/** @hidden */ +function stateContext(el) { + var $uiView = el.parent().inheritedData('$uiView'); + var path = parse('$cfg.path')($uiView); + return path ? tail(path).state.name : undefined; +} +/** @hidden */ +function processedDef($state, $element, def) { + var uiState = def.uiState || $state.current.name; + var uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {}); + var href = $state.href(uiState, def.uiStateParams, uiStateOpts); + return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href }; +} +/** @hidden */ +function getTypeInfo(el) { + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; + var isForm = el[0].nodeName === "FORM"; + return { + attr: isForm ? "action" : (isSvg ? 'xlink:href' : 'href'), + isAnchor: el.prop("tagName").toUpperCase() === "A", + clickable: !isForm + }; +} +/** @hidden */ +function clickHook(el, $state, $timeout, type, getDef) { + return function (e) { + var button = e.which || e.button, target = getDef(); + if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function () { + $state.go(target.uiState, target.uiStateParams, target.uiStateOpts); + }); + e.preventDefault(); + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0; + e.preventDefault = function () { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }; +} +/** @hidden */ +function defaultOpts(el, $state) { + return { + relative: stateContext(el) || $state.$current, + inherit: true, + source: "sref" + }; +} +/** @hidden */ +function bindEvents(element, scope, hookFn, uiStateOpts) { + var events; + if (uiStateOpts) { + events = uiStateOpts.events; + } + if (!isArray(events)) { + events = ['click']; + } + var on = element.on ? 'on' : 'bind'; + for (var _i = 0, events_1 = events; _i < events_1.length; _i++) { + var event_1 = events_1[_i]; + element[on](event_1, hookFn); + } + scope.$on('$destroy', function () { + var off = element.off ? 'off' : 'unbind'; + for (var _i = 0, events_2 = events; _i < events_2.length; _i++) { + var event_2 = events_2[_i]; + element[off](event_2, hookFn); + } + }); +} +/** + * `ui-sref`: A directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of the `ui-sref` is the name of the state to link to. + * + * #### Example: + * This will activate the `home` state when the link is clicked. + * ```html + * Home + * ``` + * + * ### Relative Links + * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]). + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create a relative `ui-sref` which always targets the same destination. + * + * #### Example: + * Both these links are relative to the parent state, even when a child state is currently active. + * ```html + * child 1 state + * child 2 state + * ``` + * + * This link activates the parent state. + * ```html + * Return + * ``` + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * #### Example: + * Assuming the `users` state has a url of `/users/` + * ```html + * Users + * ``` + * + * ### Parameter Values + * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state. + * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses. + * The content inside the parentheses is an expression, evaluated to the parameter values. + * + * #### Example: + * This example renders a list of links to users. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ user.displayName }} + *
  • + * ``` + * + * Note: + * The parameter values expression is `$watch`ed for updates. + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-sref-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Examples + * If you have the following template: + * + * ```html + * Home + * About + * Next page + * + * + * ``` + * + * Then (assuming the current state is `contacts`) the rendered html including hrefs would be: + * + * ```html + * Home + * About + * Next page + * + *
      + *
    • + * Joe + *
    • + *
    • + * Alice + *
    • + *
    • + * Bob + *
    • + *
    + * + * Home + * ``` + * + * ### Notes + * + * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses. + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * + * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). + * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. + */ +var uiSref; +uiSref = ['$uiRouter', '$timeout', + function $StateRefDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var ref = parseStateRef(attrs.uiSref); + rawDef.uiState = ref.state; + rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {}; + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function (val) { + rawDef.uiStateParams = extend({}, val); + update(); + }, true); + rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr)); + } + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-state`: A fully dynamic directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.** + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to. + * **This is in contrast with `ui-sref`, which takes a state name as a string literal.** + * + * #### Example: + * Create a list of links. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Relative Links + * If the expression evaluates to a relative path, it is processed like [[uiSref]]. + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create relative `ui-state` which always targets the same destination. + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * ### Parameter Values + * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state. + * Param values should be provided using the `ui-state-params` attribute. + * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression. + * + * #### Example: + * This example renders a list of links with param values. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-state-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Notes + * + * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`. + * However, it might be simpler to use [[uiSref]] parameter-only links. + * + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * ``` + */ +var uiState; +uiState = ['$uiRouter', '$timeout', + function $StateRefDynamicDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts']; + var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return (acc[attr] = noop, acc); }, {}); + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + inputAttrs.forEach(function (field) { + rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null; + attrs.$observe(field, function (expr) { + watchDeregFns[field](); + watchDeregFns[field] = scope.$watch(expr, function (newval) { + rawDef[field] = newval; + update(); + }, true); + }); + }); + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active + * + * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the + * related directive's state is active (and remove them when it is inactive). + * + * The primary use-case is to highlight the active link in navigation menus, + * distinguishing it from the inactive menu items. + * + * ### Linking to a `ui-sref` or `ui-state` + * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element. + * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**. + * + * ### Matching + * + * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**. + * This is a "fuzzy match" which uses [[StateService.includes]]. + * + * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active). + * This is an "exact match" which uses [[StateService.is]]. + * + * ### Parameter values + * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted. + * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted. + * + * #### Example: + * ```html + *
  • + * {{ user.lastName }} + *
  • + * ``` + * + * ### Examples + * + * Given the following template: + * #### Example: + * ```html + * + * ``` + * + * When the app state is `app.user` (or any child state), + * and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + * + * ```html + * + * ``` + * + * ### Glob mode + * + * It is possible to pass `ui-sref-active` an expression that evaluates to an object. + * The objects keys represent active class names and values represent the respective state names/globs. + * `ui-sref-active` will match if the current active state **includes** any of + * the specified state names/globs, even the abstract ones. + * + * #### Example: + * Given the following template, with "admin" being an abstract state: + * ```html + *
    + * Roles + *
    + * ``` + * + * When the current state is "admin.roles" the "active" class will be applied to both the
    and elements. + * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`. + * + * ### Notes: + * + * - The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` + */ +var uiSrefActive; +uiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter', + function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + var states = [], activeEqClass, uiSrefActive; + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); + try { + uiSrefActive = $scope.$eval($attrs.uiSrefActive); + } + catch (e) { + // Do nothing. uiSrefActive is not a valid expression. + // Fall back to using $interpolate below + } + uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); + if (isObject(uiSrefActive)) { + forEach(uiSrefActive, function (stateOrName, activeClass) { + if (isString(stateOrName)) { + var ref = parseStateRef(stateOrName); + addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); + } + }); + } + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$addStateInfo = function (newState, newParams) { + // we already got an explicit state provided by ui-sref-active, so we + // shadow the one that comes from ui-sref + if (isObject(uiSrefActive) && states.length > 0) { + return; + } + var deregister = addState(newState, newParams, uiSrefActive); + update(); + return deregister; + }; + function updateAfterTransition(trans) { + trans.promise.then(update, noop); + } + $scope.$on('$stateChangeSuccess', update); + $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition)); + if ($uiRouter.globals.transition) { + updateAfterTransition($uiRouter.globals.transition); + } + function addState(stateName, stateParams, activeClass) { + var state = $state.get(stateName, stateContext($element)); + var stateInfo = { + state: state || { name: stateName }, + params: stateParams, + activeClass: activeClass + }; + states.push(stateInfo); + return function removeState() { + removeFrom(states)(stateInfo); + }; + } + // Update route state + function update() { + var splitClasses = function (str) { + return str.split(/\s/).filter(identity); + }; + var getClasses = function (stateList) { + return stateList.map(function (x) { return x.activeClass; }).map(splitClasses).reduce(unnestR, []); + }; + var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []); + var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); })); + var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length; + var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : []; + var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []); + var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); }); + $scope.$evalAsync(function () { + addClasses.forEach(function (className) { return $element.addClass(className); }); + removeClasses.forEach(function (className) { return $element.removeClass(className); }); + }); + } + update(); + }] + }; + }]; +angular.module('ui.router.state') + .directive('uiSref', uiSref) + .directive('uiSrefActive', uiSrefActive) + .directive('uiSrefActiveEq', uiSrefActive) + .directive('uiState', uiState); +//# sourceMappingURL=stateDirectives.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js.map new file mode 100644 index 00000000..06d9b733 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateDirectives.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/directives/stateDirectives.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;GASG,CAAC,kBAAkB;AACtB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EACE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAEtH,MAAM,gBAAgB,CAAC;AAMxB,cAAc;AACd,uBAAuB,GAAW;IAChC,IAAI,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACxD,EAAE,CAAC,CAAC,UAAU,CAAC;QAAC,GAAG,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAEhD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACzE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;IACvF,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;AACpE,CAAC;AAED,cAAc;AACd,sBAAsB,EA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,MAAM,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAzB,CAAyB,CAAC,CAAC;wBAExE,MAAM,CAAC,UAAU,CAAC;4BAChB,UAAU,CAAC,OAAO,CAAC,UAAA,SAAS,IAAI,OAAA,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EAA5B,CAA4B,CAAC,CAAC;4BAC9D,aAAa,CAAC,OAAO,CAAC,UAAA,SAAS,IAAI,OAAA,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,EAA/B,CAA+B,CAAC,CAAC;wBACtE,CAAC,CAAC,CAAC;oBACL,CAAC;oBAED,MAAM,EAAE,CAAC;gBACX,CAAC,CAAC;SACL,CAAC;IACJ,CAAC,CAAC,CAAC;AAOL,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;KAC5B,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC3B,SAAS,CAAC,cAAc,EAAE,YAAY,CAAC;KACvC,SAAS,CAAC,gBAAgB,EAAE,YAAY,CAAC;KACzC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC", + "sourcesContent": [ + "/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.d.ts new file mode 100644 index 00000000..5c065ea1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.d.ts @@ -0,0 +1,142 @@ +import { ActiveUIView } from "@uirouter/core"; +import { Ng1ViewConfig } from "../statebuilders/views"; +import { ng1_directive } from "./stateDirectives"; +/** @hidden */ +export declare type UIViewData = { + $cfg: Ng1ViewConfig; + $uiView: ActiveUIView; +}; +/** @hidden */ +export declare type UIViewAnimData = { + $animEnter: Promise; + $animLeave: Promise; + $$animLeave: { + resolve: () => any; + }; +}; +/** + * `ui-view`: A viewport directive which is filled in by a view from the active state. + * + * ### Attributes + * + * - `name`: (Optional) A view name. + * The name should be unique amongst the other views in the same state. + * You can have views of the same name that live in different states. + * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). + * + * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. + * Uses [[$uiViewScroll]] to do the scrolling. + * + * - `onload`: Expression to evaluate whenever the view updates. + * + * #### Example: + * A view can be unnamed or named. + * ```html + * + *
    + * + * + *
    + * + * + * + * ``` + * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + * + * ```html + *
    + * $stateProvider.state("home", { + * template: "

    HELLO!

    " + * }) + * ``` + * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the + * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + * + * ```html + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "main": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * Really though, you'll use views to set up multiple views: + * + * ```html + *
    + *
    + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + * ``` + * + * #### Examples for `autoscroll`: + * ```html + * + * + * + * + * + * + * + * ``` + * + * Resolve data: + * + * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this + * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. + * + * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the + * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which + * depends on `$resolve` data. + * + * #### Example: + * ```js + * $stateProvider.state('home', { + * template: '', + * resolve: { + * user: function(UserService) { return UserService.fetchUser(); } + * } + * }); + * ``` + */ +export declare let uiView: ng1_directive; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js new file mode 100644 index 00000000..06a4f4ad --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js @@ -0,0 +1,414 @@ +/** + * @ng1api + * @module directives + */ /** for typedoc */ +import { ng as angular } from "../angular"; +import { noop } from "angular"; +import { extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse, ResolveContext, kebobString } from "@uirouter/core"; +import { Ng1ViewConfig } from "../statebuilders/views"; +import { getLocals } from "../services"; +/** + * `ui-view`: A viewport directive which is filled in by a view from the active state. + * + * ### Attributes + * + * - `name`: (Optional) A view name. + * The name should be unique amongst the other views in the same state. + * You can have views of the same name that live in different states. + * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). + * + * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. + * Uses [[$uiViewScroll]] to do the scrolling. + * + * - `onload`: Expression to evaluate whenever the view updates. + * + * #### Example: + * A view can be unnamed or named. + * ```html + * + *
    + * + * + *
    + * + * + * + * ``` + * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + * + * ```html + *
    + * $stateProvider.state("home", { + * template: "

    HELLO!

    " + * }) + * ``` + * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the + * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + * + * ```html + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "main": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * Really though, you'll use views to set up multiple views: + * + * ```html + *
    + *
    + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + * ``` + * + * #### Examples for `autoscroll`: + * ```html + * + * + * + * + * + * + * + * ``` + * + * Resolve data: + * + * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this + * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. + * + * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the + * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which + * depends on `$resolve` data. + * + * #### Example: + * ```js + * $stateProvider.state('home', { + * template: '', + * resolve: { + * user: function(UserService) { return UserService.fetchUser(); } + * } + * }); + * ``` + */ +export var uiView; +uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q', + function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) { + function getRenderer(attrs, scope) { + return { + enter: function (element, target, cb) { + if (angular.version.minor > 2) { + $animate.enter(element, null, target).then(cb); + } + else { + $animate.enter(element, null, target, cb); + } + }, + leave: function (element, cb) { + if (angular.version.minor > 2) { + $animate.leave(element).then(cb); + } + else { + $animate.leave(element, cb); + } + } + }; + } + function configsEqual(config1, config2) { + return config1 === config2; + } + var rootData = { + $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } }, + $uiView: {} + }; + var directive = { + count: 0, + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, unregister, onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(attrs, scope), viewConfig = undefined, inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default'; + var activeUIView = { + $type: 'ng1', + id: directive.count++, + name: name, + fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + "." + name : name, + config: null, + configUpdated: configUpdatedCallback, + get creationContext() { + var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited); + // Allow + // See https://github.com/angular-ui/ui-router/issues/3355 + var fromParentTag = parse('$uiView.creationContext')(inherited); + return fromParentTagConfig || fromParentTag; + } + }; + trace.traceUIViewEvent("Linking", activeUIView); + function configUpdatedCallback(config) { + if (config && !(config instanceof Ng1ViewConfig)) + return; + if (configsEqual(viewConfig, config)) + return; + trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context); + viewConfig = config; + updateView(config); + } + $element.data('$uiView', { $uiView: activeUIView }); + updateView(); + unregister = $view.registerUIView(activeUIView); + scope.$on("$destroy", function () { + trace.traceUIViewEvent("Destroying/Unregistering", activeUIView); + unregister(); + }); + function cleanupLastView() { + if (previousEl) { + trace.traceUIViewEvent("Removing (previous) el", previousEl.data('$uiView')); + previousEl.remove(); + previousEl = null; + } + if (currentScope) { + trace.traceUIViewEvent("Destroying scope", activeUIView); + currentScope.$destroy(); + currentScope = null; + } + if (currentEl) { + var _viewData_1 = currentEl.data('$uiViewAnim'); + trace.traceUIViewEvent("Animate out", _viewData_1); + renderer.leave(currentEl, function () { + _viewData_1.$$animLeave.resolve(); + previousEl = null; + }); + previousEl = currentEl; + currentEl = null; + } + } + function updateView(config) { + var newScope = scope.$new(); + var animEnter = $q.defer(), animLeave = $q.defer(); + var $uiViewData = { + $cfg: config, + $uiView: activeUIView, + }; + var $uiViewAnim = { + $animEnter: animEnter.promise, + $animLeave: animLeave.promise, + $$animLeave: animLeave + }; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoading + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {string} viewName Name of the view. + */ + newScope.$emit('$viewContentLoading', name); + var cloned = $transclude(newScope, function (clone) { + clone.data('$uiViewAnim', $uiViewAnim); + clone.data('$uiView', $uiViewData); + renderer.enter(clone, $element, function onUIViewEnter() { + animEnter.resolve(); + if (currentScope) + currentScope.$emit('$viewContentAnimationEnded'); + if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + currentEl = cloned; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded', config || viewConfig); + currentScope.$eval(onloadExp); + } + }; + } + }; + return directive; + }]; +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout']; +/** @hidden */ +function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q, $timeout) { + var getControllerAs = parse('viewDecl.controllerAs'); + var getResolveAs = parse('viewDecl.resolveAs'); + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + tElement.empty(); + return function (scope, $element) { + var data = $element.data('$uiView'); + if (!data) { + $element.html(initial); + $compile($element.contents())(scope); + return; + } + var cfg = data.$cfg || { viewDecl: {}, getTemplate: noop }; + var resolveCtx = cfg.path && new ResolveContext(cfg.path); + $element.html(cfg.getTemplate($element, resolveCtx) || initial); + trace.traceUIViewFill(data.$uiView, $element.html()); + var link = $compile($element.contents()); + var controller = cfg.controller; + var controllerAs = getControllerAs(cfg); + var resolveAs = getResolveAs(cfg); + var locals = resolveCtx && getLocals(resolveCtx); + scope[resolveAs] = locals; + if (controller) { + var controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element })); + if (controllerAs) { + scope[controllerAs] = controllerInstance; + scope[controllerAs][resolveAs] = locals; + } + // TODO: Use $view service as a central point for registering component-level hooks + // Then, when a component is created, tell the $view service, so it can invoke hooks + // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element }); + // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element })); + $element.data('$ngControllerController', controllerInstance); + $element.children().data('$ngControllerController', controllerInstance); + registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg); + } + // Wait for the component to appear in the DOM + if (isString(cfg.viewDecl.component)) { + var cmp_1 = cfg.viewDecl.component; + var kebobName = kebobString(cmp_1); + var tagRegexp_1 = new RegExp("^(x-|data-)?" + kebobName + "$", "i"); + var getComponentController = function () { + var directiveEl = [].slice.call($element[0].children) + .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); }); + return directiveEl && angular.element(directiveEl).data("$" + cmp_1 + "Controller"); + }; + var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) { + if (!ctrlInstance) + return; + registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg); + deregisterWatch_1(); + }); + } + link(scope); + }; + } + }; +} +/** @hidden */ +var hasComponentImpl = typeof angular.module('ui.router')['component'] === 'function'; +/** @hidden incrementing id */ +var _uiCanExitId = 0; +/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */ +function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) { + // Call $onInit() ASAP + if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) { + controllerInstance.$onInit(); + } + var viewState = tail(cfg.path).state.self; + var hookOptions = { bind: controllerInstance }; + // Add component-level hook for onParamsChange + if (isFunction(controllerInstance.uiOnParamsChanged)) { + var resolveContext = new ResolveContext(cfg.path); + var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data; + // Fire callback on any successful transition + var paramsUpdated = function ($transition$) { + // Exit early if the $transition$ is the same as the view was created within. + // Exit early if the $transition$ will exit the state the view is for. + if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1) + return; + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + var toSchema = $transition$.treeChanges().to.map(function (node) { return node.paramSchema; }).reduce(unnestR, []); + var fromSchema = $transition$.treeChanges().from.map(function (node) { return node.paramSchema; }).reduce(unnestR, []); + // Find the to params that have different values than the from params + var changedToParams = toSchema.filter(function (param) { + var idx = fromSchema.indexOf(param); + return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]); + }); + // Only trigger callback if a to param has changed or is new + if (changedToParams.length) { + var changedKeys_1 = changedToParams.map(function (x) { return x.id; }); + // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params. + var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; }); + controllerInstance.uiOnParamsChanged(newValues, $transition$); + } + }; + $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions)); + } + // Add component-level hook for uiCanExit + if (isFunction(controllerInstance.uiCanExit)) { + var id_1 = _uiCanExitId++; + var cacheProp_1 = '_uiCanExitIds'; + // Returns true if a redirect transition already answered truthy + var prevTruthyAnswer_1 = function (trans) { + return !!trans && (trans[cacheProp_1] && trans[cacheProp_1][id_1] === true || prevTruthyAnswer_1(trans.redirectedFrom())); + }; + // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition + var wrappedHook = function (trans) { + var promise, ids = trans[cacheProp_1] = trans[cacheProp_1] || {}; + if (!prevTruthyAnswer_1(trans)) { + promise = $q.when(controllerInstance.uiCanExit(trans)); + promise.then(function (val) { return ids[id_1] = (val !== false); }); + } + return promise; + }; + var criteria = { exiting: viewState.name }; + $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions)); + } +} +angular.module('ui.router.state').directive('uiView', uiView); +angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill); +//# sourceMappingURL=viewDirective.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js.map new file mode 100644 index 00000000..d1423f5d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "viewDirective.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/directives/viewDirective.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAEmD,IAAI,EAC7D,MAAM,SAAS,CAAC;AAEjB,OAAO,EACH,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAC3C,cAAc,EACxC,WAAW,EACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAA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,IAAI,kBAAgB,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC;QAA1G,CAA0G,CAAC;QAE/G,kHAAkH;QAClH,IAAM,WAAW,GAAG,UAAC,KAAiB;YACpC,IAAI,OAAO,EAAE,GAAG,GAAG,KAAK,CAAC,WAAS,CAAC,GAAG,KAAK,CAAC,WAAS,CAAC,IAAI,EAAE,CAAC;YAC7D,EAAE,CAAC,CAAC,CAAC,kBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAE,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,CAAC,EAAzB,CAAyB,CAAC,CAAC;YACjD,CAAC;YACD,MAAM,CAAC,OAAO,CAAC;QACjB,CAAC,CAAC;QAEF,IAAI,QAAQ,GAAG,EAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAC,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAQ,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAQ,MAAM,CAAC,CAAC;AACpE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAQ,kBAAkB,CAAC,CAAC", + "sourcesContent": [ + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.d.ts new file mode 100644 index 00000000..b2871e24 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.d.ts @@ -0,0 +1,19 @@ +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +export * from "./interface"; +export * from "./services"; +export * from "./statebuilders/views"; +export * from "./stateProvider"; +export * from "./urlRouterProvider"; +import "./injectables"; +import "./directives/stateDirectives"; +import "./stateFilters"; +import "./directives/viewDirective"; +import "./viewScroll"; +declare const _default: "ui.router"; +export default _default; +import * as core from "@uirouter/core"; +export { core }; +export * from "@uirouter/core"; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js new file mode 100644 index 00000000..9ae66926 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js @@ -0,0 +1,18 @@ +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +export * from "./services"; +export * from "./statebuilders/views"; +export * from "./stateProvider"; +export * from "./urlRouterProvider"; +import "./injectables"; +import "./directives/stateDirectives"; +import "./stateFilters"; +import "./directives/viewDirective"; +import "./viewScroll"; +export default "ui.router"; +import * as core from "@uirouter/core"; +export { core }; +export * from "@uirouter/core"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js.map new file mode 100644 index 00000000..18a559a3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/index.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AAGV,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,8BAA8B,CAAC;AACtC,OAAO,gBAAgB,CAAC;AACxB,OAAO,4BAA4B,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,eAAe,WAAW,CAAC;AAE3B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,cAAc,gBAAgB,CAAC", + "sourcesContent": [ + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js new file mode 100644 index 00000000..599583d4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js @@ -0,0 +1,366 @@ +/** + * # Angular 1 injectable services + * + * This is a list of the objects which can be injected using angular's injector. + * + * There are three different kind of injectable objects: + * + * ## **Provider** objects + * #### injectable into a `.config()` block during configtime + * + * - [[$uiRouterProvider]]: The UI-Router instance + * - [[$stateProvider]]: State registration + * - [[$transitionsProvider]]: Transition hooks + * - [[$urlServiceProvider]]: All URL related public APIs + * + * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling + * - [[$urlRouterProvider]]: (deprecated) Url matching rules + * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config + * + * ## **Service** objects + * #### injectable globally during runtime + * + * - [[$uiRouter]]: The UI-Router instance + * - [[$trace]]: Enable transition trace/debug + * - [[$transitions]]: Transition hooks + * - [[$state]]: Imperative state related APIs + * - [[$stateRegistry]]: State registration + * - [[$urlService]]: All URL related public APIs + * - [[$uiRouterGlobals]]: Global variables + * - [[$uiViewScroll]]: Scroll an element into view + * + * - [[$stateParams]]: (deprecated) Global state param values + * - [[$urlRouter]]: (deprecated) URL synchronization + * - [[$urlMatcherFactory]]: (deprecated) URL parsing config + * + * ## **Per-Transition** objects + * + * - These kind of objects are injectable into: + * - Resolves ([[Ng1StateDeclaration.resolve]]), + * - Transition Hooks ([[TransitionService.onStart]], etc), + * - Routed Controllers ([[Ng1ViewDeclaration.controller]]) + * + * #### Different instances are injected based on the [[Transition]] + * + * - [[$transition$]]: The current Transition object + * - [[$stateParams]]: State param values for pending Transition (deprecated) + * - Any resolve data defined using [[Ng1StateDeclaration.resolve]] + * + * @ng1api + * @preferred + * @module injectables + */ /** */ +/** + * The current (or pending) State Parameters + * + * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition. + * + * The values are not updated until *after* a `Transition` successfully completes. + * + * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running. + * + * ### Deprecation warning: + * + * The value injected for `$stateParams` is different depending on where it is injected. + * + * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`. + * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`. + * + * Because of these confusing details, this service is deprecated. + * + * ### Instead of using the global `$stateParams` service object, + * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]] + * + * ```js + * MyService.$inject = ['$uiRouterGlobals']; + * function MyService($uiRouterGlobals) { + * return { + * paramValues: function () { + * return $uiRouterGlobals.params; + * } + * } + * } + * ``` + * + * ### Instead of using the per-transition `$stateParams` object, + * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]] + * + * ```js + * MyController.$inject = ['$transition$']; + * function MyController($transition$) { + * var username = $transition$.params().username; + * // .. do something with username + * } + * ``` + * + * --- + * + * This object can be injected into other services. + * + * #### Deprecated Example: + * ```js + * SomeService.$inject = ['$http', '$stateParams']; + * function SomeService($http, $stateParams) { + * return { + * getUser: function() { + * return $http.get('/api/users/' + $stateParams.username); + * } + * } + * }; + * angular.service('SomeService', SomeService); + * ``` + * @deprecated + */ +var $stateParams; +/** + * Global UI-Router variables + * + * The router global state as a **Service Object** (injectable during runtime). + * + * This object contains globals such as the current state and current parameter values. + */ +var $uiRouterGlobals; +/** + * The UI-Router instance + * + * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime). + * + * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. + * It has references to the other UI-Router services + * + * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time. + */ +var $uiRouter; +/** + * The UI-Router instance + * + * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase). + * + * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. + * It has references to the other UI-Router services + * + * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime. + */ +var $uiRouterProvider; +/** + * Transition debug/tracing + * + * The [[Trace]] singleton as a **Service Object** (injectable during runtime). + * + * Enables or disables Transition tracing which can help to debug issues. + */ +var $trace; +/** + * The Transition Service + * + * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime). + * + * This angular service exposes the [[TransitionService]] singleton, which is primarily + * used to register global transition hooks. + * + * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase. + */ +var $transitions; +/** + * The Transition Service + * + * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase) + * + * This angular service exposes the [[TransitionService]] singleton, which is primarily + * used to register global transition hooks. + * + * #### Note: This object is also exposed as [[$transitions]] for injection during runtime. + */ +var $transitionsProvider; +/** + * The current [[Transition]] object + * + * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers) + * + * This object returns information about the current transition, including: + * + * - To/from states + * - To/from parameters + * - Transition options + * - States being entered, exited, and retained + * - Resolve data + * - A Promise for the transition + * - Any transition failure information + * - An injector for both Service and Per-Transition Objects + */ +var $transition$; +/** + * The State Service + * + * The [[StateService]] singleton as a **Service Object** (injectable during runtime). + * + * This service used to manage and query information on registered states. + * It exposes state related APIs including: + * + * - Start a [[Transition]] + * - Imperatively lazy load states + * - Check if a state is currently active + * - Look up states by name + * - Build URLs for a state+parameters + * - Configure the global Transition error handler + * + * This angular service exposes the [[StateService]] singleton. + */ +var $state; +/** + * The State Registry + * + * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime). + * + * This service is used to register/deregister states. + * It has state registration related APIs including: + * + * - Register/deregister states + * - Listen for state registration/deregistration + * - Get states by name + * - Add state decorators (to customize the state creation process) + * + * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase. + */ +var $stateRegistry; +/** + * The State Registry + * + * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time). + * + * This service is used to register/deregister states. + * It has state registration related APIs including: + * + * - Register/deregister states + * - Listen for state registration/deregistration + * - Get states by name + * - Add state decorators (to customize the state creation process) + * + * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime. + */ +var $stateRegistryProvider; +/** + * The View Scroll provider + * + * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time). + * + * This angular service exposes the [[UIViewScrollProvider]] singleton and is + * used to disable UI-Router's scroll behavior. + */ +var $uiViewScrollProvider; +/** + * The View Scroll function + * + * The View Scroll function as a **Service Object** (injectable during runtime). + * + * This is a function that scrolls an element into view. + * The element is scrolled after a `$timeout` so the DOM has time to refresh. + * + * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, + * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]]. + * + * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true. + */ +var $uiViewScroll; +/** + * The StateProvider + * + * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time). + * + * This angular service exposes the [[StateProvider]] singleton. + * + * The `StateProvider` is primarily used to register states or add custom state decorators. + * + * ##### Note: This provider is a ng1 vestige. + * It is a passthrough to [[$stateRegistry]] and [[$state]]. + */ +var $stateProvider; +/** + * The URL Service Provider + * + * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase). + * + * A service used to configure and interact with the URL. + * It has URL related APIs including: + * + * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) + * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) + * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) + * - delay initial URL synchronization [[UrlService.deferIntercept]]. + * - get or set the current url: [[UrlService.url]] + * + * ##### Note: This service can also be injected during runtime as [[$urlService]]. + */ +var $urlServiceProvider; +/** + * The URL Service + * + * The [[UrlService]] singleton as a **Service Object** (injectable during runtime). + * + * Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. + * + * Used to configure the URL. + * It has URL related APIs including: + * + * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) + * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) + * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) + * - delay initial URL synchronization [[UrlService.deferIntercept]]. + * - get or set the current url: [[UrlService.url]] + * + * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. + */ +var $urlService; +/** + * The URL Router Provider + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead. + * + * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time). + * + * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime. + * + * @deprecated + */ +var $urlRouterProvider; +/** + * The Url Router + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime). + * + * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time. + * + * @deprecated + */ +var $urlRouter; +/** + * The URL Matcher Factory + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime). + * + * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. + * + * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time. + * + * @deprecated + */ +var $urlMatcherFactory; +/** + * The URL Matcher Factory + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time). + * + * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. + * + * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime. + * + * @deprecated + */ +var $urlMatcherFactoryProvider; +//# sourceMappingURL=injectables.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js.map new file mode 100644 index 00000000..c9756592 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/injectables.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "injectables.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/injectables.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG,CAAC,MAAM;AAUV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,IAAI,YAAyB,CAAC;AAE9B;;;;;;GAMG;AACH,IAAI,gBAAiC,CAAC;AAEtC;;;;;;;;;GASG;AACH,IAAI,SAAmB,CAAE;AAEzB;;;;;;;;;GASG;AACH,IAAI,iBAA2B,CAAC;AAEhC;;;;;;GAMG;AACH,IAAI,MAAa,CAAC;AAElB;;;;;;;;;GASG;AACH,IAAI,YAA+B,CAAC;AAEpC;;;;;;;;;GASG;AACH,IAAI,oBAAuC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,IAAI,YAAwB,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,MAAoB,CAAC;AAEzB;;;;;;;;;;;;;;GAcG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;GAcG;AACH,IAAI,sBAAqC,CAAC;AAE1C;;;;;;;GAOG;AACH,IAAI,qBAA2C,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,IAAI,aAAyC,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;;GAeG;AACH,IAAI,mBAA+B,CAAC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAI,WAAuB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,IAAI,UAAqB,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,IAAI,0BAA6C,CAAC", + "sourcesContent": [ + "/**\n * # Angular 1 injectable services\n *\n * This is a list of the objects which can be injected using angular's injector.\n *\n * There are three different kind of injectable objects:\n *\n * ## **Provider** objects\n * #### injectable into a `.config()` block during configtime\n *\n * - [[$uiRouterProvider]]: The UI-Router instance\n * - [[$stateProvider]]: State registration\n * - [[$transitionsProvider]]: Transition hooks\n * - [[$urlServiceProvider]]: All URL related public APIs\n *\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\n *\n * ## **Service** objects\n * #### injectable globally during runtime\n *\n * - [[$uiRouter]]: The UI-Router instance\n * - [[$trace]]: Enable transition trace/debug\n * - [[$transitions]]: Transition hooks\n * - [[$state]]: Imperative state related APIs\n * - [[$stateRegistry]]: State registration\n * - [[$urlService]]: All URL related public APIs\n * - [[$uiRouterGlobals]]: Global variables\n * - [[$uiViewScroll]]: Scroll an element into view\n *\n * - [[$stateParams]]: (deprecated) Global state param values\n * - [[$urlRouter]]: (deprecated) URL synchronization\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\n *\n * ## **Per-Transition** objects\n *\n * - These kind of objects are injectable into:\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\n * - Transition Hooks ([[TransitionService.onStart]], etc),\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\n *\n * #### Different instances are injected based on the [[Transition]]\n *\n * - [[$transition$]]: The current Transition object\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\n *\n * @ng1api\n * @preferred\n * @module injectables\n */ /** */\n\nimport { StateProvider } from \"./stateProvider\";\nimport {\n StateService, TransitionService, Transition, UrlRouter, UrlMatcherFactory,\n StateParams, StateRegistry, UIRouterGlobals, UIRouter, Trace, UrlService\n} from \"@uirouter/core\";\nimport { UIViewScrollProvider } from \"./viewScroll\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\n\n/**\n * The current (or pending) State Parameters\n *\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\n *\n * The values are not updated until *after* a `Transition` successfully completes.\n *\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\n *\n * ### Deprecation warning:\n *\n * The value injected for `$stateParams` is different depending on where it is injected.\n *\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\n *\n * Because of these confusing details, this service is deprecated.\n *\n * ### Instead of using the global `$stateParams` service object,\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\n *\n * ```js\n * MyService.$inject = ['$uiRouterGlobals'];\n * function MyService($uiRouterGlobals) {\n * return {\n * paramValues: function () {\n * return $uiRouterGlobals.params;\n * }\n * }\n * }\n * ```\n *\n * ### Instead of using the per-transition `$stateParams` object,\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\n *\n * ```js\n * MyController.$inject = ['$transition$'];\n * function MyController($transition$) {\n * var username = $transition$.params().username;\n * // .. do something with username\n * }\n * ```\n *\n * ---\n *\n * This object can be injected into other services.\n *\n * #### Deprecated Example:\n * ```js\n * SomeService.$inject = ['$http', '$stateParams'];\n * function SomeService($http, $stateParams) {\n * return {\n * getUser: function() {\n * return $http.get('/api/users/' + $stateParams.username);\n * }\n * }\n * };\n * angular.service('SomeService', SomeService);\n * ```\n * @deprecated\n */\nvar $stateParams: StateParams;\n\n/**\n * Global UI-Router variables\n *\n * The router global state as a **Service Object** (injectable during runtime).\n *\n * This object contains globals such as the current state and current parameter values.\n */\nvar $uiRouterGlobals: UIRouterGlobals;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time.\n */\nlet $uiRouter: UIRouter ;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime.\n */\nvar $uiRouterProvider: UIRouter;\n\n/**\n * Transition debug/tracing\n *\n * The [[Trace]] singleton as a **Service Object** (injectable during runtime).\n *\n * Enables or disables Transition tracing which can help to debug issues.\n */\nvar $trace: Trace;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.\n */\nvar $transitions: TransitionService;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitions]] for injection during runtime.\n */\nvar $transitionsProvider: TransitionService;\n\n/**\n * The current [[Transition]] object\n *\n * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)\n *\n * This object returns information about the current transition, including:\n *\n * - To/from states\n * - To/from parameters\n * - Transition options\n * - States being entered, exited, and retained\n * - Resolve data\n * - A Promise for the transition\n * - Any transition failure information\n * - An injector for both Service and Per-Transition Objects\n */\nvar $transition$: Transition;\n\n/**\n * The State Service\n *\n * The [[StateService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service used to manage and query information on registered states.\n * It exposes state related APIs including:\n *\n * - Start a [[Transition]]\n * - Imperatively lazy load states\n * - Check if a state is currently active\n * - Look up states by name\n * - Build URLs for a state+parameters\n * - Configure the global Transition error handler\n *\n * This angular service exposes the [[StateService]] singleton.\n */\nvar $state: StateService;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.\n */\nvar $stateRegistry: StateRegistry;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.\n */\nvar $stateRegistryProvider: StateRegistry;\n\n/**\n * The View Scroll provider\n *\n * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[UIViewScrollProvider]] singleton and is\n * used to disable UI-Router's scroll behavior.\n */\nvar $uiViewScrollProvider: UIViewScrollProvider;\n\n/**\n * The View Scroll function\n *\n * The View Scroll function as a **Service Object** (injectable during runtime).\n *\n * This is a function that scrolls an element into view.\n * The element is scrolled after a `$timeout` so the DOM has time to refresh.\n *\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].\n *\n * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true.\n */\nvar $uiViewScroll: ($element: JQuery) => void;\n\n/**\n * The StateProvider\n *\n * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[StateProvider]] singleton.\n *\n * The `StateProvider` is primarily used to register states or add custom state decorators.\n *\n * ##### Note: This provider is a ng1 vestige.\n * It is a passthrough to [[$stateRegistry]] and [[$state]].\n */\nvar $stateProvider: StateProvider;\n\n/**\n * The URL Service Provider\n *\n * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).\n *\n * A service used to configure and interact with the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during runtime as [[$urlService]].\n */\nvar $urlServiceProvider: UrlService;\n\n/**\n * The URL Service\n *\n * The [[UrlService]] singleton as a **Service Object** (injectable during runtime).\n *\n * Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n *\n * Used to configure the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n */\nvar $urlService: UrlService;\n\n/**\n * The URL Router Provider\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead.\n *\n * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time).\n *\n * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlRouterProvider: UrlRouterProvider;\n\n/**\n * The Url Router\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime).\n *\n * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlRouter: UrlRouter;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlMatcherFactory: UrlMatcherFactory;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlMatcherFactoryProvider: UrlMatcherFactory;\n\n\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.d.ts new file mode 100644 index 00000000..92a8cc14 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.d.ts @@ -0,0 +1,730 @@ +/** + * @ng1api + * @module ng1 + */ /** */ +import { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from "@uirouter/core"; +/** + * The signature for Angular 1 State Transition Hooks. + * + * State hooks are registered as onEnter/onRetain/onExit in state declarations. + * State hooks can additionally be injected with $transition$ and $state$ for + * the current [[Transition]] and [[StateObject]] in the transition. + * + * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition. + * As a transition runs, it may exit some states, retain (keep) states, and enter states. + * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order). + * + * #### See also: + * + * - [[IHookRegistry.onExit]] + * - [[IHookRegistry.onRetain]] + * - [[IHookRegistry.onEnter]] + * + * #### Example: + * ```js + * onEnter: function() { console.log('Entering'); } + * ``` + * + * Not minification-safe + * ```js + * onRetain: function($state$) { console.log('Retained ' + $state$.name); } + * ``` + * + * Annotated for minification-safety + * ```js + * onExit: [ '$transition$', '$state', function($transition$, $state) { + * // always redirect to 'foo' state when being exited + * if ($transition$.to().name !== 'foo') { + * return $state.target('foo'); + * } + * } ] + * ``` + * + * @returns an optional [[HookResult]] which may alter the transition + */ +export interface Ng1StateTransitionHook { + (...injectables: any[]): HookResult; +} +/** + * @internalapi + * an intermediate interface. + * + * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */ +export interface _Ng1StateDeclaration extends StateDeclaration { + onExit?: any; + onRetain?: any; + onEnter?: any; + views?: any; +} +/** + * The StateDeclaration object is used to define a state or nested state. + * It should be registered with the [[StateRegistry]]. + * + * #### Example: + * ```js + * // StateDeclaration object + * var foldersState = { + * name: 'folders', + * url: '/folders', + * resolve: { + * allfolders: function(FolderService) { + * return FolderService.list(); + * } + * }, + * template: "
    • {{folder.name}}
    ", + * controller: function(allfolders, $scope) { + * $scope.allfolders = allfolders; + * } + * } + * ``` + * + * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly + * on the state declaration and they will be applied to the view with the name `$default`. For example: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * template: '

    foo

    ', + * controller: 'FooController' + * } + * ``` + * + * is simply syntactic sugar for: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * views: { + * $default: { + * template: '

    foo

    ', + * controller: 'FooController + * } + * } + * } + * ``` + * + * If a state definition contains a `views:` object, any view properties set directly on the state are ignored. + * Thus, this is an invalid state defintion: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * controller: 'FooController, // invalid because views: exists + * views: { + * header: { + * template: '

    header

    ' + * } + * } + * } + * ``` + */ +export interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration { + /** + * An optional object which defines multiple named views. + * + * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]]. + * Unnamed views are internally renamed to `$default`. + * + * A view's name is used to match an active `` directive in the DOM. When the state + * is entered, the state's views are activated and matched with active `` directives: + * + * - The view's name is processed into a ui-view target: + * - ui-view address: an address to a ui-view + * - state anchor: the state to anchor the address to + * + * Examples: + * + * Targets three named ui-views in the parent state's template + * + * #### Example: + * ```js + * views: { + * header: { + * controller: "headerCtrl", + * templateUrl: "header.html" + * }, + * body: { + * controller: "bodyCtrl", + * templateUrl: "body.html" + * }, + * footer: "footerComponent" + * } + * ``` + * + * #### Example: + * ```js + * // Targets named ui-view="header" in the template of the ancestor state 'top' + * // and the named `ui-view="body" from the parent state's template. + * views: { + * 'header@top': { + * controller: "msgHeaderCtrl", + * templateUrl: "msgHeader.html" + * }, + * 'body': { + * controller: "messagesCtrl", + * templateUrl: "messages.html" + * } + * } + * ``` + * + * ## View targeting details + * + * There are a few styles of view addressing/targeting. + * The most common is a simple `ui-view` name + * + * #### Simple ui-view name + * + * Addresses without an `@` are anchored to the parent state. + * + * #### Example: + * ```js + * // target the `
    ` created in the parent state's view + * views: { + * foo: {...} + * } + * ``` + * + * #### View name anchored to a state + * + * You can anchor the `ui-view` name to a specific state by including an `@` + * + * #### Example: + * targets the `
    ` which was created in a view owned by the state `bar.baz` + * ```js + * views: { + * 'foo@bar.baz': {...} + * } + * ``` + * + * #### Absolute addressing + * + * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`. + * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM: + * + * #### Example: + * absolutely targets the `
    ` + * ... which was created in the unnamed/$default root `` + * ```js + * views: { + * '!$default.nested': {...} + * } + * ``` + * + * #### Relative addressing + * + * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`""`). + * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`: + * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names. + * + * #### Example: + * targets the `
    ` + * ... which was created inside the + * `
    ` + * ... which was created inside the parent state's template. + * ```js + * views: { + * 'foo.bar': {...} + * } + * ``` + * + * #### Example: + * targets the `
    ` + * ... which was created in `
    ` + * ... which was created in a template from the state `baz.qux` + * ```js + * views: { + * 'foo.bar@baz.qux': {...} + * } + * ``` + * + * #### Example: + * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning "parent") + * ```js + * views: { + * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo') + * 'bar@^.^': {...}, // bar@(grandparent state) + * 'baz@^.^.^': {...}, // baz@(great-grandparent state) + * } + * ``` + * + * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]]. + * + * --- + * + * ## State template+controller and `views:` incompatiblity + * + * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore, + * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in + * the `views` object. The state declaration must not have any of the following fields: + * - component + * - bindings + * - resolveAs + * - template + * - templateUrl + * - templateProvider + * - controller + * - controllerAs + * - controllerProvider + */ + views?: { + [key: string]: string | Ng1ViewDeclaration; + }; + /** + * A state hook invoked when a state is being entered. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * ### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onEnter: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onEnter?: Ng1StateTransitionHook | IInjectable; + /** + * A state hook invoked when a state is being exited. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * ### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onExit: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onExit?: Ng1StateTransitionHook | IInjectable; + /** + * A state hook invoked when a state is being retained. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * #### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onRetain: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onRetain?: Ng1StateTransitionHook | IInjectable; + /** + * Makes all search/query parameters `dynamic` + * + * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead + * + * @deprecated + */ + reloadOnSearch?: boolean; +} +export interface Ng1ViewDeclaration extends _ViewDeclaration { + /** + * The name of the component to use for this view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with + * bindToController and/or scope declaration) which will be used for this view. + * + * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the + * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared + * on the component, any resolve with the same name is set on the component's controller instance. The binding + * is provided to the component as a one-time-binding. In general, components should likewise declare their + * input bindings as [one-way ("<")](https://docs.angularjs.org/api/ng/service/$compile#-scope-). + * + * Note: inside a "views:" block, a bare string `"foo"` is shorthand for `{ component: "foo" }` + * + * Note: Mapping from resolve names to component inputs may be specified using [[bindings]]. + * + * #### Example: + * ```js + * .state('profile', { + * // Use the component for the Unnamed view + * component: 'MyProfile', + * } + * + * .state('messages', { + * // use the component for the view named 'header' + * // use the component for the view named 'content' + * views: { + * header: { component: 'NavBar' }, + * content: { component: 'MessageList' } + * } + * } + * + * .state('contacts', { + * // Inside a "views:" block, a bare string "NavBar" is shorthand for { component: "NavBar" } + * // use the component for the view named 'header' + * // use the component for the view named 'content' + * views: { + * header: 'NavBar', + * content: 'ContactList' + * } + * } + * ``` + * + * + * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`, + * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`. + * + * + * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component) + */ + component?: string; + /** + * An object which maps `resolve`s to [[component]] `bindings`. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied + * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here. + * + * Each key in this object is the name of one of the component's input bindings. + * Each value is the name of the resolve that should be provided to that binding. + * + * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the + * same name. + * + * #### Example: + * ```js + * $stateProvider.state('foo', { + * resolve: { + * foo: function(FooService) { return FooService.get(); }, + * bar: function(BarService) { return BarService.get(); } + * }, + * component: 'Baz', + * // The component's `baz` binding gets data from the `bar` resolve + * // The component's `foo` binding gets data from the `foo` resolve (default behavior) + * bindings: { + * baz: 'bar' + * } + * }); + * + * app.component('Baz', { + * templateUrl: 'baz.html', + * controller: 'BazController', + * bindings: { + * foo: '<', // foo binding + * baz: '<' // baz binding + * } + * }); + * ``` + * + */ + bindings?: { + [key: string]: string; + }; + /** + * Dynamic component provider function. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * This is an injectable provider function which returns the name of the component to use. + * The provider will invoked during a Transition in which the view's state is entered. + * The provider is called after the resolve data is fetched. + * + * #### Example: + * ```js + * componentProvider: function(MyResolveData, $transition$) { + * if (MyResolveData.foo) { + * return "fooComponent" + * } else if ($transition$.to().name === 'bar') { + * return "barComponent"; + * } + * } + * ``` + */ + componentProvider?: IInjectable; + /** + * The view's controller function or name + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * The controller function, or the name of a registered controller. The controller function will be used + * to control the contents of the [[directives.uiView]] directive. + * + * If specified as a string, controllerAs can be declared here, i.e., "FooController as foo" instead of in + * a separate [[controllerAs]] property. + * + * See: [[Ng1Controller]] for information about component-level router hooks. + */ + controller?: (IInjectable | string); + /** + * A controller alias name. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * If present, the controller will be published to scope under the `controllerAs` name. + * See: https://docs.angularjs.org/api/ng/directive/ngController + */ + controllerAs?: string; + /** + * Dynamic controller provider function. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * This is an injectable provider function which returns the actual controller function, or the name + * of a registered controller. The provider will invoked during a Transition in which the view's state is + * entered. The provider is called after the resolve data is fetched. + * + * #### Example: + * ```js + * controllerProvider: function(MyResolveData, $transition$) { + * if (MyResolveData.foo) { + * return "FooCtrl" + * } else if ($transition$.to().name === 'bar') { + * return "BarCtrl"; + * } else { + * return function($scope) { + * $scope.baz = "Qux"; + * } + * } + * } + * ``` + */ + controllerProvider?: IInjectable; + /** + * The scope variable name to use for resolve data. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * When a view is activated, the resolved data for the state which the view belongs to is put on the scope. + * This property sets the name of the scope variable to use for the resolved data. + * + * Defaults to `$resolve`. + */ + resolveAs?: string; + /** + * The HTML template for the view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * HTML template as a string, or a function which returns an html template as a string. + * This template will be used to render the corresponding [[directives.uiView]] directive. + * + * This property takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the Transition parameters as the first argument. + * + * #### Example: + * ```js + * template: "

    inline template definition

    " + * ``` + * + * #### Example: + * ```js + * template: function(params) { + * return "

    generated template

    "; + * } + * ``` + */ + template?: (Function | string); + /** + * The URL for the HTML template for the view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * A path or a function that returns a path to an html template. + * The template will be fetched and used to render the corresponding [[directives.uiView]] directive. + * + * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument. + * + * #### Example: + * ```js + * templateUrl: "/templates/home.html" + * ``` + * + * #### Example: + * ```js + * templateUrl: function(params) { + * return myTemplates[params.pageId]; + * } + * ``` + */ + templateUrl?: (string | Function); + /** + * Injected function which returns the HTML template. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * Injected function which returns the HTML template. + * The template will be used to render the corresponding [[directives.uiView]] directive. + * + * #### Example: + * ```js + * templateProvider: function(MyTemplateService, $transition$) { + * return MyTemplateService.getTemplate($transition$.params().pageId); + * } + * ``` + */ + templateProvider?: IInjectable; +} +/** + * The shape of a controller for a view (and/or component), defining the controller callbacks. + * + * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a + * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`). + * + * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks, + * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks + * ([[IHookRegistry]]), but are only called if the view is currently active. + * + * This interface defines the UI-Router component callbacks. + * + */ +export interface Ng1Controller { + /** @hidden */ + $onInit(): void; + /** + * This callback is called when parameter values have changed. + * + * This callback can be used to respond to changing parameter values in the current state, or in parent/child states. + * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]]) + * + * Called when: + * - The view is still active + * - A new transition has completed successfully + * - The state for the view (controller) was not reloaded + * - At least one parameter value was changed + * + * Called with: + * @param newValues an object containing the changed parameter values + * @param $transition$ the new Transition which triggered this callback + * + * #### Example: + * ```js + * angular.module('foo').controller('FancyCtrl', function() { + * this.uiOnParamsChanged = function(newParams) { + * console.log("new params: ", newParams); + * } + * }); + * ``` + */ + uiOnParamsChanged(newValues: any, $transition$: Transition): void; + /** + * This callback is called when the view's state is about to be exited. + * + * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]]. + * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should + * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the + * promise settles. + * + * + * Called when: + * - The view is still active + * - A new Transition is about to run + * - The new Transition will exit the view's state + * + * Called with: + * - The new Transition + * + * Relevant return Values: + * - `false`: The transition is cancelled. + * - A rejected promise: The transition is cancelled. + * - [[TargetState]]: The transition is redirected to the new target state. + * - Anything else: the transition will continue normally (the state and view will be deactivated) + * + * #### Example: + * ```js + * app.component('myComponent', { + * template: '', + * bindings: { 'data': '<' }, + * controller: function() { + * + * this.originalData = angular.copy(this.data); + * + * this.uiCanExit = function() { + * if (!angular.equals(this.data, this.originalData)) { + * // Note: This could also return a Promise and request async + * // confirmation using something like ui-bootstrap $modal + * return window.confirm("Data has changed. Exit anyway and lose changes?"); + * } + * } + * } + * } + * ``` + * + * @param transition the new Transition that is about to exit the component's state + * @return a HookResult, or a promise for a HookResult + */ + uiCanExit(transition: Transition): HookResult; +} +/** + * Manages which template-loading mechanism to use. + * + * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise. + */ +export interface TemplateFactoryProvider { + /** + * Forces $templateFactory to use $http instead of $templateRequest. + * + * UI-Router uses `$templateRequest` by default on angular 1.3+. + * Use this method to choose to use `$http` instead. + * + * --- + * + * ## Security warning + * + * This might cause XSS, as $http doesn't enforce the regular security checks for + * templates that have been introduced in Angular 1.3. + * + * See the $sce documentation, section + *
    + * Impact on loading templates for more details about this mechanism. + * + * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.* + * + * @param useUnsafeHttpService `true` to use `$http` to fetch templates + */ + useHttpService(useUnsafeHttpService: boolean): any; +} +declare module "@uirouter/core/lib/state/stateRegistry" { + interface StateRegistry { + register(state: Ng1StateDeclaration): any; + } +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js new file mode 100644 index 00000000..c51da0a1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js @@ -0,0 +1 @@ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js.map new file mode 100644 index 00000000..af00306d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @ng1api\n * @module ng1\n */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from \"@uirouter/core\";\n\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]) : HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"
    • {{folder.name}}
    \",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '

    foo

    ',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '

    foo

    ',\n * controller: 'FooController\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController, // invalid because views: exists\n * views: {\n * header: {\n * template: '

    header

    '\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `
    ` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `
    ` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `
    `\n * ... which was created in the unnamed/$default root ``\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `
    `\n * ... which was created inside the\n * `
    `\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `
    `\n * ... which was created in `
    `\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration; };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n * \n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with \n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared \n * on the component, any resolve with the same name is set on the component's controller instance. The binding \n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"<\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the component for the view named 'header'\n * // use the component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the component for the view named 'header'\n * // use the component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: (IInjectable|string);\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"

    inline template definition

    \"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"

    generated template

    \";\n * }\n * ```\n */\n template?: (Function|string);\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: (string|Function);\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n * \n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n * \n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * \n * Impact on loading templates for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module \"@uirouter/core/lib/state/stateRegistry\" {\n interface StateRegistry {\n register(state: Ng1StateDeclaration);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.d.ts new file mode 100644 index 00000000..1684f1ef --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.d.ts @@ -0,0 +1,6 @@ +/** @hidden */ +export declare const resolveFactory: () => { + resolve: (invocables: { + [key: string]: Function; + }, locals?: {}, parent?: Promise) => Promise<{}>; +}; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js new file mode 100644 index 00000000..ed6244a5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js @@ -0,0 +1,67 @@ +/** @module ng1 */ /** */ +import { StateObject, PathNode, ResolveContext, mapObj, resolvablesBuilder } from "@uirouter/core"; +import * as angular from "angular"; +/** + * Implementation of the legacy `$resolve` service for angular 1. + */ +var $resolve = { + /** + * Asynchronously injects a resolve block. + * + * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API. + * + * ### Not bundled by default + * + * This API is no longer not part of the standard `@uirouter/angularjs` bundle. + * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle. + * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`. + * + * --- + * + * Given an object `invocables`, where keys are strings and values are injectable functions, + * injects each function, and waits for the resulting promise to resolve. + * When all resulting promises are resolved, returns the results as an object. + * + * #### Example: + * ```js + * let invocables = { + * foo: [ '$http', ($http) => + * $http.get('/api/foo').then(resp => resp.data) ], + * bar: [ 'foo', '$http', (foo, $http) => + * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ] + * } + * $resolve.resolve(invocables) + * .then(results => console.log(results.foo, results.bar)) + * // Logs foo and bar: + * // { id: 123, barId: 456, fooData: 'foo data' } + * // { id: 456, barData: 'bar data' } + * ``` + * + * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions + * @param locals key/value pre-resolved data (locals) + * @param parent a promise for a "parent resolve" + */ + resolve: function (invocables, locals, parent) { + if (locals === void 0) { locals = {}; } + var parentNode = new PathNode(new StateObject({ params: {}, resolvables: [] })); + var node = new PathNode(new StateObject({ params: {}, resolvables: [] })); + var context = new ResolveContext([parentNode, node]); + context.addResolvables(resolvablesBuilder({ resolve: invocables }), node.state); + var resolveData = function (parentLocals) { + var rewrap = function (_locals) { return resolvablesBuilder({ resolve: mapObj(_locals, function (local) { return function () { return local; }; }) }); }; + context.addResolvables(rewrap(parentLocals), parentNode.state); + context.addResolvables(rewrap(locals), node.state); + var tuples2ObjR = function (acc, tuple) { + acc[tuple.token] = tuple.value; + return acc; + }; + return context.resolvePath().then(function (results) { return results.reduce(tuples2ObjR, {}); }); + }; + return parent ? parent.then(resolveData) : resolveData({}); + } +}; +/** @hidden */ +export var resolveFactory = function () { return $resolve; }; +// The old $resolve service +angular.module('ui.router').factory('$resolve', resolveFactory); +//# sourceMappingURL=resolveService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js.map new file mode 100644 index 00000000..f59e4435 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/resolveService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolveService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/legacy/resolveService.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,MAAM;AACzB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAO,MAAM,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,IAAI,QAAQ,GAAG;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,EAAE,UAAC,UAAuC,EAAE,MAAW,EAAE,MAAqB;QAAlC,uBAAA,EAAA,WAAW;QAC5D,IAAI,UAAU,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAO,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACtF,IAAI,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAO,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,OAAO,GAAG,IAAI,cAAc,CAAC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AAC,CAAC,OAAO,CAAC,UAAU,EAAQ,cAAc,CAAC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from \"@uirouter/core\";\nimport * as angular from \"angular\";\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nvar $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise) => {\n let parentNode = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let node = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder( { resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder( { resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any, value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n }\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', resolveFactory);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.d.ts new file mode 100644 index 00000000..db7a7204 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.d.ts @@ -0,0 +1,124 @@ + +import { IAngularEvent } from "angular"; +/** + * An event broadcast on `$rootScope` when the state transition **begins**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] + * + * #### Example: + * ```js + * $rootScope.$on('$stateChangeStart', function(event, transition) { + * event.preventDefault(); + * // transitionTo() promise will be rejected with + * // a 'transition prevented' error + * }) + * ``` + * + * @event $stateChangeStart + * @deprecated + */ +export declare var $stateChangeStart: IAngularEvent; +/** + * An event broadcast on `$rootScope` if a transition is **cancelled**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that was cancelled + * + * @event $stateChangeCancel + * @deprecated + */ +export declare var $stateChangeCancel: IAngularEvent; +/** + * An event broadcast on `$rootScope` once the state transition is **complete**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]] + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that just succeeded + * + * @event $stateChangeSuccess + * @deprecated + */ +export declare var $stateChangeSuccess: IAngularEvent; +/** + * An event broadcast on `$rootScope` when an **error occurs** during transition. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]] + * + * It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `error`: The reason the transition errored. + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that errored + * + * @event $stateChangeError + * @deprecated + */ +export declare var $stateChangeError: IAngularEvent; +/** + * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name. + * + * ### Deprecation warning: use [[StateService.onInvalid]] instead + * + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler, + * you can see its properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `transitionTo()` will be rejected with a + * `'transition aborted'` error. + * + * Additional arguments to the event handler are provided: + * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties. + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * + * #### Example: + * ```js + * // somewhere, assume lazy.state has not been defined + * $state.go("lazy.state", { a: 1, b: 2 }, { inherit: false }); + * + * // somewhere else + * $scope.$on('$stateNotFound', function(event, transition) { + * function(event, unfoundState, fromState, fromParams){ + * console.log(unfoundState.to); // "lazy.state" + * console.log(unfoundState.toParams); // {a:1, b:2} + * console.log(unfoundState.options); // {inherit:false} + default options + * }); + * ``` + * + * @event $stateNotFound + * @deprecated + */ +export declare var $stateNotFound: IAngularEvent; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js new file mode 100644 index 00000000..2d5ea23c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js @@ -0,0 +1,270 @@ +/** + * # Legacy state events + * + * Polyfill implementation of the UI-Router 0.2.x state events. + * + * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they + * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary + * to implement meaningful application behaviors. + * + * To enable these state events, include the `stateEvents.js` file in your project, e.g., + * ``` + * + * ``` + * and also make sure you depend on the `ui.router.state.events` angular module, e.g., + * ``` + * angular.module("myApplication", ['ui.router', 'ui.router.state.events'] + * ``` + * + * @module ng1_state_events + */ /** */ +import { ng as angular } from "../angular"; +/** + * An event broadcast on `$rootScope` when the state transition **begins**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] + * + * #### Example: + * ```js + * $rootScope.$on('$stateChangeStart', function(event, transition) { + * event.preventDefault(); + * // transitionTo() promise will be rejected with + * // a 'transition prevented' error + * }) + * ``` + * + * @event $stateChangeStart + * @deprecated + */ +export var $stateChangeStart; +/** + * An event broadcast on `$rootScope` if a transition is **cancelled**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that was cancelled + * + * @event $stateChangeCancel + * @deprecated + */ +export var $stateChangeCancel; +/** + * An event broadcast on `$rootScope` once the state transition is **complete**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]] + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that just succeeded + * + * @event $stateChangeSuccess + * @deprecated + */ +export var $stateChangeSuccess; +/** + * An event broadcast on `$rootScope` when an **error occurs** during transition. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]] + * + * It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `error`: The reason the transition errored. + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that errored + * + * @event $stateChangeError + * @deprecated + */ +export var $stateChangeError; +/** + * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name. + * + * ### Deprecation warning: use [[StateService.onInvalid]] instead + * + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler, + * you can see its properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `transitionTo()` will be rejected with a + * `'transition aborted'` error. + * + * Additional arguments to the event handler are provided: + * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties. + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * + * #### Example: + * ```js + * // somewhere, assume lazy.state has not been defined + * $state.go("lazy.state", { a: 1, b: 2 }, { inherit: false }); + * + * // somewhere else + * $scope.$on('$stateNotFound', function(event, transition) { + * function(event, unfoundState, fromState, fromParams){ + * console.log(unfoundState.to); // "lazy.state" + * console.log(unfoundState.toParams); // {a:1, b:2} + * console.log(unfoundState.options); // {inherit:false} + default options + * }); + * ``` + * + * @event $stateNotFound + * @deprecated + */ +export var $stateNotFound; +(function () { + var isFunction = angular.isFunction, isString = angular.isString; + function applyPairs(memo, keyValTuple) { + var key, value; + if (Array.isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; + } + function stateChangeStartHandler($transition$) { + if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) + return; + var $injector = $transition$.injector(); + var $stateEvents = $injector.get('$stateEvents'); + var $rootScope = $injector.get('$rootScope'); + var $state = $injector.get('$state'); + var $urlRouter = $injector.get('$urlRouter'); + var enabledEvents = $stateEvents.provider.enabled(); + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + if (enabledEvents.$stateChangeSuccess) { + var startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + if (startEvent.defaultPrevented) { + if (enabledEvents.$stateChangeCancel) { + $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + } + //Don't update and resync url if there's been a new transition started. see issue #2238, #600 + if ($state.transition == null) + $urlRouter.update(); + return false; + } + // right after global state is updated + var successOpts = { priority: 9999 }; + $transition$.onSuccess({}, function () { + $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + }, successOpts); + } + if (enabledEvents.$stateChangeError) { + $transition$.promise["catch"](function (error) { + if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */)) + return; + var evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$); + if (!evt.defaultPrevented) { + $urlRouter.update(); + } + }); + } + } + stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter']; + function stateNotFoundHandler($to$, $from$, injector) { + var $state = injector.get('$state'); + var $rootScope = injector.get('$rootScope'); + var $urlRouter = injector.get('$urlRouter'); + var redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() }; + var e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params()); + if (e.defaultPrevented || e.retry) + $urlRouter.update(); + function redirectFn() { + return $state.target(redirect.to, redirect.toParams, redirect.options); + } + if (e.defaultPrevented) { + return false; + } + else if (e.retry || !!$state.get(redirect.to)) { + return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn(); + } + } + $StateEventsProvider.$inject = ['$stateProvider']; + function $StateEventsProvider($stateProvider) { + $StateEventsProvider.prototype.instance = this; + var runtime = false; + var allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError']; + var enabledStateEvents = allEvents.map(function (e) { return [e, true]; }).reduce(applyPairs, {}); + function assertNotRuntime() { + if (runtime) + throw new Error("Cannot enable events at runtime (use $stateEventsProvider"); + } + /** + * Enables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.enable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return enabledStateEvents[event] = true; }); + }; + /** + * Disables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.disable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return delete enabledStateEvents[event]; }); + }; + this.enabled = function () { return enabledStateEvents; }; + this.$get = $get; + $get.$inject = ['$transitions']; + function $get($transitions) { + runtime = true; + if (enabledStateEvents["$stateNotFound"]) + $stateProvider.onInvalid(stateNotFoundHandler); + if (enabledStateEvents.$stateChangeStart) + $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 }); + return { + provider: $StateEventsProvider.prototype.instance + }; + } + } + angular.module('ui.router.state.events', ['ui.router.state']) + .provider("$stateEvents", $StateEventsProvider) + .run(['$stateEvents', function ($stateEvents) { + }]); +})(); +//# sourceMappingURL=stateEvents.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js.map new file mode 100644 index 00000000..b2f2220b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/legacy/stateEvents.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateEvents.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/legacy/stateEvents.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;;;;;;;;;GAmBG,CAAC,MAAM;AACV,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAO3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,IAAI,iBAAgC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,IAAI,kBAAiC,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,IAAI,mBAAkC,C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CAAC,EAAE,EAAE,uBAAuB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAEzE,MAAM,CAAC;gBACL,QAAQ,EAAE,oBAAoB,CAAC,SAAS,CAAC,QAAQ;aAClD,CAAC;QACJ,CAAC;IACH,CAAC;IAGD,OAAO,CAAC,MAAM,CAAC,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,CAAC;SACxD,QAAQ,CAAC,cAAc,EAA4B,oBAAoB,CAAC;SACxE,GAAG,CAAC,CAAC,cAAc,EAAE,UAAU,YAAiB;QACjD,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,EAAE,CAAC", + "sourcesContent": [ + "/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * \n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @module ng1_state_events\n */ /** */\nimport { ng as angular } from \"../angular\";\nimport { IScope, IAngularEvent, IServiceProviderFactory } from \"angular\";\nimport {\n Obj, TargetState, StateService, Transition, TransitionService, UrlRouter, HookResult, UIInjector\n} from \"@uirouter/core\";\nimport { StateProvider } from \"../stateProvider\";\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport var $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport var $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport var $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport var $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport var $stateNotFound: IAngularEvent;\n\n\n(function () {\n let { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored())\n return;\n\n let $injector = $transition$.injector();\n let $stateEvents = $injector.get('$stateEvents');\n let $rootScope = $injector.get('$rootScope');\n let $state = $injector.get('$state');\n let $urlRouter = $injector.get('$urlRouter');\n\n let enabledEvents = $stateEvents.provider.enabled();\n\n\n let toParams = $transition$.params(\"to\");\n let fromParams = $transition$.params(\"from\");\n\n if (enabledEvents.$stateChangeSuccess) {\n let startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }\n //Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n let successOpts = { priority: 9999 };\n $transition$.onSuccess({}, function () {\n $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }, successOpts);\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise[\"catch\"](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */))\n return;\n\n\n let evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$);\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n let $state: StateService = injector.get('$state');\n let $rootScope: IScope = injector.get('$rootScope');\n let $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise;\n }\n\n let redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n let e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry)\n $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n let allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n let enabledStateEvents = allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error(\"Cannot enable events at runtime (use $stateEventsProvider\");\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => enabledStateEvents[event] = true);\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents[\"$stateNotFound\"])\n $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart)\n $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance\n };\n }\n }\n\n\n angular.module('ui.router.state.events', ['ui.router.state'])\n .provider(\"$stateEvents\", $StateEventsProvider)\n .run(['$stateEvents', function ($stateEvents: any) { /* Invokes $get() */\n }]);\n})();\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.d.ts new file mode 100644 index 00000000..147d7312 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.d.ts @@ -0,0 +1,43 @@ + +/** + * @internalapi + * @module ng1 + */ /** */ +import { LocationConfig, LocationServices, UIRouter } from "@uirouter/core"; +import { ILocationService, ILocationProvider } from "angular"; +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +export declare class Ng1LocationServices implements LocationConfig, LocationServices { + private $locationProvider; + private $location; + private $sniffer; + path: any; + search: any; + hash: any; + hashPrefix: any; + port: any; + protocol: any; + host: any; + baseHref: any; + private _urlListeners; + dispose(): void; + constructor($locationProvider: ILocationProvider); + onChange(callback: Function): () => Function[]; + html5Mode(): any; + url(newUrl?: string, replace?: boolean, state?: any): string; + _runtimeServices($rootScope: any, $location: ILocationService, $sniffer: any, $browser: any): void; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + static monkeyPatchPathParameterType(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js new file mode 100644 index 00000000..23d206cb --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js @@ -0,0 +1,73 @@ +import { val, createProxyFunctions, removeFrom, isObject } from "@uirouter/core"; +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +var Ng1LocationServices = /** @class */ (function () { + function Ng1LocationServices($locationProvider) { + // .onChange() registry + this._urlListeners = []; + this.$locationProvider = $locationProvider; + var _lp = val($locationProvider); + createProxyFunctions(_lp, this, _lp, ['hashPrefix']); + } + Ng1LocationServices.prototype.dispose = function () { }; + Ng1LocationServices.prototype.onChange = function (callback) { + var _this = this; + this._urlListeners.push(callback); + return function () { return removeFrom(_this._urlListeners)(callback); }; + }; + Ng1LocationServices.prototype.html5Mode = function () { + var html5Mode = this.$locationProvider.html5Mode(); + html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode; + return html5Mode && this.$sniffer.history; + }; + Ng1LocationServices.prototype.url = function (newUrl, replace, state) { + if (replace === void 0) { replace = false; } + if (newUrl) + this.$location.url(newUrl); + if (replace) + this.$location.replace(); + if (state) + this.$location.state(state); + return this.$location.url(); + }; + Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser) { + var _this = this; + this.$location = $location; + this.$sniffer = $sniffer; + // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange + $rootScope.$on("$locationChangeSuccess", function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); }); + var _loc = val($location); + var _browser = val($browser); + // Bind these LocationService functions to $location + createProxyFunctions(_loc, this, _loc, ["replace", "path", "search", "hash"]); + // Bind these LocationConfig functions to $location + createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']); + // Bind these LocationConfig functions to $browser + createProxyFunctions(_browser, this, _browser, ['baseHref']); + }; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + Ng1LocationServices.monkeyPatchPathParameterType = function (router) { + var pathType = router.urlMatcherFactory.type('path'); + pathType.encode = function (val) { + return val != null ? val.toString().replace(/(~|\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : val; + }; + pathType.decode = function (val) { + return val != null ? val.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : val; + }; + }; + return Ng1LocationServices; +}()); +export { Ng1LocationServices }; +//# sourceMappingURL=locationServices.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js.map new file mode 100644 index 00000000..d32c463e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/locationServices.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "locationServices.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/locationServices.ts" + ], + "names": [], + "mappings": "AAKA,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGjF;;GAEG;AACH;IAmBE,6BAAY,iBAAoC;QALhD,uBAAuB;QACf,kBAAa,GAAe,EAAE,CAAC;QAKrC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,GAAG,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IACvD,CAAC;IAND,qCAAO,GAAP,cAAY,CAAC;IAQb,sCAAQ,GAAR,UAAS,QAAkB;QAA3B,iBAGC;QAFC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,CAAC,cAAM,OAAA,UAAU,CAAC,KAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,EAAxC,CAAwC,CAAC;IACxD,CAAC;IAED,uCAAS,GAAT;QACE,IAAI,SAAS,GAAQ,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QACxD,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAChE,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAA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kDAAkD;QAClD,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;;OAWG;IACI,gDAA4B,GAAnC,UAAoC,MAAgB;QAClD,IAAI,QAAQ,GAAc,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEhE,QAAQ,CAAC,MAAM,GAAG,UAAC,GAAQ;YACvB,OAAA,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,CAAC,CAAC,CAAC,GAAG;QAA1F,CAA0F,CAAC;QAE/F,QAAQ,CAAC,MAAM,GAAG,UAAC,GAAW;YAC1B,OAAA,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,CAAC,CAAC,CAAC,GAAG;QAA5F,CAA4F,CAAC;IAEnG,CAAC;IACH,0BAAC;AAAD,CAAC,AAlFD,IAkFC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.d.ts new file mode 100644 index 00000000..72217adc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.d.ts @@ -0,0 +1,16 @@ + +import { IRootScopeService } from "angular"; +import { ResolveContext, TypedMap } from "@uirouter/core"; +import { StateProvider } from "./stateProvider"; +import { UrlRouterProvider } from "./urlRouterProvider"; +declare module '@uirouter/core/lib/router' { + interface UIRouter { + /** @hidden */ + stateProvider: StateProvider; + /** @hidden */ + urlRouterProvider: UrlRouterProvider; + } +} +export declare function watchDigests($rootScope: IRootScopeService): void; +/** @hidden TODO: find a place to move this */ +export declare const getLocals: (ctx: ResolveContext) => TypedMap; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js new file mode 100644 index 00000000..3db9fa99 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js @@ -0,0 +1,113 @@ +/** + * # Angular 1 types + * + * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. + * The customizations to the core types for Angular UI-Router are documented here. + * + * The optional [[$resolve]] service is also documented here. + * + * @module ng1 + * @preferred + */ +/** for typedoc */ +import { ng as angular } from "./angular"; +import { services, applyPairs, isString, trace, extend, UIRouter, unnestR } from "@uirouter/core"; +import { ng1ViewsBuilder, getNg1ViewConfigFactory } from "./statebuilders/views"; +import { TemplateFactory } from "./templateFactory"; +import { StateProvider } from "./stateProvider"; +import { getStateHookBuilder } from "./statebuilders/onEnterExitRetain"; +import { Ng1LocationServices } from "./locationServices"; +import { UrlRouterProvider } from "./urlRouterProvider"; +angular.module("ui.router.angular1", []); +var mod_init = angular.module('ui.router.init', []); +var mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']); +var mod_rtr = angular.module('ui.router.router', ['ui.router.util']); +var mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']); +var mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']); +var mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line +var router = null; +$uiRouter.$inject = ['$locationProvider']; +/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */ +function $uiRouter($locationProvider) { + // Create a new instance of the Router when the $uiRouterProvider is initialized + router = this.router = new UIRouter(); + router.stateProvider = new StateProvider(router.stateRegistry, router.stateService); + // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties + router.stateRegistry.decorator("views", ng1ViewsBuilder); + router.stateRegistry.decorator("onExit", getStateHookBuilder("onExit")); + router.stateRegistry.decorator("onRetain", getStateHookBuilder("onRetain")); + router.stateRegistry.decorator("onEnter", getStateHookBuilder("onEnter")); + router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory()); + var ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider); + Ng1LocationServices.monkeyPatchPathParameterType(router); + // backwards compat: also expose router instance as $uiRouterProvider.router + router['router'] = router; + router['$get'] = $get; + $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache']; + function $get($location, $browser, $sniffer, $rootScope, $http, $templateCache) { + ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser); + delete router['router']; + delete router['$get']; + return router; + } + return router; +} +var getProviderFor = function (serviceName) { return ['$uiRouterProvider', function ($urp) { + var service = $urp.router[serviceName]; + service["$get"] = function () { return service; }; + return service; + }]; }; +// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime) +runBlock.$inject = ['$injector', '$q', '$uiRouter']; +function runBlock($injector, $q, $uiRouter) { + services.$injector = $injector; + services.$q = $q; + // The $injector is now available. + // Find any resolvables that had dependency annotation deferred + $uiRouter.stateRegistry.get() + .map(function (x) { return x.$$state().resolvables; }) + .reduce(unnestR, []) + .filter(function (x) { return x.deps === "deferred"; }) + .forEach(function (resolvable) { return resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi); }); +} +// $urlRouter service and $urlRouterProvider +var getUrlRouterProvider = function (uiRouter) { + return uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter); +}; +// $state service and $stateProvider +// $urlRouter service and $urlRouterProvider +var getStateProvider = function () { + return extend(router.stateProvider, { $get: function () { return router.stateService; } }); +}; +watchDigests.$inject = ['$rootScope']; +export function watchDigests($rootScope) { + $rootScope.$watch(function () { trace.approximateDigests++; }); +} +mod_init.provider("$uiRouter", $uiRouter); +mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]); +mod_util.provider('$urlService', getProviderFor('urlService')); +mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]); +mod_util.provider('$templateFactory', function () { return new TemplateFactory(); }); +mod_state.provider('$stateRegistry', getProviderFor('stateRegistry')); +mod_state.provider('$uiRouterGlobals', getProviderFor('globals')); +mod_state.provider('$transitions', getProviderFor('transitionService')); +mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]); +mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]); +mod_main.factory('$view', function () { return router.viewService; }); +mod_main.service("$trace", function () { return trace; }); +mod_main.run(watchDigests); +mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]); +mod_state.run(['$state', function ($state) { }]); +mod_rtr.run(['$urlRouter', function ($urlRouter) { }]); +mod_init.run(runBlock); +/** @hidden TODO: find a place to move this */ +export var getLocals = function (ctx) { + var tokens = ctx.getTokens().filter(isString); + var tuples = tokens.map(function (key) { + var resolvable = ctx.getResolvable(key); + var waitPolicy = ctx.getPolicy(resolvable).async; + return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data]; + }); + return tuples.reduce(applyPairs, {}); +}; +//# sourceMappingURL=services.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js.map new file mode 100644 index 00000000..185f21f8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/services.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "services.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/services.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;GAUG;AACH,kBAAkB;AAClB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAI1C,OAAO,EACL,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EACvD,OAAO,EACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACzC,IAAI,QAAQ,GAAI,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAI,EAAE,CAAC,CAAC;AACvD,IAAI,QAAQ,GAAI,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC7E,IAAI,OAAO,GAAK,O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AE,UAAU,UAAqB,IAAI,CAAC,CAAC,CAAC,CAAC;AACzE,QAAQ,CAAE,GAAG,CAAM,QAAQ,CAAC,CAAC;AAE7B,8CAA8C;AAC9C,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,GAAmB;IAC3C,IAAI,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE9C,IAAI,MAAM,GAAG,MAAM,CAAE,GAAG,CAAC,UAAA,GAAG;QAC1B,IAAI,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACjD,MAAM,CAAC,CAAE,GAAG,EAAE,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC", + "sourcesContent": [ + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.d.ts new file mode 100644 index 00000000..1e2d747a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.d.ts @@ -0,0 +1,3 @@ +import { StateService } from "@uirouter/core"; +export declare function $IsStateFilter($state: StateService): any; +export declare function $IncludedByStateFilter($state: StateService): any; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js new file mode 100644 index 00000000..f984c518 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js @@ -0,0 +1,42 @@ +/** @module ng1 */ /** for typedoc */ +import { ng as angular } from "./angular"; +/** + * `isState` Filter: truthy if the current state is the parameter + * + * Translates to [[StateService.is]] `$state.is("stateName")`. + * + * #### Example: + * ```html + *
    show if state is 'stateName'
    + * ``` + */ +$IsStateFilter.$inject = ['$state']; +export function $IsStateFilter($state) { + var isFilter = function (state, params, options) { + return $state.is(state, params, options); + }; + isFilter.$stateful = true; + return isFilter; +} +/** + * `includedByState` Filter: truthy if the current state includes the parameter + * + * Translates to [[StateService.includes]]` $state.is("fullOrPartialStateName")`. + * + * #### Example: + * ```html + *
    show if state includes 'fullOrPartialStateName'
    + * ``` + */ +$IncludedByStateFilter.$inject = ['$state']; +export function $IncludedByStateFilter($state) { + var includesFilter = function (state, params, options) { + return $state.includes(state, params, options); + }; + includesFilter.$stateful = true; + return includesFilter; +} +angular.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); +//# sourceMappingURL=stateFilters.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js.map new file mode 100644 index 00000000..52370494 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateFilters.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateFilters.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/stateFilters.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,kBAAkB;AAErC,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;GASG;AACH,cAAc,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,MAAM,yBAAyB,MAAoB;IACjD,IAAI,QAAQ,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAoC;QAChG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,sBAAsB,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,iCAAiC,MAAoB;IACzD,IAAI,cAAc,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAmC;QACrG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,MAAM,CAAE,cAAc,CAAC;AACzB,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;KAC9B,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC;KACjC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.d.ts new file mode 100644 index 00000000..366b608d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.d.ts @@ -0,0 +1,254 @@ +/** @module ng1 */ /** for typedoc */ +import { BuilderFunction, StateRegistry, StateService, OnInvalidCallback } from "@uirouter/core"; +import { Ng1StateDeclaration } from "./interface"; +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +export declare class StateProvider { + private stateRegistry; + private stateService; + constructor(stateRegistry: StateRegistry, stateService: StateService); + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + decorator(name: string, func: BuilderFunction): Function | this | BuilderFunction[]; + /** + * Registers a state + * + * ### This is a passthrough to [[StateRegistry.register]]. + * + * Registers a state configuration under a given state name. + * The stateConfig object has the following acceptable properties. + * + * + * + * - **`template`** - {string|function=} - html template as a string or a function that returns + * an html template as a string which should be used by the uiView directives. This property + * takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + * + * + * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html + * template that should be used by uiView. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + * + * + * - **`templateProvider`** - {function=} - Provider function that returns HTML content + * string. + * + * + * + * - **`controller`** - {string|function=} - Controller fn that should be associated with newly + * related scope or the name of a registered controller if passed as a string. + * + * + * + * - **`controllerProvider`** - {function=} - Injectable provider function that returns + * the actual controller or string. + * + * + * + * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be + * published to scope under the controllerAs name. + * + * + * + * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which + * should be injected into the controller. If any of these dependencies are promises, + * the router will wait for them all to be resolved or one to be rejected before the + * controller is instantiated. If all the promises are resolved successfully, the values + * of the resolved promises are injected and $stateChangeSuccess event is fired. If any + * of the promises are rejected the $stateChangeError event is fired. The map object is: + * + * - key - {string}: name of dependency to be injected into controller + * - factory - {string|function}: If string then it is alias for service. Otherwise if function, + * it is injected and return value it treated as dependency. If result is a promise, it is + * resolved before its value is injected into controller. + * + * + * + * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or + * transitioned to, the `$stateParams` service will be populated with any + * parameters that were passed. + * + * + * + * - **`params`** - {object=} - An array of parameter names or regular expressions. Only + * use this within a state if you are not using url. Otherwise you can specify your + * parameters within the url. When a state is navigated or transitioned to, the + * $stateParams service will be populated with any parameters that were passed. + * + * + * + * - **`views`** - {object=} - Use the views property to set up multiple views or to target views + * manually/explicitly. + * + * + * + * - **`abstract`** - {boolean=} - An abstract state will never be directly activated, + * but can provide inherited properties to its common children states. + * + * + * + * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way + * to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax. + * + * + * + * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to + * trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax. + * + * + * + * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state + * just because a search/query parameter has changed (via $location.search() or $location.hash()). + * Useful for when you'd like to modify $location.search() without triggering a reload. + * + * + * + * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration. + * + * #### Example: + * Some state name examples + * ```js + * // stateName can be a single top-level name (must be unique). + * $stateProvider.state("home", {}); + * + * // Or it can be a nested state name. This state is a child of the + * // above "home" state. + * $stateProvider.state("home.newest", {}); + * + * // Nest states as deeply as needed. + * $stateProvider.state("home.newest.abc.xyz.inception", {}); + * + * // state() returns $stateProvider, so you can chain state declarations. + * $stateProvider + * .state("home", {}) + * .state("about", {}) + * .state("contacts", {}); + * ``` + * + * @param {string} name A unique state name, e.g. "home", "about", "contacts". + * To create a parent/child state use a dot, e.g. "about.sales", "home.newest". + * @param {object} definition State configuration object. + */ + state(name: string, definition: Ng1StateDeclaration): StateProvider; + state(definition: Ng1StateDeclaration): StateProvider; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + onInvalid(callback: OnInvalidCallback): Function; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js new file mode 100644 index 00000000..7d7e9e07 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js @@ -0,0 +1,138 @@ +/** @module ng1 */ /** for typedoc */ +import { val, isObject, createProxyFunctions } from "@uirouter/core"; +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +var StateProvider = /** @class */ (function () { + function StateProvider(stateRegistry, stateService) { + this.stateRegistry = stateRegistry; + this.stateService = stateService; + createProxyFunctions(val(StateProvider.prototype), this, val(this)); + } + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + StateProvider.prototype.decorator = function (name, func) { + return this.stateRegistry.decorator(name, func) || this; + }; + StateProvider.prototype.state = function (name, definition) { + if (isObject(name)) { + definition = name; + } + else { + definition.name = name; + } + this.stateRegistry.register(definition); + return this; + }; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + StateProvider.prototype.onInvalid = function (callback) { + return this.stateService.onInvalid(callback); + }; + return StateProvider; +}()); +export { StateProvider }; +//# sourceMappingURL=stateProvider.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js.map new file mode 100644 index 00000000..a98bedf2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/stateProvider.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateProvider.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/stateProvider.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,kBAAkB;AACrC,OAAO,EACH,GAAG,EAAE,QAAQ,EAAE,oBAAoB,EACtC,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;GAeG;AACH;IACE,uBAAoB,aAA4B,EAAU,YAA0B;QAAhE,kBAAa,GAAb,aAAa,CAAe;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAClF,oBAAoB,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwFG;IACH,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC1D,CAAC;IAwID,6BAAK,GAAL,UAAM,IAAS,EAAE,UAAgB;QAC/B,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,UAAU,GAAG,IAAI,CAAC;QACpB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IAEH,iCAAS,GAAT,UAAU,QAA2B;QACnC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACH,oBAAC;AAAD,CAAC,AA3PD,IA2PC", + "sourcesContent": [ + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n * \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.d.ts new file mode 100644 index 00000000..94bc8bdc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.d.ts @@ -0,0 +1,10 @@ +/** @module ng1 */ /** */ +import { StateObject, TransitionStateHookFn, BuilderFunction } from "@uirouter/core"; +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +export declare const getStateHookBuilder: (hookName: "onEnter" | "onExit" | "onRetain") => (state: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js new file mode 100644 index 00000000..2a999dee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js @@ -0,0 +1,23 @@ +/** @module ng1 */ /** */ +import { services, ResolveContext, extend } from "@uirouter/core"; +import { getLocals } from "../services"; +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +export var getStateHookBuilder = function (hookName) { + return function stateHookBuilder(state, parentFn) { + var hook = state[hookName]; + var pathname = hookName === 'onExit' ? 'from' : 'to'; + function decoratedNg1Hook(trans, state) { + var resolveContext = new ResolveContext(trans.treeChanges(pathname)); + var locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans }); + return services.$injector.invoke(hook, this, locals); + } + return hook ? decoratedNg1Hook : undefined; + }; +}; +//# sourceMappingURL=onEnterExitRetain.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js.map new file mode 100644 index 00000000..d3e47cdb --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "onEnterExitRetain.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/statebuilders/onEnterExitRetain.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,MAAM;AACzB,OAAO,EACuD,QAAQ,EAAE,cAAc,EAAE,MAAM,EAC7F,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,QAAuC;IAC3E,OAAA,0BAA0B,KAAkB,EAAE,QAAyB;QACrE,IAAI,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC3B,IAAI,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAErD,0BAA0B,KAAiB,EAAE,KAA0B;YACrE,IAAI,cAAc,GAAG,IAAI,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrE,IAAI,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACxF,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;AAXD,CAWC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.d.ts new file mode 100644 index 00000000..687ad4a4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.d.ts @@ -0,0 +1,34 @@ +import { StateObject, ViewConfig, ViewConfigFactory, PathNode, ResolveContext, IInjectable } from "@uirouter/core"; +import { Ng1ViewDeclaration } from "../interface"; +import { TemplateFactory } from "../templateFactory"; +export declare function getNg1ViewConfigFactory(): ViewConfigFactory; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +export declare function ng1ViewsBuilder(state: StateObject): {}; +export declare class Ng1ViewConfig implements ViewConfig { + path: PathNode[]; + viewDecl: Ng1ViewDeclaration; + factory: TemplateFactory; + $id: number; + loaded: boolean; + controller: Function; + template: string; + component: string; + locals: any; + constructor(path: PathNode[], viewDecl: Ng1ViewDeclaration, factory: TemplateFactory); + load(): Promise; + getTemplate: (uiView: any, context: ResolveContext) => string; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + getController(context: ResolveContext): (IInjectable | string | Promise); +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js new file mode 100644 index 00000000..702ce9e8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js @@ -0,0 +1,105 @@ +import { pick, forEach, tail, extend, isArray, isInjectable, isDefined, isString, services, trace, ViewService, ResolveContext, Resolvable } from "@uirouter/core"; +export function getNg1ViewConfigFactory() { + var templateFactory = null; + return function (path, view) { + templateFactory = templateFactory || services.$injector.get("$templateFactory"); + return [new Ng1ViewConfig(path, view, templateFactory)]; + }; +} +var hasAnyKey = function (keys, obj) { + return keys.reduce(function (acc, key) { return acc || isDefined(obj[key]); }, false); +}; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +export function ng1ViewsBuilder(state) { + // Do not process root state + if (!state.parent) + return {}; + var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys); + // Do not allow a state to have both state-level props and also a `views: {}` property. + // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state. + // However, the `$default` approach should not be mixed with a separate `views: ` block. + if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) { + throw new Error("State '" + state.name + "' has a 'views' object. " + + "It cannot also have \"view properties\" at the state level. " + + "Move the following properties into a view (in the 'views' object): " + + (" " + allViewKeys.filter(function (key) { return isDefined(state[key]); }).join(", "))); + } + var views = {}, viewsObject = state.views || { "$default": pick(state, allViewKeys) }; + forEach(viewsObject, function (config, name) { + // Account for views: { "": { template... } } + name = name || "$default"; + // Account for views: { header: "headerComponent" } + if (isString(config)) + config = { component: config }; + // Make a shallow copy of the config object + config = extend({}, config); + // Do not allow a view to mix props for component-style view with props for template/controller-style view + if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) { + throw new Error("Cannot combine: " + compKeys.join("|") + " with: " + nonCompKeys.join("|") + " in stateview: '" + name + "@" + state.name + "'"); + } + config.resolveAs = config.resolveAs || '$resolve'; + config.$type = "ng1"; + config.$context = state; + config.$name = name; + var normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name); + config.$uiViewName = normalized.uiViewName; + config.$uiViewContextAnchor = normalized.uiViewContextAnchor; + views[name] = config; + }); + return views; +} +var id = 0; +var Ng1ViewConfig = /** @class */ (function () { + function Ng1ViewConfig(path, viewDecl, factory) { + var _this = this; + this.path = path; + this.viewDecl = viewDecl; + this.factory = factory; + this.$id = id++; + this.loaded = false; + this.getTemplate = function (uiView, context) { + return _this.component ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings) : _this.template; + }; + } + Ng1ViewConfig.prototype.load = function () { + var _this = this; + var $q = services.$q; + var context = new ResolveContext(this.path); + var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); + var promises = { + template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), + controller: $q.when(this.getController(context)) + }; + return $q.all(promises).then(function (results) { + trace.traceViewServiceEvent("Loaded", _this); + _this.controller = results.controller; + extend(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" } + return _this; + }); + }; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + Ng1ViewConfig.prototype.getController = function (context) { + var provider = this.viewDecl.controllerProvider; + if (!isInjectable(provider)) + return this.viewDecl.controller; + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + return Ng1ViewConfig; +}()); +export { Ng1ViewConfig }; +//# sourceMappingURL=views.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js.map new file mode 100644 index 00000000..6357dcb6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "views.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/statebuilders/views.ts" + ], + "names": [], + "mappings": "AAEA,OAAO,EACU,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EACxC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAC/C,WAAW,EAA+B,cAAc,EAAE,UAAU,EACnF,MAAM,gBAAgB,CAAC;AAKxB,MAAM;IACJ,IAAI,eAAe,GAAoB,IAAI,CAAC;IAC5C,MAAM,CAAC,UAAC,IAAI,EAAE,IAAI;QAChB,eAAe,GAAG,eAAe,IAAI,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAChF,MAAM,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED,IAAM,SAAS,GAAG,UAAC,IAAI,EAAE,GAAG;IACxB,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAA1B,CAA0B,EAAE,KAAK,CAAC;AAA5D,CAA4D,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,0BAA0B,KAA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AC;IACL,CAAC;IAKD;;;;OAIG;IACH,qCAAa,GAAb,UAAc,OAAuB;QACnC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAChD,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC7D,IAAI,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QACrE,IAAI,UAAU,GAAG,IAAI,UAAU,CAAC,EAAE,EAAQ,UAAU,EAAE,IAAI,CAAC,CAAC;QAC5D,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACH,oBAAC;AAAD,CAAC,AA5CD,IA4CC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.d.ts new file mode 100644 index 00000000..76eae489 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.d.ts @@ -0,0 +1,85 @@ + +import { IAugmentedJQuery } from "angular"; +import { IInjectable, ResolveContext, RawParams } from "@uirouter/core"; +import { Ng1ViewDeclaration, TemplateFactoryProvider } from "./interface"; +/** + * Service which manages loading of templates from a ViewConfig. + */ +export declare class TemplateFactory implements TemplateFactoryProvider { + /** @hidden */ private _useHttp; + /** @hidden */ private $templateRequest; + /** @hidden */ private $templateCache; + /** @hidden */ private $http; + /** @hidden */ $get: (string | (($http: any, $templateCache: any, $injector: any) => this))[]; + /** @hidden */ + useHttpService(value: boolean): void; + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ + template?: string; + component?: string; + }>; + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + fromString(template: (string | Function), params?: RawParams): any; + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + fromUrl(url: (string | Function), params: any): any; + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + fromProvider(provider: IInjectable, params: any, context: ResolveContext): Promise; + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext): Promise; + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js new file mode 100644 index 00000000..4f947127 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js @@ -0,0 +1,192 @@ +/** @module view */ +/** for typedoc */ +import { ng as angular } from "./angular"; +import { isArray, isDefined, isFunction, isObject, services, tail, kebobString, unnestR, Resolvable } from "@uirouter/core"; +/** + * Service which manages loading of templates from a ViewConfig. + */ +var TemplateFactory = /** @class */ (function () { + function TemplateFactory() { + var _this = this; + /** @hidden */ this._useHttp = angular.version.minor < 3; + /** @hidden */ this.$get = ['$http', '$templateCache', '$injector', function ($http, $templateCache, $injector) { + _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest'); + _this.$http = $http; + _this.$templateCache = $templateCache; + return _this; + }]; + } + /** @hidden */ + TemplateFactory.prototype.useHttpService = function (value) { + this._useHttp = value; + }; + ; + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + TemplateFactory.prototype.fromConfig = function (config, params, context) { + var defaultTemplate = ""; + var asTemplate = function (result) { return services.$q.when(result).then(function (str) { return ({ template: str }); }); }; + var asComponent = function (result) { return services.$q.when(result).then(function (str) { return ({ component: str }); }); }; + return (isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) : + isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) : + isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) : + isDefined(config.component) ? asComponent(config.component) : + isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) : + asTemplate(defaultTemplate)); + }; + ; + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + TemplateFactory.prototype.fromString = function (template, params) { + return isFunction(template) ? template(params) : template; + }; + ; + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromUrl = function (url, params) { + if (isFunction(url)) + url = url(params); + if (url == null) + return null; + if (this._useHttp) { + return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) + .then(function (response) { + return response.data; + }); + } + return this.$templateRequest(url); + }; + ; + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromProvider = function (provider, params, context) { + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + ; + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) { + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + ; + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) { + bindings = bindings || {}; + // Bind once prefix + var prefix = angular.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 = 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 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 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)" + if (type === '&') { + var res = context.getResolvable(resolveName); + var fn = res && res.data; + 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 attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; + } + // some-attr="::$resolve.someResolveName" + return attrName + "='" + prefix + "$resolve." + resolveName + "'"; + }; + var attrs = getComponentBindings(component).map(attributeTpl).join(" "); + var kebobName = kebob(component); + return "<" + kebobName + " " + attrs + ">"; + }; + ; + return TemplateFactory; +}()); +export { TemplateFactory }; +// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&') +function getComponentBindings(name) { + var cmpDefs = services.$injector.get(name + "Directive"); // could be multiple + if (!cmpDefs || !cmpDefs.length) + throw new Error("Unable to find component named '" + name + "'"); + return cmpDefs.map(getBindings).reduce(unnestR, []); +} +// Given a directive definition, find its object input attributes +// Use different properties, depending on the type of directive (component, bindToController, normal) +var getBindings = function (def) { + if (isObject(def.bindToController)) + return scopeBindings(def.bindToController); + return scopeBindings(def.scope); +}; +// for ng 1.2 style, process the scope: { input: "=foo" } +// for ng 1.3 through ng 1.5, process the component's bindToController: { input: "=foo" } object +var scopeBindings = function (bindingsObj) { return Object.keys(bindingsObj || {}) + .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; }) + .filter(function (tuple) { return isDefined(tuple) && isArray(tuple[1]); }) + .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); }; +//# sourceMappingURL=templateFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js.map new file mode 100644 index 00000000..bbe58e8e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/templateFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "templateFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/templateFactory.ts" + ], + "names": [], + "mappings": "AAAA,mBAAmB;AACnB,kBAAkB;AAClB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAoB,IAAI,EAAE,WAAW,EAAE,OAAO,EAChG,UAAU,EACX,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH;IAAA;QAAA,iBA6KC;QA5KC,cAAc,CAAS,aAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;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,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,iEAAiE;AACjE,qGAAqG;AACrG,IAAM,WAAW,GAAG,UAAC,GAAQ;IAC3B,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC/E,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC,CAAC;AAOF,yDAAyD;AACzD,gGAAgG;AAChG,IAAM,aAAa,GAAG,UAAC,WAAgB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;KAErE,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAjD,CAAiD,CAAC;KAE7D,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC,CAAC;KAEtD,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAmB,CAAA,EAAtE,CAAsE,CAAC,EAN7C,CAM6C,CAAC", + "sourcesContent": [ + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.d.ts new file mode 100644 index 00000000..aa31bd77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.d.ts @@ -0,0 +1,157 @@ +/** @module url */ /** */ +import { UIRouter, UrlRouter, LocationServices, $InjectorLike, UrlRuleHandlerFn, UrlMatcher, IInjectable } from "@uirouter/core"; +export interface RawNg1RuleFunction { + ($injector: $InjectorLike, $location: LocationServices): string | void; +} +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +export declare class UrlRouterProvider { + /** @hidden */ _router: UIRouter; + /** @hidden */ _urlRouter: UrlRouter; + /** @hidden */ + constructor(router: UIRouter); + /** @hidden */ + $get(): UrlRouter; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider; + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider; + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + when(what: (RegExp | UrlMatcher | string), handler: string | IInjectable): this; + static injectableHandler(router: UIRouter, handler: any): UrlRuleHandlerFn; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + deferIntercept(defer?: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js new file mode 100644 index 00000000..b1d0bdcf --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js @@ -0,0 +1,204 @@ +/** @module url */ /** */ +import { BaseUrlRule } from "@uirouter/core"; +import { services, isString, isFunction, isArray, identity } from "@uirouter/core"; +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +var UrlRouterProvider = /** @class */ (function () { + /** @hidden */ + function UrlRouterProvider(router) { + this._router = router; + this._urlRouter = router.urlRouter; + } + /** @hidden */ + UrlRouterProvider.prototype.$get = function () { + var urlRouter = this._urlRouter; + urlRouter.update(true); + if (!urlRouter.interceptDeferred) + urlRouter.listen(); + return urlRouter; + }; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + UrlRouterProvider.prototype.rule = function (ruleFn) { + var _this = this; + if (!isFunction(ruleFn)) + throw new Error("'rule' must be a function"); + var match = function () { + return ruleFn(services.$injector, _this._router.locationService); + }; + var rule = new BaseUrlRule(match, identity); + this._urlRouter.rule(rule); + return this; + }; + ; + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + UrlRouterProvider.prototype.otherwise = function (rule) { + var _this = this; + var urlRouter = this._urlRouter; + if (isString(rule)) { + urlRouter.otherwise(rule); + } + else if (isFunction(rule)) { + urlRouter.otherwise(function () { return rule(services.$injector, _this._router.locationService); }); + } + else { + throw new Error("'rule' must be a string or function"); + } + return this; + }; + ; + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + UrlRouterProvider.prototype.when = function (what, handler) { + if (isArray(handler) || isFunction(handler)) { + handler = UrlRouterProvider.injectableHandler(this._router, handler); + } + this._urlRouter.when(what, handler); + return this; + }; + ; + UrlRouterProvider.injectableHandler = function (router, handler) { + return function (match) { + return services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); + }; + }; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + UrlRouterProvider.prototype.deferIntercept = function (defer) { + this._urlRouter.deferIntercept(defer); + }; + ; + return UrlRouterProvider; +}()); +export { UrlRouterProvider }; +//# sourceMappingURL=urlRouterProvider.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js.map new file mode 100644 index 00000000..9b2a5ad6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlRouterProvider.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/urlRouterProvider.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,MAAM;AACzB,OAAO,EACmD,WAAW,EAEpE,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAMnF;;;;;;;;;;;;;GAaG;AACH;IAIE,cAAc;IACd,2BAAY,MAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC;IACrC,CAAC;IAED,cAAc;IACd,gCAAI,GAAJ;QACE,IAAI,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,EA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;QAED,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAAA,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,gCAAI,GAAJ,UAAK,IAAgC,EAAE,OAA2B;QAChE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,OAAc,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAAA,CAAC;IAEK,mCAAiB,GAAxB,UAAyB,MAAgB,EAAE,OAAO;QAChD,MAAM,CAAC,UAAA,KAAK;YACR,OAAA,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAAhG,CAAgG,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,0CAAc,GAAd,UAAe,KAAe;QAC5B,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAAA,CAAC;IACJ,wBAAC;AAAD,CAAC,AAzLD,IAyLC", + "sourcesContent": [ + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.d.ts new file mode 100644 index 00000000..e4fc544f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.d.ts @@ -0,0 +1,9 @@ +export interface UIViewScrollProvider { + /** + * Uses standard anchorScroll behavior + * + * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) + * service for scrolling based on the url anchor. + */ + useAnchorScroll(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js new file mode 100644 index 00000000..7dab9a7d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js @@ -0,0 +1,21 @@ +/** @module ng1 */ /** */ +import { ng as angular } from "./angular"; +/** @hidden */ +function $ViewScrollProvider() { + var useAnchorScroll = false; + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + return function ($element) { + return $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} +angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); +//# sourceMappingURL=viewScroll.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js.map new file mode 100644 index 00000000..9f77ee23 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib-esm/viewScroll.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "viewScroll.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/viewScroll.ts" + ], + "names": [], + "mappings": "AAAA,kBAAkB,CAAC,MAAM;AACzB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAgB1C,cAAc;AACd;IAEE,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,UAAU,aAAmC,EAAE,QAAyB;YAChH,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,aAAa,CAAC;YACvB,CAAC;YAED,MAAM,CAAC,UAAU,QAAgB;gBAC/B,MAAM,CAAC,QAAQ,CAAC;oBACd,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA4B,mBAAmB,CAAC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.d.ts new file mode 100644 index 00000000..a58640ee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.d.ts @@ -0,0 +1 @@ +export declare const ng: any; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js new file mode 100644 index 00000000..00a15e6b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ng_from_import = require("angular"); +var ng_from_global = angular; +exports.ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global; +//# sourceMappingURL=angular.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js.map new file mode 100644 index 00000000..f8029a85 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/angular.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "angular.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/angular.ts" + ], + "names": [], + "mappings": ";;AAKA,wCAA0C;AAC1C,IAAI,cAAc,GAAG,OAAO,CAAC;AAEhB,QAAA,EAAE,GAAG,CAAC,cAAc,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC", + "sourcesContent": [ + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.d.ts new file mode 100644 index 00000000..0e3fe8d5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.d.ts @@ -0,0 +1,3 @@ +/** @hidden Used for typedoc */ +export interface ng1_directive { +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js new file mode 100644 index 00000000..6d748ace --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js @@ -0,0 +1,571 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * # Angular 1 Directives + * + * These are the directives included in UI-Router for Angular 1. + * These directives are used in templates to create viewports and link/navigate to states. + * + * @ng1api + * @preferred + * @module directives + */ /** for typedoc */ +var angular_1 = require("../angular"); +var core_1 = require("@uirouter/core"); +/** @hidden */ +function parseStateRef(ref) { + var paramsOnly = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (paramsOnly) + ref = '(' + paramsOnly[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/); + if (!parsed || parsed.length !== 4) + throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1] || null, paramExpr: parsed[3] || null }; +} +/** @hidden */ +function stateContext(el) { + var $uiView = el.parent().inheritedData('$uiView'); + var path = core_1.parse('$cfg.path')($uiView); + return path ? core_1.tail(path).state.name : undefined; +} +/** @hidden */ +function processedDef($state, $element, def) { + var uiState = def.uiState || $state.current.name; + var uiStateOpts = core_1.extend(defaultOpts($element, $state), def.uiStateOpts || {}); + var href = $state.href(uiState, def.uiStateParams, uiStateOpts); + return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href }; +} +/** @hidden */ +function getTypeInfo(el) { + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; + var isForm = el[0].nodeName === "FORM"; + return { + attr: isForm ? "action" : (isSvg ? 'xlink:href' : 'href'), + isAnchor: el.prop("tagName").toUpperCase() === "A", + clickable: !isForm + }; +} +/** @hidden */ +function clickHook(el, $state, $timeout, type, getDef) { + return function (e) { + var button = e.which || e.button, target = getDef(); + if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function () { + $state.go(target.uiState, target.uiStateParams, target.uiStateOpts); + }); + e.preventDefault(); + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0; + e.preventDefault = function () { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }; +} +/** @hidden */ +function defaultOpts(el, $state) { + return { + relative: stateContext(el) || $state.$current, + inherit: true, + source: "sref" + }; +} +/** @hidden */ +function bindEvents(element, scope, hookFn, uiStateOpts) { + var events; + if (uiStateOpts) { + events = uiStateOpts.events; + } + if (!core_1.isArray(events)) { + events = ['click']; + } + var on = element.on ? 'on' : 'bind'; + for (var _i = 0, events_1 = events; _i < events_1.length; _i++) { + var event_1 = events_1[_i]; + element[on](event_1, hookFn); + } + scope.$on('$destroy', function () { + var off = element.off ? 'off' : 'unbind'; + for (var _i = 0, events_2 = events; _i < events_2.length; _i++) { + var event_2 = events_2[_i]; + element[off](event_2, hookFn); + } + }); +} +/** + * `ui-sref`: A directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of the `ui-sref` is the name of the state to link to. + * + * #### Example: + * This will activate the `home` state when the link is clicked. + * ```html + * Home + * ``` + * + * ### Relative Links + * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]). + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create a relative `ui-sref` which always targets the same destination. + * + * #### Example: + * Both these links are relative to the parent state, even when a child state is currently active. + * ```html + * child 1 state + * child 2 state + * ``` + * + * This link activates the parent state. + * ```html + * Return + * ``` + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * #### Example: + * Assuming the `users` state has a url of `/users/` + * ```html + * Users + * ``` + * + * ### Parameter Values + * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state. + * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses. + * The content inside the parentheses is an expression, evaluated to the parameter values. + * + * #### Example: + * This example renders a list of links to users. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ user.displayName }} + *
  • + * ``` + * + * Note: + * The parameter values expression is `$watch`ed for updates. + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-sref-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Examples + * If you have the following template: + * + * ```html + * Home + * About + * Next page + * + * + * ``` + * + * Then (assuming the current state is `contacts`) the rendered html including hrefs would be: + * + * ```html + * Home + * About + * Next page + * + *
      + *
    • + * Joe + *
    • + *
    • + * Alice + *
    • + *
    • + * Bob + *
    • + *
    + * + * Home + * ``` + * + * ### Notes + * + * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses. + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * + * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). + * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. + */ +var uiSref; +uiSref = ['$uiRouter', '$timeout', + function $StateRefDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var ref = parseStateRef(attrs.uiSref); + rawDef.uiState = ref.state; + rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {}; + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function (val) { + rawDef.uiStateParams = core_1.extend({}, val); + update(); + }, true); + rawDef.uiStateParams = core_1.extend({}, scope.$eval(ref.paramExpr)); + } + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-state`: A fully dynamic directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.** + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to. + * **This is in contrast with `ui-sref`, which takes a state name as a string literal.** + * + * #### Example: + * Create a list of links. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Relative Links + * If the expression evaluates to a relative path, it is processed like [[uiSref]]. + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create relative `ui-state` which always targets the same destination. + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * ### Parameter Values + * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state. + * Param values should be provided using the `ui-state-params` attribute. + * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression. + * + * #### Example: + * This example renders a list of links with param values. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-state-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Notes + * + * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`. + * However, it might be simpler to use [[uiSref]] parameter-only links. + * + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * ``` + */ +var uiState; +uiState = ['$uiRouter', '$timeout', + function $StateRefDynamicDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts']; + var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return (acc[attr] = core_1.noop, acc); }, {}); + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + inputAttrs.forEach(function (field) { + rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null; + attrs.$observe(field, function (expr) { + watchDeregFns[field](); + watchDeregFns[field] = scope.$watch(expr, function (newval) { + rawDef[field] = newval; + update(); + }, true); + }); + }); + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active + * + * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the + * related directive's state is active (and remove them when it is inactive). + * + * The primary use-case is to highlight the active link in navigation menus, + * distinguishing it from the inactive menu items. + * + * ### Linking to a `ui-sref` or `ui-state` + * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element. + * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**. + * + * ### Matching + * + * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**. + * This is a "fuzzy match" which uses [[StateService.includes]]. + * + * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active). + * This is an "exact match" which uses [[StateService.is]]. + * + * ### Parameter values + * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted. + * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted. + * + * #### Example: + * ```html + *
  • + * {{ user.lastName }} + *
  • + * ``` + * + * ### Examples + * + * Given the following template: + * #### Example: + * ```html + * + * ``` + * + * When the app state is `app.user` (or any child state), + * and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + * + * ```html + * + * ``` + * + * ### Glob mode + * + * It is possible to pass `ui-sref-active` an expression that evaluates to an object. + * The objects keys represent active class names and values represent the respective state names/globs. + * `ui-sref-active` will match if the current active state **includes** any of + * the specified state names/globs, even the abstract ones. + * + * #### Example: + * Given the following template, with "admin" being an abstract state: + * ```html + *
    + * Roles + *
    + * ``` + * + * When the current state is "admin.roles" the "active" class will be applied to both the
    and elements. + * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`. + * + * ### Notes: + * + * - The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` + */ +var uiSrefActive; +uiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter', + function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + var states = [], activeEqClass, uiSrefActive; + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); + try { + uiSrefActive = $scope.$eval($attrs.uiSrefActive); + } + catch (e) { + // Do nothing. uiSrefActive is not a valid expression. + // Fall back to using $interpolate below + } + uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); + if (core_1.isObject(uiSrefActive)) { + core_1.forEach(uiSrefActive, function (stateOrName, activeClass) { + if (core_1.isString(stateOrName)) { + var ref = parseStateRef(stateOrName); + addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); + } + }); + } + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$addStateInfo = function (newState, newParams) { + // we already got an explicit state provided by ui-sref-active, so we + // shadow the one that comes from ui-sref + if (core_1.isObject(uiSrefActive) && states.length > 0) { + return; + } + var deregister = addState(newState, newParams, uiSrefActive); + update(); + return deregister; + }; + function updateAfterTransition(trans) { + trans.promise.then(update, core_1.noop); + } + $scope.$on('$stateChangeSuccess', update); + $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition)); + if ($uiRouter.globals.transition) { + updateAfterTransition($uiRouter.globals.transition); + } + function addState(stateName, stateParams, activeClass) { + var state = $state.get(stateName, stateContext($element)); + var stateInfo = { + state: state || { name: stateName }, + params: stateParams, + activeClass: activeClass + }; + states.push(stateInfo); + return function removeState() { + core_1.removeFrom(states)(stateInfo); + }; + } + // Update route state + function update() { + var splitClasses = function (str) { + return str.split(/\s/).filter(core_1.identity); + }; + var getClasses = function (stateList) { + return stateList.map(function (x) { return x.activeClass; }).map(splitClasses).reduce(core_1.unnestR, []); + }; + var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(core_1.uniqR, []); + var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); })); + var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length; + var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : []; + var addClasses = fuzzyClasses.concat(exactClasses).reduce(core_1.uniqR, []); + var removeClasses = allClasses.filter(function (cls) { return !core_1.inArray(addClasses, cls); }); + $scope.$evalAsync(function () { + addClasses.forEach(function (className) { return $element.addClass(className); }); + removeClasses.forEach(function (className) { return $element.removeClass(className); }); + }); + } + update(); + }] + }; + }]; +angular_1.ng.module('ui.router.state') + .directive('uiSref', uiSref) + .directive('uiSrefActive', uiSrefActive) + .directive('uiSrefActiveEq', uiSrefActive) + .directive('uiState', uiState); +//# sourceMappingURL=stateDirectives.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js.map new file mode 100644 index 00000000..94f263c2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/stateDirectives.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateDirectives.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/directives/stateDirectives.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;;;;GASG,CAAC,kBAAkB;AACtB,sCAA2C;AAG3C,uCAGwB;AAMxB,cAAc;AACd,uBAAuB,GAAW;IAChC,IAAI,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACxD,EAAE,CAAC,CAAC,UAAU,CAAC;QAAC,GAAG,GAAG,GAAG,GAAG,UAAU,CAAC,CA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I-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.d.ts new file mode 100644 index 00000000..5c065ea1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.d.ts @@ -0,0 +1,142 @@ +import { ActiveUIView } from "@uirouter/core"; +import { Ng1ViewConfig } from "../statebuilders/views"; +import { ng1_directive } from "./stateDirectives"; +/** @hidden */ +export declare type UIViewData = { + $cfg: Ng1ViewConfig; + $uiView: ActiveUIView; +}; +/** @hidden */ +export declare type UIViewAnimData = { + $animEnter: Promise; + $animLeave: Promise; + $$animLeave: { + resolve: () => any; + }; +}; +/** + * `ui-view`: A viewport directive which is filled in by a view from the active state. + * + * ### Attributes + * + * - `name`: (Optional) A view name. + * The name should be unique amongst the other views in the same state. + * You can have views of the same name that live in different states. + * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). + * + * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. + * Uses [[$uiViewScroll]] to do the scrolling. + * + * - `onload`: Expression to evaluate whenever the view updates. + * + * #### Example: + * A view can be unnamed or named. + * ```html + * + *
    + * + * + *
    + * + * + * + * ``` + * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + * + * ```html + *
    + * $stateProvider.state("home", { + * template: "

    HELLO!

    " + * }) + * ``` + * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the + * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + * + * ```html + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "main": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * Really though, you'll use views to set up multiple views: + * + * ```html + *
    + *
    + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + * ``` + * + * #### Examples for `autoscroll`: + * ```html + * + * + * + * + * + * + * + * ``` + * + * Resolve data: + * + * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this + * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. + * + * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the + * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which + * depends on `$resolve` data. + * + * #### Example: + * ```js + * $stateProvider.state('home', { + * template: '', + * resolve: { + * user: function(UserService) { return UserService.fetchUser(); } + * } + * }); + * ``` + */ +export declare let uiView: ng1_directive; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js new file mode 100644 index 00000000..3060ad36 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js @@ -0,0 +1,290 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @ng1api + * @module directives + */ /** for typedoc */ +var angular_1 = require("../angular"); +var angular_2 = require("angular"); +var core_1 = require("@uirouter/core"); +var views_1 = require("../statebuilders/views"); +var services_1 = require("../services"); +exports.uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q', + function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) { + function getRenderer(attrs, scope) { + return { + enter: function (element, target, cb) { + if (angular_1.ng.version.minor > 2) { + $animate.enter(element, null, target).then(cb); + } + else { + $animate.enter(element, null, target, cb); + } + }, + leave: function (element, cb) { + if (angular_1.ng.version.minor > 2) { + $animate.leave(element).then(cb); + } + else { + $animate.leave(element, cb); + } + } + }; + } + function configsEqual(config1, config2) { + return config1 === config2; + } + var rootData = { + $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } }, + $uiView: {} + }; + var directive = { + count: 0, + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, unregister, onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(attrs, scope), viewConfig = undefined, inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default'; + var activeUIView = { + $type: 'ng1', + id: directive.count++, + name: name, + fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + "." + name : name, + config: null, + configUpdated: configUpdatedCallback, + get creationContext() { + var fromParentTagConfig = core_1.parse('$cfg.viewDecl.$context')(inherited); + // Allow + // See https://github.com/angular-ui/ui-router/issues/3355 + var fromParentTag = core_1.parse('$uiView.creationContext')(inherited); + return fromParentTagConfig || fromParentTag; + } + }; + core_1.trace.traceUIViewEvent("Linking", activeUIView); + function configUpdatedCallback(config) { + if (config && !(config instanceof views_1.Ng1ViewConfig)) + return; + if (configsEqual(viewConfig, config)) + return; + core_1.trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context); + viewConfig = config; + updateView(config); + } + $element.data('$uiView', { $uiView: activeUIView }); + updateView(); + unregister = $view.registerUIView(activeUIView); + scope.$on("$destroy", function () { + core_1.trace.traceUIViewEvent("Destroying/Unregistering", activeUIView); + unregister(); + }); + function cleanupLastView() { + if (previousEl) { + core_1.trace.traceUIViewEvent("Removing (previous) el", previousEl.data('$uiView')); + previousEl.remove(); + previousEl = null; + } + if (currentScope) { + core_1.trace.traceUIViewEvent("Destroying scope", activeUIView); + currentScope.$destroy(); + currentScope = null; + } + if (currentEl) { + var _viewData_1 = currentEl.data('$uiViewAnim'); + core_1.trace.traceUIViewEvent("Animate out", _viewData_1); + renderer.leave(currentEl, function () { + _viewData_1.$$animLeave.resolve(); + previousEl = null; + }); + previousEl = currentEl; + currentEl = null; + } + } + function updateView(config) { + var newScope = scope.$new(); + var animEnter = $q.defer(), animLeave = $q.defer(); + var $uiViewData = { + $cfg: config, + $uiView: activeUIView, + }; + var $uiViewAnim = { + $animEnter: animEnter.promise, + $animLeave: animLeave.promise, + $$animLeave: animLeave + }; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoading + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {string} viewName Name of the view. + */ + newScope.$emit('$viewContentLoading', name); + var cloned = $transclude(newScope, function (clone) { + clone.data('$uiViewAnim', $uiViewAnim); + clone.data('$uiView', $uiViewData); + renderer.enter(clone, $element, function onUIViewEnter() { + animEnter.resolve(); + if (currentScope) + currentScope.$emit('$viewContentAnimationEnded'); + if (core_1.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + currentEl = cloned; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded', config || viewConfig); + currentScope.$eval(onloadExp); + } + }; + } + }; + return directive; + }]; +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout']; +/** @hidden */ +function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q, $timeout) { + var getControllerAs = core_1.parse('viewDecl.controllerAs'); + var getResolveAs = core_1.parse('viewDecl.resolveAs'); + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + tElement.empty(); + return function (scope, $element) { + var data = $element.data('$uiView'); + if (!data) { + $element.html(initial); + $compile($element.contents())(scope); + return; + } + var cfg = data.$cfg || { viewDecl: {}, getTemplate: angular_2.noop }; + var resolveCtx = cfg.path && new core_1.ResolveContext(cfg.path); + $element.html(cfg.getTemplate($element, resolveCtx) || initial); + core_1.trace.traceUIViewFill(data.$uiView, $element.html()); + var link = $compile($element.contents()); + var controller = cfg.controller; + var controllerAs = getControllerAs(cfg); + var resolveAs = getResolveAs(cfg); + var locals = resolveCtx && services_1.getLocals(resolveCtx); + scope[resolveAs] = locals; + if (controller) { + var controllerInstance = $controller(controller, core_1.extend({}, locals, { $scope: scope, $element: $element })); + if (controllerAs) { + scope[controllerAs] = controllerInstance; + scope[controllerAs][resolveAs] = locals; + } + // TODO: Use $view service as a central point for registering component-level hooks + // Then, when a component is created, tell the $view service, so it can invoke hooks + // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element }); + // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element })); + $element.data('$ngControllerController', controllerInstance); + $element.children().data('$ngControllerController', controllerInstance); + registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg); + } + // Wait for the component to appear in the DOM + if (core_1.isString(cfg.viewDecl.component)) { + var cmp_1 = cfg.viewDecl.component; + var kebobName = core_1.kebobString(cmp_1); + var tagRegexp_1 = new RegExp("^(x-|data-)?" + kebobName + "$", "i"); + var getComponentController = function () { + var directiveEl = [].slice.call($element[0].children) + .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); }); + return directiveEl && angular_1.ng.element(directiveEl).data("$" + cmp_1 + "Controller"); + }; + var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) { + if (!ctrlInstance) + return; + registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg); + deregisterWatch_1(); + }); + } + link(scope); + }; + } + }; +} +/** @hidden */ +var hasComponentImpl = typeof angular_1.ng.module('ui.router')['component'] === 'function'; +/** @hidden incrementing id */ +var _uiCanExitId = 0; +/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */ +function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) { + // Call $onInit() ASAP + if (core_1.isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) { + controllerInstance.$onInit(); + } + var viewState = core_1.tail(cfg.path).state.self; + var hookOptions = { bind: controllerInstance }; + // Add component-level hook for onParamsChange + if (core_1.isFunction(controllerInstance.uiOnParamsChanged)) { + var resolveContext = new core_1.ResolveContext(cfg.path); + var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data; + // Fire callback on any successful transition + var paramsUpdated = function ($transition$) { + // Exit early if the $transition$ is the same as the view was created within. + // Exit early if the $transition$ will exit the state the view is for. + if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1) + return; + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + var toSchema = $transition$.treeChanges().to.map(function (node) { return node.paramSchema; }).reduce(core_1.unnestR, []); + var fromSchema = $transition$.treeChanges().from.map(function (node) { return node.paramSchema; }).reduce(core_1.unnestR, []); + // Find the to params that have different values than the from params + var changedToParams = toSchema.filter(function (param) { + var idx = fromSchema.indexOf(param); + return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]); + }); + // Only trigger callback if a to param has changed or is new + if (changedToParams.length) { + var changedKeys_1 = changedToParams.map(function (x) { return x.id; }); + // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params. + var newValues = core_1.filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; }); + controllerInstance.uiOnParamsChanged(newValues, $transition$); + } + }; + $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions)); + } + // Add component-level hook for uiCanExit + if (core_1.isFunction(controllerInstance.uiCanExit)) { + var id_1 = _uiCanExitId++; + var cacheProp_1 = '_uiCanExitIds'; + // Returns true if a redirect transition already answered truthy + var prevTruthyAnswer_1 = function (trans) { + return !!trans && (trans[cacheProp_1] && trans[cacheProp_1][id_1] === true || prevTruthyAnswer_1(trans.redirectedFrom())); + }; + // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition + var wrappedHook = function (trans) { + var promise, ids = trans[cacheProp_1] = trans[cacheProp_1] || {}; + if (!prevTruthyAnswer_1(trans)) { + promise = $q.when(controllerInstance.uiCanExit(trans)); + promise.then(function (val) { return ids[id_1] = (val !== false); }); + } + return promise; + }; + var criteria = { exiting: viewState.name }; + $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions)); + } +} +angular_1.ng.module('ui.router.state').directive('uiView', exports.uiView); +angular_1.ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill); +//# sourceMappingURL=viewDirective.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js.map new file mode 100644 index 00000000..25cdf5e3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/directives/viewDirective.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "viewDirective.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/directives/viewDirective.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,kBAAkB;AACtB,sCAA2C;AAC3C,mCAGiB;AAEjB,uCAIwB;AACxB,gDAAqD;AAErD,wCAAsC;AA8ItC,cAAM,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI;IACpE,wBAAwB,KAAkB,EAAE,QAAa,EAAE,aAAkB,EAAE,YAAiC,EAAE,EAAU;QAE1H,qBAAqB,KAAU,EAAE,KAAa;YAC5C,MAAM,CAAC;gBACL,KAAK,EAAE,UAAS,OAAe,EAAE,MAAW,EAAE,EAAY;oBACxD,EAAE,CAAC,CAAC,YAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;wBAC9B,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACjD,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;oBAC5C,CAAC;gBACH,CAAC;gBACD,KAAK,EAAE,UAAS,OAAe,EAAE,EAAY;oBAC3C,EAAE,CAAC,CAAC,YAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;wBAC9B,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACnC,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBAC9B,CAAC;gBACH,CAAC;aACF,CAAC;QACJ,C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,IAAE,CAAC,KAAK,IAAI,IAAI,kBAAgB,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC;QAA1G,CAA0G,CAAC;QAE/G,kHAAkH;QAClH,IAAM,WAAW,GAAG,UAAC,KAAiB;YACpC,IAAI,OAAO,EAAE,GAAG,GAAG,KAAK,CAAC,WAAS,CAAC,GAAG,KAAK,CAAC,WAAS,CAAC,IAAI,EAAE,CAAC;YAC7D,EAAE,CAAC,CAAC,CAAC,kBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAE,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,CAAC,EAAzB,CAAyB,CAAC,CAAC;YACjD,CAAC;YACD,MAAM,CAAC,OAAO,CAAC;QACjB,CAAC,CAAC;QAEF,IAAI,QAAQ,GAAG,EAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAC,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAQ,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC;AAED,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAQ,cAAM,CAAC,CAAC;AACpE,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAQ,kBAAkB,CAAC,CAAC", + "sourcesContent": [ + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.d.ts new file mode 100644 index 00000000..b2871e24 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.d.ts @@ -0,0 +1,19 @@ +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +export * from "./interface"; +export * from "./services"; +export * from "./statebuilders/views"; +export * from "./stateProvider"; +export * from "./urlRouterProvider"; +import "./injectables"; +import "./directives/stateDirectives"; +import "./stateFilters"; +import "./directives/viewDirective"; +import "./viewScroll"; +declare const _default: "ui.router"; +export default _default; +import * as core from "@uirouter/core"; +export { core }; +export * from "@uirouter/core"; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js new file mode 100644 index 00000000..02b8b7c9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js @@ -0,0 +1,23 @@ +"use strict"; +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./services")); +__export(require("./statebuilders/views")); +__export(require("./stateProvider")); +__export(require("./urlRouterProvider")); +require("./injectables"); +require("./directives/stateDirectives"); +require("./stateFilters"); +require("./directives/viewDirective"); +require("./viewScroll"); +exports.default = "ui.router"; +var core = require("@uirouter/core"); +exports.core = core; +__export(require("@uirouter/core")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js.map new file mode 100644 index 00000000..6bc4ac3a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/index.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,MAAM;;;;;AAGV,gCAA2B;AAC3B,2CAAsC;AACtC,qCAAgC;AAChC,yCAAoC;AAEpC,yBAAuB;AACvB,wCAAsC;AACtC,0BAAwB;AACxB,sCAAoC;AACpC,wBAAsB;AAEtB,kBAAe,WAAW,CAAC;AAE3B,qCAAuC;AAC9B,oBAAI;AACb,oCAA+B", + "sourcesContent": [ + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js new file mode 100644 index 00000000..23fdf18d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js @@ -0,0 +1,368 @@ +"use strict"; +/** + * # Angular 1 injectable services + * + * This is a list of the objects which can be injected using angular's injector. + * + * There are three different kind of injectable objects: + * + * ## **Provider** objects + * #### injectable into a `.config()` block during configtime + * + * - [[$uiRouterProvider]]: The UI-Router instance + * - [[$stateProvider]]: State registration + * - [[$transitionsProvider]]: Transition hooks + * - [[$urlServiceProvider]]: All URL related public APIs + * + * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling + * - [[$urlRouterProvider]]: (deprecated) Url matching rules + * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config + * + * ## **Service** objects + * #### injectable globally during runtime + * + * - [[$uiRouter]]: The UI-Router instance + * - [[$trace]]: Enable transition trace/debug + * - [[$transitions]]: Transition hooks + * - [[$state]]: Imperative state related APIs + * - [[$stateRegistry]]: State registration + * - [[$urlService]]: All URL related public APIs + * - [[$uiRouterGlobals]]: Global variables + * - [[$uiViewScroll]]: Scroll an element into view + * + * - [[$stateParams]]: (deprecated) Global state param values + * - [[$urlRouter]]: (deprecated) URL synchronization + * - [[$urlMatcherFactory]]: (deprecated) URL parsing config + * + * ## **Per-Transition** objects + * + * - These kind of objects are injectable into: + * - Resolves ([[Ng1StateDeclaration.resolve]]), + * - Transition Hooks ([[TransitionService.onStart]], etc), + * - Routed Controllers ([[Ng1ViewDeclaration.controller]]) + * + * #### Different instances are injected based on the [[Transition]] + * + * - [[$transition$]]: The current Transition object + * - [[$stateParams]]: State param values for pending Transition (deprecated) + * - Any resolve data defined using [[Ng1StateDeclaration.resolve]] + * + * @ng1api + * @preferred + * @module injectables + */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * The current (or pending) State Parameters + * + * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition. + * + * The values are not updated until *after* a `Transition` successfully completes. + * + * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running. + * + * ### Deprecation warning: + * + * The value injected for `$stateParams` is different depending on where it is injected. + * + * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`. + * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`. + * + * Because of these confusing details, this service is deprecated. + * + * ### Instead of using the global `$stateParams` service object, + * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]] + * + * ```js + * MyService.$inject = ['$uiRouterGlobals']; + * function MyService($uiRouterGlobals) { + * return { + * paramValues: function () { + * return $uiRouterGlobals.params; + * } + * } + * } + * ``` + * + * ### Instead of using the per-transition `$stateParams` object, + * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]] + * + * ```js + * MyController.$inject = ['$transition$']; + * function MyController($transition$) { + * var username = $transition$.params().username; + * // .. do something with username + * } + * ``` + * + * --- + * + * This object can be injected into other services. + * + * #### Deprecated Example: + * ```js + * SomeService.$inject = ['$http', '$stateParams']; + * function SomeService($http, $stateParams) { + * return { + * getUser: function() { + * return $http.get('/api/users/' + $stateParams.username); + * } + * } + * }; + * angular.service('SomeService', SomeService); + * ``` + * @deprecated + */ +var $stateParams; +/** + * Global UI-Router variables + * + * The router global state as a **Service Object** (injectable during runtime). + * + * This object contains globals such as the current state and current parameter values. + */ +var $uiRouterGlobals; +/** + * The UI-Router instance + * + * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime). + * + * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. + * It has references to the other UI-Router services + * + * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time. + */ +var $uiRouter; +/** + * The UI-Router instance + * + * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase). + * + * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. + * It has references to the other UI-Router services + * + * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime. + */ +var $uiRouterProvider; +/** + * Transition debug/tracing + * + * The [[Trace]] singleton as a **Service Object** (injectable during runtime). + * + * Enables or disables Transition tracing which can help to debug issues. + */ +var $trace; +/** + * The Transition Service + * + * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime). + * + * This angular service exposes the [[TransitionService]] singleton, which is primarily + * used to register global transition hooks. + * + * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase. + */ +var $transitions; +/** + * The Transition Service + * + * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase) + * + * This angular service exposes the [[TransitionService]] singleton, which is primarily + * used to register global transition hooks. + * + * #### Note: This object is also exposed as [[$transitions]] for injection during runtime. + */ +var $transitionsProvider; +/** + * The current [[Transition]] object + * + * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers) + * + * This object returns information about the current transition, including: + * + * - To/from states + * - To/from parameters + * - Transition options + * - States being entered, exited, and retained + * - Resolve data + * - A Promise for the transition + * - Any transition failure information + * - An injector for both Service and Per-Transition Objects + */ +var $transition$; +/** + * The State Service + * + * The [[StateService]] singleton as a **Service Object** (injectable during runtime). + * + * This service used to manage and query information on registered states. + * It exposes state related APIs including: + * + * - Start a [[Transition]] + * - Imperatively lazy load states + * - Check if a state is currently active + * - Look up states by name + * - Build URLs for a state+parameters + * - Configure the global Transition error handler + * + * This angular service exposes the [[StateService]] singleton. + */ +var $state; +/** + * The State Registry + * + * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime). + * + * This service is used to register/deregister states. + * It has state registration related APIs including: + * + * - Register/deregister states + * - Listen for state registration/deregistration + * - Get states by name + * - Add state decorators (to customize the state creation process) + * + * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase. + */ +var $stateRegistry; +/** + * The State Registry + * + * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time). + * + * This service is used to register/deregister states. + * It has state registration related APIs including: + * + * - Register/deregister states + * - Listen for state registration/deregistration + * - Get states by name + * - Add state decorators (to customize the state creation process) + * + * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime. + */ +var $stateRegistryProvider; +/** + * The View Scroll provider + * + * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time). + * + * This angular service exposes the [[UIViewScrollProvider]] singleton and is + * used to disable UI-Router's scroll behavior. + */ +var $uiViewScrollProvider; +/** + * The View Scroll function + * + * The View Scroll function as a **Service Object** (injectable during runtime). + * + * This is a function that scrolls an element into view. + * The element is scrolled after a `$timeout` so the DOM has time to refresh. + * + * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, + * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]]. + * + * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true. + */ +var $uiViewScroll; +/** + * The StateProvider + * + * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time). + * + * This angular service exposes the [[StateProvider]] singleton. + * + * The `StateProvider` is primarily used to register states or add custom state decorators. + * + * ##### Note: This provider is a ng1 vestige. + * It is a passthrough to [[$stateRegistry]] and [[$state]]. + */ +var $stateProvider; +/** + * The URL Service Provider + * + * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase). + * + * A service used to configure and interact with the URL. + * It has URL related APIs including: + * + * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) + * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) + * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) + * - delay initial URL synchronization [[UrlService.deferIntercept]]. + * - get or set the current url: [[UrlService.url]] + * + * ##### Note: This service can also be injected during runtime as [[$urlService]]. + */ +var $urlServiceProvider; +/** + * The URL Service + * + * The [[UrlService]] singleton as a **Service Object** (injectable during runtime). + * + * Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. + * + * Used to configure the URL. + * It has URL related APIs including: + * + * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) + * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) + * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) + * - delay initial URL synchronization [[UrlService.deferIntercept]]. + * - get or set the current url: [[UrlService.url]] + * + * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. + */ +var $urlService; +/** + * The URL Router Provider + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead. + * + * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time). + * + * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime. + * + * @deprecated + */ +var $urlRouterProvider; +/** + * The Url Router + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime). + * + * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time. + * + * @deprecated + */ +var $urlRouter; +/** + * The URL Matcher Factory + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime). + * + * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. + * + * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time. + * + * @deprecated + */ +var $urlMatcherFactory; +/** + * The URL Matcher Factory + * + * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. + * + * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time). + * + * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. + * + * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime. + * + * @deprecated + */ +var $urlMatcherFactoryProvider; +//# sourceMappingURL=injectables.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js.map new file mode 100644 index 00000000..4809ee46 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/injectables.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "injectables.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/injectables.ts" + ], + "names": [], + "mappings": ";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG,CAAC,MAAM;;AAUV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,IAAI,YAAyB,CAAC;AAE9B;;;;;;GAMG;AACH,IAAI,gBAAiC,CAAC;AAEtC;;;;;;;;;GASG;AACH,IAAI,SAAmB,CAAE;AAEzB;;;;;;;;;GASG;AACH,IAAI,iBAA2B,CAAC;AAEhC;;;;;;GAMG;AACH,IAAI,MAAa,CAAC;AAElB;;;;;;;;;GASG;AACH,IAAI,YAA+B,CAAC;AAEpC;;;;;;;;;GASG;AACH,IAAI,oBAAuC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,IAAI,YAAwB,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,MAAoB,CAAC;AAEzB;;;;;;;;;;;;;;GAcG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;GAcG;AACH,IAAI,sBAAqC,CAAC;AAE1C;;;;;;;GAOG;AACH,IAAI,qBAA2C,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,IAAI,aAAyC,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;;GAeG;AACH,IAAI,mBAA+B,CAAC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAI,WAAuB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,IAAI,UAAqB,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,IAAI,0BAA6C,CAAC", + "sourcesContent": [ + "/**\n * # Angular 1 injectable services\n *\n * This is a list of the objects which can be injected using angular's injector.\n *\n * There are three different kind of injectable objects:\n *\n * ## **Provider** objects\n * #### injectable into a `.config()` block during configtime\n *\n * - [[$uiRouterProvider]]: The UI-Router instance\n * - [[$stateProvider]]: State registration\n * - [[$transitionsProvider]]: Transition hooks\n * - [[$urlServiceProvider]]: All URL related public APIs\n *\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\n *\n * ## **Service** objects\n * #### injectable globally during runtime\n *\n * - [[$uiRouter]]: The UI-Router instance\n * - [[$trace]]: Enable transition trace/debug\n * - [[$transitions]]: Transition hooks\n * - [[$state]]: Imperative state related APIs\n * - [[$stateRegistry]]: State registration\n * - [[$urlService]]: All URL related public APIs\n * - [[$uiRouterGlobals]]: Global variables\n * - [[$uiViewScroll]]: Scroll an element into view\n *\n * - [[$stateParams]]: (deprecated) Global state param values\n * - [[$urlRouter]]: (deprecated) URL synchronization\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\n *\n * ## **Per-Transition** objects\n *\n * - These kind of objects are injectable into:\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\n * - Transition Hooks ([[TransitionService.onStart]], etc),\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\n *\n * #### Different instances are injected based on the [[Transition]]\n *\n * - [[$transition$]]: The current Transition object\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\n *\n * @ng1api\n * @preferred\n * @module injectables\n */ /** */\n\nimport { StateProvider } from \"./stateProvider\";\nimport {\n StateService, TransitionService, Transition, UrlRouter, UrlMatcherFactory,\n StateParams, StateRegistry, UIRouterGlobals, UIRouter, Trace, UrlService\n} from \"@uirouter/core\";\nimport { UIViewScrollProvider } from \"./viewScroll\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\n\n/**\n * The current (or pending) State Parameters\n *\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\n *\n * The values are not updated until *after* a `Transition` successfully completes.\n *\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\n *\n * ### Deprecation warning:\n *\n * The value injected for `$stateParams` is different depending on where it is injected.\n *\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\n *\n * Because of these confusing details, this service is deprecated.\n *\n * ### Instead of using the global `$stateParams` service object,\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\n *\n * ```js\n * MyService.$inject = ['$uiRouterGlobals'];\n * function MyService($uiRouterGlobals) {\n * return {\n * paramValues: function () {\n * return $uiRouterGlobals.params;\n * }\n * }\n * }\n * ```\n *\n * ### Instead of using the per-transition `$stateParams` object,\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\n *\n * ```js\n * MyController.$inject = ['$transition$'];\n * function MyController($transition$) {\n * var username = $transition$.params().username;\n * // .. do something with username\n * }\n * ```\n *\n * ---\n *\n * This object can be injected into other services.\n *\n * #### Deprecated Example:\n * ```js\n * SomeService.$inject = ['$http', '$stateParams'];\n * function SomeService($http, $stateParams) {\n * return {\n * getUser: function() {\n * return $http.get('/api/users/' + $stateParams.username);\n * }\n * }\n * };\n * angular.service('SomeService', SomeService);\n * ```\n * @deprecated\n */\nvar $stateParams: StateParams;\n\n/**\n * Global UI-Router variables\n *\n * The router global state as a **Service Object** (injectable during runtime).\n *\n * This object contains globals such as the current state and current parameter values.\n */\nvar $uiRouterGlobals: UIRouterGlobals;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time.\n */\nlet $uiRouter: UIRouter ;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime.\n */\nvar $uiRouterProvider: UIRouter;\n\n/**\n * Transition debug/tracing\n *\n * The [[Trace]] singleton as a **Service Object** (injectable during runtime).\n *\n * Enables or disables Transition tracing which can help to debug issues.\n */\nvar $trace: Trace;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.\n */\nvar $transitions: TransitionService;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitions]] for injection during runtime.\n */\nvar $transitionsProvider: TransitionService;\n\n/**\n * The current [[Transition]] object\n *\n * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)\n *\n * This object returns information about the current transition, including:\n *\n * - To/from states\n * - To/from parameters\n * - Transition options\n * - States being entered, exited, and retained\n * - Resolve data\n * - A Promise for the transition\n * - Any transition failure information\n * - An injector for both Service and Per-Transition Objects\n */\nvar $transition$: Transition;\n\n/**\n * The State Service\n *\n * The [[StateService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service used to manage and query information on registered states.\n * It exposes state related APIs including:\n *\n * - Start a [[Transition]]\n * - Imperatively lazy load states\n * - Check if a state is currently active\n * - Look up states by name\n * - Build URLs for a state+parameters\n * - Configure the global Transition error handler\n *\n * This angular service exposes the [[StateService]] singleton.\n */\nvar $state: StateService;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.\n */\nvar $stateRegistry: StateRegistry;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.\n */\nvar $stateRegistryProvider: StateRegistry;\n\n/**\n * The View Scroll provider\n *\n * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[UIViewScrollProvider]] singleton and is\n * used to disable UI-Router's scroll behavior.\n */\nvar $uiViewScrollProvider: UIViewScrollProvider;\n\n/**\n * The View Scroll function\n *\n * The View Scroll function as a **Service Object** (injectable during runtime).\n *\n * This is a function that scrolls an element into view.\n * The element is scrolled after a `$timeout` so the DOM has time to refresh.\n *\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].\n *\n * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true.\n */\nvar $uiViewScroll: ($element: JQuery) => void;\n\n/**\n * The StateProvider\n *\n * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[StateProvider]] singleton.\n *\n * The `StateProvider` is primarily used to register states or add custom state decorators.\n *\n * ##### Note: This provider is a ng1 vestige.\n * It is a passthrough to [[$stateRegistry]] and [[$state]].\n */\nvar $stateProvider: StateProvider;\n\n/**\n * The URL Service Provider\n *\n * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).\n *\n * A service used to configure and interact with the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during runtime as [[$urlService]].\n */\nvar $urlServiceProvider: UrlService;\n\n/**\n * The URL Service\n *\n * The [[UrlService]] singleton as a **Service Object** (injectable during runtime).\n *\n * Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n *\n * Used to configure the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n */\nvar $urlService: UrlService;\n\n/**\n * The URL Router Provider\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead.\n *\n * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time).\n *\n * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlRouterProvider: UrlRouterProvider;\n\n/**\n * The Url Router\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime).\n *\n * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlRouter: UrlRouter;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlMatcherFactory: UrlMatcherFactory;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlMatcherFactoryProvider: UrlMatcherFactory;\n\n\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.d.ts new file mode 100644 index 00000000..92a8cc14 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.d.ts @@ -0,0 +1,730 @@ +/** + * @ng1api + * @module ng1 + */ /** */ +import { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from "@uirouter/core"; +/** + * The signature for Angular 1 State Transition Hooks. + * + * State hooks are registered as onEnter/onRetain/onExit in state declarations. + * State hooks can additionally be injected with $transition$ and $state$ for + * the current [[Transition]] and [[StateObject]] in the transition. + * + * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition. + * As a transition runs, it may exit some states, retain (keep) states, and enter states. + * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order). + * + * #### See also: + * + * - [[IHookRegistry.onExit]] + * - [[IHookRegistry.onRetain]] + * - [[IHookRegistry.onEnter]] + * + * #### Example: + * ```js + * onEnter: function() { console.log('Entering'); } + * ``` + * + * Not minification-safe + * ```js + * onRetain: function($state$) { console.log('Retained ' + $state$.name); } + * ``` + * + * Annotated for minification-safety + * ```js + * onExit: [ '$transition$', '$state', function($transition$, $state) { + * // always redirect to 'foo' state when being exited + * if ($transition$.to().name !== 'foo') { + * return $state.target('foo'); + * } + * } ] + * ``` + * + * @returns an optional [[HookResult]] which may alter the transition + */ +export interface Ng1StateTransitionHook { + (...injectables: any[]): HookResult; +} +/** + * @internalapi + * an intermediate interface. + * + * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */ +export interface _Ng1StateDeclaration extends StateDeclaration { + onExit?: any; + onRetain?: any; + onEnter?: any; + views?: any; +} +/** + * The StateDeclaration object is used to define a state or nested state. + * It should be registered with the [[StateRegistry]]. + * + * #### Example: + * ```js + * // StateDeclaration object + * var foldersState = { + * name: 'folders', + * url: '/folders', + * resolve: { + * allfolders: function(FolderService) { + * return FolderService.list(); + * } + * }, + * template: "
    • {{folder.name}}
    ", + * controller: function(allfolders, $scope) { + * $scope.allfolders = allfolders; + * } + * } + * ``` + * + * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly + * on the state declaration and they will be applied to the view with the name `$default`. For example: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * template: '

    foo

    ', + * controller: 'FooController' + * } + * ``` + * + * is simply syntactic sugar for: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * views: { + * $default: { + * template: '

    foo

    ', + * controller: 'FooController + * } + * } + * } + * ``` + * + * If a state definition contains a `views:` object, any view properties set directly on the state are ignored. + * Thus, this is an invalid state defintion: + * + * ```js + * var state = { + * name: 'foo', + * url: '/foo', + * controller: 'FooController, // invalid because views: exists + * views: { + * header: { + * template: '

    header

    ' + * } + * } + * } + * ``` + */ +export interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration { + /** + * An optional object which defines multiple named views. + * + * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]]. + * Unnamed views are internally renamed to `$default`. + * + * A view's name is used to match an active `` directive in the DOM. When the state + * is entered, the state's views are activated and matched with active `` directives: + * + * - The view's name is processed into a ui-view target: + * - ui-view address: an address to a ui-view + * - state anchor: the state to anchor the address to + * + * Examples: + * + * Targets three named ui-views in the parent state's template + * + * #### Example: + * ```js + * views: { + * header: { + * controller: "headerCtrl", + * templateUrl: "header.html" + * }, + * body: { + * controller: "bodyCtrl", + * templateUrl: "body.html" + * }, + * footer: "footerComponent" + * } + * ``` + * + * #### Example: + * ```js + * // Targets named ui-view="header" in the template of the ancestor state 'top' + * // and the named `ui-view="body" from the parent state's template. + * views: { + * 'header@top': { + * controller: "msgHeaderCtrl", + * templateUrl: "msgHeader.html" + * }, + * 'body': { + * controller: "messagesCtrl", + * templateUrl: "messages.html" + * } + * } + * ``` + * + * ## View targeting details + * + * There are a few styles of view addressing/targeting. + * The most common is a simple `ui-view` name + * + * #### Simple ui-view name + * + * Addresses without an `@` are anchored to the parent state. + * + * #### Example: + * ```js + * // target the `
    ` created in the parent state's view + * views: { + * foo: {...} + * } + * ``` + * + * #### View name anchored to a state + * + * You can anchor the `ui-view` name to a specific state by including an `@` + * + * #### Example: + * targets the `
    ` which was created in a view owned by the state `bar.baz` + * ```js + * views: { + * 'foo@bar.baz': {...} + * } + * ``` + * + * #### Absolute addressing + * + * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`. + * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM: + * + * #### Example: + * absolutely targets the `
    ` + * ... which was created in the unnamed/$default root `` + * ```js + * views: { + * '!$default.nested': {...} + * } + * ``` + * + * #### Relative addressing + * + * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`""`). + * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`: + * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names. + * + * #### Example: + * targets the `
    ` + * ... which was created inside the + * `
    ` + * ... which was created inside the parent state's template. + * ```js + * views: { + * 'foo.bar': {...} + * } + * ``` + * + * #### Example: + * targets the `
    ` + * ... which was created in `
    ` + * ... which was created in a template from the state `baz.qux` + * ```js + * views: { + * 'foo.bar@baz.qux': {...} + * } + * ``` + * + * #### Example: + * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning "parent") + * ```js + * views: { + * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo') + * 'bar@^.^': {...}, // bar@(grandparent state) + * 'baz@^.^.^': {...}, // baz@(great-grandparent state) + * } + * ``` + * + * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]]. + * + * --- + * + * ## State template+controller and `views:` incompatiblity + * + * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore, + * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in + * the `views` object. The state declaration must not have any of the following fields: + * - component + * - bindings + * - resolveAs + * - template + * - templateUrl + * - templateProvider + * - controller + * - controllerAs + * - controllerProvider + */ + views?: { + [key: string]: string | Ng1ViewDeclaration; + }; + /** + * A state hook invoked when a state is being entered. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * ### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onEnter: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onEnter?: Ng1StateTransitionHook | IInjectable; + /** + * A state hook invoked when a state is being exited. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * ### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onExit: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onExit?: Ng1StateTransitionHook | IInjectable; + /** + * A state hook invoked when a state is being retained. + * + * The hook can inject global services. + * It can also inject `$transition$` or `$state$` (from the current transition). + * + * #### Example: + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onRetain: (MyService, $transition$, $state$) => { + * return MyService.doSomething($state$.name, $transition$.params()); + * } + * }); + * ``` + * + * #### Example:` + * ```js + * $stateProvider.state({ + * name: 'mystate', + * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) { + * return MyService.doSomething($state$.name, $transition$.params()); + * } ] + * }); + * ``` + */ + onRetain?: Ng1StateTransitionHook | IInjectable; + /** + * Makes all search/query parameters `dynamic` + * + * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead + * + * @deprecated + */ + reloadOnSearch?: boolean; +} +export interface Ng1ViewDeclaration extends _ViewDeclaration { + /** + * The name of the component to use for this view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with + * bindToController and/or scope declaration) which will be used for this view. + * + * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the + * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared + * on the component, any resolve with the same name is set on the component's controller instance. The binding + * is provided to the component as a one-time-binding. In general, components should likewise declare their + * input bindings as [one-way ("<")](https://docs.angularjs.org/api/ng/service/$compile#-scope-). + * + * Note: inside a "views:" block, a bare string `"foo"` is shorthand for `{ component: "foo" }` + * + * Note: Mapping from resolve names to component inputs may be specified using [[bindings]]. + * + * #### Example: + * ```js + * .state('profile', { + * // Use the component for the Unnamed view + * component: 'MyProfile', + * } + * + * .state('messages', { + * // use the component for the view named 'header' + * // use the component for the view named 'content' + * views: { + * header: { component: 'NavBar' }, + * content: { component: 'MessageList' } + * } + * } + * + * .state('contacts', { + * // Inside a "views:" block, a bare string "NavBar" is shorthand for { component: "NavBar" } + * // use the component for the view named 'header' + * // use the component for the view named 'content' + * views: { + * header: 'NavBar', + * content: 'ContactList' + * } + * } + * ``` + * + * + * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`, + * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`. + * + * + * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component) + */ + component?: string; + /** + * An object which maps `resolve`s to [[component]] `bindings`. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied + * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here. + * + * Each key in this object is the name of one of the component's input bindings. + * Each value is the name of the resolve that should be provided to that binding. + * + * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the + * same name. + * + * #### Example: + * ```js + * $stateProvider.state('foo', { + * resolve: { + * foo: function(FooService) { return FooService.get(); }, + * bar: function(BarService) { return BarService.get(); } + * }, + * component: 'Baz', + * // The component's `baz` binding gets data from the `bar` resolve + * // The component's `foo` binding gets data from the `foo` resolve (default behavior) + * bindings: { + * baz: 'bar' + * } + * }); + * + * app.component('Baz', { + * templateUrl: 'baz.html', + * controller: 'BazController', + * bindings: { + * foo: '<', // foo binding + * baz: '<' // baz binding + * } + * }); + * ``` + * + */ + bindings?: { + [key: string]: string; + }; + /** + * Dynamic component provider function. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * This is an injectable provider function which returns the name of the component to use. + * The provider will invoked during a Transition in which the view's state is entered. + * The provider is called after the resolve data is fetched. + * + * #### Example: + * ```js + * componentProvider: function(MyResolveData, $transition$) { + * if (MyResolveData.foo) { + * return "fooComponent" + * } else if ($transition$.to().name === 'bar') { + * return "barComponent"; + * } + * } + * ``` + */ + componentProvider?: IInjectable; + /** + * The view's controller function or name + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * The controller function, or the name of a registered controller. The controller function will be used + * to control the contents of the [[directives.uiView]] directive. + * + * If specified as a string, controllerAs can be declared here, i.e., "FooController as foo" instead of in + * a separate [[controllerAs]] property. + * + * See: [[Ng1Controller]] for information about component-level router hooks. + */ + controller?: (IInjectable | string); + /** + * A controller alias name. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * If present, the controller will be published to scope under the `controllerAs` name. + * See: https://docs.angularjs.org/api/ng/directive/ngController + */ + controllerAs?: string; + /** + * Dynamic controller provider function. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * This is an injectable provider function which returns the actual controller function, or the name + * of a registered controller. The provider will invoked during a Transition in which the view's state is + * entered. The provider is called after the resolve data is fetched. + * + * #### Example: + * ```js + * controllerProvider: function(MyResolveData, $transition$) { + * if (MyResolveData.foo) { + * return "FooCtrl" + * } else if ($transition$.to().name === 'bar') { + * return "BarCtrl"; + * } else { + * return function($scope) { + * $scope.baz = "Qux"; + * } + * } + * } + * ``` + */ + controllerProvider?: IInjectable; + /** + * The scope variable name to use for resolve data. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * When a view is activated, the resolved data for the state which the view belongs to is put on the scope. + * This property sets the name of the scope variable to use for the resolved data. + * + * Defaults to `$resolve`. + */ + resolveAs?: string; + /** + * The HTML template for the view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * HTML template as a string, or a function which returns an html template as a string. + * This template will be used to render the corresponding [[directives.uiView]] directive. + * + * This property takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the Transition parameters as the first argument. + * + * #### Example: + * ```js + * template: "

    inline template definition

    " + * ``` + * + * #### Example: + * ```js + * template: function(params) { + * return "

    generated template

    "; + * } + * ``` + */ + template?: (Function | string); + /** + * The URL for the HTML template for the view. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * A path or a function that returns a path to an html template. + * The template will be fetched and used to render the corresponding [[directives.uiView]] directive. + * + * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument. + * + * #### Example: + * ```js + * templateUrl: "/templates/home.html" + * ``` + * + * #### Example: + * ```js + * templateUrl: function(params) { + * return myTemplates[params.pageId]; + * } + * ``` + */ + templateUrl?: (string | Function); + /** + * Injected function which returns the HTML template. + * + * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]: + * + * Injected function which returns the HTML template. + * The template will be used to render the corresponding [[directives.uiView]] directive. + * + * #### Example: + * ```js + * templateProvider: function(MyTemplateService, $transition$) { + * return MyTemplateService.getTemplate($transition$.params().pageId); + * } + * ``` + */ + templateProvider?: IInjectable; +} +/** + * The shape of a controller for a view (and/or component), defining the controller callbacks. + * + * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a + * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`). + * + * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks, + * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks + * ([[IHookRegistry]]), but are only called if the view is currently active. + * + * This interface defines the UI-Router component callbacks. + * + */ +export interface Ng1Controller { + /** @hidden */ + $onInit(): void; + /** + * This callback is called when parameter values have changed. + * + * This callback can be used to respond to changing parameter values in the current state, or in parent/child states. + * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]]) + * + * Called when: + * - The view is still active + * - A new transition has completed successfully + * - The state for the view (controller) was not reloaded + * - At least one parameter value was changed + * + * Called with: + * @param newValues an object containing the changed parameter values + * @param $transition$ the new Transition which triggered this callback + * + * #### Example: + * ```js + * angular.module('foo').controller('FancyCtrl', function() { + * this.uiOnParamsChanged = function(newParams) { + * console.log("new params: ", newParams); + * } + * }); + * ``` + */ + uiOnParamsChanged(newValues: any, $transition$: Transition): void; + /** + * This callback is called when the view's state is about to be exited. + * + * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]]. + * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should + * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the + * promise settles. + * + * + * Called when: + * - The view is still active + * - A new Transition is about to run + * - The new Transition will exit the view's state + * + * Called with: + * - The new Transition + * + * Relevant return Values: + * - `false`: The transition is cancelled. + * - A rejected promise: The transition is cancelled. + * - [[TargetState]]: The transition is redirected to the new target state. + * - Anything else: the transition will continue normally (the state and view will be deactivated) + * + * #### Example: + * ```js + * app.component('myComponent', { + * template: '', + * bindings: { 'data': '<' }, + * controller: function() { + * + * this.originalData = angular.copy(this.data); + * + * this.uiCanExit = function() { + * if (!angular.equals(this.data, this.originalData)) { + * // Note: This could also return a Promise and request async + * // confirmation using something like ui-bootstrap $modal + * return window.confirm("Data has changed. Exit anyway and lose changes?"); + * } + * } + * } + * } + * ``` + * + * @param transition the new Transition that is about to exit the component's state + * @return a HookResult, or a promise for a HookResult + */ + uiCanExit(transition: Transition): HookResult; +} +/** + * Manages which template-loading mechanism to use. + * + * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise. + */ +export interface TemplateFactoryProvider { + /** + * Forces $templateFactory to use $http instead of $templateRequest. + * + * UI-Router uses `$templateRequest` by default on angular 1.3+. + * Use this method to choose to use `$http` instead. + * + * --- + * + * ## Security warning + * + * This might cause XSS, as $http doesn't enforce the regular security checks for + * templates that have been introduced in Angular 1.3. + * + * See the $sce documentation, section + *
    + * Impact on loading templates for more details about this mechanism. + * + * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.* + * + * @param useUnsafeHttpService `true` to use `$http` to fetch templates + */ + useHttpService(useUnsafeHttpService: boolean): any; +} +declare module "@uirouter/core/lib/state/stateRegistry" { + interface StateRegistry { + register(state: Ng1StateDeclaration): any; + } +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js new file mode 100644 index 00000000..d549d1f1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js.map new file mode 100644 index 00000000..af00306d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @ng1api\n * @module ng1\n */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from \"@uirouter/core\";\n\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]) : HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"
    • {{folder.name}}
    \",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '

    foo

    ',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '

    foo

    ',\n * controller: 'FooController\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController, // invalid because views: exists\n * views: {\n * header: {\n * template: '

    header

    '\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `
    ` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `
    ` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `
    `\n * ... which was created in the unnamed/$default root ``\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `
    `\n * ... which was created inside the\n * `
    `\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `
    `\n * ... which was created in `
    `\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration; };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n * \n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with \n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared \n * on the component, any resolve with the same name is set on the component's controller instance. The binding \n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"<\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the component for the view named 'header'\n * // use the component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the component for the view named 'header'\n * // use the component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: (IInjectable|string);\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"

    inline template definition

    \"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"

    generated template

    \";\n * }\n * ```\n */\n template?: (Function|string);\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: (string|Function);\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n * \n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n * \n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * \n * Impact on loading templates for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module \"@uirouter/core/lib/state/stateRegistry\" {\n interface StateRegistry {\n register(state: Ng1StateDeclaration);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.d.ts new file mode 100644 index 00000000..1684f1ef --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.d.ts @@ -0,0 +1,6 @@ +/** @hidden */ +export declare const resolveFactory: () => { + resolve: (invocables: { + [key: string]: Function; + }, locals?: {}, parent?: Promise) => Promise<{}>; +}; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js new file mode 100644 index 00000000..e4b03b34 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module ng1 */ /** */ +var core_1 = require("@uirouter/core"); +var angular = require("angular"); +/** + * Implementation of the legacy `$resolve` service for angular 1. + */ +var $resolve = { + /** + * Asynchronously injects a resolve block. + * + * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API. + * + * ### Not bundled by default + * + * This API is no longer not part of the standard `@uirouter/angularjs` bundle. + * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle. + * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`. + * + * --- + * + * Given an object `invocables`, where keys are strings and values are injectable functions, + * injects each function, and waits for the resulting promise to resolve. + * When all resulting promises are resolved, returns the results as an object. + * + * #### Example: + * ```js + * let invocables = { + * foo: [ '$http', ($http) => + * $http.get('/api/foo').then(resp => resp.data) ], + * bar: [ 'foo', '$http', (foo, $http) => + * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ] + * } + * $resolve.resolve(invocables) + * .then(results => console.log(results.foo, results.bar)) + * // Logs foo and bar: + * // { id: 123, barId: 456, fooData: 'foo data' } + * // { id: 456, barData: 'bar data' } + * ``` + * + * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions + * @param locals key/value pre-resolved data (locals) + * @param parent a promise for a "parent resolve" + */ + resolve: function (invocables, locals, parent) { + if (locals === void 0) { locals = {}; } + var parentNode = new core_1.PathNode(new core_1.StateObject({ params: {}, resolvables: [] })); + var node = new core_1.PathNode(new core_1.StateObject({ params: {}, resolvables: [] })); + var context = new core_1.ResolveContext([parentNode, node]); + context.addResolvables(core_1.resolvablesBuilder({ resolve: invocables }), node.state); + var resolveData = function (parentLocals) { + var rewrap = function (_locals) { return core_1.resolvablesBuilder({ resolve: core_1.mapObj(_locals, function (local) { return function () { return local; }; }) }); }; + context.addResolvables(rewrap(parentLocals), parentNode.state); + context.addResolvables(rewrap(locals), node.state); + var tuples2ObjR = function (acc, tuple) { + acc[tuple.token] = tuple.value; + return acc; + }; + return context.resolvePath().then(function (results) { return results.reduce(tuples2ObjR, {}); }); + }; + return parent ? parent.then(resolveData) : resolveData({}); + } +}; +/** @hidden */ +exports.resolveFactory = function () { return $resolve; }; +// The old $resolve service +angular.module('ui.router').factory('$resolve', exports.resolveFactory); +//# sourceMappingURL=resolveService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js.map new file mode 100644 index 00000000..624885b8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/resolveService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolveService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/legacy/resolveService.ts" + ], + "names": [], + "mappings": ";;AAAA,kBAAkB,CAAC,MAAM;AACzB,uCAAwG;AACxG,iCAAmC;AAEnC;;GAEG;AACH,IAAI,QAAQ,GAAG;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,EAAE,UAAC,UAAuC,EAAE,MAAW,EAAE,MAAqB;QAAlC,uBAAA,EAAA,WAAW;QAC5D,IAAI,UAAU,GAAG,IAAI,eAAQ,CAAC,IAAI,kBAAW,CAAO,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACtF,IAAI,IAAI,GAAG,IAAI,eAAQ,CAAC,IAAI,kBAAW,CAAO,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,OAAO,GAAG,IAAI,qBAAc,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;QAErD,OAAO,CAAC,cAAc,CAAC,yBAAkB,CAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,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irouter/core\";\nimport * as angular from \"angular\";\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nvar $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise) => {\n let parentNode = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let node = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder( { resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder( { resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any, value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n }\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', resolveFactory);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.d.ts new file mode 100644 index 00000000..db7a7204 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.d.ts @@ -0,0 +1,124 @@ + +import { IAngularEvent } from "angular"; +/** + * An event broadcast on `$rootScope` when the state transition **begins**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] + * + * #### Example: + * ```js + * $rootScope.$on('$stateChangeStart', function(event, transition) { + * event.preventDefault(); + * // transitionTo() promise will be rejected with + * // a 'transition prevented' error + * }) + * ``` + * + * @event $stateChangeStart + * @deprecated + */ +export declare var $stateChangeStart: IAngularEvent; +/** + * An event broadcast on `$rootScope` if a transition is **cancelled**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that was cancelled + * + * @event $stateChangeCancel + * @deprecated + */ +export declare var $stateChangeCancel: IAngularEvent; +/** + * An event broadcast on `$rootScope` once the state transition is **complete**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]] + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that just succeeded + * + * @event $stateChangeSuccess + * @deprecated + */ +export declare var $stateChangeSuccess: IAngularEvent; +/** + * An event broadcast on `$rootScope` when an **error occurs** during transition. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]] + * + * It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `error`: The reason the transition errored. + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that errored + * + * @event $stateChangeError + * @deprecated + */ +export declare var $stateChangeError: IAngularEvent; +/** + * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name. + * + * ### Deprecation warning: use [[StateService.onInvalid]] instead + * + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler, + * you can see its properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `transitionTo()` will be rejected with a + * `'transition aborted'` error. + * + * Additional arguments to the event handler are provided: + * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties. + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * + * #### Example: + * ```js + * // somewhere, assume lazy.state has not been defined + * $state.go("lazy.state", { a: 1, b: 2 }, { inherit: false }); + * + * // somewhere else + * $scope.$on('$stateNotFound', function(event, transition) { + * function(event, unfoundState, fromState, fromParams){ + * console.log(unfoundState.to); // "lazy.state" + * console.log(unfoundState.toParams); // {a:1, b:2} + * console.log(unfoundState.options); // {inherit:false} + default options + * }); + * ``` + * + * @event $stateNotFound + * @deprecated + */ +export declare var $stateNotFound: IAngularEvent; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js new file mode 100644 index 00000000..73d4bdd6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js @@ -0,0 +1,150 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * # Legacy state events + * + * Polyfill implementation of the UI-Router 0.2.x state events. + * + * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they + * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary + * to implement meaningful application behaviors. + * + * To enable these state events, include the `stateEvents.js` file in your project, e.g., + * ``` + * + * ``` + * and also make sure you depend on the `ui.router.state.events` angular module, e.g., + * ``` + * angular.module("myApplication", ['ui.router', 'ui.router.state.events'] + * ``` + * + * @module ng1_state_events + */ /** */ +var angular_1 = require("../angular"); +(function () { + var isFunction = angular_1.ng.isFunction, isString = angular_1.ng.isString; + function applyPairs(memo, keyValTuple) { + var key, value; + if (Array.isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; + } + function stateChangeStartHandler($transition$) { + if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) + return; + var $injector = $transition$.injector(); + var $stateEvents = $injector.get('$stateEvents'); + var $rootScope = $injector.get('$rootScope'); + var $state = $injector.get('$state'); + var $urlRouter = $injector.get('$urlRouter'); + var enabledEvents = $stateEvents.provider.enabled(); + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + if (enabledEvents.$stateChangeSuccess) { + var startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + if (startEvent.defaultPrevented) { + if (enabledEvents.$stateChangeCancel) { + $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + } + //Don't update and resync url if there's been a new transition started. see issue #2238, #600 + if ($state.transition == null) + $urlRouter.update(); + return false; + } + // right after global state is updated + var successOpts = { priority: 9999 }; + $transition$.onSuccess({}, function () { + $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + }, successOpts); + } + if (enabledEvents.$stateChangeError) { + $transition$.promise["catch"](function (error) { + if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */)) + return; + var evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$); + if (!evt.defaultPrevented) { + $urlRouter.update(); + } + }); + } + } + stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter']; + function stateNotFoundHandler($to$, $from$, injector) { + var $state = injector.get('$state'); + var $rootScope = injector.get('$rootScope'); + var $urlRouter = injector.get('$urlRouter'); + var redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() }; + var e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params()); + if (e.defaultPrevented || e.retry) + $urlRouter.update(); + function redirectFn() { + return $state.target(redirect.to, redirect.toParams, redirect.options); + } + if (e.defaultPrevented) { + return false; + } + else if (e.retry || !!$state.get(redirect.to)) { + return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn(); + } + } + $StateEventsProvider.$inject = ['$stateProvider']; + function $StateEventsProvider($stateProvider) { + $StateEventsProvider.prototype.instance = this; + var runtime = false; + var allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError']; + var enabledStateEvents = allEvents.map(function (e) { return [e, true]; }).reduce(applyPairs, {}); + function assertNotRuntime() { + if (runtime) + throw new Error("Cannot enable events at runtime (use $stateEventsProvider"); + } + /** + * Enables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.enable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return enabledStateEvents[event] = true; }); + }; + /** + * Disables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.disable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return delete enabledStateEvents[event]; }); + }; + this.enabled = function () { return enabledStateEvents; }; + this.$get = $get; + $get.$inject = ['$transitions']; + function $get($transitions) { + runtime = true; + if (enabledStateEvents["$stateNotFound"]) + $stateProvider.onInvalid(stateNotFoundHandler); + if (enabledStateEvents.$stateChangeStart) + $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 }); + return { + provider: $StateEventsProvider.prototype.instance + }; + } + } + angular_1.ng.module('ui.router.state.events', ['ui.router.state']) + .provider("$stateEvents", $StateEventsProvider) + .run(['$stateEvents', function ($stateEvents) { + }]); +})(); +//# sourceMappingURL=stateEvents.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js.map new file mode 100644 index 00000000..af94c294 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/legacy/stateEvents.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateEvents.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/legacy/stateEvents.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;;;;;;;;;;;;;;GAmBG,CAAC,MAAM;AACV,sCAA2C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AAC;IACH,CAAC;IAGD,YAAO,CAAC,MAAM,CAAC,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,CAAC;SACxD,QAAQ,CAAC,cAAc,EAA4B,oBAAoB,CAAC;SACxE,GAAG,CAAC,CAAC,cAAc,EAAE,UAAU,YAAiB;QACjD,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,EAAE,CAAC", + "sourcesContent": [ + "/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * \n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @module ng1_state_events\n */ /** */\nimport { ng as angular } from \"../angular\";\nimport { IScope, IAngularEvent, IServiceProviderFactory } from \"angular\";\nimport {\n Obj, TargetState, StateService, Transition, TransitionService, UrlRouter, HookResult, UIInjector\n} from \"@uirouter/core\";\nimport { StateProvider } from \"../stateProvider\";\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport var $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport var $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport var $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport var $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport var $stateNotFound: IAngularEvent;\n\n\n(function () {\n let { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored())\n return;\n\n let $injector = $transition$.injector();\n let $stateEvents = $injector.get('$stateEvents');\n let $rootScope = $injector.get('$rootScope');\n let $state = $injector.get('$state');\n let $urlRouter = $injector.get('$urlRouter');\n\n let enabledEvents = $stateEvents.provider.enabled();\n\n\n let toParams = $transition$.params(\"to\");\n let fromParams = $transition$.params(\"from\");\n\n if (enabledEvents.$stateChangeSuccess) {\n let startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }\n //Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n let successOpts = { priority: 9999 };\n $transition$.onSuccess({}, function () {\n $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }, successOpts);\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise[\"catch\"](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */))\n return;\n\n\n let evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$);\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n let $state: StateService = injector.get('$state');\n let $rootScope: IScope = injector.get('$rootScope');\n let $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise;\n }\n\n let redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n let e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry)\n $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n let allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n let enabledStateEvents = allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error(\"Cannot enable events at runtime (use $stateEventsProvider\");\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => enabledStateEvents[event] = true);\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents[\"$stateNotFound\"])\n $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart)\n $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance\n };\n }\n }\n\n\n angular.module('ui.router.state.events', ['ui.router.state'])\n .provider(\"$stateEvents\", $StateEventsProvider)\n .run(['$stateEvents', function ($stateEvents: any) { /* Invokes $get() */\n }]);\n})();\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.d.ts new file mode 100644 index 00000000..147d7312 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.d.ts @@ -0,0 +1,43 @@ + +/** + * @internalapi + * @module ng1 + */ /** */ +import { LocationConfig, LocationServices, UIRouter } from "@uirouter/core"; +import { ILocationService, ILocationProvider } from "angular"; +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +export declare class Ng1LocationServices implements LocationConfig, LocationServices { + private $locationProvider; + private $location; + private $sniffer; + path: any; + search: any; + hash: any; + hashPrefix: any; + port: any; + protocol: any; + host: any; + baseHref: any; + private _urlListeners; + dispose(): void; + constructor($locationProvider: ILocationProvider); + onChange(callback: Function): () => Function[]; + html5Mode(): any; + url(newUrl?: string, replace?: boolean, state?: any): string; + _runtimeServices($rootScope: any, $location: ILocationService, $sniffer: any, $browser: any): void; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + static monkeyPatchPathParameterType(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js new file mode 100644 index 00000000..9af2f7dc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = require("@uirouter/core"); +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +var Ng1LocationServices = /** @class */ (function () { + function Ng1LocationServices($locationProvider) { + // .onChange() registry + this._urlListeners = []; + this.$locationProvider = $locationProvider; + var _lp = core_1.val($locationProvider); + core_1.createProxyFunctions(_lp, this, _lp, ['hashPrefix']); + } + Ng1LocationServices.prototype.dispose = function () { }; + Ng1LocationServices.prototype.onChange = function (callback) { + var _this = this; + this._urlListeners.push(callback); + return function () { return core_1.removeFrom(_this._urlListeners)(callback); }; + }; + Ng1LocationServices.prototype.html5Mode = function () { + var html5Mode = this.$locationProvider.html5Mode(); + html5Mode = core_1.isObject(html5Mode) ? html5Mode.enabled : html5Mode; + return html5Mode && this.$sniffer.history; + }; + Ng1LocationServices.prototype.url = function (newUrl, replace, state) { + if (replace === void 0) { replace = false; } + if (newUrl) + this.$location.url(newUrl); + if (replace) + this.$location.replace(); + if (state) + this.$location.state(state); + return this.$location.url(); + }; + Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser) { + var _this = this; + this.$location = $location; + this.$sniffer = $sniffer; + // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange + $rootScope.$on("$locationChangeSuccess", function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); }); + var _loc = core_1.val($location); + var _browser = core_1.val($browser); + // Bind these LocationService functions to $location + core_1.createProxyFunctions(_loc, this, _loc, ["replace", "path", "search", "hash"]); + // Bind these LocationConfig functions to $location + core_1.createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']); + // Bind these LocationConfig functions to $browser + core_1.createProxyFunctions(_browser, this, _browser, ['baseHref']); + }; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + Ng1LocationServices.monkeyPatchPathParameterType = function (router) { + var pathType = router.urlMatcherFactory.type('path'); + pathType.encode = function (val) { + return val != null ? val.toString().replace(/(~|\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : val; + }; + pathType.decode = function (val) { + return val != null ? val.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : val; + }; + }; + return Ng1LocationServices; +}()); +exports.Ng1LocationServices = Ng1LocationServices; +//# sourceMappingURL=locationServices.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js.map new file mode 100644 index 00000000..337a13af --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/locationServices.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "locationServices.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/locationServices.ts" + ], + "names": [], + "mappings": ";;AAKA,uCAAiF;AAGjF;;GAEG;AACH;IAmBE,6BAAY,iBAAoC;QALhD,uBAAuB;QACf,kBAAa,GAAe,EAAE,CAAC;QAKrC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,GAAG,GAAG,UAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,2BAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IACvD,CAAC;IAND,qCAAO,GAAP,cAAY,CAAC;IAQb,sCAAQ,GAAR,UAAS,QAAkB;QAA3B,iBAGC;QAFC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,CAAC,cAAM,OAAA,iBAAU,CAAC,KAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,EAAxC,CAAwC,CAAC;IACxD,CAAC;IAED,uCAAS,GAAT;QACE,IAAI,SAAS,GAAQ,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;QACxD,SAAS,GAAG,eAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAChE,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC5C,CAAC;IAED,iCAAG,GAAH,UAAI,MAAe,EAAE,OAAe,EAAE,KAAM;QAAvB,wBAAA,EAAA,eAAe;QAClC,EAAE,CAAC,CAAC,MAAM,CAAC;YAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC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M,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEhE,QAAQ,CAAC,MAAM,GAAG,UAAC,GAAQ;YACvB,OAAA,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,CAAC,CAAC,CAAC,GAAG;QAA1F,CAA0F,CAAC;QAE/F,QAAQ,CAAC,MAAM,GAAG,UAAC,GAAW;YAC1B,OAAA,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,CAAC,CAAC,CAAC,GAAG;QAA5F,CAA4F,CAAC;IAEnG,CAAC;IACH,0BAAC;AAAD,CAAC,AAlFD,IAkFC;AAlFY,kDAAmB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.d.ts new file mode 100644 index 00000000..72217adc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.d.ts @@ -0,0 +1,16 @@ + +import { IRootScopeService } from "angular"; +import { ResolveContext, TypedMap } from "@uirouter/core"; +import { StateProvider } from "./stateProvider"; +import { UrlRouterProvider } from "./urlRouterProvider"; +declare module '@uirouter/core/lib/router' { + interface UIRouter { + /** @hidden */ + stateProvider: StateProvider; + /** @hidden */ + urlRouterProvider: UrlRouterProvider; + } +} +export declare function watchDigests($rootScope: IRootScopeService): void; +/** @hidden TODO: find a place to move this */ +export declare const getLocals: (ctx: ResolveContext) => TypedMap; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js new file mode 100644 index 00000000..05d33387 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js @@ -0,0 +1,116 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * # Angular 1 types + * + * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. + * The customizations to the core types for Angular UI-Router are documented here. + * + * The optional [[$resolve]] service is also documented here. + * + * @module ng1 + * @preferred + */ +/** for typedoc */ +var angular_1 = require("./angular"); +var core_1 = require("@uirouter/core"); +var views_1 = require("./statebuilders/views"); +var templateFactory_1 = require("./templateFactory"); +var stateProvider_1 = require("./stateProvider"); +var onEnterExitRetain_1 = require("./statebuilders/onEnterExitRetain"); +var locationServices_1 = require("./locationServices"); +var urlRouterProvider_1 = require("./urlRouterProvider"); +angular_1.ng.module("ui.router.angular1", []); +var mod_init = angular_1.ng.module('ui.router.init', []); +var mod_util = angular_1.ng.module('ui.router.util', ['ng', 'ui.router.init']); +var mod_rtr = angular_1.ng.module('ui.router.router', ['ui.router.util']); +var mod_state = angular_1.ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']); +var mod_main = angular_1.ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']); +var mod_cmpt = angular_1.ng.module('ui.router.compat', ['ui.router']); // tslint:disable-line +var router = null; +$uiRouter.$inject = ['$locationProvider']; +/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */ +function $uiRouter($locationProvider) { + // Create a new instance of the Router when the $uiRouterProvider is initialized + router = this.router = new core_1.UIRouter(); + router.stateProvider = new stateProvider_1.StateProvider(router.stateRegistry, router.stateService); + // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties + router.stateRegistry.decorator("views", views_1.ng1ViewsBuilder); + router.stateRegistry.decorator("onExit", onEnterExitRetain_1.getStateHookBuilder("onExit")); + router.stateRegistry.decorator("onRetain", onEnterExitRetain_1.getStateHookBuilder("onRetain")); + router.stateRegistry.decorator("onEnter", onEnterExitRetain_1.getStateHookBuilder("onEnter")); + router.viewService._pluginapi._viewConfigFactory('ng1', views_1.getNg1ViewConfigFactory()); + var ng1LocationService = router.locationService = router.locationConfig = new locationServices_1.Ng1LocationServices($locationProvider); + locationServices_1.Ng1LocationServices.monkeyPatchPathParameterType(router); + // backwards compat: also expose router instance as $uiRouterProvider.router + router['router'] = router; + router['$get'] = $get; + $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache']; + function $get($location, $browser, $sniffer, $rootScope, $http, $templateCache) { + ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser); + delete router['router']; + delete router['$get']; + return router; + } + return router; +} +var getProviderFor = function (serviceName) { return ['$uiRouterProvider', function ($urp) { + var service = $urp.router[serviceName]; + service["$get"] = function () { return service; }; + return service; + }]; }; +// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime) +runBlock.$inject = ['$injector', '$q', '$uiRouter']; +function runBlock($injector, $q, $uiRouter) { + core_1.services.$injector = $injector; + core_1.services.$q = $q; + // The $injector is now available. + // Find any resolvables that had dependency annotation deferred + $uiRouter.stateRegistry.get() + .map(function (x) { return x.$$state().resolvables; }) + .reduce(core_1.unnestR, []) + .filter(function (x) { return x.deps === "deferred"; }) + .forEach(function (resolvable) { return resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi); }); +} +// $urlRouter service and $urlRouterProvider +var getUrlRouterProvider = function (uiRouter) { + return uiRouter.urlRouterProvider = new urlRouterProvider_1.UrlRouterProvider(uiRouter); +}; +// $state service and $stateProvider +// $urlRouter service and $urlRouterProvider +var getStateProvider = function () { + return core_1.extend(router.stateProvider, { $get: function () { return router.stateService; } }); +}; +watchDigests.$inject = ['$rootScope']; +function watchDigests($rootScope) { + $rootScope.$watch(function () { core_1.trace.approximateDigests++; }); +} +exports.watchDigests = watchDigests; +mod_init.provider("$uiRouter", $uiRouter); +mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]); +mod_util.provider('$urlService', getProviderFor('urlService')); +mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]); +mod_util.provider('$templateFactory', function () { return new templateFactory_1.TemplateFactory(); }); +mod_state.provider('$stateRegistry', getProviderFor('stateRegistry')); +mod_state.provider('$uiRouterGlobals', getProviderFor('globals')); +mod_state.provider('$transitions', getProviderFor('transitionService')); +mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]); +mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]); +mod_main.factory('$view', function () { return router.viewService; }); +mod_main.service("$trace", function () { return core_1.trace; }); +mod_main.run(watchDigests); +mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]); +mod_state.run(['$state', function ($state) { }]); +mod_rtr.run(['$urlRouter', function ($urlRouter) { }]); +mod_init.run(runBlock); +/** @hidden TODO: find a place to move this */ +exports.getLocals = function (ctx) { + var tokens = ctx.getTokens().filter(core_1.isString); + var tuples = tokens.map(function (key) { + var resolvable = ctx.getResolvable(key); + var waitPolicy = ctx.getPolicy(resolvable).async; + return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data]; + }); + return tuples.reduce(core_1.applyPairs, {}); +}; +//# sourceMappingURL=services.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js.map new file mode 100644 index 00000000..44caf971 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/services.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "services.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/services.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;;;;;GAUG;AACH,kBAAkB;AAClB,qCAA0C;AAI1C,uCAGwB;AACxB,+CAAiF;AACjF,qDAAoD;AACpD,iDAAgD;AAChD,uEAAwE;AACxE,uDAAyD;AACzD,yDAAwD;AAGxD,YAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACzC,IAAI,QAAQ,GAAI,YAAO,CAAC,MAAM,CAAC,gBAAgB,EAAI,EAAE,CAAC,CAAC;AACvD,IAAI,QAAQ,GAAI,YAAO,CAAC,MAAM,CAAC,gBAAgB,EAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC7E,IAAI,OAAO,GAAK,YAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACvE,IAAI,SAAS,GAAG,YAAO,CAAC,MAAM,CAAC,iBAAiB,EAAG,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AACjH,IAAI,QAAQ,GAAI,YAAO,CAAC,MAAM,CAAC,WAAW,EAAS,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAChH,IAAI,QAAQ,GAAI,YAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,s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,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACjD,MAAM,CAAC,CAAE,GAAG,EAAE,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAU,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC", + "sourcesContent": [ + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.d.ts new file mode 100644 index 00000000..1e2d747a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.d.ts @@ -0,0 +1,3 @@ +import { StateService } from "@uirouter/core"; +export declare function $IsStateFilter($state: StateService): any; +export declare function $IncludedByStateFilter($state: StateService): any; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js new file mode 100644 index 00000000..d0fd2fe4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js @@ -0,0 +1,46 @@ +"use strict"; +/** @module ng1 */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var angular_1 = require("./angular"); +/** + * `isState` Filter: truthy if the current state is the parameter + * + * Translates to [[StateService.is]] `$state.is("stateName")`. + * + * #### Example: + * ```html + *
    show if state is 'stateName'
    + * ``` + */ +$IsStateFilter.$inject = ['$state']; +function $IsStateFilter($state) { + var isFilter = function (state, params, options) { + return $state.is(state, params, options); + }; + isFilter.$stateful = true; + return isFilter; +} +exports.$IsStateFilter = $IsStateFilter; +/** + * `includedByState` Filter: truthy if the current state includes the parameter + * + * Translates to [[StateService.includes]]` $state.is("fullOrPartialStateName")`. + * + * #### Example: + * ```html + *
    show if state includes 'fullOrPartialStateName'
    + * ``` + */ +$IncludedByStateFilter.$inject = ['$state']; +function $IncludedByStateFilter($state) { + var includesFilter = function (state, params, options) { + return $state.includes(state, params, options); + }; + includesFilter.$stateful = true; + return includesFilter; +} +exports.$IncludedByStateFilter = $IncludedByStateFilter; +angular_1.ng.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); +//# sourceMappingURL=stateFilters.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js.map new file mode 100644 index 00000000..5d3b86f4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateFilters.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateFilters.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/stateFilters.ts" + ], + "names": [], + "mappings": ";AAAA,kBAAkB,CAAC,kBAAkB;;AAErC,qCAA0C;AAG1C;;;;;;;;;GASG;AACH,cAAc,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,wBAA+B,MAAoB;IACjD,IAAI,QAAQ,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAoC;QAChG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,QAAQ,CAAC;AAClB,CAAC;AAND,wCAMC;AAED;;;;;;;;;GASG;AACH,sBAAsB,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC5C,gCAAuC,MAAoB;IACzD,IAAI,cAAc,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAmC;QACrG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,MAAM,CAAE,cAAc,CAAC;AACzB,CAAC;AAND,wDAMC;AAED,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;KAC9B,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC;KACjC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.d.ts new file mode 100644 index 00000000..366b608d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.d.ts @@ -0,0 +1,254 @@ +/** @module ng1 */ /** for typedoc */ +import { BuilderFunction, StateRegistry, StateService, OnInvalidCallback } from "@uirouter/core"; +import { Ng1StateDeclaration } from "./interface"; +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +export declare class StateProvider { + private stateRegistry; + private stateService; + constructor(stateRegistry: StateRegistry, stateService: StateService); + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + decorator(name: string, func: BuilderFunction): Function | this | BuilderFunction[]; + /** + * Registers a state + * + * ### This is a passthrough to [[StateRegistry.register]]. + * + * Registers a state configuration under a given state name. + * The stateConfig object has the following acceptable properties. + * + * + * + * - **`template`** - {string|function=} - html template as a string or a function that returns + * an html template as a string which should be used by the uiView directives. This property + * takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + * + * + * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html + * template that should be used by uiView. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + * + * + * - **`templateProvider`** - {function=} - Provider function that returns HTML content + * string. + * + * + * + * - **`controller`** - {string|function=} - Controller fn that should be associated with newly + * related scope or the name of a registered controller if passed as a string. + * + * + * + * - **`controllerProvider`** - {function=} - Injectable provider function that returns + * the actual controller or string. + * + * + * + * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be + * published to scope under the controllerAs name. + * + * + * + * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which + * should be injected into the controller. If any of these dependencies are promises, + * the router will wait for them all to be resolved or one to be rejected before the + * controller is instantiated. If all the promises are resolved successfully, the values + * of the resolved promises are injected and $stateChangeSuccess event is fired. If any + * of the promises are rejected the $stateChangeError event is fired. The map object is: + * + * - key - {string}: name of dependency to be injected into controller + * - factory - {string|function}: If string then it is alias for service. Otherwise if function, + * it is injected and return value it treated as dependency. If result is a promise, it is + * resolved before its value is injected into controller. + * + * + * + * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or + * transitioned to, the `$stateParams` service will be populated with any + * parameters that were passed. + * + * + * + * - **`params`** - {object=} - An array of parameter names or regular expressions. Only + * use this within a state if you are not using url. Otherwise you can specify your + * parameters within the url. When a state is navigated or transitioned to, the + * $stateParams service will be populated with any parameters that were passed. + * + * + * + * - **`views`** - {object=} - Use the views property to set up multiple views or to target views + * manually/explicitly. + * + * + * + * - **`abstract`** - {boolean=} - An abstract state will never be directly activated, + * but can provide inherited properties to its common children states. + * + * + * + * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way + * to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax. + * + * + * + * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to + * trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax. + * + * + * + * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state + * just because a search/query parameter has changed (via $location.search() or $location.hash()). + * Useful for when you'd like to modify $location.search() without triggering a reload. + * + * + * + * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration. + * + * #### Example: + * Some state name examples + * ```js + * // stateName can be a single top-level name (must be unique). + * $stateProvider.state("home", {}); + * + * // Or it can be a nested state name. This state is a child of the + * // above "home" state. + * $stateProvider.state("home.newest", {}); + * + * // Nest states as deeply as needed. + * $stateProvider.state("home.newest.abc.xyz.inception", {}); + * + * // state() returns $stateProvider, so you can chain state declarations. + * $stateProvider + * .state("home", {}) + * .state("about", {}) + * .state("contacts", {}); + * ``` + * + * @param {string} name A unique state name, e.g. "home", "about", "contacts". + * To create a parent/child state use a dot, e.g. "about.sales", "home.newest". + * @param {object} definition State configuration object. + */ + state(name: string, definition: Ng1StateDeclaration): StateProvider; + state(definition: Ng1StateDeclaration): StateProvider; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + onInvalid(callback: OnInvalidCallback): Function; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js new file mode 100644 index 00000000..b8fa3b7e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js @@ -0,0 +1,140 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module ng1 */ /** for typedoc */ +var core_1 = require("@uirouter/core"); +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +var StateProvider = /** @class */ (function () { + function StateProvider(stateRegistry, stateService) { + this.stateRegistry = stateRegistry; + this.stateService = stateService; + core_1.createProxyFunctions(core_1.val(StateProvider.prototype), this, core_1.val(this)); + } + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + StateProvider.prototype.decorator = function (name, func) { + return this.stateRegistry.decorator(name, func) || this; + }; + StateProvider.prototype.state = function (name, definition) { + if (core_1.isObject(name)) { + definition = name; + } + else { + definition.name = name; + } + this.stateRegistry.register(definition); + return this; + }; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + StateProvider.prototype.onInvalid = function (callback) { + return this.stateService.onInvalid(callback); + }; + return StateProvider; +}()); +exports.StateProvider = StateProvider; +//# sourceMappingURL=stateProvider.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js.map new file mode 100644 index 00000000..4a574faf --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/stateProvider.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateProvider.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/stateProvider.ts" + ], + "names": [], + "mappings": ";;AAAA,kBAAkB,CAAC,kBAAkB;AACrC,uCAEwB;AAGxB;;;;;;;;;;;;;;;GAeG;AACH;IACE,uBAAoB,aAA4B,EAAU,YAA0B;QAAhE,kBAAa,GAAb,aAAa,CAAe;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAClF,2BAAoB,CAAC,UAAG,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwFG;IACH,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC1D,CAAC;IAwID,6BAAK,GAAL,UAAM,IAAS,EAAE,UAAgB;QAC/B,EAAE,CAAC,CAAC,eAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,UAAU,GAAG,IAAI,CAAC;QACpB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IAEH,iCAAS,GAAT,UAAU,QAA2B;QACnC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACH,oBAAC;AAAD,CAAC,AA3PD,IA2PC;AA3PY,sCAAa", + "sourcesContent": [ + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n * \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.d.ts new file mode 100644 index 00000000..94bc8bdc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.d.ts @@ -0,0 +1,10 @@ +/** @module ng1 */ /** */ +import { StateObject, TransitionStateHookFn, BuilderFunction } from "@uirouter/core"; +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +export declare const getStateHookBuilder: (hookName: "onEnter" | "onExit" | "onRetain") => (state: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js new file mode 100644 index 00000000..5c550815 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module ng1 */ /** */ +var core_1 = require("@uirouter/core"); +var services_1 = require("../services"); +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +exports.getStateHookBuilder = function (hookName) { + return function stateHookBuilder(state, parentFn) { + var hook = state[hookName]; + var pathname = hookName === 'onExit' ? 'from' : 'to'; + function decoratedNg1Hook(trans, state) { + var resolveContext = new core_1.ResolveContext(trans.treeChanges(pathname)); + var locals = core_1.extend(services_1.getLocals(resolveContext), { $state$: state, $transition$: trans }); + return core_1.services.$injector.invoke(hook, this, locals); + } + return hook ? decoratedNg1Hook : undefined; + }; +}; +//# sourceMappingURL=onEnterExitRetain.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js.map new file mode 100644 index 00000000..a883718f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/onEnterExitRetain.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "onEnterExitRetain.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/statebuilders/onEnterExitRetain.ts" + ], + "names": [], + "mappings": ";;AAAA,kBAAkB,CAAC,MAAM;AACzB,uCAEwB;AACxB,wCAAwC;AAGxC;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,UAAC,QAAuC;IAC3E,OAAA,0BAA0B,KAAkB,EAAE,QAAyB;QACrE,IAAI,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC3B,IAAI,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAErD,0BAA0B,KAAiB,EAAE,KAA0B;YACrE,IAAI,cAAc,GAAG,IAAI,qBAAc,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrE,IAAI,MAAM,GAAG,aAAM,CAAC,oBAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACxF,MAAM,CAAC,eAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;AAXD,CAWC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.d.ts new file mode 100644 index 00000000..687ad4a4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.d.ts @@ -0,0 +1,34 @@ +import { StateObject, ViewConfig, ViewConfigFactory, PathNode, ResolveContext, IInjectable } from "@uirouter/core"; +import { Ng1ViewDeclaration } from "../interface"; +import { TemplateFactory } from "../templateFactory"; +export declare function getNg1ViewConfigFactory(): ViewConfigFactory; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +export declare function ng1ViewsBuilder(state: StateObject): {}; +export declare class Ng1ViewConfig implements ViewConfig { + path: PathNode[]; + viewDecl: Ng1ViewDeclaration; + factory: TemplateFactory; + $id: number; + loaded: boolean; + controller: Function; + template: string; + component: string; + locals: any; + constructor(path: PathNode[], viewDecl: Ng1ViewDeclaration, factory: TemplateFactory); + load(): Promise; + getTemplate: (uiView: any, context: ResolveContext) => string; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + getController(context: ResolveContext): (IInjectable | string | Promise); +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js new file mode 100644 index 00000000..7c4c88af --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js @@ -0,0 +1,109 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = require("@uirouter/core"); +function getNg1ViewConfigFactory() { + var templateFactory = null; + return function (path, view) { + templateFactory = templateFactory || core_1.services.$injector.get("$templateFactory"); + return [new Ng1ViewConfig(path, view, templateFactory)]; + }; +} +exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory; +var hasAnyKey = function (keys, obj) { + return keys.reduce(function (acc, key) { return acc || core_1.isDefined(obj[key]); }, false); +}; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +function ng1ViewsBuilder(state) { + // Do not process root state + if (!state.parent) + return {}; + var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys); + // Do not allow a state to have both state-level props and also a `views: {}` property. + // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state. + // However, the `$default` approach should not be mixed with a separate `views: ` block. + if (core_1.isDefined(state.views) && hasAnyKey(allViewKeys, state)) { + throw new Error("State '" + state.name + "' has a 'views' object. " + + "It cannot also have \"view properties\" at the state level. " + + "Move the following properties into a view (in the 'views' object): " + + (" " + allViewKeys.filter(function (key) { return core_1.isDefined(state[key]); }).join(", "))); + } + var views = {}, viewsObject = state.views || { "$default": core_1.pick(state, allViewKeys) }; + core_1.forEach(viewsObject, function (config, name) { + // Account for views: { "": { template... } } + name = name || "$default"; + // Account for views: { header: "headerComponent" } + if (core_1.isString(config)) + config = { component: config }; + // Make a shallow copy of the config object + config = core_1.extend({}, config); + // Do not allow a view to mix props for component-style view with props for template/controller-style view + if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) { + throw new Error("Cannot combine: " + compKeys.join("|") + " with: " + nonCompKeys.join("|") + " in stateview: '" + name + "@" + state.name + "'"); + } + config.resolveAs = config.resolveAs || '$resolve'; + config.$type = "ng1"; + config.$context = state; + config.$name = name; + var normalized = core_1.ViewService.normalizeUIViewTarget(config.$context, config.$name); + config.$uiViewName = normalized.uiViewName; + config.$uiViewContextAnchor = normalized.uiViewContextAnchor; + views[name] = config; + }); + return views; +} +exports.ng1ViewsBuilder = ng1ViewsBuilder; +var id = 0; +var Ng1ViewConfig = /** @class */ (function () { + function Ng1ViewConfig(path, viewDecl, factory) { + var _this = this; + this.path = path; + this.viewDecl = viewDecl; + this.factory = factory; + this.$id = id++; + this.loaded = false; + this.getTemplate = function (uiView, context) { + return _this.component ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings) : _this.template; + }; + } + Ng1ViewConfig.prototype.load = function () { + var _this = this; + var $q = core_1.services.$q; + var context = new core_1.ResolveContext(this.path); + var params = this.path.reduce(function (acc, node) { return core_1.extend(acc, node.paramValues); }, {}); + var promises = { + template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), + controller: $q.when(this.getController(context)) + }; + return $q.all(promises).then(function (results) { + core_1.trace.traceViewServiceEvent("Loaded", _this); + _this.controller = results.controller; + core_1.extend(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" } + return _this; + }); + }; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + Ng1ViewConfig.prototype.getController = function (context) { + var provider = this.viewDecl.controllerProvider; + if (!core_1.isInjectable(provider)) + return this.viewDecl.controller; + var deps = core_1.services.$injector.annotate(provider); + var providerFn = core_1.isArray(provider) ? core_1.tail(provider) : provider; + var resolvable = new core_1.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + return Ng1ViewConfig; +}()); +exports.Ng1ViewConfig = Ng1ViewConfig; +//# sourceMappingURL=views.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js.map new file mode 100644 index 00000000..29c153ce --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/statebuilders/views.js.map @@ -0,0 +1,13 @@ +{ + "version":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;QAC5D,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACH,oBAAC;AAAD,CAAC,AA5CD,IA4CC;AA5CY,sCAAa", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.d.ts new file mode 100644 index 00000000..76eae489 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.d.ts @@ -0,0 +1,85 @@ + +import { IAugmentedJQuery } from "angular"; +import { IInjectable, ResolveContext, RawParams } from "@uirouter/core"; +import { Ng1ViewDeclaration, TemplateFactoryProvider } from "./interface"; +/** + * Service which manages loading of templates from a ViewConfig. + */ +export declare class TemplateFactory implements TemplateFactoryProvider { + /** @hidden */ private _useHttp; + /** @hidden */ private $templateRequest; + /** @hidden */ private $templateCache; + /** @hidden */ private $http; + /** @hidden */ $get: (string | (($http: any, $templateCache: any, $injector: any) => this))[]; + /** @hidden */ + useHttpService(value: boolean): void; + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ + template?: string; + component?: string; + }>; + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + fromString(template: (string | Function), params?: RawParams): any; + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + fromUrl(url: (string | Function), params: any): any; + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + fromProvider(provider: IInjectable, params: any, context: ResolveContext): Promise; + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext): Promise; + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js new file mode 100644 index 00000000..a7f6cfd7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js @@ -0,0 +1,194 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module view */ +/** for typedoc */ +var angular_1 = require("./angular"); +var core_1 = require("@uirouter/core"); +/** + * Service which manages loading of templates from a ViewConfig. + */ +var TemplateFactory = /** @class */ (function () { + function TemplateFactory() { + var _this = this; + /** @hidden */ this._useHttp = angular_1.ng.version.minor < 3; + /** @hidden */ this.$get = ['$http', '$templateCache', '$injector', function ($http, $templateCache, $injector) { + _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest'); + _this.$http = $http; + _this.$templateCache = $templateCache; + return _this; + }]; + } + /** @hidden */ + TemplateFactory.prototype.useHttpService = function (value) { + this._useHttp = value; + }; + ; + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + TemplateFactory.prototype.fromConfig = function (config, params, context) { + var defaultTemplate = ""; + var asTemplate = function (result) { return core_1.services.$q.when(result).then(function (str) { return ({ template: str }); }); }; + var asComponent = function (result) { return core_1.services.$q.when(result).then(function (str) { return ({ component: str }); }); }; + return (core_1.isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) : + core_1.isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) : + core_1.isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) : + core_1.isDefined(config.component) ? asComponent(config.component) : + core_1.isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) : + asTemplate(defaultTemplate)); + }; + ; + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + TemplateFactory.prototype.fromString = function (template, params) { + return core_1.isFunction(template) ? template(params) : template; + }; + ; + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromUrl = function (url, params) { + if (core_1.isFunction(url)) + url = url(params); + if (url == null) + return null; + if (this._useHttp) { + return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) + .then(function (response) { + return response.data; + }); + } + return this.$templateRequest(url); + }; + ; + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromProvider = function (provider, params, context) { + var deps = core_1.services.$injector.annotate(provider); + var providerFn = core_1.isArray(provider) ? core_1.tail(provider) : provider; + var resolvable = new core_1.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + ; + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) { + var deps = core_1.services.$injector.annotate(provider); + var providerFn = core_1.isArray(provider) ? core_1.tail(provider) : provider; + var resolvable = new core_1.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + ; + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) { + bindings = bindings || {}; + // Bind once prefix + var prefix = angular_1.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 = core_1.kebobString(camelCase); + return /^(x|data)-/.exec(kebobed) ? "x-" + kebobed : kebobed; + }; + var attributeTpl = function (input) { + var name = input.name, type = input.type; + 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 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 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)" + if (type === '&') { + var res = context.getResolvable(resolveName); + var fn = res && res.data; + var args = fn && core_1.services.$injector.annotate(fn) || []; + // account for array style injection, i.e., ['foo', function(foo) {}] + var arrayIdxStr = core_1.isArray(fn) ? "[" + (fn.length - 1) + "]" : ''; + return attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; + } + // some-attr="::$resolve.someResolveName" + return attrName + "='" + prefix + "$resolve." + resolveName + "'"; + }; + var attrs = getComponentBindings(component).map(attributeTpl).join(" "); + var kebobName = kebob(component); + return "<" + kebobName + " " + attrs + ">"; + }; + ; + return TemplateFactory; +}()); +exports.TemplateFactory = TemplateFactory; +// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&') +function getComponentBindings(name) { + var cmpDefs = core_1.services.$injector.get(name + "Directive"); // could be multiple + if (!cmpDefs || !cmpDefs.length) + throw new Error("Unable to find component named '" + name + "'"); + return cmpDefs.map(getBindings).reduce(core_1.unnestR, []); +} +// Given a directive definition, find its object input attributes +// Use different properties, depending on the type of directive (component, bindToController, normal) +var getBindings = function (def) { + if (core_1.isObject(def.bindToController)) + return scopeBindings(def.bindToController); + return scopeBindings(def.scope); +}; +// for ng 1.2 style, process the scope: { input: "=foo" } +// for ng 1.3 through ng 1.5, process the component's bindToController: { input: "=foo" } object +var scopeBindings = function (bindingsObj) { return Object.keys(bindingsObj || {}) + .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; }) + .filter(function (tuple) { return core_1.isDefined(tuple) && core_1.isArray(tuple[1]); }) + .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); }; +//# sourceMappingURL=templateFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js.map new file mode 100644 index 00000000..9c24126b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/templateFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "templateFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/templateFactory.ts" + ], + "names": [], + "mappings": ";;AAAA,mBAAmB;AACnB,kBAAkB;AAClB,qCAA0C;AAE1C,uCAGwB;AAGxB;;GAEG;AACH;IAAA;QAAA,iBA6KC;QA5KC,cAAc,CAAS,aAAQ,GAAG,YAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;QAK5D,cAAc,CAAC,SAAI,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAC,KAAK,EAAE,cAAc,EAAE,SAAS;gBAC9F,KAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;gBAChH,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnB,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;gBACrC,MAAM,CAAC,KAAI,CAAC;YACd,CAAC,CAAC,CAAC;IAkKL,CAAC;IAhKC,cAAc;IACd,wCAAc,GAAd,UAAe,KAAc;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAAA,CAAC;IAEF;;;;;;;;;;;;OAYG;IACH,oCAAU,GAAV,UAAW,MAA0B,EAAE,M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AG,CAAC,CAAC,CAAC,EAAjD,CAAiD,CAAC;KAE7D,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,gBAAS,CAAC,KAAK,CAAC,IAAI,cAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC,CAAC;KAEtD,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAmB,CAAA,EAAtE,CAAsE,CAAC,EAN7C,CAM6C,CAAC", + "sourcesContent": [ + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.d.ts new file mode 100644 index 00000000..aa31bd77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.d.ts @@ -0,0 +1,157 @@ +/** @module url */ /** */ +import { UIRouter, UrlRouter, LocationServices, $InjectorLike, UrlRuleHandlerFn, UrlMatcher, IInjectable } from "@uirouter/core"; +export interface RawNg1RuleFunction { + ($injector: $InjectorLike, $location: LocationServices): string | void; +} +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +export declare class UrlRouterProvider { + /** @hidden */ _router: UIRouter; + /** @hidden */ _urlRouter: UrlRouter; + /** @hidden */ + constructor(router: UIRouter); + /** @hidden */ + $get(): UrlRouter; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider; + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider; + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + when(what: (RegExp | UrlMatcher | string), handler: string | IInjectable): this; + static injectableHandler(router: UIRouter, handler: any): UrlRuleHandlerFn; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + deferIntercept(defer?: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js new file mode 100644 index 00000000..698e2911 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js @@ -0,0 +1,206 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module url */ /** */ +var core_1 = require("@uirouter/core"); +var core_2 = require("@uirouter/core"); +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +var UrlRouterProvider = /** @class */ (function () { + /** @hidden */ + function UrlRouterProvider(router) { + this._router = router; + this._urlRouter = router.urlRouter; + } + /** @hidden */ + UrlRouterProvider.prototype.$get = function () { + var urlRouter = this._urlRouter; + urlRouter.update(true); + if (!urlRouter.interceptDeferred) + urlRouter.listen(); + return urlRouter; + }; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + UrlRouterProvider.prototype.rule = function (ruleFn) { + var _this = this; + if (!core_2.isFunction(ruleFn)) + throw new Error("'rule' must be a function"); + var match = function () { + return ruleFn(core_2.services.$injector, _this._router.locationService); + }; + var rule = new core_1.BaseUrlRule(match, core_2.identity); + this._urlRouter.rule(rule); + return this; + }; + ; + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + UrlRouterProvider.prototype.otherwise = function (rule) { + var _this = this; + var urlRouter = this._urlRouter; + if (core_2.isString(rule)) { + urlRouter.otherwise(rule); + } + else if (core_2.isFunction(rule)) { + urlRouter.otherwise(function () { return rule(core_2.services.$injector, _this._router.locationService); }); + } + else { + throw new Error("'rule' must be a string or function"); + } + return this; + }; + ; + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + UrlRouterProvider.prototype.when = function (what, handler) { + if (core_2.isArray(handler) || core_2.isFunction(handler)) { + handler = UrlRouterProvider.injectableHandler(this._router, handler); + } + this._urlRouter.when(what, handler); + return this; + }; + ; + UrlRouterProvider.injectableHandler = function (router, handler) { + return function (match) { + return core_2.services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); + }; + }; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + UrlRouterProvider.prototype.deferIntercept = function (defer) { + this._urlRouter.deferIntercept(defer); + }; + ; + return UrlRouterProvider; +}()); +exports.UrlRouterProvider = UrlRouterProvider; +//# sourceMappingURL=urlRouterProvider.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js.map new file mode 100644 index 00000000..98e121a4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/urlRouterProvider.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlRouterProvider.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/urlRouterProvider.ts" + ], + "names": [], + "mappings": ";;AAAA,kBAAkB,CAAC,MAAM;AACzB,uCAGwB;AACxB,uCAAmF;AAMnF;;;;;;;;;;;;;GAaG;AACH;IAIE,cAAc;IACd,2BAAY,MAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC;IACrC,CAAC;IAED,cAAc;IACd,gCAAI,GAAJ;QACE,IAAI,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC;YAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QACrD,MAAM,CAAC,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gCAAI,GAAJ,UAAK,MAA0B;QAA/B,iBASC;QARC,EAAE,CAAC,CAAC,CAAC,iBAAU,CAAC,MAAM,CAAC,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAEtE,IAAM,KAAK,GAAG;YACV,OAAA,MAAM,CAAC,eAAQ,CAAC,SAAS,EAAE,KAAI,CAAC,OAAO,CAAC,eAAe,CAAC;QAAxD,CAAwD,CAAC;QAE7D,IAAI,IAAI,GAAG,IAAI,kBAAW,CAAC,KAAK,EAAE,eAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAAA,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,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAAhG,CAAgG,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,0CAAc,GAAd,UAAe,KAAe;QAC5B,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAAA,CAAC;IACJ,wBAAC;AAAD,CAAC,AAzLD,IAyLC;AAzLY,8CAAiB", + "sourcesContent": [ + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.d.ts b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.d.ts new file mode 100644 index 00000000..e4fc544f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.d.ts @@ -0,0 +1,9 @@ +export interface UIViewScrollProvider { + /** + * Uses standard anchorScroll behavior + * + * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) + * service for scrolling based on the url anchor. + */ + useAnchorScroll(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js new file mode 100644 index 00000000..faf94dea --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module ng1 */ /** */ +var angular_1 = require("./angular"); +/** @hidden */ +function $ViewScrollProvider() { + var useAnchorScroll = false; + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + return function ($element) { + return $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} +angular_1.ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); +//# sourceMappingURL=viewScroll.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js.map new file mode 100644 index 00000000..79dc90da --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/lib/viewScroll.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "viewScroll.js", + "sourceRoot": "", + "sources": [ + "@uirouter/angularjs/viewScroll.ts" + ], + "names": [], + "mappings": ";;AAAA,kBAAkB,CAAC,MAAM;AACzB,qCAA0C;AAgB1C,cAAc;AACd;IAEE,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,UAAU,aAAmC,EAAE,QAAyB;YAChH,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,aAAa,CAAC;YACvB,CAAC;YAED,MAAM,CAAC,UAAU,QAAgB;gBAC/B,MAAM,CAAC,QAAQ,CAAC;oBACd,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA4B,mBAAmB,CAAC,CAAC", + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/package.json b/public/app/vendor/node_modules/@uirouter/angularjs/package.json new file mode 100644 index 00000000..447ba79d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/package.json @@ -0,0 +1,188 @@ +{ + "_args": [ + [ + { + "raw": "@uirouter/angularjs", + "scope": "@uirouter", + "escapedName": "@uirouter%2fangularjs", + "name": "@uirouter/angularjs", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor" + ] + ], + "_from": "@uirouter/angularjs@latest", + "_id": "@uirouter/angularjs@1.0.10", + "_inCache": true, + "_location": "/@uirouter/angularjs", + "_nodeVersion": "8.5.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/angularjs-1.0.10.tgz_1508351207239_0.049824401969090104" + }, + "_npmUser": { + "name": "christopherthielen", + "email": "christopherthielen@ikkyikkyikkypikangzoopboing.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "@uirouter/angularjs", + "scope": "@uirouter", + "escapedName": "@uirouter%2fangularjs", + "name": "@uirouter/angularjs", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.10.tgz", + "_shasum": "e18b0b65cd0d2d87165fad80294acfb2dc5e5277", + "_shrinkwrap": null, + "_spec": "@uirouter/angularjs", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor", + "bugs": { + "url": "https://github.com/angular-ui/ui-router/issues" + }, + "contributors": [ + { + "name": "Nate Abele", + "email": "nate@radify.io", + "url": "https://radify.io" + }, + { + "name": "Chris Thielen", + "url": "https://github.com/christopherthielen" + }, + { + "name": "Tim Kindberg", + "url": "https://github.com/timkindberg" + }, + { + "name": "Karsten Sperling", + "url": "https://github.com/ksperling" + } + ], + "dependencies": { + "@uirouter/core": "5.0.11" + }, + "description": "State-based routing for AngularJS 1.x", + "devDependencies": { + "@types/angular": "^1.5.14", + "@types/angular-animate": "^1.5.5", + "@types/angular-mocks": "1.5.11", + "@types/jasmine": "2.6.0", + "@types/jquery": "^1.10.31", + "@uirouter/publish-scripts": "2.0.2", + "conventional-changelog": "1.1.6", + "conventional-changelog-cli": "1.3.4", + "dts-downlevel": "^0.3.0", + "fork-ts-checker-webpack-plugin": "^0.2.8", + "jasmine-core": "2.8.0", + "karma": "1.7.1", + "karma-chrome-launcher": "2.2.0", + "karma-jasmine": "^1.0.2", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "2.0.4", + "lodash": "^4.5.1", + "replace-in-file": "2.6.4", + "rollup": "0.50.0", + "rollup-plugin-node-resolve": "3.0.0", + "rollup-plugin-progress": "0.4.0", + "rollup-plugin-sourcemaps": "^0.4.1", + "rollup-plugin-uglify": "2.0.1", + "rollup-plugin-visualizer": "0.3.1", + "shelljs": "^0.7.0", + "shx": "0.2.2", + "ts-loader": "^2.3.7", + "tslint": "5.7.0", + "typedoc": "~0.5.0", + "typedoc-plugin-external-module-name": "^1.0.2", + "typedoc-plugin-internal-external": "^1.0.0", + "typedoc-plugin-ui-router": "^1.0.0", + "typescript": "2.5.3", + "ui-router-typedoc-themes": "^1.0.1", + "watch": "^0.18.0", + "webpack": "3.6.0", + "yargs": "^4.2.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-2TI1xnejF+HzOgSdjjv6oO0z9bchixNCR/sSgqNjCj9L5NNjVgBIs67WDwtTCejM80Ju5wqFeaZoL53Gf8x4kA==", + "shasum": "e18b0b65cd0d2d87165fad80294acfb2dc5e5277", + "tarball": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.10.tgz" + }, + "engines": { + "node": ">=4.0.0" + }, + "gitHead": "d4acd8463674da09929f25c24ae73d2565458198", + "homepage": "https://ui-router.github.io", + "jsnext:main": "lib-esm/index.js", + "license": "MIT", + "main": "release/ui-router-angularjs.js", + "maintainers": [ + { + "name": "elboman", + "email": "marco.botto@gmail.com" + }, + { + "name": "nateabele", + "email": "nate.abele@gmail.com" + }, + { + "name": "christopherthielen", + "email": "christopherthielen@ikkyikkyikkypikangzoopboing.com" + }, + { + "name": "christopherthielen2", + "email": "christhielen@gmail.com" + } + ], + "name": "@uirouter/angularjs", + "optionalDependencies": {}, + "peerDependencies": { + "angular": ">=1.2.0" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/angular-ui/ui-router.git" + }, + "scripts": { + "artifacts": "artifact_tagging", + "build": "npm run clean && npm run compile && npm run bundle && npm run fixmaps:lib && npm run fixmaps:bundle", + "bundle": "npm run bundle_router && npm run bundle_monolithic_router && npm run bundle_events && npm run bundle_resolve", + "bundle_events": "rollup -c --environment EVENTS && rollup -c --environment EVENTS,MINIFY", + "bundle_monolithic_router": "rollup -c --environment ROUTER,MONOLITHIC && rollup -c --environment ROUTER,MINIFY,MONOLITHIC", + "bundle_resolve": "rollup -c --environment RESOLVE && rollup -c --environment RESOLVE,MINIFY", + "bundle_router": "rollup -c --environment ROUTER && rollup -c --environment ROUTER,MINIFY", + "clean": "shx rm -rf lib lib-esm _doc build release *.log", + "compile": "tsc && tsc -m es6 --outDir lib-esm && npm run fixdts", + "debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome", + "docs": "./scripts/docs.js", + "fixdts": "dts-downlevel 'lib/**/*.d.ts' 'lib-esm/**/*.d.ts'", + "fixmaps:bundle": "tweak_sourcemap_paths -a --include 'release/**/*.js.map'", + "fixmaps:lib": "tweak_sourcemap_paths -a --include 'lib/**/*.js.map' 'lib-esm/**/*.js.map'", + "noimplicitany": "tsc --noEmit --noImplicitAny --moduleResolution node --target es6 test/noimplicitany.ts", + "package": "npm run build", + "prepublishOnly": "npm run build", + "publishdocs": "node scripts/publishdocs.js", + "release": "npm run noimplicitany && release --deps @uirouter/core && node ./scripts/bower_release.js", + "test": "npm run test:integrate", + "test:integrate": "tsc && npm run noimplicitany && npm run test:ng16 && npm run test:ng15 && npm run test:ng14 && npm run test:ng13 && npm run test:ng12", + "test:ng12": "karma start --ngversion 1.2", + "test:ng13": "karma start --ngversion 1.3", + "test:ng14": "karma start --ngversion 1.4", + "test:ng15": "karma start --ngversion 1.5", + "test:ng16": "karma start --ngversion 1.6", + "watch": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1" + }, + "typings": "lib/index.d.ts", + "version": "1.0.10" +} diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js new file mode 100644 index 00000000..4e69b5e2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js @@ -0,0 +1,10075 @@ +/** + * State-based routing for AngularJS 1.x + * 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 https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('angular')) : + typeof define === 'function' && define.amd ? define(['exports', 'angular'], factory) : + (factory((global['@uirouter/angularjs'] = {}),global.angular)); +}(this, (function (exports,ng_from_import) { 'use strict'; + +var ng_from_global = angular; +var ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global; + +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +function curry(fn) { + var initial_args = [].slice.apply(arguments, [1]); + var func_args_length = fn.length; + function curried(args) { + if (args.length >= func_args_length) + return fn.apply(null, args); + return function () { + return curried(args.concat([].slice.apply(arguments))); + }; + } + return curried(initial_args); +} +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +function compose() { + var args = arguments; + var start = args.length - 1; + return function () { + var i = start, result = args[start].apply(this, arguments); + while (i--) + result = args[i].call(this, result); + return result; + }; +} +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +function pipe() { + var funcs = []; + for (var _i = 0; _i < arguments.length; _i++) { + funcs[_i] = arguments[_i]; + } + return compose.apply(null, [].slice.call(arguments).reverse()); +} +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +var prop = function (name) { + return function (obj) { return obj && obj[name]; }; +}; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +var propEq = curry(function (name, val, obj) { return obj && obj[name] === val; }); +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +var parse = function (name) { + return pipe.apply(null, name.split(".").map(prop)); +}; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +var not = function (fn) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return !fn.apply(null, args); + }; +}; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +function and(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) && fn2.apply(null, args); + }; +} +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +function or(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) || fn2.apply(null, args); + }; +} +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +var all = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; +}; +var any = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; +}; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +var is = function (ctor) { + return function (obj) { + return (obj != null && obj.constructor === ctor || obj instanceof ctor); + }; +}; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +var eq = function (val) { return function (other) { + return val === other; +}; }; +/** Given a value, returns a function which returns the value */ +var val = function (v) { return function () { return v; }; }; +function invoke(fnName, args) { + return function (obj) { + return obj[fnName].apply(obj, args); + }; +} +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +function pattern(struct) { + return function (x) { + for (var i = 0; i < struct.length; i++) { + if (struct[i][0](x)) + return struct[i][1](x); + } + }; +} + +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +var Glob = /** @class */ (function () { + function Glob(text) { + this.text = text; + this.glob = text.split('.'); + var regexpString = this.text.split('.') + .map(function (seg) { + if (seg === '**') + return '(?:|(?:\\.[^.]*)*)'; + if (seg === '*') + return '\\.[^.]*'; + return '\\.' + seg; + }).join(''); + this.regexp = new RegExp("^" + regexpString + "$"); + } + Glob.prototype.matches = function (name) { + return this.regexp.test('.' + name); + }; + /** Returns true if the string has glob-like characters in it */ + Glob.is = function (text) { + return !!/[!,*]+/.exec(text); + }; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + Glob.fromString = function (text) { + return Glob.is(text) ? new Glob(text) : null; + }; + return Glob; +}()); + +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +var StateObject = /** @class */ (function () { + /** @deprecated use State.create() */ + function StateObject(config) { + return StateObject.create(config || {}); + } + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + StateObject.create = function (stateDecl) { + stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl; + var state = inherit(inherit(stateDecl, StateObject.prototype)); + stateDecl.$$state = function () { return state; }; + state.self = stateDecl; + state.__stateObjectCache = { + nameGlob: Glob.fromString(state.name) // might return null + }; + return state; + }; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + StateObject.prototype.is = function (ref) { + return this === ref || this.self === ref || this.fqn() === ref; + }; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + StateObject.prototype.fqn = function () { + if (!this.parent || !(this.parent instanceof this.constructor)) + return this.name; + var name = this.parent.fqn(); + return name ? name + "." + this.name : this.name; + }; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + StateObject.prototype.root = function () { + return this.parent && this.parent.root() || this; + }; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + StateObject.prototype.parameters = function (opts) { + opts = defaults(opts, { inherit: true, matchingKeys: null }); + var inherited = opts.inherit && this.parent && this.parent.parameters() || []; + return inherited.concat(values(this.params)) + .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); }); + }; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + StateObject.prototype.parameter = function (id, opts) { + if (opts === void 0) { opts = {}; } + return (this.url && this.url.parameter(id, opts) || + find(values(this.params), propEq('id', id)) || + opts.inherit && this.parent && this.parent.parameter(id)); + }; + StateObject.prototype.toString = function () { + return this.fqn(); + }; + /** Predicate which returns true if the object is an class with @State() decorator */ + StateObject.isStateClass = function (stateDecl) { + return isFunction(stateDecl) && stateDecl['__uiRouterState'] === true; + }; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + StateObject.isState = function (obj) { + return isObject(obj['__stateObjectCache']); + }; + return StateObject; +}()); + +/** Predicates + * + * These predicates return true/false based on the input. + * Although these functions are exported, they are subject to change without notice. + * + * @module common_predicates + */ +/** */ +var toStr = Object.prototype.toString; +var tis = function (t) { return function (x) { return typeof (x) === t; }; }; +var isUndefined = tis('undefined'); +var isDefined = not(isUndefined); +var isNull = function (o) { return o === null; }; +var isNullOrUndefined = or(isNull, isUndefined); +var isFunction = tis('function'); +var isNumber = tis('number'); +var isString = tis('string'); +var isObject = function (x) { return x !== null && typeof x === 'object'; }; +var isArray = Array.isArray; +var isDate = (function (x) { return toStr.call(x) === '[object Date]'; }); +var isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; }); +var isState = StateObject.isState; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +function isInjectable(val$$1) { + if (isArray(val$$1) && val$$1.length) { + var head = val$$1.slice(0, -1), tail = val$$1.slice(-1); + return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length); + } + return isFunction(val$$1); +} +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +var isPromise = and(isObject, pipe(prop('then'), isFunction)); + +var notImplemented = function (fnname) { return function () { + throw new Error(fnname + "(): No coreservices implementation for UI-Router is loaded."); +}; }; +var services = { + $q: undefined, + $injector: undefined, +}; + +/** + * Random utility functions used in the UI-Router code + * + * These functions are exported, but are subject to change without notice. + * + * @preferred + * @module common + */ +/** for typedoc */ +var root = (typeof self === 'object' && self.self === self && self) || + (typeof global === 'object' && global.global === global && global) || undefined; +var angular$1 = root.angular || {}; +var fromJson = angular$1.fromJson || JSON.parse.bind(JSON); +var toJson = angular$1.toJson || JSON.stringify.bind(JSON); +var forEach = angular$1.forEach || _forEach; +var extend = Object.assign || _extend; +var equals = angular$1.equals || _equals; +function identity(x) { return x; } +function noop$1() { } +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +function createProxyFunctions(source, target, bind, fnNames, latebind) { + if (latebind === void 0) { latebind = false; } + var bindFunction = function (fnName) { + return source()[fnName].bind(bind()); + }; + var makeLateRebindFn = function (fnName) { return function lateRebindFunction() { + target[fnName] = bindFunction(fnName); + return target[fnName].apply(null, arguments); + }; }; + fnNames = fnNames || Object.keys(source()); + return fnNames.reduce(function (acc, name) { + acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name); + return acc; + }, target); +} +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +var inherit = function (parent, extra) { + return extend(Object.create(parent), extra); +}; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +var inArray = curry(_inArray); +function _inArray(array, obj) { + return array.indexOf(obj) !== -1; +} +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +var removeFrom = curry(_removeFrom); +function _removeFrom(array, obj) { + var idx = array.indexOf(obj); + if (idx >= 0) + array.splice(idx, 1); + return array; +} +/** pushes a values to an array and returns the value */ +var pushTo = curry(_pushTo); +function _pushTo(arr, val$$1) { + return (arr.push(val$$1), val$$1); +} +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +var deregAll = function (functions) { + return functions.slice().forEach(function (fn) { + typeof fn === 'function' && fn(); + removeFrom(functions, fn); + }); +}; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +function defaults(opts) { + var defaultsList = []; + for (var _i = 1; _i < arguments.length; _i++) { + defaultsList[_i - 1] = arguments[_i]; + } + var _defaultsList = defaultsList.concat({}).reverse(); + var defaultVals = extend.apply(null, _defaultsList); + return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals))); +} +/** Reduce function that merges each element of the list into a single object, using extend */ +var mergeR = function (memo, item) { return extend(memo, item); }; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +function ancestors(first, second) { + var path = []; + for (var n in first.path) { + if (first.path[n] !== second.path[n]) + break; + path.push(first.path[n]); + } + return path; +} +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +function pick(obj, propNames) { + 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. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +function omit(obj, propNames) { + return Object.keys(obj) + .filter(not(inArray(propNames))) + .reduce(function (acc, key) { return (acc[key] = obj[key], acc); }, {}); +} +/** + * Maps an array, or object to a property (by name) + */ +function pluck(collection, propName) { + return map(collection, prop(propName)); +} +/** Filters an Array or an Object's properties based on a predicate */ +function filter(collection, callback) { + var arr = isArray(collection), result = arr ? [] : {}; + var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; }; + forEach(collection, function (item, i) { + if (callback(item, i)) + accept(item, i); + }); + return result; +} +/** Finds an object from an array, or a property of an object, that matches a predicate */ +function find(collection, callback) { + var result; + forEach(collection, function (item, i) { + if (result) + return; + if (callback(item, i)) + result = item; + }); + return result; +} +/** Given an object, returns a new object, where each property is transformed by the callback function */ +var mapObj = map; +/** Maps an array or object properties using a callback function */ +function map(collection, callback) { + var result = isArray(collection) ? [] : {}; + forEach(collection, function (item, i) { return result[i] = callback(item, i); }); + return result; +} +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +var values = function (obj) { + return Object.keys(obj).map(function (key) { return obj[key]; }); +}; +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +var allTrueR = function (memo, elem) { return memo && elem; }; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +var anyTrueR = function (memo, elem) { return memo || elem; }; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +var unnestR = function (memo, elem) { return memo.concat(elem); }; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +var flattenR = function (memo, elem) { + return isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem); +}; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +function pushR(arr, obj) { + arr.push(obj); + return arr; +} +/** Reduce function that filters out duplicates */ +var uniqR = function (acc, token) { + return inArray(acc, token) ? acc : pushR(acc, token); +}; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +var unnest = function (arr) { return arr.reduce(unnestR, []); }; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +var flatten = function (arr) { return arr.reduce(flattenR, []); }; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +var assertPredicate = assertFn; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +var assertMap = assertFn; +function assertFn(predicateOrMap, errMsg) { + if (errMsg === void 0) { errMsg = "assert failure"; } + return function (obj) { + var result = predicateOrMap(obj); + if (!result) { + throw new Error(isFunction(errMsg) ? errMsg(obj) : errMsg); + } + return result; + }; +} +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +var pairs = function (obj) { + return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); +}; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +function arrayTuples() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (args.length === 0) + return []; + var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER + var i, result = []; + for (i = 0; i < maxArrayLen; i++) { + // This is a hot function + // Unroll when there are 1-4 arguments + switch (args.length) { + case 1: + result.push([args[0][i]]); + break; + case 2: + result.push([args[0][i], args[1][i]]); + break; + case 3: + result.push([args[0][i], args[1][i], args[2][i]]); + break; + case 4: + result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); + break; + default: + result.push(args.map(function (array) { return array[i]; })); + break; + } + } + return result; +} +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +function applyPairs(memo, keyValTuple) { + var key, value; + if (isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; +} +/** Get the last element of an array */ +function tail(arr) { + return arr.length && arr[arr.length - 1] || undefined; +} +/** + * shallow copy from src to dest + */ +function copy(src, dest) { + if (dest) + Object.keys(dest).forEach(function (key) { return delete dest[key]; }); + if (!dest) + dest = {}; + return extend(dest, src); +} +/** Naive forEach implementation works with Objects or Arrays */ +function _forEach(obj, cb, _this) { + if (isArray(obj)) + return obj.forEach(cb, _this); + Object.keys(obj).forEach(function (key) { return cb(obj[key], key); }); +} +function _extend(toObj) { + for (var i = 1; i < arguments.length; i++) { + var obj = arguments[i]; + if (!obj) + continue; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + toObj[keys[j]] = obj[keys[j]]; + } + } + return toObj; +} +function _equals(o1, o2) { + if (o1 === o2) + return true; + if (o1 === null || o2 === null) + return false; + if (o1 !== o1 && o2 !== o2) + return true; // NaN === NaN + var t1 = typeof o1, t2 = typeof o2; + if (t1 !== t2 || t1 !== 'object') + return false; + var tup = [o1, o2]; + if (all(isArray)(tup)) + return _arraysEq(o1, o2); + if (all(isDate)(tup)) + return o1.getTime() === o2.getTime(); + if (all(isRegExp)(tup)) + return o1.toString() === o2.toString(); + if (all(isFunction)(tup)) + return true; // meh + var predicates = [isFunction, isArray, isDate, isRegExp]; + if (predicates.map(any).reduce(function (b, fn) { return b || !!fn(tup); }, false)) + return false; + var key, keys = {}; + for (key in o1) { + if (!_equals(o1[key], o2[key])) + return false; + keys[key] = true; + } + for (key in o2) { + if (!keys[key]) + return false; + } + return true; +} +function _arraysEq(a1, a2) { + if (a1.length !== a2.length) + return false; + return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true); +} +// issue #2676 +var silenceUncaughtInPromise = function (promise) { + return promise.catch(function (e) { return 0; }) && promise; +}; +var silentRejection = function (error) { + return silenceUncaughtInPromise(services.$q.reject(error)); +}; + +/** + * @module common + */ /** for typedoc */ +var Queue = /** @class */ (function () { + function Queue(_items, _limit) { + if (_items === void 0) { _items = []; } + if (_limit === void 0) { _limit = null; } + this._items = _items; + this._limit = _limit; + } + Queue.prototype.enqueue = function (item) { + var items = this._items; + items.push(item); + if (this._limit && items.length > this._limit) + items.shift(); + return item; + }; + Queue.prototype.dequeue = function () { + if (this.size()) + return this._items.splice(0, 1)[0]; + }; + Queue.prototype.clear = function () { + var current = this._items; + this._items = []; + return current; + }; + Queue.prototype.size = function () { + return this._items.length; + }; + Queue.prototype.remove = function (item) { + var idx = this._items.indexOf(item); + return idx > -1 && this._items.splice(idx, 1)[0]; + }; + Queue.prototype.peekTail = function () { + return this._items[this._items.length - 1]; + }; + Queue.prototype.peekHead = function () { + if (this.size()) + return this._items[0]; + }; + return Queue; +}()); + +/** + * @coreapi + * @module transition + */ /** for typedoc */ +"use strict"; + +(function (RejectType) { + RejectType[RejectType["SUPERSEDED"] = 2] = "SUPERSEDED"; + RejectType[RejectType["ABORTED"] = 3] = "ABORTED"; + RejectType[RejectType["INVALID"] = 4] = "INVALID"; + RejectType[RejectType["IGNORED"] = 5] = "IGNORED"; + RejectType[RejectType["ERROR"] = 6] = "ERROR"; +})(exports.RejectType || (exports.RejectType = {})); +/** @hidden */ var id = 0; +var Rejection = /** @class */ (function () { + function Rejection(type, message, detail) { + this.$id = id++; + this.type = type; + this.message = message; + this.detail = detail; + } + Rejection.prototype.toString = function () { + var detailString = function (d) { + return d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d); + }; + var detail = detailString(this.detail); + var _a = this, $id = _a.$id, type = _a.type, message = _a.message; + return "Transition Rejection($id: " + $id + " type: " + type + ", message: " + message + ", detail: " + detail + ")"; + }; + Rejection.prototype.toPromise = function () { + return extend(silentRejection(this), { _transitionRejection: this }); + }; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + Rejection.isRejectionPromise = function (obj) { + return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection); + }; + /** Returns a Rejection due to transition superseded */ + Rejection.superseded = function (detail, options) { + var message = "The transition has been superseded by a different transition"; + var rejection = new Rejection(exports.RejectType.SUPERSEDED, message, detail); + if (options && options.redirected) { + rejection.redirected = true; + } + return rejection; + }; + /** Returns a Rejection due to redirected transition */ + Rejection.redirected = function (detail) { + return Rejection.superseded(detail, { redirected: true }); + }; + /** Returns a Rejection due to invalid transition */ + Rejection.invalid = function (detail) { + var message = "This transition is invalid"; + return new Rejection(exports.RejectType.INVALID, message, detail); + }; + /** Returns a Rejection due to ignored transition */ + Rejection.ignored = function (detail) { + var message = "The transition was ignored"; + return new Rejection(exports.RejectType.IGNORED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.aborted = function (detail) { + var message = "The transition has been aborted"; + return new Rejection(exports.RejectType.ABORTED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.errored = function (detail) { + var message = "The transition errored"; + return new Rejection(exports.RejectType.ERROR, message, detail); + }; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + Rejection.normalize = function (detail) { + return is(Rejection)(detail) ? detail : Rejection.errored(detail); + }; + return Rejection; +}()); + +/** + * # Transition tracing (debug) + * + * Enable transition tracing to print transition information to the console, + * in order to help debug your application. + * Tracing logs detailed information about each Transition to your console. + * + * To enable tracing, import the [[Trace]] singleton and enable one or more categories. + * + * ### ES6 + * ```js + * import {trace} from "ui-router-ng2"; // or "angular-ui-router" + * trace.enable(1, 5); // TRANSITION and VIEWCONFIG + * ``` + * + * ### CJS + * ```js + * let trace = require("angular-ui-router").trace; // or "ui-router-ng2" + * trace.enable("TRANSITION", "VIEWCONFIG"); + * ``` + * + * ### Globals + * ```js + * let trace = window["angular-ui-router"].trace; // or "ui-router-ng2" + * trace.enable(); // Trace everything (very verbose) + * ``` + * + * ### Angular 1: + * ```js + * app.run($trace => $trace.enable()); + * ``` + * + * @coreapi + * @module trace + */ /** for typedoc */ +/** @hidden */ +function uiViewString(uiview) { + if (!uiview) + return 'ui-view (defunct)'; + var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)'; + return "[ui-view#" + uiview.id + " " + uiview.$type + ":" + uiview.fqn + " (" + uiview.name + "@" + state + ")]"; +} +/** @hidden */ +var viewConfigString = function (viewConfig) { + var view = viewConfig.viewDecl; + var state = view.$context.name || '(root)'; + return "[View#" + viewConfig.$id + " from '" + state + "' state]: target ui-view: '" + view.$uiViewName + "@" + view.$uiViewContextAnchor + "'"; +}; +/** @hidden */ +function normalizedCat(input) { + return isNumber(input) ? exports.Category[input] : exports.Category[exports.Category[input]]; +} +/** @hidden */ +var consoleLog = Function.prototype.bind.call(console.log, console); +/** @hidden */ +var consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console); +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ + +(function (Category) { + Category[Category["RESOLVE"] = 0] = "RESOLVE"; + Category[Category["TRANSITION"] = 1] = "TRANSITION"; + Category[Category["HOOK"] = 2] = "HOOK"; + Category[Category["UIVIEW"] = 3] = "UIVIEW"; + Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG"; +})(exports.Category || (exports.Category = {})); +/** @hidden */ var _tid = parse("$id"); +/** @hidden */ var _rid = parse("router.$id"); +/** @hidden */ var transLbl = function (trans) { return "Transition #" + _tid(trans) + "-" + _rid(trans); }; +/** + * Prints UI-Router Transition trace information to the console. + */ +var Trace = /** @class */ (function () { + /** @hidden */ + function Trace() { + /** @hidden */ + this._enabled = {}; + this.approximateDigests = 0; + } + /** @hidden */ + Trace.prototype._set = function (enabled, categories) { + var _this = this; + if (!categories.length) { + categories = Object.keys(exports.Category) + .map(function (k) { return parseInt(k, 10); }) + .filter(function (k) { return !isNaN(k); }) + .map(function (key) { return exports.Category[key]; }); + } + categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; }); + }; + Trace.prototype.enable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(true, categories); + }; + Trace.prototype.disable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(false, categories); + }; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + Trace.prototype.enabled = function (category) { + return !!this._enabled[normalizedCat(category)]; + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionStart = function (trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Started -> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionIgnored = function (trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Ignored <> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookInvocation = function (step, trans, options) { + if (!this.enabled(exports.Category.HOOK)) + return; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = functionToString(step.registeredHook.callback); + console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + maxLength(200, name)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) { + if (!this.enabled(exports.Category.HOOK)) + return; + console.log(transLbl(trans) + ": <- Hook returned: " + maxLength(200, stringify(hookResult))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvePath = function (path, when, trans) { + if (!this.enabled(exports.Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvableResolved = function (resolvable, trans) { + if (!this.enabled(exports.Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + maxLength(200, stringify(resolvable.data))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceError = function (reason, trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Rejected " + stringify(trans) + ", reason: " + reason); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceSuccess = function (finalState, trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Success " + stringify(trans) + ", final state: " + finalState.name); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewEvent = function (event, viewData, extra) { + if (extra === void 0) { extra = ""; } + if (!this.enabled(exports.Category.UIVIEW)) + return; + console.log("ui-view: " + padString(30, event) + " " + uiViewString(viewData) + extra); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) { + if (!this.enabled(exports.Category.UIVIEW)) + return; + this.traceUIViewEvent("Updating", viewData, " with ViewConfig from context='" + context + "'"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewFill = function (viewData, html) { + if (!this.enabled(exports.Category.UIVIEW)) + return; + this.traceUIViewEvent("Fill", viewData, " with: " + maxLength(200, html)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewSync = function (pairs) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + var mapping = pairs.map(function (_a) { + var uiViewData = _a[0], config = _a[1]; + var uiView = uiViewData.$type + ":" + uiViewData.fqn; + var view = config && config.viewDecl.$context.name + ": " + config.viewDecl.$name + " (" + config.viewDecl.$type + ")"; + return { 'ui-view fqn': uiView, 'state: view name': view }; + }).sort(function (a, b) { return a['ui-view fqn'].localeCompare(b['ui-view fqn']); }); + consoletable(mapping); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceEvent = function (event, viewConfig) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData)); + }; + return Trace; +}()); +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +var trace = new Trace(); + +(function (TransitionHookPhase) { + TransitionHookPhase[TransitionHookPhase["CREATE"] = 0] = "CREATE"; + TransitionHookPhase[TransitionHookPhase["BEFORE"] = 1] = "BEFORE"; + TransitionHookPhase[TransitionHookPhase["RUN"] = 2] = "RUN"; + TransitionHookPhase[TransitionHookPhase["SUCCESS"] = 3] = "SUCCESS"; + TransitionHookPhase[TransitionHookPhase["ERROR"] = 4] = "ERROR"; +})(exports.TransitionHookPhase || (exports.TransitionHookPhase = {})); + +(function (TransitionHookScope) { + TransitionHookScope[TransitionHookScope["TRANSITION"] = 0] = "TRANSITION"; + TransitionHookScope[TransitionHookScope["STATE"] = 1] = "STATE"; +})(exports.TransitionHookScope || (exports.TransitionHookScope = {})); + +/** + * @coreapi + * @module state + */ /** for typedoc */ +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +var TargetState = /** @class */ (function () { + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + function TargetState(_stateRegistry, _identifier, _params, _options) { + this._stateRegistry = _stateRegistry; + this._identifier = _identifier; + this._identifier = _identifier; + this._params = extend({}, _params || {}); + this._options = extend({}, _options || {}); + this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative); + } + /** The name of the state this object targets */ + TargetState.prototype.name = function () { + return this._definition && this._definition.name || this._identifier; + }; + /** The identifier used when creating this TargetState */ + TargetState.prototype.identifier = function () { + return this._identifier; + }; + /** The target parameter values */ + TargetState.prototype.params = function () { + return this._params; + }; + /** The internal state object (if it was found) */ + TargetState.prototype.$state = function () { + return this._definition; + }; + /** The internal state declaration (if it was found) */ + TargetState.prototype.state = function () { + return this._definition && this._definition.self; + }; + /** The target options */ + TargetState.prototype.options = function () { + return this._options; + }; + /** True if the target state was found */ + TargetState.prototype.exists = function () { + return !!(this._definition && this._definition.self); + }; + /** True if the object is valid */ + TargetState.prototype.valid = function () { + return !this.error(); + }; + /** If the object is invalid, returns the reason why */ + TargetState.prototype.error = function () { + var base = this.options().relative; + if (!this._definition && !!base) { + var stateName = base.name ? base.name : base; + return "Could not resolve '" + this.name() + "' from state '" + stateName + "'"; + } + if (!this._definition) + return "No such state '" + this.name() + "'"; + if (!this._definition.self) + return "State '" + this.name() + "' has an invalid definition"; + }; + TargetState.prototype.toString = function () { + return "'" + this.name() + "'" + stringify(this.params()); + }; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + TargetState.prototype.withState = function (state) { + return new TargetState(this._stateRegistry, state, this._params, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + TargetState.prototype.withParams = function (params, replace) { + if (replace === void 0) { replace = false; } + var newParams = replace ? params : extend({}, this._params, params); + return new TargetState(this._stateRegistry, this._identifier, newParams, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + TargetState.prototype.withOptions = function (options, replace) { + if (replace === void 0) { replace = false; } + var newOpts = replace ? options : extend({}, this._options, options); + return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts); + }; + /** Returns true if the object has a state property that might be a state or state name */ + TargetState.isDef = function (obj) { + return obj && obj.state && (isString(obj.state) || isString(obj.state.name)); + }; + return TargetState; +}()); + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +var defaultOptions = { + current: noop$1, + transition: null, + traceData: {}, + bind: null, +}; +/** @hidden */ +var TransitionHook = /** @class */ (function () { + function TransitionHook(transition, stateContext, registeredHook, options) { + var _this = this; + this.transition = transition; + this.stateContext = stateContext; + this.registeredHook = registeredHook; + this.options = options; + this.isSuperseded = function () { + return _this.type.hookPhase === exports.TransitionHookPhase.RUN && !_this.options.transition.isActive(); + }; + this.options = defaults(options, defaultOptions); + this.type = registeredHook.eventType; + } + TransitionHook.prototype.logError = function (err) { + this.transition.router.stateService.defaultErrorHandler()(err); + }; + TransitionHook.prototype.invokeHook = function () { + var _this = this; + var hook = this.registeredHook; + if (hook._deregistered) + return; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + var options = this.options; + trace.traceHookInvocation(this, this.transition, options); + var invokeCallback = function () { + return hook.callback.call(options.bind, _this.transition, _this.stateContext); + }; + var normalizeErr = function (err) { + return Rejection.normalize(err).toPromise(); + }; + var handleError = function (err) { + return hook.eventType.getErrorHandler(_this)(err); + }; + var handleResult = function (result) { + return hook.eventType.getResultHandler(_this)(result); + }; + try { + var result = invokeCallback(); + if (!this.type.synchronous && isPromise(result)) { + return result.catch(normalizeErr) + .then(handleResult, handleError); + } + else { + return handleResult(result); + } + } + catch (err) { + // If callback throws (synchronously) + return handleError(Rejection.normalize(err)); + } + finally { + if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) { + hook.deregister(); + } + } + }; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + TransitionHook.prototype.handleHookResult = function (result) { + var _this = this; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + // Hook returned a promise + if (isPromise(result)) { + // Wait for the promise, then reprocess with the resulting value + return result.then(function (val$$1) { return _this.handleHookResult(val$$1); }); + } + trace.traceHookResult(result, this.transition, this.options); + // Hook returned false + if (result === false) { + // Abort this Transition + return Rejection.aborted("Hook aborted transition").toPromise(); + } + var isTargetState = is(TargetState); + // hook returned a TargetState + if (isTargetState(result)) { + // Halt the current Transition and redirect (a new Transition) to the TargetState. + return Rejection.redirected(result).toPromise(); + } + }; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + TransitionHook.prototype.getNotCurrentRejection = function () { + var router = this.transition.router; + // The router is stopped + if (router._disposed) { + return Rejection.aborted("UIRouter instance #" + router.$id + " has been stopped (disposed)").toPromise(); + } + if (this.transition._aborted) { + return Rejection.aborted().toPromise(); + } + // This transition is no longer current. + // Another transition started while this hook was still running. + if (this.isSuperseded()) { + // Abort this transition + return Rejection.superseded(this.options.current()).toPromise(); + } + }; + TransitionHook.prototype.toString = function () { + var _a = this, options = _a.options, registeredHook = _a.registeredHook; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = fnToString(registeredHook.callback); + return event + " context: " + context + ", " + maxLength(200, name); + }; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + TransitionHook.chain = function (hooks, waitFor) { + // Chain the next hook off the previous + var createHookChainR = function (prev, nextHook) { + return prev.then(function () { return nextHook.invokeHook(); }); + }; + return hooks.reduce(createHookChainR, waitFor || services.$q.when()); + }; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + TransitionHook.invokeHooks = function (hooks, doneCallback) { + for (var idx = 0; idx < hooks.length; idx++) { + var hookResult = hooks[idx].invokeHook(); + if (isPromise(hookResult)) { + var remainingHooks = hooks.slice(idx + 1); + return TransitionHook.chain(remainingHooks, hookResult) + .then(doneCallback); + } + } + return doneCallback(); + }; + /** + * Run all TransitionHooks, ignoring their return value. + */ + TransitionHook.runAllHooks = function (hooks) { + hooks.forEach(function (hook) { return hook.invokeHook(); }); + }; + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.HANDLE_RESULT = function (hook) { return function (result) { + return hook.handleHookResult(result); + }; }; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) { + isPromise(result) && result.catch(function (err) { + return hook.logError(Rejection.normalize(err)); + }); + return undefined; + }; }; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.LOG_ERROR = function (hook) { return function (error) { + return hook.logError(error); + }; }; + TransitionHook.REJECT_ERROR = function (hook) { return function (error) { + return silentRejection(error); + }; }; + TransitionHook.THROW_ERROR = function (hook) { return function (error) { + throw error; + }; }; + return TransitionHook; +}()); + +/** + * @coreapi + * @module transition + */ /** for typedoc */ +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +function matchState(state, criterion) { + var toMatch = isString(criterion) ? [criterion] : criterion; + function matchGlobs(_state) { + var globStrings = toMatch; + for (var i = 0; i < globStrings.length; i++) { + var glob = new Glob(globStrings[i]); + if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) { + return true; + } + } + return false; + } + var matchFn = (isFunction(toMatch) ? toMatch : matchGlobs); + return !!matchFn(state); +} +/** + * @internalapi + * The registration data for a registered transition hook + */ +var RegisteredHook = /** @class */ (function () { + function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) { + if (options === void 0) { options = {}; } + this.tranSvc = tranSvc; + this.eventType = eventType; + this.callback = callback; + this.matchCriteria = matchCriteria; + this.removeHookFromRegistry = removeHookFromRegistry; + this.invokeCount = 0; + this._deregistered = false; + this.priority = options.priority || 0; + this.bind = options.bind || null; + this.invokeLimit = options.invokeLimit; + } + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + RegisteredHook.prototype._matchingNodes = function (nodes, criterion) { + if (criterion === true) + return nodes; + var matching = nodes.filter(function (node) { return matchState(node.state, criterion); }); + return matching.length ? matching : null; + }; + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + RegisteredHook.prototype._getDefaultMatchCriteria = function () { + return map(this.tranSvc._pluginapi._getPathTypes(), function () { return true; }); + }; + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + RegisteredHook.prototype._getMatchingNodes = function (treeChanges) { + var _this = this; + var criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria); + var paths = values(this.tranSvc._pluginapi._getPathTypes()); + return paths.reduce(function (mn, pathtype) { + // STATE scope criteria matches against every node in the path. + // TRANSITION scope criteria matches against only the last node in the path + var isStateHook = pathtype.scope === exports.TransitionHookScope.STATE; + var path = treeChanges[pathtype.name] || []; + var nodes = isStateHook ? path : [tail(path)]; + mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name]); + return mn; + }, {}); + }; + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + RegisteredHook.prototype.matches = function (treeChanges) { + var matches = this._getMatchingNodes(treeChanges); + // Check if all the criteria matched the TreeChanges object + var allMatched = values(matches).every(identity); + return allMatched ? matches : null; + }; + RegisteredHook.prototype.deregister = function () { + this.removeHookFromRegistry(this); + this._deregistered = true; + }; + return RegisteredHook; +}()); +/** @hidden Return a registration function of the requested type. */ +function makeEvent(registry, transitionService, eventType) { + // Create the object which holds the registered transition hooks. + var _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {}); + var hooks = _registeredHooks[eventType.name] = []; + var removeHookFn = removeFrom(hooks); + // Create hook registration function on the IHookRegistry for the event + registry[eventType.name] = hookRegistrationFn; + function hookRegistrationFn(matchObject, callback, options) { + if (options === void 0) { options = {}; } + var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options); + hooks.push(registeredHook); + return registeredHook.deregister.bind(registeredHook); + } + return hookRegistrationFn; +} + +/** + * @coreapi + * @module transition + */ /** for typedoc */ +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +var HookBuilder = /** @class */ (function () { + function HookBuilder(transition) { + this.transition = transition; + } + HookBuilder.prototype.buildHooksForPhase = function (phase) { + var _this = this; + var $transitions = this.transition.router.transitionService; + return $transitions._pluginapi._getEvents(phase) + .map(function (type) { return _this.buildHooks(type); }) + .reduce(unnestR, []) + .filter(identity); + }; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + HookBuilder.prototype.buildHooks = function (hookType) { + var transition = this.transition; + var treeChanges = transition.treeChanges(); + // Find all the matching registered hooks for a given hook type + var matchingHooks = this.getMatchingHooks(hookType, treeChanges); + if (!matchingHooks) + return []; + var baseHookOptions = { + transition: transition, + current: transition.options().current + }; + var makeTransitionHooks = function (hook) { + // Fetch the Nodes that caused this hook to match. + var matches = hook.matches(treeChanges); + // Select the PathNode[] that will be used as TransitionHook context objects + var matchingNodes = matches[hookType.criteriaMatchPath.name]; + // Return an array of HookTuples + return matchingNodes.map(function (node) { + var _options = extend({ + bind: hook.bind, + traceData: { hookType: hookType.name, context: node } + }, baseHookOptions); + var state = hookType.criteriaMatchPath.scope === exports.TransitionHookScope.STATE ? node.state.self : null; + var transitionHook = new TransitionHook(transition, state, hook, _options); + return { hook: hook, node: node, transitionHook: transitionHook }; + }); + }; + return matchingHooks.map(makeTransitionHooks) + .reduce(unnestR, []) + .sort(tupleSort(hookType.reverseSort)) + .map(function (tuple) { return tuple.transitionHook; }); + }; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges) { + var isCreate = hookType.hookPhase === exports.TransitionHookPhase.CREATE; + // Instance and Global hook registries + var $transitions = this.transition.router.transitionService; + var registries = isCreate ? [$transitions] : [this.transition, $transitions]; + return registries.map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries + .filter(assertPredicate(isArray, "broken event named: " + hookType.name)) // Sanity check + .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array + .filter(function (hook) { return hook.matches(treeChanges); }); // Only those satisfying matchCriteria + }; + return HookBuilder; +}()); +/** + * A factory for a sort function for HookTuples. + * + * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares + * the EventHook priority. + * + * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth + * @returns a tuple sort function + */ +function tupleSort(reverseDepthSort) { + if (reverseDepthSort === void 0) { reverseDepthSort = false; } + return function nodeDepthThenPriority(l, r) { + var factor = reverseDepthSort ? -1 : 1; + var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor; + return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority; + }; +} + +/** + * @coreapi + * @module params + */ +/** */ +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +var ParamType = /** @class */ (function () { + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + function ParamType(def) { + /** @inheritdoc */ + this.pattern = /.*/; + /** @inheritdoc */ + this.inherit = true; + extend(this, def); + } + // consider these four methods to be "abstract methods" that should be overridden + /** @inheritdoc */ + ParamType.prototype.is = function (val, key) { return true; }; + /** @inheritdoc */ + ParamType.prototype.encode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.decode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.equals = function (a, b) { return a == b; }; + ParamType.prototype.$subPattern = function () { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); + }; + ParamType.prototype.toString = function () { + return "{ParamType:" + this.name + "}"; + }; + /** Given an encoded string, or a decoded object, returns a decoded object */ + ParamType.prototype.$normalize = function (val) { + return this.is(val) ? val : this.decode(val); + }; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + ParamType.prototype.$asArray = function (mode, isSearch) { + if (!mode) + return this; + if (mode === "auto" && !isSearch) + throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + }; + return ParamType; +}()); +/** + * Wraps up a `ParamType` object to handle array values. + * @internalapi + */ +function ArrayType(type, mode) { + var _this = this; + // Wrap non-array value as array + function arrayWrap(val) { + return isArray(val) ? val : (isDefined(val) ? [val] : []); + } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch (val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + if (isArray(val) && val.length === 0) + return val; + var arr = arrayWrap(val); + var result = map(arr, callback); + return (allTruthyMode === true) ? filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result); + }; + } + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) + return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) + return false; + } + return true; + }; + } + ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) { + var paramTypeFn = type[name].bind(type); + var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler; + _this[name] = wrapperFn(paramTypeFn); + }); + extend(this, { + dynamic: type.dynamic, + name: type.name, + pattern: type.pattern, + inherit: type.inherit, + is: arrayHandler(type.is.bind(type), true), + $arrayMode: mode + }); +} + +/** + * @coreapi + * @module params + */ /** for typedoc */ +/** @hidden */ var hasOwn = Object.prototype.hasOwnProperty; +/** @hidden */ var isShorthand = function (cfg) { + return ["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {})).length === 0; +}; +/** @internalapi */ + +(function (DefType) { + DefType[DefType["PATH"] = 0] = "PATH"; + DefType[DefType["SEARCH"] = 1] = "SEARCH"; + DefType[DefType["CONFIG"] = 2] = "CONFIG"; +})(exports.DefType || (exports.DefType = {})); +/** @hidden */ +function unwrapShorthand(cfg) { + cfg = isShorthand(cfg) && { value: cfg } || cfg; + getStaticDefaultValue['__cacheable'] = true; + function getStaticDefaultValue() { + return cfg.value; + } + return extend(cfg, { + $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue, + }); +} +/** @hidden */ +function getType(cfg, urlType, location, id, paramTypes) { + if (cfg.type && urlType && urlType.name !== 'string') + throw new Error("Param '" + id + "' has two type configurations."); + if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type)) + return paramTypes.type(cfg.type); + if (urlType) + return urlType; + if (!cfg.type) { + var type = location === exports.DefType.CONFIG ? "any" : + location === exports.DefType.PATH ? "path" : + location === exports.DefType.SEARCH ? "query" : "string"; + return paramTypes.type(type); + } + return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type); +} +/** + * @internalapi + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ +function getSquashPolicy(config, isOptional, defaultPolicy) { + var squash = config.squash; + if (!isOptional || squash === false) + return false; + if (!isDefined(squash) || squash == null) + return defaultPolicy; + if (squash === true || isString(squash)) + return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); +} +/** @internalapi */ +function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") }, + ]; + replace = isArray(config.replace) ? config.replace : []; + if (isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = map(replace, prop("from")); + return filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace); +} +/** @internalapi */ +var Param = /** @class */ (function () { + function Param(id, type, config, location, urlMatcherFactory) { + config = unwrapShorthand(config); + type = getType(config, type, location, id, urlMatcherFactory.paramTypes); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === exports.DefType.SEARCH) : type; + var isOptional = config.value !== undefined || location === exports.DefType.SEARCH; + var dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic; + var raw = isDefined(config.raw) ? !!config.raw : !!type.raw; + var squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy()); + var replace = getReplace(config, arrayMode, isOptional, squash); + var inherit$$1 = isDefined(config.inherit) ? !!config.inherit : !!type.inherit; + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === exports.DefType.SEARCH ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return extend(arrayDefaults, arrayParamNomenclature, config).array; + } + extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit$$1, array: arrayMode, config: config }); + } + Param.prototype.isDefaultValue = function (value) { + return this.isOptional && this.type.equals(this.value(), value); + }; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + Param.prototype.value = function (value) { + var _this = this; + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + var getDefaultValue = function () { + if (_this._defaultValueCache) + return _this._defaultValueCache.defaultValue; + if (!services.$injector) + throw new Error("Injectable functions cannot be called at configuration time"); + var defaultValue = services.$injector.invoke(_this.config.$$fn); + if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue)) + throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")"); + if (_this.config.$$fn['__cacheable']) { + _this._defaultValueCache = { defaultValue: defaultValue }; + } + return defaultValue; + }; + var replaceSpecialValues = function (val$$1) { + for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) { + var tuple = _a[_i]; + if (tuple.from === val$$1) + return tuple.to; + } + return val$$1; + }; + value = replaceSpecialValues(value); + return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value); + }; + Param.prototype.isSearch = function () { + return this.location === exports.DefType.SEARCH; + }; + Param.prototype.validates = function (value) { + // There was no parameter value, but the param is optional + if ((isUndefined(value) || value === null) && this.isOptional) + return true; + // The value was not of the correct ParamType, and could not be decoded to the correct ParamType + var normalized = this.type.$normalize(value); + if (!this.type.is(normalized)) + return false; + // The value was of the correct type, but when encoded, did not match the ParamType's regexp + var encoded = this.type.encode(normalized); + return !(isString(encoded) && !this.type.pattern.exec(encoded)); + }; + Param.prototype.toString = function () { + return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}"; + }; + Param.values = function (params, values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + var paramValues = {}; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + paramValues[param.id] = param.value(values$$1[param.id]); + } + return paramValues; + }; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + Param.changed = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); }); + }; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + Param.equals = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return Param.changed(params, values1, values2).length === 0; + }; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + Param.validates = function (params, values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + return params.map(function (param) { return param.validates(values$$1[param.id]); }).reduce(allTrueR, true); + }; + return Param; +}()); + +/** @module path */ /** for typedoc */ +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +var PathNode = /** @class */ (function () { + function PathNode(stateOrNode) { + if (stateOrNode instanceof PathNode) { + var node = stateOrNode; + this.state = node.state; + this.paramSchema = node.paramSchema.slice(); + this.paramValues = extend({}, node.paramValues); + this.resolvables = node.resolvables.slice(); + this.views = node.views && node.views.slice(); + } + else { + var state = stateOrNode; + this.state = state; + this.paramSchema = state.parameters({ inherit: false }); + this.paramValues = {}; + this.resolvables = state.resolvables.map(function (res) { return res.clone(); }); + } + } + /** Sets [[paramValues]] for the node, from the values of an object hash */ + PathNode.prototype.applyRawParams = function (params) { + var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; }; + this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return applyPairs(memo, getParamVal(pDef)); }, {}); + return this; + }; + /** Gets a specific [[Param]] metadata that belongs to the node */ + PathNode.prototype.parameter = function (name) { + return find(this.paramSchema, propEq("id", name)); + }; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + PathNode.prototype.equals = function (node, paramsFn) { + var diff = this.diff(node, paramsFn); + return diff && diff.length === 0; + }; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + PathNode.prototype.diff = function (node, paramsFn) { + if (this.state !== node.state) + return false; + var params = paramsFn ? paramsFn(this) : this.paramSchema; + return Param.changed(params, this.paramValues, node.paramValues); + }; + /** Returns a clone of the PathNode */ + PathNode.clone = function (node) { + return new PathNode(node); + }; + return PathNode; +}()); + +/** @module path */ /** for typedoc */ +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +var PathUtils = /** @class */ (function () { + function PathUtils() { + } + /** Given a PathNode[], create an TargetState */ + PathUtils.makeTargetState = function (registry, path) { + var state = tail(path).state; + return new TargetState(registry, state, path.map(prop("paramValues")).reduce(mergeR, {}), {}); + }; + PathUtils.buildPath = function (targetState) { + var toParams = targetState.params(); + return targetState.$state().path.map(function (state) { return new PathNode(state).applyRawParams(toParams); }); + }; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + PathUtils.buildToPath = function (fromPath, targetState) { + var toPath = PathUtils.buildPath(targetState); + if (targetState.options().inherit) { + return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params())); + } + return toPath; + }; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + PathUtils.applyViewConfigs = function ($view, path, states) { + // Only apply the viewConfigs to the nodes for the given states + path.filter(function (node) { return inArray(states, node.state); }).forEach(function (node) { + var viewDecls = values(node.state.views || {}); + var subPath = PathUtils.subPath(path, function (n) { return n === node; }); + var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); }); + node.views = viewConfigs.reduce(unnestR, []); + }); + }; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + PathUtils.inheritParams = function (fromPath, toPath, toKeys) { + if (toKeys === void 0) { toKeys = []; } + function nodeParamVals(path, state) { + var node = find(path, propEq('state', state)); + return extend({}, node && node.paramValues); + } + var noInherit = fromPath.map(function (node) { return node.paramSchema; }) + .reduce(unnestR, []) + .filter(function (param) { return !param.inherit; }) + .map(prop('id')); + /** + * Given an [[PathNode]] "toNode", return a new [[PathNode]] with param values inherited from the + * matching node in fromPath. Only inherit keys that aren't found in "toKeys" from the node in "fromPath"" + */ + function makeInheritedParamsNode(toNode) { + // All param values for the node (may include default key/vals, when key was not found in toParams) + var toParamVals = extend({}, toNode && toNode.paramValues); + // limited to only those keys found in toParams + var incomingParamVals = pick(toParamVals, toKeys); + toParamVals = omit(toParamVals, toKeys); + var fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit); + // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals + var ownParamVals = extend(toParamVals, fromParamVals, incomingParamVals); + return new PathNode(toNode.state).applyRawParams(ownParamVals); + } + // The param keys specified by the incoming toParams + return toPath.map(makeInheritedParamsNode); + }; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + PathUtils.treeChanges = function (fromPath, toPath, reloadState) { + var keep = 0, max = Math.min(fromPath.length, toPath.length); + var nodesMatch = function (node1, node2) { + return node1.equals(node2, PathUtils.nonDynamicParams); + }; + while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) { + keep++; + } + /** Given a retained node, return a new node which uses the to node's param values */ + function applyToParams(retainedNode, idx) { + var cloned = PathNode.clone(retainedNode); + cloned.paramValues = toPath[idx].paramValues; + return cloned; + } + var from, retained, exiting, entering, to; + from = fromPath; + retained = from.slice(0, keep); + exiting = from.slice(keep); + // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped + var retainedWithToParams = retained.map(applyToParams); + entering = toPath.slice(keep); + to = (retainedWithToParams).concat(entering); + return { from: from, to: to, retained: retained, exiting: exiting, entering: entering }; + }; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + PathUtils.matching = function (pathA, pathB, paramsFn) { + var done = false; + var tuples = arrayTuples(pathA, pathB); + return tuples.reduce(function (matching, _a) { + var nodeA = _a[0], nodeB = _a[1]; + done = done || !nodeA.equals(nodeB, paramsFn); + return done ? matching : matching.concat(nodeA); + }, []); + }; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + PathUtils.equals = function (pathA, pathB, paramsFn) { + return pathA.length === pathB.length && + PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length; + }; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + PathUtils.subPath = function (path, predicate) { + var node = find(path, predicate); + var elementIdx = path.indexOf(node); + return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1); + }; + PathUtils.nonDynamicParams = function (node) { + return node.state.parameters({ inherit: false }) + .filter(function (param) { return !param.dynamic; }); + }; + /** Gets the raw parameter values from a path */ + PathUtils.paramValues = function (path) { + return path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); + }; + return PathUtils; +}()); + +/** + * @coreapi + * @module resolve + */ /** for typedoc */ +// TODO: explicitly make this user configurable +var defaultResolvePolicy = { + when: "LAZY", + async: "WAIT" +}; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +var Resolvable = /** @class */ (function () { + function Resolvable(arg1, resolveFn, deps, policy, data) { + this.resolved = false; + this.promise = undefined; + if (arg1 instanceof Resolvable) { + extend(this, arg1); + } + else if (isFunction(resolveFn)) { + if (isNullOrUndefined(arg1)) + throw new Error("new Resolvable(): token argument is required"); + if (!isFunction(resolveFn)) + throw new Error("new Resolvable(): resolveFn argument must be a function"); + this.token = arg1; + this.policy = policy; + this.resolveFn = resolveFn; + this.deps = deps || []; + this.data = data; + this.resolved = data !== undefined; + this.promise = this.resolved ? services.$q.when(this.data) : undefined; + } + else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) { + var literal = arg1; + return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data); + } + } + Resolvable.prototype.getPolicy = function (state) { + var thisPolicy = this.policy || {}; + var statePolicy = state && state.resolvePolicy || {}; + return { + when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when, + async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async, + }; + }; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + Resolvable.prototype.resolve = function (resolveContext, trans) { + var _this = this; + var $q = services.$q; + // Gets all dependencies from ResolveContext and wait for them to be resolved + var getResolvableDependencies = function () { + return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { + return resolvable.get(resolveContext, trans); + })); + }; + // Invokes the resolve function passing the resolved dependencies as arguments + var invokeResolveFn = function (resolvedDeps) { + return _this.resolveFn.apply(null, resolvedDeps); + }; + /** + * For RXWAIT policy: + * + * Given an observable returned from a resolve function: + * - enables .cache() mode (this allows multicast subscribers) + * - then calls toPromise() (this triggers subscribe() and thus fetches) + * - Waits for the promise, then return the cached observable (not the first emitted value). + */ + var waitForRx = function (observable$) { + var cached = observable$.cache(1); + return cached.take(1).toPromise().then(function () { return cached; }); + }; + // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through. + var node = resolveContext.findNode(this); + var state = node && node.state; + var maybeWaitForRx = this.getPolicy(state).async === "RXWAIT" ? waitForRx : identity; + // After the final value has been resolved, update the state of the Resolvable + var applyResolvedValue = function (resolvedValue) { + _this.data = resolvedValue; + _this.resolved = true; + trace.traceResolvableResolved(_this, trans); + return _this.data; + }; + // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick. + return this.promise = $q.when() + .then(getResolvableDependencies) + .then(invokeResolveFn) + .then(maybeWaitForRx) + .then(applyResolvedValue); + }; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + Resolvable.prototype.get = function (resolveContext, trans) { + return this.promise || this.resolve(resolveContext, trans); + }; + Resolvable.prototype.toString = function () { + return "Resolvable(token: " + stringify(this.token) + ", requires: [" + this.deps.map(stringify) + "])"; + }; + Resolvable.prototype.clone = function () { + return new Resolvable(this); + }; + Resolvable.fromData = function (token, data) { + return new Resolvable(token, function () { return data; }, null, null, data); + }; + return Resolvable; +}()); + +/** @internalapi */ +var resolvePolicies = { + when: { + LAZY: "LAZY", + EAGER: "EAGER" + }, + async: { + WAIT: "WAIT", + NOWAIT: "NOWAIT", + RXWAIT: "RXWAIT" + } +}; + +/** @module resolve */ +/** for typedoc */ +var whens = resolvePolicies.when; +var ALL_WHENS = [whens.EAGER, whens.LAZY]; +var EAGER_WHENS = [whens.EAGER]; +var NATIVE_INJECTOR_TOKEN = "Native Injector"; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +var ResolveContext = /** @class */ (function () { + function ResolveContext(_path) { + this._path = _path; + } + /** Gets all the tokens found in the resolve context, de-duplicated */ + ResolveContext.prototype.getTokens = function () { + return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(uniqR, []); + }; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + ResolveContext.prototype.getResolvable = function (token) { + var matching = this._path.map(function (node) { return node.resolvables; }) + .reduce(unnestR, []) + .filter(function (r) { return r.token === token; }); + return tail(matching); + }; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + ResolveContext.prototype.getPolicy = function (resolvable) { + var node = this.findNode(resolvable); + return resolvable.getPolicy(node.state); + }; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + ResolveContext.prototype.subContext = function (state) { + return new ResolveContext(PathUtils.subPath(this._path, function (node) { return node.state === state; })); + }; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + ResolveContext.prototype.addResolvables = function (newResolvables, state) { + var node = find(this._path, propEq('state', state)); + var keys = newResolvables.map(function (r) { return r.token; }); + node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables); + }; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + ResolveContext.prototype.resolvePath = function (when, trans) { + var _this = this; + if (when === void 0) { when = "LAZY"; } + // This option determines which 'when' policy Resolvables we are about to fetch. + var whenOption = inArray(ALL_WHENS, when) ? when : "LAZY"; + // If the caller specified EAGER, only the EAGER Resolvables are fetched. + // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.` + var matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS; + // get the subpath to the state argument, if provided + trace.traceResolvePath(this._path, when, trans); + var matchesPolicy = function (acceptedVals, whenOrAsync) { + return function (resolvable) { + return inArray(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]); + }; + }; + // Trigger all the (matching) Resolvables in the path + // Reduce all the "WAIT" Resolvables into an array + var promises = this._path.reduce(function (acc, node) { + var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when')); + var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async')); + var wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async'))); + // For the matching Resolvables, start their async fetch process. + var subContext = _this.subContext(node.state); + var getResult = function (r) { return r.get(subContext, trans) + .then(function (value) { return ({ token: r.token, value: value }); }); }; + nowait.forEach(getResult); + return acc.concat(wait.map(getResult)); + }, []); + // Wait for all the "WAIT" resolvables + return services.$q.all(promises); + }; + ResolveContext.prototype.injector = function () { + return this._injector || (this._injector = new UIInjectorImpl(this)); + }; + ResolveContext.prototype.findNode = function (resolvable) { + return find(this._path, function (node) { return inArray(node.resolvables, resolvable); }); + }; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + ResolveContext.prototype.getDependencies = function (resolvable) { + var _this = this; + var node = this.findNode(resolvable); + // Find which other resolvables are "visible" to the `resolvable` argument + // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path) + var subPath = PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path; + var availableResolvables = subPath + .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) //all of subpath's resolvables + .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument + var getDependency = function (token) { + var matching = availableResolvables.filter(function (r) { return r.token === token; }); + if (matching.length) + return tail(matching); + var fromInjector = _this.injector().getNative(token); + if (isUndefined(fromInjector)) { + throw new Error("Could not find Dependency Injection token: " + stringify(token)); + } + return new Resolvable(token, function () { return fromInjector; }, [], fromInjector); + }; + return resolvable.deps.map(getDependency); + }; + return ResolveContext; +}()); +var UIInjectorImpl = /** @class */ (function () { + function UIInjectorImpl(context) { + this.context = context; + this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector; + } + UIInjectorImpl.prototype.get = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) { + if (this.context.getPolicy(resolvable).async === 'NOWAIT') { + return resolvable.get(this.context); + } + if (!resolvable.resolved) { + throw new Error("Resolvable async .get() not complete:" + stringify(resolvable.token)); + } + return resolvable.data; + } + return this.getNative(token); + }; + UIInjectorImpl.prototype.getAsync = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) + return resolvable.get(this.context); + return services.$q.when(this.native.get(token)); + }; + UIInjectorImpl.prototype.getNative = function (token) { + return this.native && this.native.get(token); + }; + return UIInjectorImpl; +}()); + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +/** @hidden */ +var stateSelf = prop("self"); +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +var Transition = /** @class */ (function () { + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + function Transition(fromPath, targetState, router) { + var _this = this; + /** @hidden */ + this._deferred = services.$q.defer(); + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + this.promise = this._deferred.promise; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + this._registeredHooks = {}; + /** @hidden */ + this._hookBuilder = new HookBuilder(this); + /** Checks if this transition is currently active/running. */ + this.isActive = function () { + return _this.router.globals.transition === _this; + }; + this.router = router; + this._targetState = targetState; + if (!targetState.valid()) { + throw new Error(targetState.error()); + } + // current() is assumed to come from targetState.options, but provide a naive implementation otherwise. + this._options = extend({ current: val(this) }, targetState.options()); + this.$id = router.transitionService._transitionCount++; + var toPath = PathUtils.buildToPath(fromPath, targetState); + this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState); + this.createTransitionHookRegFns(); + var onCreateHooks = this._hookBuilder.buildHooksForPhase(exports.TransitionHookPhase.CREATE); + TransitionHook.invokeHooks(onCreateHooks, function () { return null; }); + this.applyViewConfigs(router); + } + /** @hidden */ + Transition.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onError = function (criteria, callback, options) { return; }; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + Transition.prototype.createTransitionHookRegFns = function () { + var _this = this; + this.router.transitionService._pluginapi._getEvents() + .filter(function (type) { return type.hookPhase !== exports.TransitionHookPhase.CREATE; }) + .forEach(function (type) { return makeEvent(_this, _this.router.transitionService, type); }); + }; + /** @internalapi */ + Transition.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + Transition.prototype.applyViewConfigs = function (router) { + var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; }); + PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates); + }; + /** + * @internalapi + * + * @returns the internal from [State] object + */ + Transition.prototype.$from = function () { + return tail(this._treeChanges.from).state; + }; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + Transition.prototype.$to = function () { + return tail(this._treeChanges.to).state; + }; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + Transition.prototype.from = function () { + return this.$from().self; + }; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + Transition.prototype.to = function () { + return this.$to().self; + }; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + Transition.prototype.targetState = function () { + return this._targetState; + }; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + Transition.prototype.is = function (compare) { + if (compare instanceof Transition) { + // TODO: Also compare parameters + return this.is({ to: compare.$to().name, from: compare.$from().name }); + } + return !((compare.to && !matchState(this.$to(), compare.to)) || + (compare.from && !matchState(this.$from(), compare.from))); + }; + Transition.prototype.params = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return Object.freeze(this._treeChanges[pathname].map(prop("paramValues")).reduce(mergeR, {})); + }; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + Transition.prototype.injector = function (state, pathName) { + if (pathName === void 0) { pathName = "to"; } + var path = this._treeChanges[pathName]; + if (state) + path = PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; }); + return new ResolveContext(path).injector(); + }; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + Transition.prototype.getResolveTokens = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return new ResolveContext(this._treeChanges[pathname]).getTokens(); + }; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + Transition.prototype.addResolvable = function (resolvable, state) { + if (state === void 0) { state = ""; } + resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable); + var stateName = (typeof state === "string") ? state : state.name; + var topath = this._treeChanges.to; + var targetNode = find(topath, function (node) { return node.state.name === stateName; }); + var resolveContext = new ResolveContext(topath); + resolveContext.addResolvables([resolvable], targetNode.state); + }; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + Transition.prototype.redirectedFrom = function () { + return this._options.redirectedFrom || null; + }; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + Transition.prototype.originalTransition = function () { + var rf = this.redirectedFrom(); + return (rf && rf.originalTransition()) || this; + }; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + Transition.prototype.options = function () { + return this._options; + }; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + Transition.prototype.entering = function () { + return map(this._treeChanges.entering, prop('state')).map(stateSelf); + }; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + Transition.prototype.exiting = function () { + return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse(); + }; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + Transition.prototype.retained = function () { + return map(this._treeChanges.retained, prop('state')).map(stateSelf); + }; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + Transition.prototype.views = function (pathname, state) { + if (pathname === void 0) { pathname = "entering"; } + var path = this._treeChanges[pathname]; + path = !state ? path : path.filter(propEq('state', state)); + return path.map(prop("views")).filter(identity).reduce(unnestR, []); + }; + Transition.prototype.treeChanges = function (pathname) { + return pathname ? this._treeChanges[pathname] : this._treeChanges; + }; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + Transition.prototype.redirect = function (targetState) { + var redirects = 1, trans = this; + while ((trans = trans.redirectedFrom()) != null) { + if (++redirects > 20) + throw new Error("Too many consecutive Transition redirects (20+)"); + } + var redirectOpts = { redirectedFrom: this, source: "redirect" }; + // If the original transition was caused by URL sync, then use { location: 'replace' } + // on the new transition (unless the target state explicitly specifies location: false). + // This causes the original url to be replaced with the url for the redirect target + // so the original url disappears from the browser history. + if (this.options().source === 'url' && targetState.options().location !== false) { + redirectOpts.location = 'replace'; + } + var newOptions = extend({}, this.options(), targetState.options(), redirectOpts); + targetState = targetState.withOptions(newOptions, true); + var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState); + var originalEnteringNodes = this._treeChanges.entering; + var redirectEnteringNodes = newTransition._treeChanges.entering; + // --- Re-use resolve data from original transition --- + // When redirecting from a parent state to a child state where the parent parameter values haven't changed + // (because of the redirect), the resolves fetched by the original transition are still valid in the + // redirected transition. + // + // This allows you to define a redirect on a parent state which depends on an async resolve value. + // You can wait for the resolve, then redirect to a child state based on the result. + // The redirected transition does not have to re-fetch the resolve. + // --------------------------------------------------------- + var nodeIsReloading = function (reloadState) { return function (node) { + return reloadState && node.state.includes[reloadState.name]; + }; }; + // Find any "entering" nodes in the redirect path that match the original path and aren't being reloaded + var matchingEnteringNodes = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams) + .filter(not(nodeIsReloading(targetState.options().reloadState))); + // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes. + matchingEnteringNodes.forEach(function (node, idx) { + node.resolvables = originalEnteringNodes[idx].resolvables; + }); + return newTransition; + }; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + Transition.prototype._changedParams = function () { + var tc = this._treeChanges; + /** Return undefined if it's not a "dynamic" transition, for the following reasons */ + // If user explicitly wants a reload + if (this._options.reload) + return undefined; + // If any states are exiting or entering + if (tc.exiting.length || tc.entering.length) + return undefined; + // If to/from path lengths differ + if (tc.to.length !== tc.from.length) + return undefined; + // If the to/from paths are different + var pathsDiffer = arrayTuples(tc.to, tc.from) + .map(function (tuple) { return tuple[0].state !== tuple[1].state; }) + .reduce(anyTrueR, false); + if (pathsDiffer) + return undefined; + // Find any parameter values that differ + var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; }); + var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1]; + var tuples = arrayTuples(nodeSchemas, toValues, fromValues); + return tuples.map(function (_a) { + var schema = _a[0], toVals = _a[1], fromVals = _a[2]; + return Param.changed(schema, toVals, fromVals); + }).reduce(unnestR, []); + }; + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + Transition.prototype.dynamic = function () { + var changes = this._changedParams(); + return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(anyTrueR, false); + }; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + Transition.prototype.ignored = function () { + return !!this._ignoredReason(); + }; + /** @hidden */ + Transition.prototype._ignoredReason = function () { + var pending = this.router.globals.transition; + var reloadState = this._options.reloadState; + var same = function (pathA, pathB) { + if (pathA.length !== pathB.length) + return false; + var matching = PathUtils.matching(pathA, pathB); + return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length; + }; + var newTC = this.treeChanges(); + var pendTC = pending && pending.treeChanges(); + if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) + return "SameAsPending"; + if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) + return "SameAsCurrent"; + }; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + Transition.prototype.run = function () { + var _this = this; + var runAllHooks = TransitionHook.runAllHooks; + // Gets transition hooks array for the given phase + var getHooksFor = function (phase) { + return _this._hookBuilder.buildHooksForPhase(phase); + }; + // When the chain is complete, then resolve or reject the deferred + var transitionSuccess = function () { + trace.traceSuccess(_this.$to(), _this); + _this.success = true; + _this._deferred.resolve(_this.to()); + runAllHooks(getHooksFor(exports.TransitionHookPhase.SUCCESS)); + }; + var transitionError = function (reason) { + trace.traceError(reason, _this); + _this.success = false; + _this._deferred.reject(reason); + _this._error = reason; + runAllHooks(getHooksFor(exports.TransitionHookPhase.ERROR)); + }; + var runTransition = function () { + // Wait to build the RUN hook chain until the BEFORE hooks are done + // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object. + var allRunHooks = getHooksFor(exports.TransitionHookPhase.RUN); + var done = function () { return services.$q.when(undefined); }; + return TransitionHook.invokeHooks(allRunHooks, done); + }; + var startTransition = function () { + var globals = _this.router.globals; + globals.lastStartedTransitionId = _this.$id; + globals.transition = _this; + globals.transitionHistory.enqueue(_this); + trace.traceTransitionStart(_this); + return services.$q.when(undefined); + }; + var allBeforeHooks = getHooksFor(exports.TransitionHookPhase.BEFORE); + TransitionHook.invokeHooks(allBeforeHooks, startTransition) + .then(runTransition) + .then(transitionSuccess, transitionError); + return this.promise; + }; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + Transition.prototype.valid = function () { + return !this.error() || this.success !== undefined; + }; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + Transition.prototype.abort = function () { + // Do not set flag if the transition is already complete + if (isUndefined(this.success)) { + this._aborted = true; + } + }; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + Transition.prototype.error = function () { + var state = this.$to(); + if (state.self.abstract) + return "Cannot transition to abstract state '" + state.name + "'"; + var paramDefs = state.parameters(), values$$1 = this.params(); + var invalidParams = paramDefs.filter(function (param) { return !param.validates(values$$1[param.id]); }); + if (invalidParams.length) { + return "Param values not valid for state '" + state.name + "'. Invalid params: [ " + invalidParams.map(function (param) { return param.id; }).join(', ') + " ]"; + } + if (this.success === false) + return this._error; + }; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + Transition.prototype.toString = function () { + var fromStateOrName = this.from(); + var toStateOrName = this.to(); + var avoidEmptyHash = function (params) { + return (params["#"] !== null && params["#"] !== undefined) ? params : omit(params, ["#"]); + }; + // (X) means the to state is invalid. + var id = this.$id, from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))), toValid = this.valid() ? "" : "(X) ", to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = stringify(avoidEmptyHash(this.params())); + return "Transition#" + id + "( '" + from + "'" + fromParams + " -> " + toValid + "'" + to + "'" + toParams + " )"; + }; + /** @hidden */ + Transition.diToken = Transition; + return Transition; +}()); + +/** + * Functions that manipulate strings + * + * Although these functions are exported, they are subject to change without notice. + * + * @module common_strings + */ /** */ +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +function maxLength(max, str) { + if (str.length <= max) + return str; + return str.substr(0, max - 3) + "..."; +} +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +function padString(length, str) { + while (str.length < length) + str += " "; + return str; +} +function kebobString(camelCase) { + return camelCase + .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char + .replace(/([A-Z])/g, function ($1) { return "-" + $1.toLowerCase(); }); // replace rest +} +function functionToString(fn) { + var fnStr = fnToString(fn); + var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/); + var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr; + var fnName = fn['name'] || ""; + if (fnName && toStr.match(/function \(/)) { + return 'function ' + fnName + toStr.substr(9); + } + return toStr; +} +function fnToString(fn) { + var _fn = isArray(fn) ? fn.slice(-1)[0] : fn; + return _fn && _fn.toString() || "undefined"; +} +var stringifyPatternFn = null; +var stringifyPattern = function (value) { + var isRejection = Rejection.isRejectionPromise; + stringifyPatternFn = stringifyPatternFn || pattern([ + [not(isDefined), val("undefined")], + [isNull, val("null")], + [isPromise, val("[Promise]")], + [isRejection, function (x) { return x._transitionRejection.toString(); }], + [is(Rejection), invoke("toString")], + [is(Transition), invoke("toString")], + [is(Resolvable), invoke("toString")], + [isInjectable, functionToString], + [val(true), identity] + ]); + return stringifyPatternFn(value); +}; +function stringify(o) { + var seen = []; + function format(val$$1) { + if (isObject(val$$1)) { + if (seen.indexOf(val$$1) !== -1) + return '[circular ref]'; + seen.push(val$$1); + } + return stringifyPattern(val$$1); + } + return JSON.stringify(o, function (key, val$$1) { return format(val$$1); }).replace(/\\"/g, '"'); +} +/** Returns a function that splits a string on a character or substring */ +var beforeAfterSubstr = function (char) { return function (str) { + if (!str) + return ["", ""]; + var idx = str.indexOf(char); + if (idx === -1) + return [str, ""]; + return [str.substr(0, idx), str.substr(idx + 1)]; +}; }; +var hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/'); +var stripFile = function (str) { return str.replace(/\/[^/]*$/, ''); }; +var splitHash = beforeAfterSubstr("#"); +var splitQuery = beforeAfterSubstr("?"); +var splitEqual = beforeAfterSubstr("="); +var trimHashVal = function (str) { return str ? str.replace(/^#/, "") : ""; }; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +function splitOnDelim(delim) { + var re = new RegExp("(" + delim + ")", "g"); + return function (str) { + return str.split(re).filter(identity); + }; +} + +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +function joinNeighborsR(acc, x) { + if (isString(tail(acc)) && isString(x)) + return acc.slice(0, -1).concat(tail(acc) + x); + return pushR(acc, x); +} + +/** @module common */ /** for typedoc */ + +/** + * @coreapi + * @module params + */ +/** */ +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +var ParamTypes = /** @class */ (function () { + /** @internalapi */ + function ParamTypes() { + /** @hidden */ + this.enqueue = true; + /** @hidden */ + this.typeQueue = []; + /** @internalapi */ + this.defaultTypes = pick(ParamTypes.prototype, ["hash", "string", "query", "path", "int", "bool", "date", "json", "any"]); + // Register default types. Store them in the prototype of this.types. + var makeType = function (definition, name) { + return new ParamType(extend({ name: name }, definition)); + }; + this.types = inherit(map(this.defaultTypes, makeType), {}); + } + /** @internalapi */ + ParamTypes.prototype.dispose = function () { + this.types = {}; + }; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + ParamTypes.prototype.type = function (name, definition, definitionFn) { + if (!isDefined(definition)) + return this.types[name]; + if (this.types.hasOwnProperty(name)) + throw new Error("A type named '" + name + "' has already been defined."); + this.types[name] = new ParamType(extend({ name: name }, definition)); + if (definitionFn) { + this.typeQueue.push({ name: name, def: definitionFn }); + if (!this.enqueue) + this._flushTypeQueue(); + } + return this; + }; + /** @internalapi */ + ParamTypes.prototype._flushTypeQueue = function () { + while (this.typeQueue.length) { + var type = this.typeQueue.shift(); + if (type.pattern) + throw new Error("You cannot override a type's .pattern at runtime."); + extend(this.types[type.name], services.$injector.invoke(type.def)); + } + }; + return ParamTypes; +}()); +/** @hidden */ +function initDefaultTypes() { + var makeDefaultType = function (def) { + var valToString = function (val$$1) { + return val$$1 != null ? val$$1.toString() : val$$1; + }; + var defaultTypeBase = { + encode: valToString, + decode: valToString, + is: is(String), + pattern: /.*/, + equals: function (a, b) { return a == b; }, + }; + return extend({}, defaultTypeBase, def); + }; + // Default Parameter Type Definitions + extend(ParamTypes.prototype, { + string: makeDefaultType({}), + path: makeDefaultType({ + pattern: /[^/]*/, + }), + query: makeDefaultType({}), + hash: makeDefaultType({ + inherit: false, + }), + int: makeDefaultType({ + decode: function (val$$1) { return parseInt(val$$1, 10); }, + is: function (val$$1) { + return !isNullOrUndefined(val$$1) && this.decode(val$$1.toString()) === val$$1; + }, + pattern: /-?\d+/, + }), + bool: makeDefaultType({ + encode: function (val$$1) { return val$$1 && 1 || 0; }, + decode: function (val$$1) { return parseInt(val$$1, 10) !== 0; }, + is: is(Boolean), + pattern: /0|1/, + }), + date: makeDefaultType({ + encode: function (val$$1) { + return !this.is(val$$1) ? undefined : [ + val$$1.getFullYear(), + ('0' + (val$$1.getMonth() + 1)).slice(-2), + ('0' + val$$1.getDate()).slice(-2), + ].join("-"); + }, + decode: function (val$$1) { + if (this.is(val$$1)) + return val$$1; + var match = this.capture.exec(val$$1); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function (val$$1) { return val$$1 instanceof Date && !isNaN(val$$1.valueOf()); }, + equals: function (l, r) { + return ['getFullYear', 'getMonth', 'getDate'] + .reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true); + }, + 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: makeDefaultType({ + encode: toJson, + decode: fromJson, + is: is(Object), + equals: equals, + pattern: /[^/]*/, + }), + // does not encode/decode + any: makeDefaultType({ + encode: identity, + decode: identity, + is: function () { return true; }, + equals: equals, + }), + }); +} +initDefaultTypes(); + +/** + * @coreapi + * @module params + */ +/** */ +/** @internalapi */ +var StateParams = /** @class */ (function () { + function StateParams(params) { + if (params === void 0) { params = {}; } + extend(this, params); + } + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + StateParams.prototype.$inherit = function (newParams, $current, $to) { + var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + for (var i in parents) { + if (!parents[i] || !parents[i].params) + continue; + parentParams = Object.keys(parents[i].params); + if (!parentParams.length) + continue; + for (var j in parentParams) { + if (inheritList.indexOf(parentParams[j]) >= 0) + continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = this[parentParams[j]]; + } + } + return extend({}, inherited, newParams); + }; + + return StateParams; +}()); + +/** @module path */ /** for typedoc */ + +/** @module resolve */ /** for typedoc */ + +/** @module state */ /** for typedoc */ +var parseUrl = function (url) { + if (!isString(url)) + return false; + var root$$1 = url.charAt(0) === '^'; + return { val: root$$1 ? url.substring(1) : url, root: root$$1 }; +}; +function nameBuilder(state) { + return state.name; +} +function selfBuilder(state) { + state.self.$$state = function () { return state; }; + return state.self; +} +function dataBuilder(state) { + if (state.parent && state.parent.data) { + state.data = state.self.data = inherit(state.parent.data, state.data); + } + return state.data; +} +var getUrlBuilder = function ($urlMatcherFactoryProvider, root$$1) { + return function urlBuilder(state) { + var stateDec = state; + // For future states, i.e., states whose name ends with `.**`, + // match anything that starts with the url prefix + if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\.\*\*$/)) { + stateDec.url += "{remainder:any}"; // match any path (.*) + } + var parsed = parseUrl(stateDec.url), parent = state.parent; + var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { + params: state.params || {}, + paramMap: function (paramConfig, isSearch) { + if (stateDec.reloadOnSearch === false && isSearch) + paramConfig = extend(paramConfig || {}, { dynamic: true }); + return paramConfig; + } + }); + if (!url) + return null; + if (!$urlMatcherFactoryProvider.isMatcher(url)) + throw new Error("Invalid url '" + url + "' in state '" + state + "'"); + return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root$$1()).url.append(url); + }; +}; +var getNavigableBuilder = function (isRoot) { + return function navigableBuilder(state) { + return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null); + }; +}; +var getParamsBuilder = function (paramFactory) { + return function paramsBuilder(state) { + var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, config); }; + var urlParams = (state.url && state.url.parameters({ inherit: false })) || []; + var nonUrlParams = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam)); + return urlParams.concat(nonUrlParams).map(function (p) { return [p.id, p]; }).reduce(applyPairs, {}); + }; +}; +function pathBuilder(state) { + return state.parent ? state.parent.path.concat(state) : /*root*/ [state]; +} +function includesBuilder(state) { + var includes = state.parent ? extend({}, state.parent.includes) : {}; + includes[state.name] = true; + return includes; +} +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +function resolvablesBuilder(state) { + /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */ + var objects2Tuples = function (resolveObj, resolvePolicies) { + return Object.keys(resolveObj || {}).map(function (token) { return ({ token: token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token] }); }); + }; + /** fetch DI annotations from a function or ng1-style array */ + var annotate = function (fn) { + var $injector = services.$injector; + // ng1 doesn't have an $injector until runtime. + // If the $injector doesn't exist, use "deferred" literal as a + // marker indicating they should be annotated when runtime starts + return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || "deferred"; + }; + /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */ + var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); }; + /** true if the object looks like a provide literal, or a ng2 Provider */ + var isLikeNg2Provider = function (obj) { return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); }; + /** true if the object looks like a tuple from obj2Tuples */ + var isTupleFromObj = function (obj) { return !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val))); }; + /** extracts the token from a Provider or provide literal */ + var token = function (p) { return p.provide || p.token; }; + /** Given a literal resolve or provider object, returns a Resolvable */ + var literal2Resolvable = pattern([ + [prop('resolveFn'), function (p) { return new Resolvable(token(p), p.resolveFn, p.deps, p.policy); }], + [prop('useFactory'), function (p) { return new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy); }], + [prop('useClass'), function (p) { return new Resolvable(token(p), function () { return new p.useClass(); }, [], p.policy); }], + [prop('useValue'), function (p) { return new Resolvable(token(p), function () { return p.useValue; }, [], p.policy, p.useValue); }], + [prop('useExisting'), function (p) { return new Resolvable(token(p), identity, [p.useExisting], p.policy); }], + ]); + var tuple2Resolvable = pattern([ + [pipe(prop("val"), isString), function (tuple) { return new Resolvable(tuple.token, identity, [tuple.val], tuple.policy); }], + [pipe(prop("val"), isArray), function (tuple) { return new Resolvable(tuple.token, tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }], + [pipe(prop("val"), isFunction), function (tuple) { return new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }], + ]); + var item2Resolvable = pattern([ + [is(Resolvable), function (r) { return r; }], + [isResolveLiteral, literal2Resolvable], + [isLikeNg2Provider, literal2Resolvable], + [isTupleFromObj, tuple2Resolvable], + [val(true), function (obj) { throw new Error("Invalid resolve value: " + stringify(obj)); }] + ]); + // If resolveBlock is already an array, use it as-is. + // Otherwise, assume it's an object and convert to an Array of tuples + var decl = state.resolve; + var items = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {}); + return items.map(item2Resolvable); +} +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +var StateBuilder = /** @class */ (function () { + function StateBuilder(matcher, urlMatcherFactory) { + this.matcher = matcher; + var self = this; + var root$$1 = function () { return matcher.find(""); }; + var isRoot = function (state) { return state.name === ""; }; + function parentBuilder(state) { + if (isRoot(state)) + return null; + return matcher.find(self.parentName(state)) || root$$1(); + } + this.builders = { + name: [nameBuilder], + self: [selfBuilder], + parent: [parentBuilder], + data: [dataBuilder], + // Build a URLMatcher if necessary, either via a relative or absolute URL + url: [getUrlBuilder(urlMatcherFactory, root$$1)], + // Keep track of the closest ancestor state that has a URL (i.e. is navigable) + navigable: [getNavigableBuilder(isRoot)], + params: [getParamsBuilder(urlMatcherFactory.paramFactory)], + // Each framework-specific ui-router implementation should define its own `views` builder + // e.g., src/ng1/statebuilders/views.ts + views: [], + // Keep a full path from the root down to this state as this is needed for state activation. + path: [pathBuilder], + // Speed up $state.includes() as it's used a lot + includes: [includesBuilder], + resolvables: [resolvablesBuilder] + }; + } + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + StateBuilder.prototype.builder = function (name, fn) { + var builders = this.builders; + var array = builders[name] || []; + // Backwards compat: if only one builder exists, return it, else return whole arary. + if (isString(name) && !isDefined(fn)) + return array.length > 1 ? array : array[0]; + if (!isString(name) || !isFunction(fn)) + return; + builders[name] = array; + builders[name].push(fn); + return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; }; + }; + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + StateBuilder.prototype.build = function (state) { + var _a = this, matcher = _a.matcher, builders = _a.builders; + var parent = this.parentName(state); + if (parent && !matcher.find(parent, undefined, false)) { + return null; + } + for (var key in builders) { + if (!builders.hasOwnProperty(key)) + continue; + var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, noop$1); + state[key] = chain(state); + } + return state; + }; + StateBuilder.prototype.parentName = function (state) { + // name = 'foo.bar.baz.**' + var name = state.name || ""; + // segments = ['foo', 'bar', 'baz', '.**'] + var segments = name.split('.'); + // segments = ['foo', 'bar', 'baz'] + var lastSegment = segments.pop(); + // segments = ['foo', 'bar'] (ignore .** segment for future states) + if (lastSegment === '**') + segments.pop(); + if (segments.length) { + if (state.parent) { + throw new Error("States that specify the 'parent:' property should not have a '.' in their name (" + name + ")"); + } + // 'foo.bar' + return segments.join("."); + } + if (!state.parent) + return ""; + return isString(state.parent) ? state.parent : state.parent.name; + }; + StateBuilder.prototype.name = function (state) { + var name = state.name; + if (name.indexOf('.') !== -1 || !state.parent) + return name; + var parentName = isString(state.parent) ? state.parent : state.parent.name; + return parentName ? parentName + "." + name : name; + }; + return StateBuilder; +}()); + +/** @module state */ /** for typedoc */ +var StateMatcher = /** @class */ (function () { + function StateMatcher(_states) { + this._states = _states; + } + StateMatcher.prototype.isRelative = function (stateName) { + stateName = stateName || ""; + return stateName.indexOf(".") === 0 || stateName.indexOf("^") === 0; + }; + StateMatcher.prototype.find = function (stateOrName, base, matchGlob) { + if (matchGlob === void 0) { matchGlob = true; } + if (!stateOrName && stateOrName !== "") + return undefined; + var isStr = isString(stateOrName); + var name = isStr ? stateOrName : stateOrName.name; + if (this.isRelative(name)) + name = this.resolvePath(name, base); + var state = this._states[name]; + if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { + return state; + } + else if (isStr && matchGlob) { + var _states = values(this._states); + var matches = _states.filter(function (state) { + return state.__stateObjectCache.nameGlob && + state.__stateObjectCache.nameGlob.matches(name); + }); + if (matches.length > 1) { + console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; })); + } + return matches[0]; + } + return undefined; + }; + StateMatcher.prototype.resolvePath = function (name, base) { + if (!base) + throw new Error("No reference point given for path '" + name + "'"); + var baseState = this.find(base); + var splitName = name.split("."), i = 0, pathLength = splitName.length, current = baseState; + for (; i < pathLength; i++) { + if (splitName[i] === "" && i === 0) { + current = baseState; + continue; + } + if (splitName[i] === "^") { + if (!current.parent) + throw new Error("Path '" + name + "' not valid for state '" + baseState.name + "'"); + current = current.parent; + continue; + } + break; + } + var relName = splitName.slice(i).join("."); + return current.name + (current.name && relName ? "." : "") + relName; + }; + return StateMatcher; +}()); + +/** @module state */ /** for typedoc */ +/** @internalapi */ +var StateQueueManager = /** @class */ (function () { + function StateQueueManager($registry, $urlRouter, states, builder, listeners) { + this.$registry = $registry; + this.$urlRouter = $urlRouter; + this.states = states; + this.builder = builder; + this.listeners = listeners; + this.queue = []; + this.matcher = $registry.matcher; + } + /** @internalapi */ + StateQueueManager.prototype.dispose = function () { + this.queue = []; + }; + StateQueueManager.prototype.register = function (stateDecl) { + var queue = this.queue; + var state = StateObject.create(stateDecl); + var name = state.name; + if (!isString(name)) + throw new Error("State must have a valid name"); + if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name)) + throw new Error("State '" + name + "' is already defined"); + queue.push(state); + this.flush(); + return state; + }; + StateQueueManager.prototype.flush = function () { + var _this = this; + var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder; + var registered = [], // states that got registered + orphans = [], // states that don't yet have a parent registered + previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered + var getState = function (name) { + return _this.states.hasOwnProperty(name) && _this.states[name]; + }; + while (queue.length > 0) { + var state = queue.shift(); + var name_1 = state.name; + var result = builder.build(state); + var orphanIdx = orphans.indexOf(state); + if (result) { + var existingState = getState(name_1); + if (existingState && existingState.name === name_1) { + throw new Error("State '" + name_1 + "' is already defined"); + } + var existingFutureState = getState(name_1 + ".**"); + if (existingFutureState) { + // Remove future state of the same name + this.$registry.deregister(existingFutureState); + } + states[name_1] = state; + this.attachRoute(state); + if (orphanIdx >= 0) + orphans.splice(orphanIdx, 1); + registered.push(state); + continue; + } + var prev = previousQueueLength[name_1]; + previousQueueLength[name_1] = queue.length; + if (orphanIdx >= 0 && prev === queue.length) { + // Wait until two consecutive iterations where no additional states were dequeued successfully. + // throw new Error(`Cannot register orphaned state '${name}'`); + queue.push(state); + return states; + } + else if (orphanIdx < 0) { + orphans.push(state); + } + queue.push(state); + } + if (registered.length) { + this.listeners.forEach(function (listener) { return listener("registered", registered.map(function (s) { return s.self; })); }); + } + return states; + }; + StateQueueManager.prototype.attachRoute = function (state) { + if (state.abstract || !state.url) + return; + this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state)); + }; + return StateQueueManager; +}()); + +/** + * @coreapi + * @module state + */ /** for typedoc */ +var StateRegistry = /** @class */ (function () { + /** @internalapi */ + function StateRegistry(_router) { + this._router = _router; + this.states = {}; + this.listeners = []; + this.matcher = new StateMatcher(this.states); + this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory); + this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners); + this._registerRoot(); + } + /** @internalapi */ + StateRegistry.prototype._registerRoot = function () { + var rootStateDef = { + name: '', + url: '^', + views: null, + params: { + '#': { value: null, type: 'hash', dynamic: true } + }, + abstract: true + }; + var _root = this._root = this.stateQueue.register(rootStateDef); + _root.navigable = null; + }; + /** @internalapi */ + StateRegistry.prototype.dispose = function () { + var _this = this; + this.stateQueue.dispose(); + this.listeners = []; + this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); }); + }; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + StateRegistry.prototype.onStatesChanged = function (listener) { + this.listeners.push(listener); + return function deregisterListener() { + removeFrom(this.listeners)(listener); + }.bind(this); + }; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + StateRegistry.prototype.root = function () { + return this._root; + }; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + StateRegistry.prototype.register = function (stateDefinition) { + return this.stateQueue.register(stateDefinition); + }; + /** @hidden */ + StateRegistry.prototype._deregisterTree = function (state) { + var _this = this; + var all$$1 = this.get().map(function (s) { return s.$$state(); }); + var getChildren = function (states) { + var children = all$$1.filter(function (s) { return states.indexOf(s.parent) !== -1; }); + return children.length === 0 ? children : children.concat(getChildren(children)); + }; + var children = getChildren([state]); + var deregistered = [state].concat(children).reverse(); + deregistered.forEach(function (state) { + var $ur = _this._router.urlRouter; + // Remove URL rule + $ur.rules().filter(propEq("state", state)).forEach($ur.removeRule.bind($ur)); + // Remove state from registry + delete _this.states[state.name]; + }); + return deregistered; + }; + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + StateRegistry.prototype.deregister = function (stateOrName) { + var _state = this.get(stateOrName); + if (!_state) + throw new Error("Can't deregister state; not found: " + stateOrName); + var deregisteredStates = this._deregisterTree(_state.$$state()); + this.listeners.forEach(function (listener) { return listener("deregistered", deregisteredStates.map(function (s) { return s.self; })); }); + return deregisteredStates; + }; + StateRegistry.prototype.get = function (stateOrName, base) { + var _this = this; + if (arguments.length === 0) + return Object.keys(this.states).map(function (name) { return _this.states[name].self; }); + var found = this.matcher.find(stateOrName, base); + return found && found.self || null; + }; + StateRegistry.prototype.decorator = function (name, func) { + return this.builder.builder(name, func); + }; + return StateRegistry; +}()); + +/** + * @coreapi + * @module url + */ +/** for typedoc */ +/** @hidden */ +function quoteRegExp(string, param) { + var surroundPattern = ['', ''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!param) + return result; + switch (param.squash) { + case false: + surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; + break; + case true: + result = result.replace(/\/$/, ''); + surroundPattern = ['(?:\/(', ')|\/)?']; + break; + default: + surroundPattern = ["(" + param.squash + "|", ')?']; + break; + } + return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1]; +} +/** @hidden */ +var memoizeTo = function (obj, prop$$1, fn) { + return obj[prop$$1] = obj[prop$$1] || fn(); +}; +/** @hidden */ +var splitOnSlash = splitOnDelim('/'); +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +var UrlMatcher = /** @class */ (function () { + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + function UrlMatcher(pattern$$1, paramTypes, paramFactory, config) { + var _this = this; + this.config = config; + /** @hidden */ + this._cache = { path: [this] }; + /** @hidden */ + this._children = []; + /** @hidden */ + this._params = []; + /** @hidden */ + this._segments = []; + /** @hidden */ + this._compiled = []; + this.pattern = pattern$$1; + this.config = defaults(this.config, { + params: {}, + strict: true, + caseInsensitive: false, + paramMap: identity + }); + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, last = 0, m, patterns = []; + var checkParamErrors = function (id) { + if (!UrlMatcher.nameValidator.test(id)) + throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern$$1 + "'"); + if (find(_this._params, propEq('id', id))) + throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern$$1 + "'"); + }; + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + var matchDetails = function (m, isSearch) { + // IE[78] returns '' for unmatched groups instead of null + var id = m[2] || m[3]; + var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\s\\S]*' : null); + var makeRegexpType = function (regexp) { return inherit(paramTypes.type(isSearch ? "query" : "path"), { + pattern: new RegExp(regexp, _this.config.caseInsensitive ? 'i' : undefined) + }); }; + return { + id: id, + regexp: regexp, + cfg: _this.config.params[id], + segment: pattern$$1.substring(last, m.index), + type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp) + }; + }; + var p, segment; + while ((m = placeholder.exec(pattern$$1))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) + break; // we're into the search part + checkParamErrors(p.id); + this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false))); + this._segments.push(p.segment); + patterns.push([p.segment, tail(this._params)]); + last = placeholder.lastIndex; + } + segment = pattern$$1.substring(last); + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + if (i >= 0) { + var search = segment.substring(i); + segment = segment.substring(0, i); + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + checkParamErrors(p.id); + this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true))); + last = placeholder.lastIndex; + // check if ?& + } + } + } + this._segments.push(segment); + this._compiled = patterns.map(function (pattern$$1) { return quoteRegExp.apply(null, pattern$$1); }).concat(quoteRegExp(segment)); + } + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + UrlMatcher.prototype.append = function (url) { + this._children.push(url); + url._cache = { + path: this._cache.path.concat(url), + parent: this, + pattern: null, + }; + return url; + }; + /** @hidden */ + UrlMatcher.prototype.isRoot = function () { + return this._cache.path[0] === this; + }; + /** Returns the input pattern string */ + UrlMatcher.prototype.toString = function () { + return this.pattern; + }; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + UrlMatcher.prototype.exec = function (path, search, hash, options) { + var _this = this; + if (search === void 0) { search = {}; } + if (options === void 0) { options = {}; } + var match = memoizeTo(this._cache, 'pattern', function () { + return new RegExp([ + '^', + unnest(_this._cache.path.map(prop('_compiled'))).join(''), + _this.config.strict === false ? '\/?' : '', + '$' + ].join(''), _this.config.caseInsensitive ? 'i' : undefined); + }).exec(path); + if (!match) + return null; + //options = defaults(options, { isolate: false }); + var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values$$1 = {}; + if (nPathSegments !== match.length - 1) + throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); + function decodePathArray(string) { + var reverseString = function (str) { return str.split("").reverse().join(""); }; + var unquoteDashes = function (str) { return str.replace(/\\-/g, "-"); }; + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = map(split, reverseString); + return map(allReversed, unquoteDashes).reverse(); + } + for (var i = 0; i < nPathSegments; i++) { + var param = pathParams[i]; + var value = match[i + 1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (value && param.array === true) + value = decodePathArray(value); + if (isDefined(value)) + value = param.type.decode(value); + values$$1[param.id] = param.value(value); + } + searchParams.forEach(function (param) { + var value = search[param.id]; + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (isDefined(value)) + value = param.type.decode(value); + values$$1[param.id] = param.value(value); + }); + if (hash) + values$$1["#"] = hash; + return values$$1; + }; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + UrlMatcher.prototype.parameters = function (opts) { + if (opts === void 0) { opts = {}; } + if (opts.inherit === false) + return this._params; + return unnest(this._cache.path.map(function (matcher) { return matcher._params; })); + }; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + UrlMatcher.prototype.parameter = function (id, opts) { + var _this = this; + if (opts === void 0) { opts = {}; } + var findParam = function () { + for (var _i = 0, _a = _this._params; _i < _a.length; _i++) { + var param = _a[_i]; + if (param.id === id) + return param; + } + }; + var parent = this._cache.parent; + return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null; + }; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + UrlMatcher.prototype.validates = function (params) { + var validParamVal = function (param, val$$1) { + return !param || param.validates(val$$1); + }; + params = params || {}; + // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher + var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); }); + return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(allTrueR, true); + }; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + UrlMatcher.prototype.format = function (values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + // Build the full path of UrlMatchers (including all parent UrlMatchers) + var urlMatchers = this._cache.path; + // Extract all the static segments and Params (processed as ParamDetails) + // into an ordered array + var pathSegmentsAndParams = urlMatchers.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .map(function (x) { return isString(x) ? x : getDetails(x); }); + // Extract the query params into a separate array + var queryParams = urlMatchers.map(UrlMatcher.queryParams) + .reduce(unnestR, []) + .map(getDetails); + var isInvalid = function (param) { return param.isValid === false; }; + if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) { + return null; + } + /** + * Given a Param, applies the parameter value, then returns detailed information about it + */ + function getDetails(param) { + // Normalize to typed value + var value = param.value(values$$1[param.id]); + var isValid = param.validates(value); + var isDefaultValue = param.isDefaultValue(value); + // Check if we're in squash mode for the parameter + var squash = isDefaultValue ? param.squash : false; + // Allow the Parameter's Type to encode the value + var encoded = param.type.encode(value); + return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded }; + } + // Build up the path-portion from the list of static segments and parameters + var pathString = pathSegmentsAndParams.reduce(function (acc, x) { + // The element is a static segment (a raw string); just append it + if (isString(x)) + return acc + x; + // Otherwise, it's a ParamDetails. + var squash = x.squash, encoded = x.encoded, param = x.param; + // If squash is === true, try to remove a slash from the path + if (squash === true) + return (acc.match(/\/$/)) ? acc.slice(0, -1) : acc; + // If squash is a string, use the string for the param value + if (isString(squash)) + return acc + squash; + if (squash !== false) + return acc; // ? + if (encoded == null) + return acc; + // If this parameter value is an array, encode the value using encodeDashes + if (isArray(encoded)) + return acc + map(encoded, UrlMatcher.encodeDashes).join("-"); + // If the parameter type is "raw", then do not encodeURIComponent + if (param.raw) + return acc + encoded; + // Encode the value + return acc + encodeURIComponent(encoded); + }, ""); + // Build the query string by applying parameter values (array or regular) + // then mapping to key=value, then flattening and joining using "&" + var queryString = queryParams.map(function (paramDetails) { + var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue; + if (encoded == null || (isDefaultValue && squash !== false)) + return; + if (!isArray(encoded)) + encoded = [encoded]; + if (encoded.length === 0) + return; + if (!param.raw) + encoded = map(encoded, encodeURIComponent); + return encoded.map(function (val$$1) { return param.id + "=" + val$$1; }); + }).filter(identity).reduce(unnestR, []).join("&"); + // Concat the pathstring with the queryString (if exists) and the hashString (if exists) + return pathString + (queryString ? "?" + queryString : "") + (values$$1["#"] ? "#" + values$$1["#"] : ""); + }; + /** @hidden */ + UrlMatcher.encodeDashes = function (str) { + return encodeURIComponent(str).replace(/-/g, function (c) { return "%5C%" + c.charCodeAt(0).toString(16).toUpperCase(); }); + }; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + UrlMatcher.pathSegmentsAndParams = function (matcher) { + var staticSegments = matcher._segments; + var pathParams = matcher._params.filter(function (p) { return p.location === exports.DefType.PATH; }); + return arrayTuples(staticSegments, pathParams.concat(undefined)) + .reduce(unnestR, []) + .filter(function (x) { return x !== "" && isDefined(x); }); + }; + /** @hidden Given a matcher, return an array with the matcher's query params */ + UrlMatcher.queryParams = function (matcher) { + return matcher._params.filter(function (p) { return p.location === exports.DefType.SEARCH; }); + }; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + UrlMatcher.compare = function (a, b) { + /** + * Turn a UrlMatcher and all its parent matchers into an array + * of slash literals '/', string literals, and Param objects + * + * This example matcher matches strings like "/foo/:param/tail": + * var matcher = $umf.compile("/foo").append($umf.compile("/:param")).append($umf.compile("/")).append($umf.compile("tail")); + * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ] + * + * Caches the result as `matcher._cache.segments` + */ + var segments = function (matcher) { + return matcher._cache.segments = matcher._cache.segments || + matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .reduce(joinNeighborsR, []) + .map(function (x) { return isString(x) ? splitOnSlash(x) : x; }) + .reduce(unnestR, []); + }; + /** + * Gets the sort weight for each segment of a UrlMatcher + * + * Caches the result as `matcher._cache.weights` + */ + var weights = function (matcher) { + return matcher._cache.weights = matcher._cache.weights || + segments(matcher).map(function (segment) { + // Sort slashes first, then static strings, the Params + if (segment === '/') + return 1; + if (isString(segment)) + return 2; + if (segment instanceof Param) + return 3; + }); + }; + /** + * Pads shorter array in-place (mutates) + */ + var padArrays = function (l, r, padVal) { + var len = Math.max(l.length, r.length); + while (l.length < len) + l.push(padVal); + while (r.length < len) + r.push(padVal); + }; + var weightsA = weights(a), weightsB = weights(b); + padArrays(weightsA, weightsB, 0); + var cmp, i, pairs$$1 = arrayTuples(weightsA, weightsB); + for (i = 0; i < pairs$$1.length; i++) { + cmp = pairs$$1[i][0] - pairs$$1[i][1]; + if (cmp !== 0) + return cmp; + } + return 0; + }; + /** @hidden */ + UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/; + return UrlMatcher; +}()); + +/** + * @internalapi + * @module url + */ /** for typedoc */ +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +var UrlMatcherFactory = /** @class */ (function () { + function UrlMatcherFactory() { + var _this = this; + /** @hidden */ this.paramTypes = new ParamTypes(); + /** @hidden */ this._isCaseInsensitive = false; + /** @hidden */ this._isStrictMode = true; + /** @hidden */ this._defaultSquashPolicy = false; + /** @hidden */ + this._getConfig = function (config) { + return extend({ strict: _this._isStrictMode, caseInsensitive: _this._isCaseInsensitive }, config); + }; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + this.paramFactory = { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig: function (id, type, config) { + return new Param(id, type, config, exports.DefType.CONFIG, _this); + }, + /** Creates a new [[Param]] from a url PATH */ + fromPath: function (id, type, config) { + return new Param(id, type, config, exports.DefType.PATH, _this); + }, + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch: function (id, type, config) { + return new Param(id, type, config, exports.DefType.SEARCH, _this); + }, + }; + extend(this, { UrlMatcher: UrlMatcher, Param: Param }); + } + /** @inheritdoc */ + UrlMatcherFactory.prototype.caseInsensitive = function (value) { + return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.strictMode = function (value) { + return this._isStrictMode = isDefined(value) ? value : this._isStrictMode; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.defaultSquashPolicy = function (value) { + if (isDefined(value) && value !== true && value !== false && !isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy; + }; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + UrlMatcherFactory.prototype.compile = function (pattern, config) { + return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config)); + }; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + UrlMatcherFactory.prototype.isMatcher = function (object) { + // TODO: typeof? + if (!isObject(object)) + return false; + var result = true; + forEach(UrlMatcher.prototype, function (val, name) { + if (isFunction(val)) + result = result && (isDefined(object[name]) && isFunction(object[name])); + }); + return result; + }; + + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + UrlMatcherFactory.prototype.type = function (name, definition, definitionFn) { + var type = this.paramTypes.type(name, definition, definitionFn); + return !isDefined(definition) ? type : this; + }; + + /** @hidden */ + UrlMatcherFactory.prototype.$get = function () { + this.paramTypes.enqueue = false; + this.paramTypes._flushTypeQueue(); + return this; + }; + + /** @internalapi */ + UrlMatcherFactory.prototype.dispose = function () { + this.paramTypes.dispose(); + }; + return UrlMatcherFactory; +}()); + +/** + * @coreapi + * @module url + */ /** */ +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +var UrlRuleFactory = /** @class */ (function () { + function UrlRuleFactory(router) { + this.router = router; + } + UrlRuleFactory.prototype.compile = function (str) { + return this.router.urlMatcherFactory.compile(str); + }; + UrlRuleFactory.prototype.create = function (what, handler) { + var _this = this; + var makeRule = pattern([ + [isString, function (_what) { return makeRule(_this.compile(_what)); }], + [is(UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }], + [isState, function (_what) { return _this.fromState(_what, _this.router); }], + [is(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }], + [isFunction, function (_what) { return new BaseUrlRule(_what, handler); }], + ]); + var rule = makeRule(what); + if (!rule) + throw new Error("invalid 'what' in when()"); + return rule; + }; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) { + var _handler = handler; + if (isString(handler)) + handler = this.router.urlMatcherFactory.compile(handler); + if (is(UrlMatcher)(handler)) + _handler = function (match) { return handler.format(match); }; + function match(url) { + var match = urlMatcher.exec(url.path, url.search, url.hash); + return urlMatcher.validates(match) && match; + } + // Prioritize URLs, lowest to highest: + // - Some optional URL parameters, but none matched + // - No optional parameters in URL + // - Some optional parameters, some matched + // - Some optional parameters, all matched + function matchPriority(params) { + var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; }); + if (!optional.length) + return 0.000001; + var matched = optional.filter(function (param) { return params[param.id]; }); + return matched.length / optional.length; + } + var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: "URLMATCHER" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + UrlRuleFactory.prototype.fromState = function (state, router) { + /** + * Handles match by transitioning to matched state + * + * First checks if the router should start a new transition. + * A new transition is not required if the current state's URL + * and the new URL are already identical + */ + var handler = function (match) { + var $state = router.stateService; + var globals = router.globals; + if ($state.href(state, match) !== $state.href(globals.current, globals.params)) { + $state.transitionTo(state, match, { inherit: true, source: "url" }); + } + }; + var details = { state: state, type: "STATE" }; + return extend(this.fromUrlMatcher(state.url, handler), details); + }; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) { + if (regexp.global || regexp.sticky) + throw new Error("Rule RegExp must not be global or sticky"); + /** + * If handler is a string, the url will be replaced by the string. + * If the string has any String.replace() style variables in it (like `$2`), + * they will be replaced by the captures from [[match]] + */ + var redirectUrlTo = function (match) { + // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern + return handler.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + }; + var _handler = isString(handler) ? redirectUrlTo : handler; + var match = function (url) { + return regexp.exec(url.path); + }; + var details = { regexp: regexp, type: "REGEXP" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + UrlRuleFactory.isUrlRule = function (obj) { + return obj && ['type', 'match', 'handler'].every(function (key) { return isDefined(obj[key]); }); + }; + return UrlRuleFactory; +}()); +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +var BaseUrlRule = /** @class */ (function () { + function BaseUrlRule(match, handler) { + var _this = this; + this.match = match; + this.type = "RAW"; + this.matchPriority = function (match) { return 0 - _this.$id; }; + this.handler = handler || identity; + } + return BaseUrlRule; +}()); + +/** + * @internalapi + * @module url + */ +/** for typedoc */ +/** @hidden */ +function appendBasePath(url, isHtml5, absolute, baseHref) { + if (baseHref === '/') + return url; + if (isHtml5) + return stripFile(baseHref) + url; + if (absolute) + return baseHref.slice(1) + url; + return url; +} +/** @hidden */ +var prioritySort = function (a, b) { + return (b.priority || 0) - (a.priority || 0); +}; +/** @hidden */ +var typeSort = function (a, b) { + var weights = { "STATE": 4, "URLMATCHER": 4, "REGEXP": 3, "RAW": 2, "OTHER": 1 }; + return (weights[a.type] || 0) - (weights[b.type] || 0); +}; +/** @hidden */ +var urlMatcherSort = function (a, b) { + return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher); +}; +/** @hidden */ +var idSort = function (a, b) { + // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL + var useMatchPriority = { STATE: true, URLMATCHER: true }; + var equal = useMatchPriority[a.type] && useMatchPriority[b.type]; + return equal ? 0 : (a.$id || 0) - (b.$id || 0); +}; +/** + * Default rule priority sorting function. + * + * Sorts rules by: + * + * - Explicit priority (set rule priority using [[UrlRulesApi.when]]) + * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1) + * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule. + * - Rule registration order (for rule types other than STATE and URLMATCHER) + * - Equally sorted State and UrlMatcher rules will each match the URL. + * Then, the *best* match is chosen based on how many parameter values were matched. + * + * @coreapi + */ +var defaultRuleSortFn; +defaultRuleSortFn = function (a, b) { + var cmp = prioritySort(a, b); + if (cmp !== 0) + return cmp; + cmp = typeSort(a, b); + if (cmp !== 0) + return cmp; + cmp = urlMatcherSort(a, b); + if (cmp !== 0) + return cmp; + return idSort(a, b); +}; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +var UrlRouter = /** @class */ (function () { + /** @hidden */ + function UrlRouter(router) { + /** @hidden */ this._sortFn = defaultRuleSortFn; + /** @hidden */ this._rules = []; + /** @hidden */ this.interceptDeferred = false; + /** @hidden */ this._id = 0; + /** @hidden */ this._sorted = false; + this._router = router; + this.urlRuleFactory = new UrlRuleFactory(router); + createProxyFunctions(val(UrlRouter.prototype), this, val(this)); + } + /** @internalapi */ + UrlRouter.prototype.dispose = function () { + this.listen(false); + this._rules = []; + delete this._otherwiseFn; + }; + /** @inheritdoc */ + UrlRouter.prototype.sort = function (compareFn) { + this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn); + this._sorted = true; + }; + UrlRouter.prototype.ensureSorted = function () { + this._sorted || this.sort(); + }; + UrlRouter.prototype.stableSort = function (arr, compareFn) { + var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); }); + arrOfWrapper.sort(function (wrapperA, wrapperB) { + var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem); + return cmpDiff === 0 + ? wrapperA.idx - wrapperB.idx + : cmpDiff; + }); + return arrOfWrapper.map(function (wrapper) { return wrapper.elem; }); + }; + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + UrlRouter.prototype.match = function (url) { + var _this = this; + this.ensureSorted(); + url = extend({ path: '', search: {}, hash: '' }, url); + var rules = this.rules(); + if (this._otherwiseFn) + rules.push(this._otherwiseFn); + // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined + var checkRule = function (rule) { + var match = rule.match(url, _this._router); + return match && { match: match, rule: rule, weight: rule.matchPriority(match) }; + }; + // The rules are pre-sorted. + // - Find the first matching rule. + // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`. + // - Choose the rule with the highest match weight. + var best; + for (var i = 0; i < rules.length; i++) { + // Stop when there is a 'best' rule and the next rule sorts differently than it. + if (best && this._sortFn(rules[i], best.rule) !== 0) + break; + var current = checkRule(rules[i]); + // Pick the best MatchResult + best = (!best || current && current.weight > best.weight) ? current : best; + } + return best; + }; + /** @inheritdoc */ + UrlRouter.prototype.sync = function (evt) { + if (evt && evt.defaultPrevented) + return; + var router = this._router, $url = router.urlService, $state = router.stateService; + var url = { + path: $url.path(), search: $url.search(), hash: $url.hash(), + }; + var best = this.match(url); + var applyResult = pattern([ + [isString, function (newurl) { return $url.url(newurl, true); }], + [TargetState.isDef, function (def) { return $state.go(def.state, def.params, def.options); }], + [is(TargetState), function (target) { return $state.go(target.state(), target.params(), target.options()); }], + ]); + applyResult(best && best.rule.handler(best.match, url, router)); + }; + /** @inheritdoc */ + UrlRouter.prototype.listen = function (enabled) { + var _this = this; + if (enabled === false) { + this._stopFn && this._stopFn(); + delete this._stopFn; + } + else { + return this._stopFn = this._stopFn || this._router.urlService.onChange(function (evt) { return _this.sync(evt); }); + } + }; + /** + * Internal API. + * @internalapi + */ + UrlRouter.prototype.update = function (read) { + var $url = this._router.locationService; + if (read) { + this.location = $url.path(); + return; + } + if ($url.path() === this.location) + return; + $url.url(this.location, true); + }; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + UrlRouter.prototype.push = function (urlMatcher, params, options) { + var replace = options && !!options.replace; + this._router.urlService.url(urlMatcher.format(params || {}), replace); + }; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + UrlRouter.prototype.href = function (urlMatcher, params, options) { + var url = urlMatcher.format(params); + if (url == null) + return null; + options = options || { absolute: false }; + var cfg = this._router.urlService.config; + var isHtml5 = cfg.html5Mode(); + if (!isHtml5 && url !== null) { + url = "#" + cfg.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref()); + if (!options.absolute || !url) { + return url; + } + var slash = (!isHtml5 && url ? '/' : ''), port = cfg.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + return [cfg.protocol(), '://', cfg.host(), port, slash, url].join(''); + }; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + UrlRouter.prototype.rule = function (rule) { + var _this = this; + if (!UrlRuleFactory.isUrlRule(rule)) + throw new Error("invalid rule"); + rule.$id = this._id++; + rule.priority = rule.priority || 0; + this._rules.push(rule); + this._sorted = false; + return function () { return _this.removeRule(rule); }; + }; + /** @inheritdoc */ + UrlRouter.prototype.removeRule = function (rule) { + removeFrom(this._rules, rule); + }; + /** @inheritdoc */ + UrlRouter.prototype.rules = function () { + this.ensureSorted(); + return this._rules.slice(); + }; + /** @inheritdoc */ + UrlRouter.prototype.otherwise = function (handler) { + var handlerFn = getHandlerFn(handler); + this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn); + this._sorted = false; + }; + + /** @inheritdoc */ + UrlRouter.prototype.initial = function (handler) { + var handlerFn = getHandlerFn(handler); + var matchFn = function (urlParts, router) { + return router.globals.transitionHistory.size() === 0 && !!/^\/?$/.exec(urlParts.path); + }; + this.rule(this.urlRuleFactory.create(matchFn, handlerFn)); + }; + + /** @inheritdoc */ + UrlRouter.prototype.when = function (matcher, handler, options) { + var rule = this.urlRuleFactory.create(matcher, handler); + if (isDefined(options && options.priority)) + rule.priority = options.priority; + this.rule(rule); + return rule; + }; + + /** @inheritdoc */ + UrlRouter.prototype.deferIntercept = function (defer) { + if (defer === undefined) + defer = true; + this.interceptDeferred = defer; + }; + + return UrlRouter; +}()); +function getHandlerFn(handler) { + if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) { + throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property"); + } + return isFunction(handler) ? handler : val(handler); +} + +/** + * @coreapi + * @module view + */ /** for typedoc */ +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +var ViewService = /** @class */ (function () { + function ViewService() { + var _this = this; + this._uiViews = []; + this._viewConfigs = []; + this._viewConfigFactories = {}; + this._pluginapi = { + _rootViewContext: this._rootViewContext.bind(this), + _viewConfigFactory: this._viewConfigFactory.bind(this), + _registeredUIViews: function () { return _this._uiViews; }, + _activeViewConfigs: function () { return _this._viewConfigs; }, + }; + } + ViewService.prototype._rootViewContext = function (context) { + return this._rootContext = context || this._rootContext; + }; + + ViewService.prototype._viewConfigFactory = function (viewType, factory) { + this._viewConfigFactories[viewType] = factory; + }; + ViewService.prototype.createViewConfig = function (path, decl) { + var cfgFactory = this._viewConfigFactories[decl.$type]; + if (!cfgFactory) + throw new Error("ViewService: No view config factory registered for type " + decl.$type); + var cfgs = cfgFactory(path, decl); + return isArray(cfgs) ? cfgs : [cfgs]; + }; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + ViewService.prototype.deactivateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("<- Removing", viewConfig); + removeFrom(this._viewConfigs, viewConfig); + }; + ViewService.prototype.activateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("-> Registering", viewConfig); + this._viewConfigs.push(viewConfig); + }; + ViewService.prototype.sync = function () { + var _this = this; + var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {}); + // Return a weighted depth value for a uiView. + // The depth is the nesting depth of ui-views (based on FQN; times 10,000) + // plus the depth of the state that is populating the uiView + function uiViewDepth(uiView) { + var stateDepth = function (context) { + return context && context.parent ? stateDepth(context.parent) + 1 : 1; + }; + return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext); + } + // Return the ViewConfig's context's depth in the context tree. + function viewConfigDepth(config) { + var context = config.viewDecl.$context, count = 0; + while (++count && context.parent) + context = context.parent; + return count; + } + // Given a depth function, returns a compare function which can return either ascending or descending order + var depthCompare = curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); }); + var matchingConfigPair = function (uiView) { + var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView)); + if (matchingConfigs.length > 1) { + // This is OK. Child states can target a ui-view that the parent state also targets (the child wins) + // Sort by depth and return the match from the deepest child + // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs); + matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending + } + return [uiView, matchingConfigs[0]]; + }; + var configureUIView = function (_a) { + var uiView = _a[0], viewConfig = _a[1]; + // If a parent ui-view is reconfigured, it could destroy child ui-views. + // Before configuring a child ui-view, make sure it's still in the active uiViews array. + if (_this._uiViews.indexOf(uiView) !== -1) + uiView.configUpdated(viewConfig); + }; + // Sort views by FQN and state depth. Process uiviews nearest the root first. + var pairs$$1 = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair); + trace.traceViewSync(pairs$$1); + pairs$$1.forEach(configureUIView); + }; + + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + ViewService.prototype.registerUIView = function (uiView) { + trace.traceViewServiceUIViewEvent("-> Registering", uiView); + var uiViews = this._uiViews; + var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; }; + if (uiViews.filter(fqnAndTypeMatches).length) + trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:", uiView); + uiViews.push(uiView); + this.sync(); + return function () { + var idx = uiViews.indexOf(uiView); + if (idx === -1) { + trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView", uiView); + return; + } + trace.traceViewServiceUIViewEvent("<- Deregistering", uiView); + removeFrom(uiViews)(uiView); + }; + }; + + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.available = function () { + return this._uiViews.map(prop("fqn")); + }; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.active = function () { + return this._uiViews.filter(prop("$config")).map(prop("name")); + }; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + ViewService.normalizeUIViewTarget = function (context, rawViewName) { + if (rawViewName === void 0) { rawViewName = ""; } + // TODO: Validate incoming view name with a regexp to allow: + // ex: "view.name@foo.bar" , "^.^.view.name" , "view.name@^.^" , "" , + // "@" , "$default@^" , "!$default.$default" , "!foo.bar" + var viewAtContext = rawViewName.split("@"); + var uiViewName = viewAtContext[0] || "$default"; // default to unnamed view + var uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : "^"; // default to parent context + // Handle relative view-name sugar syntax. + // Matches rawViewName "^.^.^.foo.bar" into array: ["^.^.^.foo.bar", "^.^.^", "foo.bar"], + var relativeViewNameSugar = /^(\^(?:\.\^)*)\.(.*$)/.exec(uiViewName); + if (relativeViewNameSugar) { + // Clobbers existing contextAnchor (rawViewName validation will fix this) + uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to "^.^.^" + uiViewName = relativeViewNameSugar[2]; // set view-name to "foo.bar" + } + if (uiViewName.charAt(0) === '!') { + uiViewName = uiViewName.substr(1); + uiViewContextAnchor = ""; // target absolutely from root + } + // handle parent relative targeting "^.^.^" + var relativeMatch = /^(\^(?:\.\^)*)$/; + if (relativeMatch.exec(uiViewContextAnchor)) { + var anchor = uiViewContextAnchor.split(".").reduce((function (anchor, x) { return anchor.parent; }), context); + uiViewContextAnchor = anchor.name; + } + else if (uiViewContextAnchor === '.') { + uiViewContextAnchor = context.name; + } + return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor }; + }; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) { + // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc + if (uiView.$type !== viewConfig.viewDecl.$type) + return false; + // Split names apart from both viewConfig and uiView into segments + var vc = viewConfig.viewDecl; + var vcSegments = vc.$uiViewName.split("."); + var uivSegments = uiView.fqn.split("."); + // Check if the tails of the segment arrays match. ex, these arrays' tails match: + // vc: ["foo", "bar"], uiv fqn: ["$default", "foo", "bar"] + if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length))) + return false; + // Now check if the fqn ending at the first segment of the viewConfig matches the context: + // ["$default", "foo"].join(".") == "$default.foo", does the ui-view $default.foo context match? + var negOffset = (1 - vcSegments.length) || undefined; + var fqnToFirstSegment = uivSegments.slice(0, negOffset).join("."); + var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext; + return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name); + }; }; + return ViewService; +}()); + +/** + * @coreapi + * @module core + */ /** */ +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +var UIRouterGlobals = /** @class */ (function () { + function UIRouterGlobals() { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + this.params = new StateParams(); + /** @internalapi */ + this.lastStartedTransitionId = -1; + /** @internalapi */ + this.transitionHistory = new Queue([], 1); + /** @internalapi */ + this.successfulTransitions = new Queue([], 1); + } + UIRouterGlobals.prototype.dispose = function () { + this.transitionHistory.clear(); + this.successfulTransitions.clear(); + this.transition = null; + }; + return UIRouterGlobals; +}()); + +/** + * @coreapi + * @module url + */ /** */ +/** @hidden */ +var makeStub = function (keys) { + return keys.reduce(function (acc, key) { return (acc[key] = notImplemented(key), acc); }, { dispose: noop$1 }); +}; +/** @hidden */ var locationServicesFns = ["url", "path", "search", "hash", "onChange"]; +/** @hidden */ var locationConfigFns = ["port", "protocol", "host", "baseHref", "html5Mode", "hashPrefix"]; +/** @hidden */ var umfFns = ["type", "caseInsensitive", "strictMode", "defaultSquashPolicy"]; +/** @hidden */ var rulesFns = ["sort", "when", "initial", "otherwise", "rules", "rule", "removeRule"]; +/** @hidden */ var syncFns = ["deferIntercept", "listen", "sync", "match"]; +/** + * API for URL management + */ +var UrlService = /** @class */ (function () { + /** @hidden */ + function UrlService(router, lateBind) { + if (lateBind === void 0) { lateBind = true; } + this.router = router; + this.rules = {}; + this.config = {}; + // proxy function calls from UrlService to the LocationService/LocationConfig + var locationServices = function () { return router.locationService; }; + createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind); + var locationConfig = function () { return router.locationConfig; }; + createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind); + var umf = function () { return router.urlMatcherFactory; }; + createProxyFunctions(umf, this.config, umf, umfFns); + var urlRouter = function () { return router.urlRouter; }; + createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns); + createProxyFunctions(urlRouter, this, urlRouter, syncFns); + } + UrlService.prototype.url = function (newurl, replace, state) { return; }; + + /** @inheritdoc */ + UrlService.prototype.path = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.search = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.hash = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.onChange = function (callback) { return; }; + + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + UrlService.prototype.parts = function () { + return { path: this.path(), search: this.search(), hash: this.hash() }; + }; + UrlService.prototype.dispose = function () { }; + /** @inheritdoc */ + UrlService.prototype.sync = function (evt) { return; }; + /** @inheritdoc */ + UrlService.prototype.listen = function (enabled) { return; }; + + /** @inheritdoc */ + UrlService.prototype.deferIntercept = function (defer) { return; }; + /** @inheritdoc */ + UrlService.prototype.match = function (urlParts) { return; }; + /** @hidden */ + UrlService.locationServiceStub = makeStub(locationServicesFns); + /** @hidden */ + UrlService.locationConfigStub = makeStub(locationConfigFns); + return UrlService; +}()); + +/** + * @coreapi + * @module core + */ /** */ +/** @hidden */ +var _routerInstance = 0; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +var UIRouter = /** @class */ (function () { + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + function UIRouter(locationService, locationConfig) { + if (locationService === void 0) { locationService = UrlService.locationServiceStub; } + if (locationConfig === void 0) { locationConfig = UrlService.locationConfigStub; } + this.locationService = locationService; + this.locationConfig = locationConfig; + /** @hidden */ this.$id = _routerInstance++; + /** @hidden */ this._disposed = false; + /** @hidden */ this._disposables = []; + /** Provides trace information to the console */ + this.trace = trace; + /** Provides services related to ui-view synchronization */ + this.viewService = new ViewService(); + /** Provides services related to Transitions */ + this.transitionService = new TransitionService(this); + /** Global router state */ + this.globals = new UIRouterGlobals(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlMatcherFactory = new UrlMatcherFactory(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlRouter = new UrlRouter(this); + /** Provides a registry for states, and related registration services */ + this.stateRegistry = new StateRegistry(this); + /** Provides services related to states */ + this.stateService = new StateService(this); + /** Provides services related to the URL */ + this.urlService = new UrlService(this); + /** @hidden */ + 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(locationService); + this.disposable(locationConfig); + } + /** Registers an object to be notified when the router is disposed */ + UIRouter.prototype.disposable = function (disposable) { + this._disposables.push(disposable); + }; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + UIRouter.prototype.dispose = function (disposable) { + var _this = this; + if (disposable && isFunction(disposable.dispose)) { + disposable.dispose(this); + return undefined; + } + this._disposed = true; + this._disposables.slice().forEach(function (d) { + try { + typeof d.dispose === 'function' && d.dispose(_this); + removeFrom(_this._disposables, d); + } + catch (ignored) { } + }); + }; + /** + * Adds a plugin to UI-Router + * + * This method adds a UI-Router Plugin. + * A plugin can enhance or change UI-Router behavior using any public API. + * + * #### Example: + * ```js + * import { MyCoolPlugin } from "ui-router-cool-plugin"; + * + * var plugin = router.addPlugin(MyCoolPlugin); + * ``` + * + * ### Plugin authoring + * + * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object. + * + * The plugin can implement its functionality using any of the public APIs of [[UIRouter]]. + * For example, it may configure router options or add a Transition Hook. + * + * The plugin can then be published as a separate module. + * + * #### Example: + * ```js + * export class MyAuthPlugin implements UIRouterPlugin { + * constructor(router: UIRouter, options: any) { + * this.name = "MyAuthPlugin"; + * let $transitions = router.transitionService; + * let $state = router.stateService; + * + * let authCriteria = { + * to: (state) => state.data && state.data.requiresAuth + * }; + * + * function authHook(transition: Transition) { + * let authService = transition.injector().get('AuthService'); + * if (!authService.isAuthenticated()) { + * return $state.target('login'); + * } + * } + * + * $transitions.onStart(authCriteria, authHook); + * } + * } + * ``` + * + * @param plugin one of: + * - a plugin class which implements [[UIRouterPlugin]] + * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance + * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance + * @param options options to pass to the plugin class/factory + * @returns the registered plugin instance + */ + UIRouter.prototype.plugin = function (plugin, options) { + if (options === void 0) { options = {}; } + var pluginInstance = new plugin(this, options); + if (!pluginInstance.name) + throw new Error("Required property `name` missing on plugin: " + pluginInstance); + this._disposables.push(pluginInstance); + return this._plugins[pluginInstance.name] = pluginInstance; + }; + UIRouter.prototype.getPlugin = function (pluginName) { + return pluginName ? this._plugins[pluginName] : values(this._plugins); + }; + return UIRouter; +}()); + +/** @module hooks */ /** */ +function addCoreResolvables(trans) { + trans.addResolvable({ token: UIRouter, deps: [], resolveFn: function () { return trans.router; }, data: trans.router }, ""); + trans.addResolvable({ token: Transition, deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$transition$', deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: function () { return trans.params(); }, data: trans.params() }, ""); + trans.entering().forEach(function (state) { + trans.addResolvable({ token: '$state$', deps: [], resolveFn: function () { return state; }, data: state }, state); + }); +} +var registerAddCoreResolvables = function (transitionService) { + return transitionService.onCreate({}, addCoreResolvables); +}; + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that redirects to a different state or params + * + * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);` + * + * See [[StateDeclaration.redirectTo]] + */ +var redirectToHook = function (trans) { + var redirect = trans.to().redirectTo; + if (!redirect) + return; + var $state = trans.router.stateService; + function handleResult(result) { + if (!result) + return; + if (result instanceof TargetState) + return result; + if (isString(result)) + return $state.target(result, trans.params(), trans.options()); + if (result['state'] || result['params']) + return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options()); + } + if (isFunction(redirect)) { + return services.$q.when(redirect(trans)).then(handleResult); + } + return handleResult(redirect); +}; +var registerRedirectToHook = function (transitionService) { + return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook); +}; + +/** + * A factory which creates an onEnter, onExit or onRetain transition hook function + * + * The returned function invokes the (for instance) state.onEnter hook when the + * state is being entered. + * + * @hidden + */ +function makeEnterExitRetainHook(hookName) { + return function (transition, state) { + var _state = state.$$state(); + var hookFn = _state[hookName]; + return hookFn(transition, state); + }; +} +/** + * The [[TransitionStateHookFn]] for onExit + * + * When the state is being exited, the state's .onExit function is invoked. + * + * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);` + * + * See: [[IHookRegistry.onExit]] + */ +var onExitHook = makeEnterExitRetainHook('onExit'); +var registerOnExitHook = function (transitionService) { + return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook); +}; +/** + * The [[TransitionStateHookFn]] for onRetain + * + * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked. + * + * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);` + * + * See: [[IHookRegistry.onRetain]] + */ +var onRetainHook = makeEnterExitRetainHook('onRetain'); +var registerOnRetainHook = function (transitionService) { + return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook); +}; +/** + * The [[TransitionStateHookFn]] for onEnter + * + * When the state is being entered, the state's .onEnter function is invoked. + * + * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);` + * + * See: [[IHookRegistry.onEnter]] + */ +var onEnterHook = makeEnterExitRetainHook('onEnter'); +var registerOnEnterHook = function (transitionService) { + return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook); +}; + +/** @module hooks */ +/** for typedoc */ +/** + * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path + * + * Registered using `transitionService.onStart({}, eagerResolvePath);` + * + * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var eagerResolvePath = function (trans) { + return new ResolveContext(trans.treeChanges().to) + .resolvePath("EAGER", trans) + .then(noop$1); +}; +var registerEagerResolvePath = function (transitionService) { + return transitionService.onStart({}, eagerResolvePath, { priority: 1000 }); +}; +/** + * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path + * + * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);` + * + * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var lazyResolveState = function (trans, state) { + return new ResolveContext(trans.treeChanges().to) + .subContext(state.$$state()) + .resolvePath("LAZY", trans) + .then(noop$1); +}; +var registerLazyResolveState = function (transitionService) { + return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: 1000 }); +}; + +/** @module hooks */ /** for typedoc */ +/** + * A [[TransitionHookFn]] which waits for the views to load + * + * Registered using `transitionService.onStart({}, loadEnteringViews);` + * + * Allows the views to do async work in [[ViewConfig.load]] before the transition continues. + * In angular 1, this includes loading the templates. + */ +var loadEnteringViews = function (transition) { + var $q = services.$q; + var enteringViews = transition.views("entering"); + if (!enteringViews.length) + return; + return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop$1); +}; +var registerLoadEnteringViews = function (transitionService) { + return transitionService.onFinish({}, loadEnteringViews); +}; +/** + * A [[TransitionHookFn]] which activates the new views when a transition is successful. + * + * Registered using `transitionService.onSuccess({}, activateViews);` + * + * After a transition is complete, this hook deactivates the old views from the previous state, + * and activates the new views from the destination state. + * + * See [[ViewService]] + */ +var activateViews = function (transition) { + var enteringViews = transition.views("entering"); + var exitingViews = transition.views("exiting"); + if (!enteringViews.length && !exitingViews.length) + return; + var $view = transition.router.viewService; + exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); }); + enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); }); + $view.sync(); +}; +var registerActivateViews = function (transitionService) { + return transitionService.onSuccess({}, activateViews); +}; + +/** + * A [[TransitionHookFn]] which updates global UI-Router state + * + * Registered using `transitionService.onBefore({}, updateGlobalState);` + * + * Before a [[Transition]] starts, updates the global value of "the current transition" ([[Globals.transition]]). + * After a successful [[Transition]], updates the global values of "the current state" + * ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]). + * + * See also the deprecated properties: + * [[StateService.transition]], [[StateService.current]], [[StateService.params]] + */ +var updateGlobalState = function (trans) { + var globals = trans.router.globals; + var transitionSuccessful = function () { + globals.successfulTransitions.enqueue(trans); + globals.$current = trans.$to(); + globals.current = globals.$current.self; + copy(trans.params(), globals.params); + }; + var clearCurrentTransition = function () { + // Do not clear globals.transition if a different transition has started in the meantime + if (globals.transition === trans) + globals.transition = null; + }; + trans.onSuccess({}, transitionSuccessful, { priority: 10000 }); + trans.promise.then(clearCurrentTransition, clearCurrentTransition); +}; +var registerUpdateGlobalState = function (transitionService) { + return transitionService.onCreate({}, updateGlobalState); +}; + +/** + * A [[TransitionHookFn]] which updates the URL after a successful transition + * + * Registered using `transitionService.onSuccess({}, updateUrl);` + */ +var updateUrl = function (transition) { + var options = transition.options(); + var $state = transition.router.stateService; + var $urlRouter = transition.router.urlRouter; + // Dont update the url in these situations: + // The transition was triggered by a URL sync (options.source === 'url') + // The user doesn't want the url to update (options.location === false) + // The destination state, and all parents have no navigable url + if (options.source !== 'url' && options.location && $state.$current.navigable) { + var urlOptions = { replace: options.location === 'replace' }; + $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions); + } + $urlRouter.update(true); +}; +var registerUpdateUrl = function (transitionService) { + return transitionService.onSuccess({}, updateUrl, { priority: 9999 }); +}; + +/** + * A [[TransitionHookFn]] that performs lazy loading + * + * When entering a state "abc" which has a `lazyLoad` function defined: + * - Invoke the `lazyLoad` function (unless it is already in process) + * - Flag the hook function as "in process" + * - The function should return a promise (that resolves when lazy loading is complete) + * - Wait for the promise to settle + * - If the promise resolves to a [[LazyLoadResult]], then register those states + * - Flag the hook function as "not in process" + * - If the hook was successful + * - Remove the `lazyLoad` function from the state declaration + * - If all the hooks were successful + * - Retry the transition (by returning a TargetState) + * + * ``` + * .state('abc', { + * component: 'fooComponent', + * lazyLoad: () => System.import('./fooComponent') + * }); + * ``` + * + * See [[StateDeclaration.lazyLoad]] + */ +var lazyLoadHook = function (transition) { + var router = transition.router; + function retryTransition() { + if (transition.originalTransition().options().source !== 'url') { + // The original transition was not triggered via url sync + // The lazy state should be loaded now, so re-try the original transition + var orig = transition.targetState(); + return router.stateService.target(orig.identifier(), orig.params(), orig.options()); + } + // The original transition was triggered via url sync + // Run the URL rules and find the best match + var $url = router.urlService; + var result = $url.match($url.parts()); + var rule = result && result.rule; + // If the best match is a state, redirect the transition (instead + // of calling sync() which supersedes the current transition) + if (rule && rule.type === "STATE") { + var state = rule.state; + var params = result.match; + return router.stateService.target(state, params, transition.options()); + } + // No matching state found, so let .sync() choose the best non-state match/otherwise + router.urlService.sync(); + } + var promises = transition.entering() + .filter(function (state) { return !!state.$$state().lazyLoad; }) + .map(function (state) { return lazyLoadState(transition, state); }); + return services.$q.all(promises).then(retryTransition); +}; +var registerLazyLoadHook = function (transitionService) { + return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook); +}; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +function lazyLoadState(transition, state) { + var lazyLoadFn = state.$$state().lazyLoad; + // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked + var promise = lazyLoadFn['_promise']; + if (!promise) { + var success = function (result) { + delete state.lazyLoad; + delete state.$$state().lazyLoad; + delete lazyLoadFn['_promise']; + return result; + }; + var error = function (err) { + delete lazyLoadFn['_promise']; + return services.$q.reject(err); + }; + promise = lazyLoadFn['_promise'] = + services.$q.when(lazyLoadFn(transition, state)) + .then(updateStateRegistry) + .then(success, error); + } + /** Register any lazy loaded state definitions */ + function updateStateRegistry(result) { + if (result && Array.isArray(result.states)) { + result.states.forEach(function (state) { return transition.router.stateRegistry.register(state); }); + } + return result; + } + return promise; +} + +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +var TransitionEventType = /** @class */ (function () { + function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + this.name = name; + this.hookPhase = hookPhase; + this.hookOrder = hookOrder; + this.criteriaMatchPath = criteriaMatchPath; + this.reverseSort = reverseSort; + this.getResultHandler = getResultHandler; + this.getErrorHandler = getErrorHandler; + this.synchronous = synchronous; + } + return TransitionEventType; +}()); + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that skips a transition if it should be ignored + * + * This hook is invoked at the end of the onBefore phase. + * + * If the transition should be ignored (because no parameter or states changed) + * then the transition is ignored and not processed. + */ +function ignoredHook(trans) { + var ignoredReason = trans._ignoredReason(); + if (!ignoredReason) + return; + trace.traceTransitionIgnored(trans); + var pending = trans.router.globals.transition; + // The user clicked a link going back to the *current state* ('A') + // However, there is also a pending transition in flight (to 'B') + // Abort the transition to 'B' because the user now wants to be back at 'A'. + if (ignoredReason === 'SameAsCurrent' && pending) { + pending.abort(); + } + return Rejection.ignored().toPromise(); +} +var registerIgnoredTransitionHook = function (transitionService) { + return transitionService.onBefore({}, ignoredHook, { priority: -9999 }); +}; + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that rejects the Transition if it is invalid + * + * This hook is invoked at the end of the onBefore phase. + * If the transition is invalid (for example, param values do not validate) + * then the transition is rejected. + */ +function invalidTransitionHook(trans) { + if (!trans.valid()) { + throw new Error(trans.error()); + } +} +var registerInvalidTransitionHook = function (transitionService) { + return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 }); +}; + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +var defaultTransOpts = { + location: true, + relative: null, + inherit: false, + notify: true, + reload: false, + custom: {}, + current: function () { return null; }, + source: "unknown" +}; +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +var TransitionService = /** @class */ (function () { + /** @hidden */ + function TransitionService(_router) { + /** @hidden */ + this._transitionCount = 0; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + this._eventTypes = []; + /** @hidden The registered transition hooks */ + this._registeredHooks = {}; + /** @hidden The paths on a criteria object */ + this._criteriaPaths = {}; + this._router = _router; + this.$view = _router.viewService; + this._deregisterHookFns = {}; + this._pluginapi = createProxyFunctions(val(this), {}, val(this), [ + '_definePathType', + '_defineEvent', + '_getPathTypes', + '_getEvents', + 'getHooks', + ]); + this._defineCorePaths(); + this._defineCoreEvents(); + this._registerCoreTransitionHooks(); + } + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + TransitionService.prototype.onCreate = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onError = function (criteria, callback, options) { return; }; + /** + * dispose + * @internalapi + */ + TransitionService.prototype.dispose = function (router) { + values(this._registeredHooks).forEach(function (hooksArray) { return hooksArray.forEach(function (hook) { + hook._deregistered = true; + removeFrom(hooksArray, hook); + }); }); + }; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + TransitionService.prototype.create = function (fromPath, targetState) { + return new Transition(fromPath, targetState, this._router); + }; + /** @hidden */ + TransitionService.prototype._defineCoreEvents = function () { + var Phase = exports.TransitionHookPhase; + var TH = TransitionHook; + var paths = this._criteriaPaths; + var NORMAL_SORT = false, REVERSE_SORT = true; + var ASYNCHRONOUS = false, SYNCHRONOUS = true; + this._defineEvent("onCreate", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS); + this._defineEvent("onBefore", Phase.BEFORE, 0, paths.to); + this._defineEvent("onStart", Phase.RUN, 0, paths.to); + this._defineEvent("onExit", Phase.RUN, 100, paths.exiting, REVERSE_SORT); + this._defineEvent("onRetain", Phase.RUN, 200, paths.retained); + this._defineEvent("onEnter", Phase.RUN, 300, paths.entering); + this._defineEvent("onFinish", Phase.RUN, 400, paths.to); + this._defineEvent("onSuccess", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + this._defineEvent("onError", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + }; + /** @hidden */ + TransitionService.prototype._defineCorePaths = function () { + var STATE = exports.TransitionHookScope.STATE, TRANSITION = exports.TransitionHookScope.TRANSITION; + this._definePathType("to", TRANSITION); + this._definePathType("from", TRANSITION); + this._definePathType("exiting", STATE); + this._definePathType("retained", STATE); + this._definePathType("entering", STATE); + }; + /** @hidden */ + TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous); + this._eventTypes.push(eventType); + makeEvent(this, this, eventType); + }; + + /** @hidden */ + TransitionService.prototype._getEvents = function (phase) { + var transitionHookTypes = isDefined(phase) ? + this._eventTypes.filter(function (type) { return type.hookPhase === phase; }) : + this._eventTypes.slice(); + return transitionHookTypes.sort(function (l, r) { + var cmpByPhase = l.hookPhase - r.hookPhase; + return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase; + }); + }; + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + TransitionService.prototype._definePathType = function (name, hookScope) { + this._criteriaPaths[name] = { name: name, scope: hookScope }; + }; + /** * @hidden */ + TransitionService.prototype._getPathTypes = function () { + return this._criteriaPaths; + }; + /** @hidden */ + TransitionService.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + /** @hidden */ + TransitionService.prototype._registerCoreTransitionHooks = function () { + var fns = this._deregisterHookFns; + fns.addCoreResolves = registerAddCoreResolvables(this); + fns.ignored = registerIgnoredTransitionHook(this); + fns.invalid = registerInvalidTransitionHook(this); + // Wire up redirectTo hook + fns.redirectTo = registerRedirectToHook(this); + // Wire up onExit/Retain/Enter state hooks + fns.onExit = registerOnExitHook(this); + fns.onRetain = registerOnRetainHook(this); + fns.onEnter = registerOnEnterHook(this); + // Wire up Resolve hooks + fns.eagerResolve = registerEagerResolvePath(this); + fns.lazyResolve = registerLazyResolveState(this); + // Wire up the View management hooks + fns.loadViews = registerLoadEnteringViews(this); + fns.activateViews = registerActivateViews(this); + // Updates global state after a transition + fns.updateGlobals = registerUpdateGlobalState(this); + // After globals.current is updated at priority: 10000 + fns.updateUrl = registerUpdateUrl(this); + // Lazy load state trees + fns.lazyLoad = registerLazyLoadHook(this); + }; + return TransitionService; +}()); + +/** + * @coreapi + * @module state + */ +/** */ +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +var StateService = /** @class */ (function () { + /** @internalapi */ + function StateService(router) { + this.router = router; + /** @internalapi */ + this.invalidCallbacks = []; + /** @hidden */ + this._defaultErrorHandler = function $defaultErrorHandler($error$) { + if ($error$ instanceof Error && $error$.stack) { + console.error($error$); + console.error($error$.stack); + } + else if ($error$ instanceof Rejection) { + console.error($error$.toString()); + if ($error$.detail && $error$.detail.stack) + console.error($error$.detail.stack); + } + else { + console.error($error$); + } + }; + var getters = ['current', '$current', 'params', 'transition']; + var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters))); + createProxyFunctions(val(StateService.prototype), this, val(this), boundFns); + } + Object.defineProperty(StateService.prototype, "transition", { + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + get: function () { return this.router.globals.transition; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "params", { + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + get: function () { return this.router.globals.params; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "current", { + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + get: function () { return this.router.globals.current; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "$current", { + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + get: function () { return this.router.globals.$current; }, + enumerable: true, + configurable: true + }); + /** @internalapi */ + StateService.prototype.dispose = function () { + this.defaultErrorHandler(noop$1); + this.invalidCallbacks = []; + }; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + StateService.prototype._handleInvalidTargetState = function (fromPath, toState) { + var _this = this; + var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath); + var globals = this.router.globals; + var latestThing = function () { return globals.transitionHistory.peekTail(); }; + var latest = latestThing(); + var callbackQueue = new Queue(this.invalidCallbacks.slice()); + var injector = new ResolveContext(fromPath).injector(); + var checkForRedirect = function (result) { + if (!(result instanceof TargetState)) { + return; + } + var target = result; + // Recreate the TargetState, in case the state is now defined. + target = _this.target(target.identifier(), target.params(), target.options()); + if (!target.valid()) { + return Rejection.invalid(target.error()).toPromise(); + } + if (latestThing() !== latest) { + return Rejection.superseded().toPromise(); + } + return _this.transitionTo(target.identifier(), target.params(), target.options()); + }; + function invokeNextCallback() { + var nextCallback = callbackQueue.dequeue(); + if (nextCallback === undefined) + return Rejection.invalid(toState.error()).toPromise(); + var callbackResult = services.$q.when(nextCallback(toState, fromState, injector)); + return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); }); + } + return invokeNextCallback(); + }; + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + StateService.prototype.onInvalid = function (callback) { + this.invalidCallbacks.push(callback); + return function deregisterListener() { + removeFrom(this.invalidCallbacks)(callback); + }.bind(this); + }; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + StateService.prototype.reload = function (reloadState) { + return this.transitionTo(this.current, this.params, { + reload: isDefined(reloadState) ? reloadState : true, + inherit: false, + notify: false, + }); + }; + + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + StateService.prototype.go = function (to, params, options) { + var defautGoOpts = { relative: this.$current, inherit: true }; + var transOpts = defaults(options, defautGoOpts, defaultTransOpts); + return this.transitionTo(to, params, transOpts); + }; + + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + StateService.prototype.target = function (identifier, params, options) { + if (options === void 0) { options = {}; } + // If we're reloading, find the state object to reload from + if (isObject(options.reload) && !options.reload.name) + throw new Error('Invalid reload state object'); + var reg = this.router.stateRegistry; + options.reloadState = options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative); + if (options.reload && !options.reloadState) + throw new Error("No such reload state '" + (isString(options.reload) ? options.reload : options.reload.name) + "'"); + return new TargetState(this.router.stateRegistry, identifier, params, options); + }; + + StateService.prototype.getCurrentPath = function () { + var _this = this; + var globals = this.router.globals; + var latestSuccess = globals.successfulTransitions.peekTail(); + var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; }; + return latestSuccess ? latestSuccess.treeChanges().to : rootPath(); + }; + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + StateService.prototype.transitionTo = function (to, toParams, options) { + var _this = this; + if (toParams === void 0) { toParams = {}; } + if (options === void 0) { options = {}; } + var router = this.router; + var globals = router.globals; + options = defaults(options, defaultTransOpts); + var getCurrent = function () { + return globals.transition; + }; + options = extend(options, { current: getCurrent }); + var ref = this.target(to, toParams, options); + var currentPath = this.getCurrentPath(); + if (!ref.exists()) + return this._handleInvalidTargetState(currentPath, ref); + if (!ref.valid()) + return silentRejection(ref.error()); + /** + * Special handling for Ignored, Aborted, and Redirected transitions + * + * The semantics for the transition.run() promise and the StateService.transitionTo() + * promise differ. For instance, the run() promise may be rejected because it was + * IGNORED, but the transitionTo() promise is resolved because from the user perspective + * no error occurred. Likewise, the transition.run() promise may be rejected because of + * a Redirect, but the transitionTo() promise is chained to the new Transition's promise. + */ + var rejectedTransitionHandler = function (transition) { return function (error) { + if (error instanceof Rejection) { + var isLatest = router.globals.lastStartedTransitionId === transition.$id; + if (error.type === exports.RejectType.IGNORED) { + isLatest && router.urlRouter.update(); + // Consider ignored `Transition.run()` as a successful `transitionTo` + return services.$q.when(globals.current); + } + var detail = error.detail; + if (error.type === exports.RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) { + // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully + // by returning the promise for the new (redirect) `Transition.run()`. + var redirect = transition.redirect(detail); + return redirect.run().catch(rejectedTransitionHandler(redirect)); + } + if (error.type === exports.RejectType.ABORTED) { + isLatest && router.urlRouter.update(); + return services.$q.reject(error); + } + } + var errorHandler = _this.defaultErrorHandler(); + errorHandler(error); + return services.$q.reject(error); + }; }; + var transition = this.router.transitionService.create(currentPath, ref); + var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition)); + silenceUncaughtInPromise(transitionToPromise); // issue #2676 + // Return a promise for the transition, which also has the transition object on it. + return extend(transitionToPromise, { transition: transition }); + }; + + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + StateService.prototype.is = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return undefined; + if (this.$current !== state) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + StateService.prototype.includes = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var glob = isString(stateOrName) && Glob.fromString(stateOrName); + if (glob) { + if (!glob.matches(this.$current.name)) + return false; + stateOrName = this.$current.name; + } + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes; + if (!isDefined(state)) + return undefined; + if (!isDefined(include[state.name])) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + StateService.prototype.href = function (stateOrName, params, options) { + var defaultHrefOpts = { + lossy: true, + inherit: true, + absolute: false, + relative: this.$current, + }; + options = defaults(options, defaultHrefOpts); + params = params || {}; + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return null; + if (options.inherit) + params = this.params.$inherit(params, this.$current, state); + var nav = (state && options.lossy) ? state.navigable : state; + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return this.router.urlRouter.href(nav.url, params, { + absolute: options.absolute, + }); + }; + + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + StateService.prototype.defaultErrorHandler = function (handler) { + return this._defaultErrorHandler = handler || this._defaultErrorHandler; + }; + StateService.prototype.get = function (stateOrName, base) { + var reg = this.router.stateRegistry; + if (arguments.length === 0) + return reg.get(); + return reg.get(stateOrName, base || this.$current); + }; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + StateService.prototype.lazyLoad = function (stateOrName, transition) { + var state = this.get(stateOrName); + if (!state || !state.lazyLoad) + throw new Error("Can not lazy load " + stateOrName); + var currentPath = this.getCurrentPath(); + var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath); + transition = transition || this.router.transitionService.create(currentPath, target); + return lazyLoadState(transition, state); + }; + return StateService; +}()); + +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ + +/** + * @internalapi + * @module vanilla + */ +/** */ +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +var $q = { + /** Normalizes a value as a promise */ + when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); }, + /** Normalizes a value as a promise rejection */ + reject: function (val) { return new Promise(function (resolve, reject) { reject(val); }); }, + /** @returns a deferred object, which has `resolve` and `reject` functions */ + defer: function () { + var deferred = {}; + deferred.promise = new Promise(function (resolve, reject) { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }, + /** Like Promise.all(), but also supports object key/promise notation like $q */ + all: function (promises) { + if (isArray(promises)) { + return Promise.all(promises); + } + if (isObject(promises)) { + // Convert promises map to promises array. + // When each promise resolves, map it to a tuple { key: key, val: val } + var chain = Object.keys(promises) + .map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); }); + // Then wait for all promises to resolve, and convert them back to an object + return $q.all(chain).then(function (values) { + return values.reduce(function (acc, tuple) { acc[tuple.key] = tuple.val; return acc; }, {}); + }); + } + } +}; + +/** + * @internalapi + * @module vanilla + */ +/** */ +// globally available injectables +var globals = {}; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var ARGUMENT_NAMES = /([^\s,]+)/g; +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +var $injector = { + /** Gets an object from DI based on a string token */ + get: function (name) { return globals[name]; }, + /** Returns true if an object named `name` exists in global DI */ + has: function (name) { return $injector.get(name) != null; }, + /** + * Injects a function + * + * @param fn the function to inject + * @param context the function's `this` binding + * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }` + */ + invoke: function (fn, context, locals) { + var all = extend({}, globals, locals || {}); + var params = $injector.annotate(fn); + var ensureExist = assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; }); + var args = params.filter(ensureExist).map(function (x) { return all[x]; }); + if (isFunction(fn)) + return fn.apply(context, args); + else + return fn.slice(-1)[0].apply(context, args); + }, + /** + * Returns a function's dependencies + * + * Analyzes a function (or array) and returns an array of DI tokens that the function requires. + * @return an array of `string`s + */ + annotate: function (fn) { + if (!isInjectable(fn)) + throw new Error("Not an injectable function: " + fn); + if (fn && fn.$inject) + return fn.$inject; + if (isArray(fn)) + return fn.slice(0, -1); + var fnStr = fn.toString().replace(STRIP_COMMENTS, ''); + var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); + return result || []; + } +}; + +/** + * @internalapi + * @module vanilla + */ +/** */ +var keyValsToObjectR = function (accum, _a) { + var key = _a[0], val = _a[1]; + if (!accum.hasOwnProperty(key)) { + accum[key] = val; + } + else if (isArray(accum[key])) { + accum[key].push(val); + } + else { + accum[key] = [accum[key], val]; + } + return accum; +}; +var getParams = function (queryString) { + return queryString.split("&").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {}); +}; +function parseUrl$1(url) { + var orEmptyString = function (x) { return x || ""; }; + var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1]; + var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1]; + return { path: path, search: search, hash: hash, url: url }; +} +var buildUrl = function (loc) { + var path = loc.path(); + var searchObject = loc.search(); + var hash = loc.hash(); + var search = Object.keys(searchObject).map(function (key) { + var param = searchObject[key]; + var vals = isArray(param) ? param : [param]; + return vals.map(function (val) { return key + "=" + val; }); + }).reduce(unnestR, []).join("&"); + return path + (search ? "?" + search : "") + (hash ? "#" + hash : ""); +}; +function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) { + return function (router) { + var service = router.locationService = new serviceClass(router); + var configuration = router.locationConfig = new configurationClass(router, isHtml5); + function dispose(router) { + router.dispose(service); + router.dispose(configuration); + } + return { name: name, service: service, configuration: configuration, dispose: dispose }; + }; +} + +/** + * @internalapi + * @module vanilla + */ /** */ +/** A base `LocationServices` */ +var BaseLocationServices = /** @class */ (function () { + function BaseLocationServices(router, fireAfterUpdate) { + var _this = this; + this.fireAfterUpdate = fireAfterUpdate; + this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); }; + this._listeners = []; + this.hash = function () { return parseUrl$1(_this._get()).hash; }; + this.path = function () { return parseUrl$1(_this._get()).path; }; + this.search = function () { return getParams(parseUrl$1(_this._get()).search); }; + this._location = root.location; + this._history = root.history; + } + BaseLocationServices.prototype.url = function (url, replace) { + if (replace === void 0) { replace = true; } + if (isDefined(url) && url !== this._get()) { + this._set(null, null, url, replace); + if (this.fireAfterUpdate) { + this._listeners.forEach(function (cb) { return cb({ url: url }); }); + } + } + return buildUrl(this); + }; + BaseLocationServices.prototype.onChange = function (cb) { + var _this = this; + this._listeners.push(cb); + return function () { return removeFrom(_this._listeners, cb); }; + }; + BaseLocationServices.prototype.dispose = function (router) { + deregAll(this._listeners); + }; + return BaseLocationServices; +}()); + +var __extends = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +var HashLocationService = /** @class */ (function (_super) { + __extends(HashLocationService, _super); + function HashLocationService(router) { + var _this = _super.call(this, router, false) || this; + root.addEventListener('hashchange', _this._listener, false); + return _this; + } + HashLocationService.prototype._get = function () { + return trimHashVal(this._location.hash); + }; + HashLocationService.prototype._set = function (state, title, url, replace) { + this._location.hash = url; + }; + HashLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('hashchange', this._listener); + }; + return HashLocationService; +}(BaseLocationServices)); + +var __extends$1 = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +var MemoryLocationService = /** @class */ (function (_super) { + __extends$1(MemoryLocationService, _super); + function MemoryLocationService(router) { + return _super.call(this, router, true) || this; + } + MemoryLocationService.prototype._get = function () { + return this._url; + }; + MemoryLocationService.prototype._set = function (state, title, url, replace) { + this._url = url; + }; + return MemoryLocationService; +}(BaseLocationServices)); + +var __extends$2 = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +var PushStateLocationService = /** @class */ (function (_super) { + __extends$2(PushStateLocationService, _super); + function PushStateLocationService(router) { + var _this = _super.call(this, router, true) || this; + _this._config = router.urlService.config; + root.addEventListener('popstate', _this._listener, false); + return _this; + } + + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + PushStateLocationService.prototype._getBasePrefix = function () { + return stripFile(this._config.baseHref()); + }; + PushStateLocationService.prototype._get = function () { + var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search; + search = splitQuery(search)[1]; // strip ? if found + hash = splitHash(hash)[1]; // strip # if found + var basePrefix = this._getBasePrefix(); + var exactMatch = pathname === this._config.baseHref(); + var startsWith = pathname.startsWith(basePrefix); + pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname; + return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : ''); + }; + PushStateLocationService.prototype._set = function (state, title, url, replace) { + var fullUrl = this._getBasePrefix() + url; + if (replace) { + this._history.replaceState(state, title, fullUrl); + } + else { + this._history.pushState(state, title, fullUrl); + } + }; + PushStateLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('popstate', this._listener); + }; + return PushStateLocationService; +}(BaseLocationServices)); + +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +var MemoryLocationConfig = /** @class */ (function () { + function MemoryLocationConfig() { + var _this = this; + this._baseHref = ''; + this._port = 80; + this._protocol = "http"; + this._host = "localhost"; + this._hashPrefix = ""; + this.port = function () { return _this._port; }; + this.protocol = function () { return _this._protocol; }; + this.host = function () { return _this._host; }; + this.baseHref = function () { return _this._baseHref; }; + this.html5Mode = function () { return false; }; + this.hashPrefix = function (newval) { return isDefined(newval) ? _this._hashPrefix = newval : _this._hashPrefix; }; + this.dispose = noop$1; + } + return MemoryLocationConfig; +}()); + +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationConfig` that delegates to the browser's `location` object */ +var BrowserLocationConfig = /** @class */ (function () { + function BrowserLocationConfig(router, _isHtml5) { + if (_isHtml5 === void 0) { _isHtml5 = false; } + this._isHtml5 = _isHtml5; + this._baseHref = undefined; + this._hashPrefix = ""; + } + BrowserLocationConfig.prototype.port = function () { + if (location.port) { + return Number(location.port); + } + return this.protocol() === 'https' ? 443 : 80; + }; + BrowserLocationConfig.prototype.protocol = function () { + return location.protocol.replace(/:/g, ''); + }; + BrowserLocationConfig.prototype.host = function () { + return location.hostname; + }; + BrowserLocationConfig.prototype.html5Mode = function () { + return this._isHtml5; + }; + BrowserLocationConfig.prototype.hashPrefix = function (newprefix) { + return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix; + }; + + BrowserLocationConfig.prototype.baseHref = function (href) { + return isDefined(href) ? this._baseHref = href : + isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref(); + }; + BrowserLocationConfig.prototype.applyDocumentBaseHref = function () { + var baseTag = document.getElementsByTagName("base")[0]; + return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : ""; + }; + BrowserLocationConfig.prototype.dispose = function () { }; + return BrowserLocationConfig; +}()); + +/** + * @internalapi + * @module vanilla + */ +/** */ +function servicesPlugin(router) { + services.$injector = $injector; + services.$q = $q; + return { name: "vanilla.services", $q: $q, $injector: $injector, dispose: function () { return null; } }; +} +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +var pushStateLocationPlugin = locationPluginFactory("vanilla.pushStateLocation", true, PushStateLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +var memoryLocationPlugin = locationPluginFactory("vanilla.memoryLocation", false, MemoryLocationService, MemoryLocationConfig); + +/** + * @internalapi + * @module vanilla + */ +/** */ + +/** + * # Core classes and interfaces + * + * The classes and interfaces that are core to ui-router and do not belong + * to a more specific subsystem (such as resolve). + * + * @coreapi + * @preferred + * @module core + */ /** for typedoc */ +/** @internalapi */ +var UIRouterPluginBase = /** @class */ (function () { + function UIRouterPluginBase() { + } + UIRouterPluginBase.prototype.dispose = function (router) { }; + return UIRouterPluginBase; +}()); + +/** + * @coreapi + * @module common + */ /** */ + + + +var index$1 = Object.freeze({ + root: root, + fromJson: fromJson, + toJson: toJson, + forEach: forEach, + extend: extend, + equals: equals, + identity: identity, + noop: noop$1, + createProxyFunctions: createProxyFunctions, + inherit: inherit, + inArray: inArray, + _inArray: _inArray, + removeFrom: removeFrom, + _removeFrom: _removeFrom, + pushTo: pushTo, + _pushTo: _pushTo, + deregAll: deregAll, + defaults: defaults, + mergeR: mergeR, + ancestors: ancestors, + pick: pick, + omit: omit, + pluck: pluck, + filter: filter, + find: find, + mapObj: mapObj, + map: map, + values: values, + allTrueR: allTrueR, + anyTrueR: anyTrueR, + unnestR: unnestR, + flattenR: flattenR, + pushR: pushR, + uniqR: uniqR, + unnest: unnest, + flatten: flatten, + assertPredicate: assertPredicate, + assertMap: assertMap, + assertFn: assertFn, + pairs: pairs, + arrayTuples: arrayTuples, + applyPairs: applyPairs, + tail: tail, + copy: copy, + _extend: _extend, + silenceUncaughtInPromise: silenceUncaughtInPromise, + silentRejection: silentRejection, + notImplemented: notImplemented, + services: services, + Glob: Glob, + curry: curry, + compose: compose, + pipe: pipe, + prop: prop, + propEq: propEq, + parse: parse, + not: not, + and: and, + or: or, + all: all, + any: any, + is: is, + eq: eq, + val: val, + invoke: invoke, + pattern: pattern, + isUndefined: isUndefined, + isDefined: isDefined, + isNull: isNull, + isNullOrUndefined: isNullOrUndefined, + isFunction: isFunction, + isNumber: isNumber, + isString: isString, + isObject: isObject, + isArray: isArray, + isDate: isDate, + isRegExp: isRegExp, + isState: isState, + isInjectable: isInjectable, + isPromise: isPromise, + Queue: Queue, + maxLength: maxLength, + padString: padString, + kebobString: kebobString, + functionToString: functionToString, + fnToString: fnToString, + stringify: stringify, + beforeAfterSubstr: beforeAfterSubstr, + hostRegex: hostRegex, + stripFile: stripFile, + splitHash: splitHash, + splitQuery: splitQuery, + splitEqual: splitEqual, + trimHashVal: trimHashVal, + splitOnDelim: splitOnDelim, + joinNeighborsR: joinNeighborsR, + get Category () { return exports.Category; }, + Trace: Trace, + trace: trace, + get DefType () { return exports.DefType; }, + Param: Param, + ParamTypes: ParamTypes, + StateParams: StateParams, + ParamType: ParamType, + PathNode: PathNode, + PathUtils: PathUtils, + resolvePolicies: resolvePolicies, + defaultResolvePolicy: defaultResolvePolicy, + Resolvable: Resolvable, + NATIVE_INJECTOR_TOKEN: NATIVE_INJECTOR_TOKEN, + ResolveContext: ResolveContext, + resolvablesBuilder: resolvablesBuilder, + StateBuilder: StateBuilder, + StateObject: StateObject, + StateMatcher: StateMatcher, + StateQueueManager: StateQueueManager, + StateRegistry: StateRegistry, + StateService: StateService, + TargetState: TargetState, + get TransitionHookPhase () { return exports.TransitionHookPhase; }, + get TransitionHookScope () { return exports.TransitionHookScope; }, + HookBuilder: HookBuilder, + matchState: matchState, + RegisteredHook: RegisteredHook, + makeEvent: makeEvent, + get RejectType () { return exports.RejectType; }, + Rejection: Rejection, + Transition: Transition, + TransitionHook: TransitionHook, + TransitionEventType: TransitionEventType, + defaultTransOpts: defaultTransOpts, + TransitionService: TransitionService, + UrlMatcher: UrlMatcher, + UrlMatcherFactory: UrlMatcherFactory, + UrlRouter: UrlRouter, + UrlRuleFactory: UrlRuleFactory, + BaseUrlRule: BaseUrlRule, + UrlService: UrlService, + ViewService: ViewService, + UIRouterGlobals: UIRouterGlobals, + UIRouter: UIRouter, + $q: $q, + $injector: $injector, + BaseLocationServices: BaseLocationServices, + HashLocationService: HashLocationService, + MemoryLocationService: MemoryLocationService, + PushStateLocationService: PushStateLocationService, + MemoryLocationConfig: MemoryLocationConfig, + BrowserLocationConfig: BrowserLocationConfig, + keyValsToObjectR: keyValsToObjectR, + getParams: getParams, + parseUrl: parseUrl$1, + buildUrl: buildUrl, + locationPluginFactory: locationPluginFactory, + servicesPlugin: servicesPlugin, + hashLocationPlugin: hashLocationPlugin, + pushStateLocationPlugin: pushStateLocationPlugin, + memoryLocationPlugin: memoryLocationPlugin, + UIRouterPluginBase: UIRouterPluginBase +}); + +function getNg1ViewConfigFactory() { + var templateFactory = null; + return function (path, view) { + templateFactory = templateFactory || services.$injector.get("$templateFactory"); + return [new Ng1ViewConfig(path, view, templateFactory)]; + }; +} +var hasAnyKey = function (keys, obj) { + return keys.reduce(function (acc, key) { return acc || isDefined(obj[key]); }, false); +}; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +function ng1ViewsBuilder(state) { + // Do not process root state + if (!state.parent) + return {}; + var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys); + // Do not allow a state to have both state-level props and also a `views: {}` property. + // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state. + // However, the `$default` approach should not be mixed with a separate `views: ` block. + if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) { + throw new Error("State '" + state.name + "' has a 'views' object. " + + "It cannot also have \"view properties\" at the state level. " + + "Move the following properties into a view (in the 'views' object): " + + (" " + allViewKeys.filter(function (key) { return isDefined(state[key]); }).join(", "))); + } + var views = {}, viewsObject = state.views || { "$default": pick(state, allViewKeys) }; + forEach(viewsObject, function (config, name) { + // Account for views: { "": { template... } } + name = name || "$default"; + // Account for views: { header: "headerComponent" } + if (isString(config)) + config = { component: config }; + // Make a shallow copy of the config object + config = extend({}, config); + // Do not allow a view to mix props for component-style view with props for template/controller-style view + if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) { + throw new Error("Cannot combine: " + compKeys.join("|") + " with: " + nonCompKeys.join("|") + " in stateview: '" + name + "@" + state.name + "'"); + } + config.resolveAs = config.resolveAs || '$resolve'; + config.$type = "ng1"; + config.$context = state; + config.$name = name; + var normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name); + config.$uiViewName = normalized.uiViewName; + config.$uiViewContextAnchor = normalized.uiViewContextAnchor; + views[name] = config; + }); + return views; +} +var id$1 = 0; +var Ng1ViewConfig = /** @class */ (function () { + function Ng1ViewConfig(path, viewDecl, factory) { + var _this = this; + this.path = path; + this.viewDecl = viewDecl; + this.factory = factory; + this.$id = id$1++; + this.loaded = false; + this.getTemplate = function (uiView, context) { + return _this.component ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings) : _this.template; + }; + } + Ng1ViewConfig.prototype.load = function () { + var _this = this; + var $q = services.$q; + var context = new ResolveContext(this.path); + var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); + var promises = { + template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), + controller: $q.when(this.getController(context)) + }; + return $q.all(promises).then(function (results) { + trace.traceViewServiceEvent("Loaded", _this); + _this.controller = results.controller; + extend(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" } + return _this; + }); + }; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + Ng1ViewConfig.prototype.getController = function (context) { + var provider = this.viewDecl.controllerProvider; + if (!isInjectable(provider)) + return this.viewDecl.controller; + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + return Ng1ViewConfig; +}()); + +/** @module view */ +/** for typedoc */ +/** + * Service which manages loading of templates from a ViewConfig. + */ +var TemplateFactory = /** @class */ (function () { + function TemplateFactory() { + var _this = this; + /** @hidden */ this._useHttp = ng.version.minor < 3; + /** @hidden */ this.$get = ['$http', '$templateCache', '$injector', function ($http, $templateCache, $injector) { + _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest'); + _this.$http = $http; + _this.$templateCache = $templateCache; + return _this; + }]; + } + /** @hidden */ + TemplateFactory.prototype.useHttpService = function (value) { + this._useHttp = value; + }; + + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + TemplateFactory.prototype.fromConfig = function (config, params, context) { + var defaultTemplate = ""; + var asTemplate = function (result) { return services.$q.when(result).then(function (str) { return ({ template: str }); }); }; + var asComponent = function (result) { return services.$q.when(result).then(function (str) { return ({ component: str }); }); }; + return (isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) : + isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) : + isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) : + isDefined(config.component) ? asComponent(config.component) : + isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) : + asTemplate(defaultTemplate)); + }; + + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + TemplateFactory.prototype.fromString = function (template, params) { + return isFunction(template) ? template(params) : template; + }; + + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromUrl = function (url, params) { + if (isFunction(url)) + url = url(params); + if (url == null) + return null; + if (this._useHttp) { + return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) + .then(function (response) { + return response.data; + }); + } + return this.$templateRequest(url); + }; + + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromProvider = function (provider, params, context) { + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) { + var deps = services.$injector.annotate(provider); + var providerFn = isArray(provider) ? tail(provider) : provider; + var resolvable = new Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) { + 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 = 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 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 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)" + if (type === '&') { + var res = context.getResolvable(resolveName); + var fn = res && res.data; + 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 attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; + } + // some-attr="::$resolve.someResolveName" + return attrName + "='" + prefix + "$resolve." + resolveName + "'"; + }; + var attrs = getComponentBindings(component).map(attributeTpl).join(" "); + var kebobName = kebob(component); + return "<" + kebobName + " " + attrs + ">"; + }; + + return TemplateFactory; +}()); +// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&') +function getComponentBindings(name) { + var cmpDefs = services.$injector.get(name + "Directive"); // could be multiple + if (!cmpDefs || !cmpDefs.length) + throw new Error("Unable to find component named '" + name + "'"); + return cmpDefs.map(getBindings).reduce(unnestR, []); +} +// Given a directive definition, find its object input attributes +// Use different properties, depending on the type of directive (component, bindToController, normal) +var getBindings = function (def) { + if (isObject(def.bindToController)) + return scopeBindings(def.bindToController); + return scopeBindings(def.scope); +}; +// for ng 1.2 style, process the scope: { input: "=foo" } +// for ng 1.3 through ng 1.5, process the component's bindToController: { input: "=foo" } object +var scopeBindings = function (bindingsObj) { return Object.keys(bindingsObj || {}) + .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; }) + .filter(function (tuple) { return isDefined(tuple) && isArray(tuple[1]); }) + .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); }; + +/** @module ng1 */ /** for typedoc */ +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +var StateProvider = /** @class */ (function () { + function StateProvider(stateRegistry, stateService) { + this.stateRegistry = stateRegistry; + this.stateService = stateService; + createProxyFunctions(val(StateProvider.prototype), this, val(this)); + } + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + StateProvider.prototype.decorator = function (name, func) { + return this.stateRegistry.decorator(name, func) || this; + }; + StateProvider.prototype.state = function (name, definition) { + if (isObject(name)) { + definition = name; + } + else { + definition.name = name; + } + this.stateRegistry.register(definition); + return this; + }; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + StateProvider.prototype.onInvalid = function (callback) { + return this.stateService.onInvalid(callback); + }; + return StateProvider; +}()); + +/** @module ng1 */ /** */ +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +var getStateHookBuilder = function (hookName) { + return function stateHookBuilder(state, parentFn) { + var hook = state[hookName]; + var pathname = hookName === 'onExit' ? 'from' : 'to'; + function decoratedNg1Hook(trans, state) { + var resolveContext = new ResolveContext(trans.treeChanges(pathname)); + var locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans }); + return services.$injector.invoke(hook, this, locals); + } + return hook ? decoratedNg1Hook : undefined; + }; +}; + +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +var Ng1LocationServices = /** @class */ (function () { + function Ng1LocationServices($locationProvider) { + // .onChange() registry + this._urlListeners = []; + this.$locationProvider = $locationProvider; + var _lp = val($locationProvider); + createProxyFunctions(_lp, this, _lp, ['hashPrefix']); + } + Ng1LocationServices.prototype.dispose = function () { }; + Ng1LocationServices.prototype.onChange = function (callback) { + var _this = this; + this._urlListeners.push(callback); + return function () { return removeFrom(_this._urlListeners)(callback); }; + }; + Ng1LocationServices.prototype.html5Mode = function () { + var html5Mode = this.$locationProvider.html5Mode(); + html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode; + return html5Mode && this.$sniffer.history; + }; + Ng1LocationServices.prototype.url = function (newUrl, replace, state) { + if (replace === void 0) { replace = false; } + if (newUrl) + this.$location.url(newUrl); + if (replace) + this.$location.replace(); + if (state) + this.$location.state(state); + return this.$location.url(); + }; + Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser) { + var _this = this; + this.$location = $location; + this.$sniffer = $sniffer; + // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange + $rootScope.$on("$locationChangeSuccess", function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); }); + var _loc = val($location); + var _browser = val($browser); + // Bind these LocationService functions to $location + createProxyFunctions(_loc, this, _loc, ["replace", "path", "search", "hash"]); + // Bind these LocationConfig functions to $location + createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']); + // Bind these LocationConfig functions to $browser + createProxyFunctions(_browser, this, _browser, ['baseHref']); + }; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + Ng1LocationServices.monkeyPatchPathParameterType = function (router) { + var pathType = router.urlMatcherFactory.type('path'); + pathType.encode = function (val) { + return val != null ? val.toString().replace(/(~|\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : val; + }; + pathType.decode = function (val) { + return val != null ? val.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : val; + }; + }; + return Ng1LocationServices; +}()); + +/** @module url */ /** */ +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +var UrlRouterProvider = /** @class */ (function () { + /** @hidden */ + function UrlRouterProvider(router) { + this._router = router; + this._urlRouter = router.urlRouter; + } + /** @hidden */ + UrlRouterProvider.prototype.$get = function () { + var urlRouter = this._urlRouter; + urlRouter.update(true); + if (!urlRouter.interceptDeferred) + urlRouter.listen(); + return urlRouter; + }; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + UrlRouterProvider.prototype.rule = function (ruleFn) { + var _this = this; + if (!isFunction(ruleFn)) + throw new Error("'rule' must be a function"); + var match = function () { + return ruleFn(services.$injector, _this._router.locationService); + }; + var rule = new BaseUrlRule(match, identity); + this._urlRouter.rule(rule); + return this; + }; + + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + UrlRouterProvider.prototype.otherwise = function (rule) { + var _this = this; + var urlRouter = this._urlRouter; + if (isString(rule)) { + urlRouter.otherwise(rule); + } + else if (isFunction(rule)) { + urlRouter.otherwise(function () { return rule(services.$injector, _this._router.locationService); }); + } + else { + throw new Error("'rule' must be a string or function"); + } + return this; + }; + + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + UrlRouterProvider.prototype.when = function (what, handler) { + if (isArray(handler) || isFunction(handler)) { + handler = UrlRouterProvider.injectableHandler(this._router, handler); + } + this._urlRouter.when(what, handler); + return this; + }; + + UrlRouterProvider.injectableHandler = function (router, handler) { + return function (match) { + return services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); + }; + }; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + UrlRouterProvider.prototype.deferIntercept = function (defer) { + this._urlRouter.deferIntercept(defer); + }; + + return UrlRouterProvider; +}()); + +/** + * # Angular 1 types + * + * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. + * The customizations to the core types for Angular UI-Router are documented here. + * + * The optional [[$resolve]] service is also documented here. + * + * @module ng1 + * @preferred + */ +/** for typedoc */ +ng.module("ui.router.angular1", []); +var mod_init = ng.module('ui.router.init', []); +var mod_util = ng.module('ui.router.util', ['ng', 'ui.router.init']); +var mod_rtr = ng.module('ui.router.router', ['ui.router.util']); +var mod_state = ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']); +var mod_main = ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']); +var mod_cmpt = ng.module('ui.router.compat', ['ui.router']); // tslint:disable-line +var router = null; +$uiRouter.$inject = ['$locationProvider']; +/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */ +function $uiRouter($locationProvider) { + // Create a new instance of the Router when the $uiRouterProvider is initialized + router = this.router = new UIRouter(); + router.stateProvider = new StateProvider(router.stateRegistry, router.stateService); + // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties + router.stateRegistry.decorator("views", ng1ViewsBuilder); + router.stateRegistry.decorator("onExit", getStateHookBuilder("onExit")); + router.stateRegistry.decorator("onRetain", getStateHookBuilder("onRetain")); + router.stateRegistry.decorator("onEnter", getStateHookBuilder("onEnter")); + router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory()); + var ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider); + Ng1LocationServices.monkeyPatchPathParameterType(router); + // backwards compat: also expose router instance as $uiRouterProvider.router + router['router'] = router; + router['$get'] = $get; + $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache']; + function $get($location, $browser, $sniffer, $rootScope, $http, $templateCache) { + ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser); + delete router['router']; + delete router['$get']; + return router; + } + return router; +} +var getProviderFor = function (serviceName) { return ['$uiRouterProvider', function ($urp) { + var service = $urp.router[serviceName]; + service["$get"] = function () { return service; }; + return service; + }]; }; +// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime) +runBlock.$inject = ['$injector', '$q', '$uiRouter']; +function runBlock($injector, $q, $uiRouter) { + services.$injector = $injector; + services.$q = $q; + // The $injector is now available. + // Find any resolvables that had dependency annotation deferred + $uiRouter.stateRegistry.get() + .map(function (x) { return x.$$state().resolvables; }) + .reduce(unnestR, []) + .filter(function (x) { return x.deps === "deferred"; }) + .forEach(function (resolvable) { return resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi); }); +} +// $urlRouter service and $urlRouterProvider +var getUrlRouterProvider = function (uiRouter) { + return uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter); +}; +// $state service and $stateProvider +// $urlRouter service and $urlRouterProvider +var getStateProvider = function () { + return extend(router.stateProvider, { $get: function () { return router.stateService; } }); +}; +watchDigests.$inject = ['$rootScope']; +function watchDigests($rootScope) { + $rootScope.$watch(function () { trace.approximateDigests++; }); +} +mod_init.provider("$uiRouter", $uiRouter); +mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]); +mod_util.provider('$urlService', getProviderFor('urlService')); +mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]); +mod_util.provider('$templateFactory', function () { return new TemplateFactory(); }); +mod_state.provider('$stateRegistry', getProviderFor('stateRegistry')); +mod_state.provider('$uiRouterGlobals', getProviderFor('globals')); +mod_state.provider('$transitions', getProviderFor('transitionService')); +mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]); +mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]); +mod_main.factory('$view', function () { return router.viewService; }); +mod_main.service("$trace", function () { return trace; }); +mod_main.run(watchDigests); +mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]); +mod_state.run(['$state', function ($state) { }]); +mod_rtr.run(['$urlRouter', function ($urlRouter) { }]); +mod_init.run(runBlock); +/** @hidden TODO: find a place to move this */ +var getLocals = function (ctx) { + var tokens = ctx.getTokens().filter(isString); + var tuples = tokens.map(function (key) { + var resolvable = ctx.getResolvable(key); + var waitPolicy = ctx.getPolicy(resolvable).async; + return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data]; + }); + return tuples.reduce(applyPairs, {}); +}; + +/** + * # Angular 1 injectable services + * + * This is a list of the objects which can be injected using angular's injector. + * + * There are three different kind of injectable objects: + * + * ## **Provider** objects + * #### injectable into a `.config()` block during configtime + * + * - [[$uiRouterProvider]]: The UI-Router instance + * - [[$stateProvider]]: State registration + * - [[$transitionsProvider]]: Transition hooks + * - [[$urlServiceProvider]]: All URL related public APIs + * + * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling + * - [[$urlRouterProvider]]: (deprecated) Url matching rules + * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config + * + * ## **Service** objects + * #### injectable globally during runtime + * + * - [[$uiRouter]]: The UI-Router instance + * - [[$trace]]: Enable transition trace/debug + * - [[$transitions]]: Transition hooks + * - [[$state]]: Imperative state related APIs + * - [[$stateRegistry]]: State registration + * - [[$urlService]]: All URL related public APIs + * - [[$uiRouterGlobals]]: Global variables + * - [[$uiViewScroll]]: Scroll an element into view + * + * - [[$stateParams]]: (deprecated) Global state param values + * - [[$urlRouter]]: (deprecated) URL synchronization + * - [[$urlMatcherFactory]]: (deprecated) URL parsing config + * + * ## **Per-Transition** objects + * + * - These kind of objects are injectable into: + * - Resolves ([[Ng1StateDeclaration.resolve]]), + * - Transition Hooks ([[TransitionService.onStart]], etc), + * - Routed Controllers ([[Ng1ViewDeclaration.controller]]) + * + * #### Different instances are injected based on the [[Transition]] + * + * - [[$transition$]]: The current Transition object + * - [[$stateParams]]: State param values for pending Transition (deprecated) + * - Any resolve data defined using [[Ng1StateDeclaration.resolve]] + * + * @ng1api + * @preferred + * @module injectables + */ /** */ +/** + * The current (or pending) State Parameters + * + * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition. + * + * The values are not updated until *after* a `Transition` successfully completes. + * + * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running. + * + * ### Deprecation warning: + * + * The value injected for `$stateParams` is different depending on where it is injected. + * + * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`. + * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`. + * + * Because of these confusing details, this service is deprecated. + * + * ### Instead of using the global `$stateParams` service object, + * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]] + * + * ```js + * MyService.$inject = ['$uiRouterGlobals']; + * function MyService($uiRouterGlobals) { + * return { + * paramValues: function () { + * return $uiRouterGlobals.params; + * } + * } + * } + * ``` + * + * ### Instead of using the per-transition `$stateParams` object, + * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]] + * + * ```js + * MyController.$inject = ['$transition$']; + * function MyController($transition$) { + * var username = $transition$.params().username; + * // .. do something with username + * } + * ``` + * + * --- + * + * This object can be injected into other services. + * + * #### Deprecated Example: + * ```js + * SomeService.$inject = ['$http', '$stateParams']; + * function SomeService($http, $stateParams) { + * return { + * getUser: function() { + * return $http.get('/api/users/' + $stateParams.username); + * } + * } + * }; + * angular.service('SomeService', SomeService); + * ``` + * @deprecated + */ + +/** + * # Angular 1 Directives + * + * These are the directives included in UI-Router for Angular 1. + * These directives are used in templates to create viewports and link/navigate to states. + * + * @ng1api + * @preferred + * @module directives + */ /** for typedoc */ +/** @hidden */ +function parseStateRef(ref) { + var paramsOnly = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (paramsOnly) + ref = '(' + paramsOnly[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/); + if (!parsed || parsed.length !== 4) + throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1] || null, paramExpr: parsed[3] || null }; +} +/** @hidden */ +function stateContext(el) { + var $uiView = el.parent().inheritedData('$uiView'); + var path = parse('$cfg.path')($uiView); + return path ? tail(path).state.name : undefined; +} +/** @hidden */ +function processedDef($state, $element, def) { + var uiState = def.uiState || $state.current.name; + var uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {}); + var href = $state.href(uiState, def.uiStateParams, uiStateOpts); + return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href }; +} +/** @hidden */ +function getTypeInfo(el) { + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; + var isForm = el[0].nodeName === "FORM"; + return { + attr: isForm ? "action" : (isSvg ? 'xlink:href' : 'href'), + isAnchor: el.prop("tagName").toUpperCase() === "A", + clickable: !isForm + }; +} +/** @hidden */ +function clickHook(el, $state, $timeout, type, getDef) { + return function (e) { + var button = e.which || e.button, target = getDef(); + if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function () { + $state.go(target.uiState, target.uiStateParams, target.uiStateOpts); + }); + e.preventDefault(); + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0; + e.preventDefault = function () { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }; +} +/** @hidden */ +function defaultOpts(el, $state) { + return { + relative: stateContext(el) || $state.$current, + inherit: true, + source: "sref" + }; +} +/** @hidden */ +function bindEvents(element, scope, hookFn, uiStateOpts) { + var events; + if (uiStateOpts) { + events = uiStateOpts.events; + } + if (!isArray(events)) { + events = ['click']; + } + var on = element.on ? 'on' : 'bind'; + for (var _i = 0, events_1 = events; _i < events_1.length; _i++) { + var event_1 = events_1[_i]; + element[on](event_1, hookFn); + } + scope.$on('$destroy', function () { + var off = element.off ? 'off' : 'unbind'; + for (var _i = 0, events_2 = events; _i < events_2.length; _i++) { + var event_2 = events_2[_i]; + element[off](event_2, hookFn); + } + }); +} +/** + * `ui-sref`: A directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of the `ui-sref` is the name of the state to link to. + * + * #### Example: + * This will activate the `home` state when the link is clicked. + * ```html + * Home + * ``` + * + * ### Relative Links + * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]). + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create a relative `ui-sref` which always targets the same destination. + * + * #### Example: + * Both these links are relative to the parent state, even when a child state is currently active. + * ```html + * child 1 state + * child 2 state + * ``` + * + * This link activates the parent state. + * ```html + * Return + * ``` + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * #### Example: + * Assuming the `users` state has a url of `/users/` + * ```html + * Users + * ``` + * + * ### Parameter Values + * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state. + * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses. + * The content inside the parentheses is an expression, evaluated to the parameter values. + * + * #### Example: + * This example renders a list of links to users. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ user.displayName }} + *
  • + * ``` + * + * Note: + * The parameter values expression is `$watch`ed for updates. + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-sref-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Examples + * If you have the following template: + * + * ```html + * Home + * About + * Next page + * + * + * ``` + * + * Then (assuming the current state is `contacts`) the rendered html including hrefs would be: + * + * ```html + * Home + * About + * Next page + * + *
      + *
    • + * Joe + *
    • + *
    • + * Alice + *
    • + *
    • + * Bob + *
    • + *
    + * + * Home + * ``` + * + * ### Notes + * + * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses. + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * + * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). + * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. + */ +var uiSref; +uiSref = ['$uiRouter', '$timeout', + function $StateRefDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var ref = parseStateRef(attrs.uiSref); + rawDef.uiState = ref.state; + rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {}; + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function (val) { + rawDef.uiStateParams = extend({}, val); + update(); + }, true); + rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr)); + } + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-state`: A fully dynamic directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.** + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to. + * **This is in contrast with `ui-sref`, which takes a state name as a string literal.** + * + * #### Example: + * Create a list of links. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Relative Links + * If the expression evaluates to a relative path, it is processed like [[uiSref]]. + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create relative `ui-state` which always targets the same destination. + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * ### Parameter Values + * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state. + * Param values should be provided using the `ui-state-params` attribute. + * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression. + * + * #### Example: + * This example renders a list of links with param values. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-state-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Notes + * + * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`. + * However, it might be simpler to use [[uiSref]] parameter-only links. + * + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * ``` + */ +var uiState; +uiState = ['$uiRouter', '$timeout', + function $StateRefDynamicDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts']; + var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return (acc[attr] = noop$1, acc); }, {}); + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + inputAttrs.forEach(function (field) { + rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null; + attrs.$observe(field, function (expr) { + watchDeregFns[field](); + watchDeregFns[field] = scope.$watch(expr, function (newval) { + rawDef[field] = newval; + update(); + }, true); + }); + }); + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active + * + * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the + * related directive's state is active (and remove them when it is inactive). + * + * The primary use-case is to highlight the active link in navigation menus, + * distinguishing it from the inactive menu items. + * + * ### Linking to a `ui-sref` or `ui-state` + * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element. + * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**. + * + * ### Matching + * + * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**. + * This is a "fuzzy match" which uses [[StateService.includes]]. + * + * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active). + * This is an "exact match" which uses [[StateService.is]]. + * + * ### Parameter values + * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted. + * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted. + * + * #### Example: + * ```html + *
  • + * {{ user.lastName }} + *
  • + * ``` + * + * ### Examples + * + * Given the following template: + * #### Example: + * ```html + * + * ``` + * + * When the app state is `app.user` (or any child state), + * and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + * + * ```html + * + * ``` + * + * ### Glob mode + * + * It is possible to pass `ui-sref-active` an expression that evaluates to an object. + * The objects keys represent active class names and values represent the respective state names/globs. + * `ui-sref-active` will match if the current active state **includes** any of + * the specified state names/globs, even the abstract ones. + * + * #### Example: + * Given the following template, with "admin" being an abstract state: + * ```html + *
    + * Roles + *
    + * ``` + * + * When the current state is "admin.roles" the "active" class will be applied to both the
    and elements. + * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`. + * + * ### Notes: + * + * - The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` + */ +var uiSrefActive; +uiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter', + function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + var states = [], activeEqClass, uiSrefActive; + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); + try { + uiSrefActive = $scope.$eval($attrs.uiSrefActive); + } + catch (e) { + // Do nothing. uiSrefActive is not a valid expression. + // Fall back to using $interpolate below + } + uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); + if (isObject(uiSrefActive)) { + forEach(uiSrefActive, function (stateOrName, activeClass) { + if (isString(stateOrName)) { + var ref = parseStateRef(stateOrName); + addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); + } + }); + } + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$addStateInfo = function (newState, newParams) { + // we already got an explicit state provided by ui-sref-active, so we + // shadow the one that comes from ui-sref + if (isObject(uiSrefActive) && states.length > 0) { + return; + } + var deregister = addState(newState, newParams, uiSrefActive); + update(); + return deregister; + }; + function updateAfterTransition(trans) { + trans.promise.then(update, noop$1); + } + $scope.$on('$stateChangeSuccess', update); + $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition)); + if ($uiRouter.globals.transition) { + updateAfterTransition($uiRouter.globals.transition); + } + function addState(stateName, stateParams, activeClass) { + var state = $state.get(stateName, stateContext($element)); + var stateInfo = { + state: state || { name: stateName }, + params: stateParams, + activeClass: activeClass + }; + states.push(stateInfo); + return function removeState() { + removeFrom(states)(stateInfo); + }; + } + // Update route state + function update() { + var splitClasses = function (str) { + return str.split(/\s/).filter(identity); + }; + var getClasses = function (stateList) { + return stateList.map(function (x) { return x.activeClass; }).map(splitClasses).reduce(unnestR, []); + }; + var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []); + var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); })); + var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length; + var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : []; + var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []); + var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); }); + $scope.$evalAsync(function () { + addClasses.forEach(function (className) { return $element.addClass(className); }); + removeClasses.forEach(function (className) { return $element.removeClass(className); }); + }); + } + update(); + }] + }; + }]; +ng.module('ui.router.state') + .directive('uiSref', uiSref) + .directive('uiSrefActive', uiSrefActive) + .directive('uiSrefActiveEq', uiSrefActive) + .directive('uiState', uiState); + +/** @module ng1 */ /** for typedoc */ +/** + * `isState` Filter: truthy if the current state is the parameter + * + * Translates to [[StateService.is]] `$state.is("stateName")`. + * + * #### Example: + * ```html + *
    show if state is 'stateName'
    + * ``` + */ +$IsStateFilter.$inject = ['$state']; +function $IsStateFilter($state) { + var isFilter = function (state, params, options) { + return $state.is(state, params, options); + }; + isFilter.$stateful = true; + return isFilter; +} +/** + * `includedByState` Filter: truthy if the current state includes the parameter + * + * Translates to [[StateService.includes]]` $state.is("fullOrPartialStateName")`. + * + * #### Example: + * ```html + *
    show if state includes 'fullOrPartialStateName'
    + * ``` + */ +$IncludedByStateFilter.$inject = ['$state']; +function $IncludedByStateFilter($state) { + var includesFilter = function (state, params, options) { + return $state.includes(state, params, options); + }; + includesFilter.$stateful = true; + return includesFilter; +} +ng.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); + +/** + * @ng1api + * @module directives + */ /** for typedoc */ +/** + * `ui-view`: A viewport directive which is filled in by a view from the active state. + * + * ### Attributes + * + * - `name`: (Optional) A view name. + * The name should be unique amongst the other views in the same state. + * You can have views of the same name that live in different states. + * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). + * + * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. + * Uses [[$uiViewScroll]] to do the scrolling. + * + * - `onload`: Expression to evaluate whenever the view updates. + * + * #### Example: + * A view can be unnamed or named. + * ```html + * + *
    + * + * + *
    + * + * + * + * ``` + * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + * + * ```html + *
    + * $stateProvider.state("home", { + * template: "

    HELLO!

    " + * }) + * ``` + * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the + * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + * + * ```html + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "main": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * Really though, you'll use views to set up multiple views: + * + * ```html + *
    + *
    + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + * ``` + * + * #### Examples for `autoscroll`: + * ```html + * + * + * + * + * + * + * + * ``` + * + * Resolve data: + * + * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this + * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. + * + * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the + * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which + * depends on `$resolve` data. + * + * #### Example: + * ```js + * $stateProvider.state('home', { + * template: '', + * resolve: { + * user: function(UserService) { return UserService.fetchUser(); } + * } + * }); + * ``` + */ +var uiView; +uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q', + function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) { + function getRenderer(attrs, scope) { + return { + enter: function (element, target, cb) { + if (ng.version.minor > 2) { + $animate.enter(element, null, target).then(cb); + } + else { + $animate.enter(element, null, target, cb); + } + }, + leave: function (element, cb) { + if (ng.version.minor > 2) { + $animate.leave(element).then(cb); + } + else { + $animate.leave(element, cb); + } + } + }; + } + function configsEqual(config1, config2) { + return config1 === config2; + } + var rootData = { + $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } }, + $uiView: {} + }; + var directive = { + count: 0, + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, unregister, onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(attrs, scope), viewConfig = undefined, inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default'; + var activeUIView = { + $type: 'ng1', + id: directive.count++, + name: name, + fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + "." + name : name, + config: null, + configUpdated: configUpdatedCallback, + get creationContext() { + var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited); + // Allow + // See https://github.com/angular-ui/ui-router/issues/3355 + var fromParentTag = parse('$uiView.creationContext')(inherited); + return fromParentTagConfig || fromParentTag; + } + }; + trace.traceUIViewEvent("Linking", activeUIView); + function configUpdatedCallback(config) { + if (config && !(config instanceof Ng1ViewConfig)) + return; + if (configsEqual(viewConfig, config)) + return; + trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context); + viewConfig = config; + updateView(config); + } + $element.data('$uiView', { $uiView: activeUIView }); + updateView(); + unregister = $view.registerUIView(activeUIView); + scope.$on("$destroy", function () { + trace.traceUIViewEvent("Destroying/Unregistering", activeUIView); + unregister(); + }); + function cleanupLastView() { + if (previousEl) { + trace.traceUIViewEvent("Removing (previous) el", previousEl.data('$uiView')); + previousEl.remove(); + previousEl = null; + } + if (currentScope) { + trace.traceUIViewEvent("Destroying scope", activeUIView); + currentScope.$destroy(); + currentScope = null; + } + if (currentEl) { + var _viewData_1 = currentEl.data('$uiViewAnim'); + trace.traceUIViewEvent("Animate out", _viewData_1); + renderer.leave(currentEl, function () { + _viewData_1.$$animLeave.resolve(); + previousEl = null; + }); + previousEl = currentEl; + currentEl = null; + } + } + function updateView(config) { + var newScope = scope.$new(); + var animEnter = $q.defer(), animLeave = $q.defer(); + var $uiViewData = { + $cfg: config, + $uiView: activeUIView, + }; + var $uiViewAnim = { + $animEnter: animEnter.promise, + $animLeave: animLeave.promise, + $$animLeave: animLeave + }; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoading + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {string} viewName Name of the view. + */ + newScope.$emit('$viewContentLoading', name); + var cloned = $transclude(newScope, function (clone) { + clone.data('$uiViewAnim', $uiViewAnim); + clone.data('$uiView', $uiViewData); + renderer.enter(clone, $element, function onUIViewEnter() { + animEnter.resolve(); + if (currentScope) + currentScope.$emit('$viewContentAnimationEnded'); + if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + currentEl = cloned; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded', config || viewConfig); + currentScope.$eval(onloadExp); + } + }; + } + }; + return directive; + }]; +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout']; +/** @hidden */ +function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q, $timeout) { + var getControllerAs = parse('viewDecl.controllerAs'); + var getResolveAs = parse('viewDecl.resolveAs'); + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + tElement.empty(); + return function (scope, $element) { + var data = $element.data('$uiView'); + if (!data) { + $element.html(initial); + $compile($element.contents())(scope); + return; + } + var cfg = data.$cfg || { viewDecl: {}, getTemplate: ng_from_import.noop }; + var resolveCtx = cfg.path && new ResolveContext(cfg.path); + $element.html(cfg.getTemplate($element, resolveCtx) || initial); + trace.traceUIViewFill(data.$uiView, $element.html()); + var link = $compile($element.contents()); + var controller = cfg.controller; + var controllerAs = getControllerAs(cfg); + var resolveAs = getResolveAs(cfg); + var locals = resolveCtx && getLocals(resolveCtx); + scope[resolveAs] = locals; + if (controller) { + var controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element })); + if (controllerAs) { + scope[controllerAs] = controllerInstance; + scope[controllerAs][resolveAs] = locals; + } + // TODO: Use $view service as a central point for registering component-level hooks + // Then, when a component is created, tell the $view service, so it can invoke hooks + // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element }); + // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element })); + $element.data('$ngControllerController', controllerInstance); + $element.children().data('$ngControllerController', controllerInstance); + registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg); + } + // Wait for the component to appear in the DOM + if (isString(cfg.viewDecl.component)) { + var cmp_1 = cfg.viewDecl.component; + var kebobName = kebobString(cmp_1); + var tagRegexp_1 = new RegExp("^(x-|data-)?" + kebobName + "$", "i"); + var getComponentController = function () { + var directiveEl = [].slice.call($element[0].children) + .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); }); + return directiveEl && ng.element(directiveEl).data("$" + cmp_1 + "Controller"); + }; + var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) { + if (!ctrlInstance) + return; + registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg); + deregisterWatch_1(); + }); + } + link(scope); + }; + } + }; +} +/** @hidden */ +var hasComponentImpl = typeof ng.module('ui.router')['component'] === 'function'; +/** @hidden incrementing id */ +var _uiCanExitId = 0; +/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */ +function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) { + // Call $onInit() ASAP + if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) { + controllerInstance.$onInit(); + } + var viewState = tail(cfg.path).state.self; + var hookOptions = { bind: controllerInstance }; + // Add component-level hook for onParamsChange + if (isFunction(controllerInstance.uiOnParamsChanged)) { + var resolveContext = new ResolveContext(cfg.path); + var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data; + // Fire callback on any successful transition + var paramsUpdated = function ($transition$) { + // Exit early if the $transition$ is the same as the view was created within. + // Exit early if the $transition$ will exit the state the view is for. + if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1) + return; + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + var toSchema = $transition$.treeChanges().to.map(function (node) { return node.paramSchema; }).reduce(unnestR, []); + var fromSchema = $transition$.treeChanges().from.map(function (node) { return node.paramSchema; }).reduce(unnestR, []); + // Find the to params that have different values than the from params + var changedToParams = toSchema.filter(function (param) { + var idx = fromSchema.indexOf(param); + return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]); + }); + // Only trigger callback if a to param has changed or is new + if (changedToParams.length) { + var changedKeys_1 = changedToParams.map(function (x) { return x.id; }); + // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params. + var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; }); + controllerInstance.uiOnParamsChanged(newValues, $transition$); + } + }; + $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions)); + } + // Add component-level hook for uiCanExit + if (isFunction(controllerInstance.uiCanExit)) { + var id_1 = _uiCanExitId++; + var cacheProp_1 = '_uiCanExitIds'; + // Returns true if a redirect transition already answered truthy + var prevTruthyAnswer_1 = function (trans) { + return !!trans && (trans[cacheProp_1] && trans[cacheProp_1][id_1] === true || prevTruthyAnswer_1(trans.redirectedFrom())); + }; + // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition + var wrappedHook = function (trans) { + var promise, ids = trans[cacheProp_1] = trans[cacheProp_1] || {}; + if (!prevTruthyAnswer_1(trans)) { + promise = $q.when(controllerInstance.uiCanExit(trans)); + promise.then(function (val) { return ids[id_1] = (val !== false); }); + } + return promise; + }; + var criteria = { exiting: viewState.name }; + $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions)); + } +} +ng.module('ui.router.state').directive('uiView', uiView); +ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill); + +/** @module ng1 */ /** */ +/** @hidden */ +function $ViewScrollProvider() { + var useAnchorScroll = false; + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + return function ($element) { + return $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} +ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); + +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +var index = "ui.router"; + +exports['default'] = index; +exports.core = index$1; +exports.watchDigests = watchDigests; +exports.getLocals = getLocals; +exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory; +exports.ng1ViewsBuilder = ng1ViewsBuilder; +exports.Ng1ViewConfig = Ng1ViewConfig; +exports.StateProvider = StateProvider; +exports.UrlRouterProvider = UrlRouterProvider; +exports.root = root; +exports.fromJson = fromJson; +exports.toJson = toJson; +exports.forEach = forEach; +exports.extend = extend; +exports.equals = equals; +exports.identity = identity; +exports.noop = noop$1; +exports.createProxyFunctions = createProxyFunctions; +exports.inherit = inherit; +exports.inArray = inArray; +exports._inArray = _inArray; +exports.removeFrom = removeFrom; +exports._removeFrom = _removeFrom; +exports.pushTo = pushTo; +exports._pushTo = _pushTo; +exports.deregAll = deregAll; +exports.defaults = defaults; +exports.mergeR = mergeR; +exports.ancestors = ancestors; +exports.pick = pick; +exports.omit = omit; +exports.pluck = pluck; +exports.filter = filter; +exports.find = find; +exports.mapObj = mapObj; +exports.map = map; +exports.values = values; +exports.allTrueR = allTrueR; +exports.anyTrueR = anyTrueR; +exports.unnestR = unnestR; +exports.flattenR = flattenR; +exports.pushR = pushR; +exports.uniqR = uniqR; +exports.unnest = unnest; +exports.flatten = flatten; +exports.assertPredicate = assertPredicate; +exports.assertMap = assertMap; +exports.assertFn = assertFn; +exports.pairs = pairs; +exports.arrayTuples = arrayTuples; +exports.applyPairs = applyPairs; +exports.tail = tail; +exports.copy = copy; +exports._extend = _extend; +exports.silenceUncaughtInPromise = silenceUncaughtInPromise; +exports.silentRejection = silentRejection; +exports.notImplemented = notImplemented; +exports.services = services; +exports.Glob = Glob; +exports.curry = curry; +exports.compose = compose; +exports.pipe = pipe; +exports.prop = prop; +exports.propEq = propEq; +exports.parse = parse; +exports.not = not; +exports.and = and; +exports.or = or; +exports.all = all; +exports.any = any; +exports.is = is; +exports.eq = eq; +exports.val = val; +exports.invoke = invoke; +exports.pattern = pattern; +exports.isUndefined = isUndefined; +exports.isDefined = isDefined; +exports.isNull = isNull; +exports.isNullOrUndefined = isNullOrUndefined; +exports.isFunction = isFunction; +exports.isNumber = isNumber; +exports.isString = isString; +exports.isObject = isObject; +exports.isArray = isArray; +exports.isDate = isDate; +exports.isRegExp = isRegExp; +exports.isState = isState; +exports.isInjectable = isInjectable; +exports.isPromise = isPromise; +exports.Queue = Queue; +exports.maxLength = maxLength; +exports.padString = padString; +exports.kebobString = kebobString; +exports.functionToString = functionToString; +exports.fnToString = fnToString; +exports.stringify = stringify; +exports.beforeAfterSubstr = beforeAfterSubstr; +exports.hostRegex = hostRegex; +exports.stripFile = stripFile; +exports.splitHash = splitHash; +exports.splitQuery = splitQuery; +exports.splitEqual = splitEqual; +exports.trimHashVal = trimHashVal; +exports.splitOnDelim = splitOnDelim; +exports.joinNeighborsR = joinNeighborsR; +exports.Trace = Trace; +exports.trace = trace; +exports.Param = Param; +exports.ParamTypes = ParamTypes; +exports.StateParams = StateParams; +exports.ParamType = ParamType; +exports.PathNode = PathNode; +exports.PathUtils = PathUtils; +exports.resolvePolicies = resolvePolicies; +exports.defaultResolvePolicy = defaultResolvePolicy; +exports.Resolvable = Resolvable; +exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN; +exports.ResolveContext = ResolveContext; +exports.resolvablesBuilder = resolvablesBuilder; +exports.StateBuilder = StateBuilder; +exports.StateObject = StateObject; +exports.StateMatcher = StateMatcher; +exports.StateQueueManager = StateQueueManager; +exports.StateRegistry = StateRegistry; +exports.StateService = StateService; +exports.TargetState = TargetState; +exports.HookBuilder = HookBuilder; +exports.matchState = matchState; +exports.RegisteredHook = RegisteredHook; +exports.makeEvent = makeEvent; +exports.Rejection = Rejection; +exports.Transition = Transition; +exports.TransitionHook = TransitionHook; +exports.TransitionEventType = TransitionEventType; +exports.defaultTransOpts = defaultTransOpts; +exports.TransitionService = TransitionService; +exports.UrlMatcher = UrlMatcher; +exports.UrlMatcherFactory = UrlMatcherFactory; +exports.UrlRouter = UrlRouter; +exports.UrlRuleFactory = UrlRuleFactory; +exports.BaseUrlRule = BaseUrlRule; +exports.UrlService = UrlService; +exports.ViewService = ViewService; +exports.UIRouterGlobals = UIRouterGlobals; +exports.UIRouter = UIRouter; +exports.$q = $q; +exports.$injector = $injector; +exports.BaseLocationServices = BaseLocationServices; +exports.HashLocationService = HashLocationService; +exports.MemoryLocationService = MemoryLocationService; +exports.PushStateLocationService = PushStateLocationService; +exports.MemoryLocationConfig = MemoryLocationConfig; +exports.BrowserLocationConfig = BrowserLocationConfig; +exports.keyValsToObjectR = keyValsToObjectR; +exports.getParams = getParams; +exports.parseUrl = parseUrl$1; +exports.buildUrl = buildUrl; +exports.locationPluginFactory = locationPluginFactory; +exports.servicesPlugin = servicesPlugin; +exports.hashLocationPlugin = hashLocationPlugin; +exports.pushStateLocationPlugin = pushStateLocationPlugin; +exports.memoryLocationPlugin = memoryLocationPlugin; +exports.UIRouterPluginBase = UIRouterPluginBase; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=angular-ui-router.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js.map new file mode 100644 index 00000000..91ecc8a4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.js.map @@ -0,0 +1,193 @@ +{ + "version": 3, + "file": "angular-ui-router.js", + "sources": [ + "@uirouter/angularjs/src/angular.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/hof.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/glob.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateObject.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/predicates.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/coreservices.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/common.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/queue.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/rejectFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/trace.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/interface.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/targetState.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionHook.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/hookRegistry.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/hookBuilder.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/paramType.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/param.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/path/@uirouter/core/path/pathNode.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/path/@uirouter/core/path/pathFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/resolvable.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/interface.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/resolveContext.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/strings.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/index.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/paramTypes.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/stateParams.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/path/@uirouter/core/path/index.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/index.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateBuilder.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateMatcher.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateQueueManager.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateRegistry.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlMatcher.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlMatcherFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlRule.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlRouter.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/view/@uirouter/core/view/view.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/globals.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/router.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/coreResolvables.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/redirectTo.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/onEnterExitRetain.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/resolve.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/views.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/updateGlobals.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/url.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/lazyLoad.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionEventType.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/ignoredTransition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/invalidTransition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/index.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/q.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/injector.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/utils.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/baseLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/hashLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/memoryLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/pushStateLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/memoryLocationConfig.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/browserLocationConfig.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/plugins.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/vanilla.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/interface.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/index.ts", + "@uirouter/angularjs/src/statebuilders/views.ts", + "@uirouter/angularjs/src/templateFactory.ts", + "@uirouter/angularjs/src/stateProvider.ts", + "@uirouter/angularjs/src/statebuilders/onEnterExitRetain.ts", + "@uirouter/angularjs/src/locationServices.ts", + "@uirouter/angularjs/src/urlRouterProvider.ts", + "@uirouter/angularjs/src/services.ts", + "@uirouter/angularjs/src/injectables.ts", + "@uirouter/angularjs/src/directives/stateDirectives.ts", + "@uirouter/angularjs/src/stateFilters.ts", + "@uirouter/angularjs/src/directives/viewDirective.ts", + "@uirouter/angularjs/src/viewScroll.ts", + "@uirouter/angularjs/src/index.ts" + ], + "sourcesContent": [ + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n", + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n", + "/**\n * @coreapi\n * @module core\n */\n/** \n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n", + "/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n", + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n", + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n", + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n", + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n", + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}", + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];", + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n", + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n", + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n", + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n", + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n", + "/** @module common */ /** for typedoc */\nexport * from \"./common\";\nexport * from \"./coreservices\";\nexport * from \"./glob\";\nexport * from \"./hof\";\nexport * from \"./predicates\";\nexport * from \"./queue\";\nexport * from \"./strings\";\nexport * from \"./trace\";\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport { fromJson, toJson, identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n", + "/** @module path */ /** for typedoc */\nexport * from \"./pathNode\";\nexport * from \"./pathFactory\";", + "/** @module resolve */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./resolvable\";\nexport * from \"./resolveContext\";\n", + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n", + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}", + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n", + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n", + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n", + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n", + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n", + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n", + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n", + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n", + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n", + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n", + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n", + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n", + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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", + "/**\n * # Transition subsystem\n *\n * This module contains APIs related to a Transition.\n *\n * See:\n * - [[TransitionService]]\n * - [[Transition]]\n * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]]\n *\n * @coreapi\n * @preferred\n * @module transition\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./hookBuilder\";\nexport * from \"./hookRegistry\";\nexport * from \"./rejectFactory\";\nexport * from \"./transition\";\nexport * from \"./transitionHook\";\nexport * from \"./transitionEventType\";\nexport * from \"./transitionService\";\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./vanilla/index\";\n", + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}", + "/**\n * @coreapi\n * @module common\n */ /** */\n\nexport * from \"./common/index\";\nexport * from \"./params/index\";\nexport * from \"./path/index\";\nexport * from \"./resolve/index\";\nexport * from \"./state/index\";\nexport * from \"./transition/index\";\nexport * from \"./url/index\";\nexport * from \"./view/index\";\nexport * from \"./globals\";\n\nexport * from \"./router\";\nexport * from \"./vanilla\";\nexport * from \"./interface\";\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n", + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n", + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n *
    \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n", + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n", + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n", + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n", + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n", + "/**\n * # Angular 1 injectable services\n *\n * This is a list of the objects which can be injected using angular's injector.\n *\n * There are three different kind of injectable objects:\n *\n * ## **Provider** objects\n * #### injectable into a `.config()` block during configtime\n *\n * - [[$uiRouterProvider]]: The UI-Router instance\n * - [[$stateProvider]]: State registration\n * - [[$transitionsProvider]]: Transition hooks\n * - [[$urlServiceProvider]]: All URL related public APIs\n *\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\n *\n * ## **Service** objects\n * #### injectable globally during runtime\n *\n * - [[$uiRouter]]: The UI-Router instance\n * - [[$trace]]: Enable transition trace/debug\n * - [[$transitions]]: Transition hooks\n * - [[$state]]: Imperative state related APIs\n * - [[$stateRegistry]]: State registration\n * - [[$urlService]]: All URL related public APIs\n * - [[$uiRouterGlobals]]: Global variables\n * - [[$uiViewScroll]]: Scroll an element into view\n *\n * - [[$stateParams]]: (deprecated) Global state param values\n * - [[$urlRouter]]: (deprecated) URL synchronization\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\n *\n * ## **Per-Transition** objects\n *\n * - These kind of objects are injectable into:\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\n * - Transition Hooks ([[TransitionService.onStart]], etc),\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\n *\n * #### Different instances are injected based on the [[Transition]]\n *\n * - [[$transition$]]: The current Transition object\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\n *\n * @ng1api\n * @preferred\n * @module injectables\n */ /** */\n\nimport { StateProvider } from \"./stateProvider\";\nimport {\n StateService, TransitionService, Transition, UrlRouter, UrlMatcherFactory,\n StateParams, StateRegistry, UIRouterGlobals, UIRouter, Trace, UrlService\n} from \"@uirouter/core\";\nimport { UIViewScrollProvider } from \"./viewScroll\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\n\n/**\n * The current (or pending) State Parameters\n *\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\n *\n * The values are not updated until *after* a `Transition` successfully completes.\n *\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\n *\n * ### Deprecation warning:\n *\n * The value injected for `$stateParams` is different depending on where it is injected.\n *\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\n *\n * Because of these confusing details, this service is deprecated.\n *\n * ### Instead of using the global `$stateParams` service object,\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\n *\n * ```js\n * MyService.$inject = ['$uiRouterGlobals'];\n * function MyService($uiRouterGlobals) {\n * return {\n * paramValues: function () {\n * return $uiRouterGlobals.params;\n * }\n * }\n * }\n * ```\n *\n * ### Instead of using the per-transition `$stateParams` object,\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\n *\n * ```js\n * MyController.$inject = ['$transition$'];\n * function MyController($transition$) {\n * var username = $transition$.params().username;\n * // .. do something with username\n * }\n * ```\n *\n * ---\n *\n * This object can be injected into other services.\n *\n * #### Deprecated Example:\n * ```js\n * SomeService.$inject = ['$http', '$stateParams'];\n * function SomeService($http, $stateParams) {\n * return {\n * getUser: function() {\n * return $http.get('/api/users/' + $stateParams.username);\n * }\n * }\n * };\n * angular.service('SomeService', SomeService);\n * ```\n * @deprecated\n */\nvar $stateParams: StateParams;\n\n/**\n * Global UI-Router variables\n *\n * The router global state as a **Service Object** (injectable during runtime).\n *\n * This object contains globals such as the current state and current parameter values.\n */\nvar $uiRouterGlobals: UIRouterGlobals;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time.\n */\nlet $uiRouter: UIRouter ;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime.\n */\nvar $uiRouterProvider: UIRouter;\n\n/**\n * Transition debug/tracing\n *\n * The [[Trace]] singleton as a **Service Object** (injectable during runtime).\n *\n * Enables or disables Transition tracing which can help to debug issues.\n */\nvar $trace: Trace;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.\n */\nvar $transitions: TransitionService;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitions]] for injection during runtime.\n */\nvar $transitionsProvider: TransitionService;\n\n/**\n * The current [[Transition]] object\n *\n * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)\n *\n * This object returns information about the current transition, including:\n *\n * - To/from states\n * - To/from parameters\n * - Transition options\n * - States being entered, exited, and retained\n * - Resolve data\n * - A Promise for the transition\n * - Any transition failure information\n * - An injector for both Service and Per-Transition Objects\n */\nvar $transition$: Transition;\n\n/**\n * The State Service\n *\n * The [[StateService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service used to manage and query information on registered states.\n * It exposes state related APIs including:\n *\n * - Start a [[Transition]]\n * - Imperatively lazy load states\n * - Check if a state is currently active\n * - Look up states by name\n * - Build URLs for a state+parameters\n * - Configure the global Transition error handler\n *\n * This angular service exposes the [[StateService]] singleton.\n */\nvar $state: StateService;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.\n */\nvar $stateRegistry: StateRegistry;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.\n */\nvar $stateRegistryProvider: StateRegistry;\n\n/**\n * The View Scroll provider\n *\n * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[UIViewScrollProvider]] singleton and is\n * used to disable UI-Router's scroll behavior.\n */\nvar $uiViewScrollProvider: UIViewScrollProvider;\n\n/**\n * The View Scroll function\n *\n * The View Scroll function as a **Service Object** (injectable during runtime).\n *\n * This is a function that scrolls an element into view.\n * The element is scrolled after a `$timeout` so the DOM has time to refresh.\n *\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].\n *\n * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true.\n */\nvar $uiViewScroll: ($element: JQuery) => void;\n\n/**\n * The StateProvider\n *\n * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[StateProvider]] singleton.\n *\n * The `StateProvider` is primarily used to register states or add custom state decorators.\n *\n * ##### Note: This provider is a ng1 vestige.\n * It is a passthrough to [[$stateRegistry]] and [[$state]].\n */\nvar $stateProvider: StateProvider;\n\n/**\n * The URL Service Provider\n *\n * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).\n *\n * A service used to configure and interact with the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during runtime as [[$urlService]].\n */\nvar $urlServiceProvider: UrlService;\n\n/**\n * The URL Service\n *\n * The [[UrlService]] singleton as a **Service Object** (injectable during runtime).\n *\n * Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n *\n * Used to configure the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n */\nvar $urlService: UrlService;\n\n/**\n * The URL Router Provider\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead.\n *\n * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time).\n *\n * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlRouterProvider: UrlRouterProvider;\n\n/**\n * The Url Router\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime).\n *\n * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlRouter: UrlRouter;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlMatcherFactory: UrlMatcherFactory;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlMatcherFactoryProvider: UrlMatcherFactory;\n\n\n\n", + "/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n", + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n", + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n", + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ], + "names": [ + "ng_from_import.module", + "val", + "this", + "angular", + "RejectType", + "Category", + "TransitionHookPhase", + "TransitionHookScope", + "noop", + "DefType", + "inherit", + "values", + "root", + "all", + "prop", + "pattern", + "pairs", + "parseUrl", + "__extends", + "id" + ], + "mappings": ";;;;;;;;;;;;;;;;AAMA,IAAI,cAAc,GAAG,OAAO,CAAC;AAE7B,AAAO,IAAM,EAAE,GAAG,CAAC,cAAc,IAAIA,qBAAqB,IAAI,cAAc,GAAG,cAAc;;ACR7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,eAAsB,EAAY;IAChC,IAAI,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;IAEjC,iBAAiB,IAAW;QAC1B,IAAI,IAAI,CAAC,MAAM,IAAI,gBAAgB;YACjC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO;YACL,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SACxD,CAAC;KACH;IACD,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B;;;;;;;AAUD;IACE,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,IAAI,KAAK,GAAG,I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AG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;KACxB,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,UAAU,aAAmC,EAAE,QAAyB;YAChH,IAAI,eAAe,EAAE;gBACnB,OAAO,aAAa,CAAC;aACtB;YAED,OAAO,UAAU,QAAgB;gBAC/B,OAAO,QAAQ,CAAC;oBACd,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;iBAC9B,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;aACd,CAAC;SACH,CAAC,CAAC;CACJ;AAEDA,EAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA4B,mBAAmB,CAAC,CAAC;;ACvC3G;;;;AAMA,AAWA,YAAe,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js new file mode 100644 index 00000000..67e2e2fe --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js @@ -0,0 +1,12 @@ +/** + * State-based routing for AngularJS 1.x + * 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 https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles + * @version v1.0.10 + * @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.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 Et(t,e){return{relative:$t(t)||e.$current,inherit:!0,source:"sref"}}function Tt(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 Ae=0,He=function(){function e(t,e,r){this.$id=Ae++,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():J(t)}(this.detail),e=this;return"Transition Rejection($id: "+e.$id+" type: "+e.type+", message: "+e.message+", detail: "+t+")"},e.prototype.toPromise=function(){return he(je(this),{_transitionRejection:this})},e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&Ft(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 Ft(e)(t)?t:e.errored(t)},e}(),qe=function(t){var e=t.viewDecl,r=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+r+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"},De=Function.prototype.bind.call(console.log,console),Fe=Kt(console.table)?console.table.bind(console):De.bind(console);!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 Ne=At("$id"),Ue=At("router.$id"),Le=function(t){return"Transition #"+Ne(t)+"-"+Ue(t)},Me=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(V).forEach(function(t){return n._enabled[t]=e})},e.prototype.enable=function(){for(var t=[],e=0;e "+J(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Le(e)+": Ignored <> "+J(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=W(e.registeredHook.callback);console.log(Le(r)+": Hook -> "+i+" context: "+o+", "+M(200,a))}},e.prototype.traceHookResult=function(e,r,n){this.enabled(t.Category.HOOK)&&console.log(Le(r)+": <- Hook returned: "+M(200,J(e)))},e.prototype.traceResolvePath=function(e,r,n){this.enabled(t.Category.RESOLVE)&&console.log(Le(n)+": Resolving "+e+" ("+r+")")},e.prototype.traceResolvableResolved=function(e,r){this.enabled(t.Category.RESOLVE)&&console.log(Le(r)+": <- Resolved "+e+" to: "+M(200,J(e.data)))},e.prototype.traceError=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Le(r)+": <- Rejected "+J(r)+", reason: "+e)},e.prototype.traceSuccess=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Le(r)+": <- Success "+J(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: "+B(30,e)+" "+j(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: "+M(200,r))},e.prototype.traceViewSync=function(e){if(this.enabled(t.Category.VIEWCONFIG)){var r=e.map(function(t){var e=t[0],r=t[1];return{"ui-view fqn":e.$type+":"+e.fqn,"state: view name":r&&r.viewDecl.$context.name+": "+r.viewDecl.$name+" ("+r.viewDecl.$type+")"}}).sort(function(t,e){return t["ui-view fqn"].localeCompare(e["ui-view fqn"])});Fe(r)}},e.prototype.traceViewServiceEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+qe(r))},e.prototype.traceViewServiceUIViewEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+j(r))},e}(),Be=new Me;!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 Ge=function(){function t(t,e,r,n){this._stateRegistry=t,this._identifier=e,this._identifier=e,this._params=he({},r||{}),this._options=he({},n||{}),this._definition=t.matcher.find(e,this._options.relative)}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()+"'"+J(this.params())},t.prototype.withState=function(e){return new t(this._stateRegistry,e,this._params,this._options)},t.prototype.withParams=function(e,r){void 0===r&&(r=!1);var n=r?e:he({},this._params,e);return new t(this._stateRegistry,this._identifier,n,this._options)},t.prototype.withOptions=function(e,r){void 0===r&&(r=!1);var n=r?e:he({},this._options,e);return new t(this._stateRegistry,this._identifier,this._params,n)},t.isDef=function(t){return t&&t.state&&(Zt(t.state)||Zt(t.state.name))},t}(),We={current:l,transition:null,traceData:{},bind:null},ze=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,We),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;Be.traceHookInvocation(this,this.transition,n);var i=function(r){return e.eventType.getErrorHandler(t)(r)},o=function(r){return e.eventType.getResultHandler(t)(r)};try{var a=e.callback.call(n.bind,t.transition,t.stateContext);return!this.type.synchronous&&ie(a)?a.catch(function(t){return He.normalize(t).toPromise()}).then(o,i):o(a)}catch(t){return i(He.normalize(t))}finally{e.invokeLimit&&++e.invokeCount>=e.invokeLimit&&e.deregister()}}},e.prototype.handleHookResult=function(t){var e=this,r=this.getNotCurrentRejection();return r||(ie(t)?t.then(function(t){return e.handleHookResult(t)}):(Be.traceHookResult(t,this.transition,this.options),!1===t?He.aborted("Hook aborted transition").toPromise():Ft(Ge)(t)?He.redirected(t).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?He.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?He.aborted().toPromise():this.isSuperseded()?He.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")+", "+M(200,z(r.callback))},e.chain=function(t,e){return t.reduce(function(t,e){return t.then(function(){return e.invokeHook()})},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=he({},this.options(),t.options(),n);t=t.withOptions(i,!0);var o=this.router.transitionService.create(this._treeChanges.from,t),a=this._treeChanges.entering,u=o._treeChanges.entering;return er.matching(u,a,er.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||T(t.to,t.from).map(function(t){return t[0].state!==t[1].state}).reduce(be,!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 Xe.changed(e,r,n)}).reduce(Re,[])}},e.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(be,!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=er.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=ze.runAllHooks,n=function(t){return e._hookBuilder.buildHooksForPhase(t)},i=n(t.TransitionHookPhase.BEFORE);return ze.invokeHooks(i,function(){var t=e.router.globals;return t.lastStartedTransitionId=e.$id,t.transition=e,t.transitionHistory.enqueue(e),Be.traceTransitionStart(e),ae.$q.when(void 0)}).then(function(){var e=n(t.TransitionHookPhase.RUN);return ze.invokeHooks(e,function(){return ae.$q.when(void 0)})}).then(function(){Be.traceSuccess(e.$to(),e),e.success=!0,e._deferred.resolve(e.to()),r(n(t.TransitionHookPhase.SUCCESS))},function(i){Be.traceError(i,e),e.success=!1,e._deferred.reject(i),e._error=i,r(n(t.TransitionHookPhase.ERROR))}),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();if(t.self.abstract)return"Cannot transition to abstract state '"+t.name+"'";var e=t.parameters(),r=this.params(),n=e.filter(function(t){return!t.validates(r[t.id])});return n.length?"Param values not valid for state '"+t.name+"'. Invalid params: [ "+n.map(function(t){return t.id}).join(", ")+" ]":!1===this.success?this._error:void 0},e.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:_(t,["#"])};return"Transition#"+this.$id+"( '"+(Xt(t)?t.name:t)+"'"+J(r(this._treeChanges.from.map(jt("paramValues")).reduce(_e,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(Xt(e)?e.name:e)+"'"+J(r(this.params()))+" )"},e.diToken=e,e}(),pr=null,dr=function(t){var e=He.isRejectionPromise;return(pr=pr||s([[Ht(zt),Ut("undefined")],[Jt,Ut("null")],[ie,Ut("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[Ft(He),u("toString")],[Ft(hr),u("toString")],[Ft(nr),u("toString")],[c,W],[Ut(!0),f]]))(t)},vr=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)]}},mr=new RegExp("^(?:[a-z]+:)?//[^/]+/"),yr=function(t){return t.replace(/\/[^/]*$/,"")},gr=vr("#"),_r=vr("?"),wr=vr("="),$r=function(t){return t?t.replace(/^#/,""):""},Sr=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=g(t.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=de(b(this.defaultTypes,function(t,e){return new Ke(he({name:e},t))}),{})}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 Ke(he({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.");he(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:Ft(String),pattern:/.*/,equals:function(t,e){return t==e}};return he({},r,t)};he(Sr.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:Ft(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:Ft(Object),equals:pe,pattern:/[^/]*/}),any:t({encode:f,decode:f,is:function(){return!0},equals:pe})})}();var br,Rr=function(){function t(t){void 0===t&&(t={}),he(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)).length)for(var s in n)a.indexOf(n[s])>=0||(a.push(n[s]),o[n[s]]=this[n[s]]);return he({},o,t)},t}(),Er=function(t){if(!Zt(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},Tr=function(t,e){return function(r){var n=r;n&&n.url&&n.name&&n.name.match(/\.\*\*$/)&&(n.url+="{remainder:any}");var i=Er(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return!1===n.reloadOnSearch&&e&&(t=he(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)}},Cr=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},Pr=function(t){return function(e){var r=e.url&&e.url.parameters({inherit:!1})||[],n=$e(we(_(e.params||{},r.map(jt("id"))),function(e,r){return t.fromConfig(r,null,e)}));return r.concat(n).map(function(t){return[t.id,t]}).reduce(C,{})}},kr=function(){function t(t,e){this.matcher=t;var r=this,n=function(){return t.find("")},i=function(t){return""===t.name};this.builders={name:[Y],self:[Z],parent:[function(e){return i(e)?null:t.find(r.parentName(e))||n()}],data:[X],url:[Tr(e,n)],navigable:[Cr(i)],params:[Pr(e.paramFactory)],views:[],path:[tt],includes:[et],resolvables:[rt]}}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.pop()&&r.pop(),r.length){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return 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}(),Or=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return 0===(t=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=$e(this._states).filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return a.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",a.map(function(t){return t.name})),a[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}(),Ir=function(){function t(t){this._router=t,this.states={},this.listeners=[],this.matcher=new Or(this.states),this.builder=new kr(this.matcher,t.urlMatcherFactory),this.stateQueue=new xr(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(){me(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}(),jr=function(t,e,r){return t[e]=t[e]||r()},Vr=Q("/"),Ar=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]?"[\\s\\S]*":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 de(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)).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;var y=(s=t.substring(h)).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);)d((u=v(a,!0)).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 nt.apply(null,t)}).concat(nt(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=jr(this._cache,"pattern",function(){return new RegExp(["^",Ce(i._cache.path.map(jt("_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)}],[Ge.isDef,function(t){return n.go(t.state,t.params,t.options)}],[Ft(Ge),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;t?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=it(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(!qr.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){me(this._rules,t)},t.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},t.prototype.otherwise=function(t){var e=ot(t);this._otherwiseFn=this.urlRuleFactory.create(Ut(!0),e),this._sorted=!1},t.prototype.initial=function(t){var e=ot(t);this.rule(this.urlRuleFactory.create(function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)},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}(),Br=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){Be.traceViewServiceEvent("<- Removing",t),me(this._viewConfigs,t)},t.prototype.activateViewConfig=function(t){Be.traceViewServiceEvent("-> Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){function e(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var n=this,i=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(C,{}),o=r(function(t,e,r,n){return e*(t(r)-t(n))}),a=this._uiViews.sort(o(function(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)},1)).map(function(r){var a=n._viewConfigs.filter(t.matches(i,r));return a.length>1&&a.sort(o(e,-1)),[r,a[0]]});Be.traceViewSync(a),a.forEach(function(t){var e=t[0],r=t[1];-1!==n._uiViews.indexOf(e)&&e.configUpdated(r)})},t.prototype.registerUIView=function(t){Be.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&Be.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(Be.traceViewServiceUIViewEvent("<- Deregistering",t),me(e)(t)):Be.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},t.prototype.available=function(){return this._uiViews.map(jt("fqn"))},t.prototype.active=function(){return this._uiViews.filter(jt("$config")).map(jt("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);return 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),{uiViewName:n,uiViewContextAnchor:i}},t.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(!pe(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)}},t}(),Gr=function(){function t(){this.params=new Rr,this.lastStartedTransitionId=-1,this.transitionHistory=new Ve([],1),this.successfulTransitions=new Ve([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}(),Wr=function(t){return t.reduce(function(t,e){return t[e]=oe(e),t},{dispose:l})},zr=["url","path","search","hash","onChange"],Jr=["port","protocol","host","baseHref","html5Mode","hashPrefix"],Qr=["type","caseInsensitive","strictMode","defaultSquashPolicy"],Kr=["sort","when","initial","otherwise","rules","rule","removeRule"],Yr=["deferIntercept","listen","sync","match"],Zr=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,zr,e);var n=function(){return t.locationConfig};h(n,this.config,n,Jr,e);var i=function(){return t.urlMatcherFactory};h(i,this.config,i,Qr);var o=function(){return t.urlRouter};h(o,this.rules,o,Kr),h(o,this,o,Yr)}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.locationServiceStub=Wr(zr),t.locationConfigStub=Wr(Jr),t}(),Xr=0,tn=function(){function t(t,e){void 0===t&&(t=Zr.locationServiceStub),void 0===e&&(e=Zr.locationConfigStub),this.locationService=t,this.locationConfig=e,this.$id=Xr++,this._disposed=!1,this._disposables=[],this.trace=Be,this.viewService=new Br,this.transitionService=new kn(this),this.globals=new Gr,this.urlMatcherFactory=new Hr,this.urlRouter=new Mr(this),this.stateRegistry=new Ir(this),this.stateService=new On(this),this.urlService=new Zr(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;t&&Kt(t.dispose)?t.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),me(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]:$e(this._plugins)},t}(),en=function(t){return t.onCreate({},at)},rn=function(t){function e(e){if(e)return e instanceof Ge?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)}},nn=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},rn)},on=ut("onExit"),an=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},on)},un=ut("onRetain"),sn=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},un)},cn=ut("onEnter"),fn=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},cn)},ln=function(t){return new cr(t.treeChanges().to).resolvePath("EAGER",t).then(l)},hn=function(t){return t.onStart({},ln,{priority:1e3})},pn=function(t,e){return new cr(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(l)},dn=function(t){return t.onEnter({entering:Ut(!0)},pn,{priority:1e3})},vn=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)},mn=function(t){return t.onFinish({},vn)},yn=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()}},gn=function(t){return t.onSuccess({},yn)},_n=function(t){var e=t.router.globals,r=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,k(t.params(),e.params)},{priority:1e4}),t.promise.then(r,r)},wn=function(t){return t.onCreate({},_n)},$n=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)},Sn=function(t){return t.onSuccess({},$n,{priority:9999})},bn=function(t){var e=t.router,r=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return st(t,e)});return ae.$q.all(r).then(function(){if("url"!==t.originalTransition().options().source){var r=t.targetState();return e.stateService.target(r.identifier(),r.params(),r.options())}var n=e.urlService,i=n.match(n.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,u=i.match;return e.stateService.target(a,u,t.options())}e.urlService.sync()})},Rn=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},bn)},En=function(){return function(t,e,r,n,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=ze.HANDLE_RESULT),void 0===a&&(a=ze.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}}(),Tn=function(t){return t.onBefore({},ct,{priority:-9999})},Cn=function(t){return t.onBefore({},ft,{priority:-1e4})},Pn={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},kn=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){$e(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,me(t,e)})})},e.prototype.create=function(t,e){return new hr(t,e,this._router)},e.prototype._defineCoreEvents=function(){var e=t.TransitionHookPhase,r=ze,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=ze.HANDLE_RESULT),void 0===a&&(a=ze.REJECT_ERROR),void 0===u&&(u=!1);var s=new En(t,e,r,n,i,o,a,u);this._eventTypes.push(s),H(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=en(this),t.ignored=Tn(this),t.invalid=Cn(this),t.redirectTo=nn(this),t.onExit=an(this),t.onRetain=sn(this),t.onEnter=fn(this),t.eagerResolve=hn(this),t.lazyResolve=dn(this),t.loadViews=mn(this),t.activateViews=gn(this),t.updateGlobals=wn(this),t.updateUrl=Sn(this),t.lazyLoad=Rn(this)},e}(),On=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 He?(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(ve(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?He.invalid(e.error()).toPromise():ae.$q.when(t(e,i,c)).then(f).then(function(t){return t||r()})}var n=this,i=er.makeTargetState(this.router.stateRegistry,t),o=this.router.globals,a=function(){return o.transitionHistory.peekTail()},u=a(),s=new Ve(this.invalidCallbacks.slice()),c=new cr(t).injector(),f=function(t){if(t instanceof Ge){var e=t;return(e=n.target(e.identifier(),e.params(),e.options())).valid()?a()!==u?He.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):He.invalid(e.error()).toPromise()}};return r()},e.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){me(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=m(r,{relative:this.$current,inherit:!0},Pn);return this.transitionTo(t,e,n)},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)+"'");return new Ge(this.router.stateRegistry,t,e,r)},e.prototype.getCurrentPath=function(){var t=this,e=this.router.globals.successfulTransitions.peekTail();return e?e.treeChanges().to:[new tr(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,Pn);n=he(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 je(u.error());var c=function(e){return function(r){if(r instanceof He){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 Ge){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 Ie(l),he(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 Xe.equals(i,Xe.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 Xe.equals(a,Xe.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=er.makeTargetState(this.router.stateRegistry,n);return e=e||this.router.transitionService.create(n,i),st(e,r)},e}(),xn={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 xn.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},In={},jn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Vn=/([^\s,]+)/g,An={get:function(t){return In[t]},has:function(t){return null!=An.get(t)},invoke:function(t,e,r){var n=he({},In,r||{}),i=An.annotate(t),o=ke(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(jn,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(Vn)||[]}},Hn=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},qn=function(t){return t.split("&").filter(f).map(wr).reduce(Hn,{})},Dn=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(Re,[]).join("&");return e+(i?"?"+i:"")+(n?"#"+n:"")},Fn=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 lt(r._get()).hash},this.path=function(){return lt(r._get()).path},this.search=function(){return qn(lt(r._get()).search)},this._location=ue.location,this._history=ue.history}return t.prototype.url=function(t,e){return void 0===e&&(e=!0),zt(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),Dn(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return me(e._listeners,t)}},t.prototype.dispose=function(t){ge(this._listeners)},t}(),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)}}(),Un=function(t){function e(e){var r=t.call(this,e,!1)||this;return ue.addEventListener("hashchange",r._listener,!1),r}return Nn(e,t),e.prototype._get=function(){return $r(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),ue.removeEventListener("hashchange",this._listener)},e}(Fn),Ln=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)}}(),Mn=function(t){function e(e){return t.call(this,e,!0)||this}return Ln(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,r,n){this._url=r},e}(Fn),Bn=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)}}(),Gn=function(t){function e(e){var r=t.call(this,e,!0)||this;return r._config=e.urlService.config,ue.addEventListener("popstate",r._listener,!1),r}return Bn(e,t),e.prototype._getBasePrefix=function(){return yr(this._config.baseHref())},e.prototype._get=function(){var t=this._location,e=t.pathname,r=t.hash,n=t.search;n=_r(n)[1],r=gr(r)[1];var i=this._getBasePrefix(),o=e===this._config.baseHref(),a=e.startsWith(i);return(e=o?"/":a?e.substring(i.length):e)+(n?"?"+n:"")+(r?"#"+r:"")},e.prototype._set=function(t,e,r,n){var i=this._getBasePrefix()+r;n?this._history.replaceState(t,e,i):this._history.pushState(t,e,i)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),ue.removeEventListener("popstate",this._listener)},e}(Fn),Wn=function(){return function(){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}}(),zn=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.hostname},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:zt(this._baseHref)?this._baseHref:this.applyDocumentBaseHref()},t.prototype.applyDocumentBaseHref=function(){var t=document.getElementsByTagName("base")[0];return this._baseHref=t?t.href.substr(location.origin.length):""},t.prototype.dispose=function(){},t}(),Jn=ht("vanilla.hashBangLocation",!1,Un,zn),Qn=ht("vanilla.pushStateLocation",!0,Gn,zn),Kn=ht("vanilla.memoryLocation",!1,Mn,Wn),Yn=function(){function t(){}return t.prototype.dispose=function(t){},t}(),Zn=Object.freeze({root:ue,fromJson:ce,toJson:fe,forEach:le,extend:he,equals:pe,identity:f,noop:l,createProxyFunctions:h,inherit:de,inArray:ve,_inArray:p,removeFrom:me,_removeFrom:d,pushTo:ye,_pushTo:v,deregAll:ge,defaults:m,mergeR:_e,ancestors:y,pick:g,omit:_,pluck:w,filter:$,find:S,mapObj:we,map:b,values:$e,allTrueR:Se,anyTrueR:be,unnestR:Re,flattenR:Ee,pushR:R,uniqR:Te,unnest:Ce,flatten:Pe,assertPredicate:ke,assertMap:Oe,assertFn:E,pairs:xe,arrayTuples:T,applyPairs:C,tail:P,copy:k,_extend:O,silenceUncaughtInPromise:Ie,silentRejection:je,notImplemented:oe,services:ae,Glob:Lt,curry:r,compose:n,pipe:i,prop:jt,propEq:Vt,parse:At,not:Ht,and:o,or:a,all:qt,any:Dt,is:Ft,eq:Nt,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:Ve,maxLength:M,padString:B,kebobString:G,functionToString:W,fnToString:z,stringify:J,beforeAfterSubstr:vr,hostRegex:mr,stripFile:yr,splitHash:gr,splitQuery:_r,splitEqual:wr,trimHashVal:$r,splitOnDelim:Q,joinNeighborsR:K,get Category(){return t.Category},Trace:Me,trace:Be,get DefType(){return t.DefType},Param:Xe,ParamTypes:Sr,StateParams:Rr,ParamType:Ke,PathNode:tr,PathUtils:er,resolvePolicies:ir,defaultResolvePolicy:rr,Resolvable:nr,NATIVE_INJECTOR_TOKEN:sr,ResolveContext:cr,resolvablesBuilder:rt,StateBuilder:kr,StateObject:Mt,StateMatcher:Or,StateQueueManager:xr,StateRegistry:Ir,StateService:On,TargetState:Ge,get TransitionHookPhase(){return t.TransitionHookPhase},get TransitionHookScope(){return t.TransitionHookScope},HookBuilder:Qe,matchState:A,RegisteredHook:Je,makeEvent:H,get RejectType(){return t.RejectType},Rejection:He,Transition:hr,TransitionHook:ze,TransitionEventType:En,defaultTransOpts:Pn,TransitionService:kn,UrlMatcher:Ar,UrlMatcherFactory:Hr,UrlRouter:Mr,UrlRuleFactory:qr,BaseUrlRule:Dr,UrlService:Zr,ViewService:Br,UIRouterGlobals:Gr,UIRouter:tn,$q:xn,$injector:An,BaseLocationServices:Fn,HashLocationService:Un,MemoryLocationService:Mn,PushStateLocationService:Gn,MemoryLocationConfig:Wn,BrowserLocationConfig:zn,keyValsToObjectR:Hn,getParams:qn,parseUrl:lt,buildUrl:Dn,locationPluginFactory:ht,servicesPlugin:pt,hashLocationPlugin:Jn,pushStateLocationPlugin:Qn,memoryLocationPlugin:Kn,UIRouterPluginBase:Yn}),Xn=function(t,e){return t.reduce(function(t,r){return t||zt(e[r])},!1)},ti=0,ei=function(){function t(t,e,r){var n=this;this.path=t,this.viewDecl=e,this.factory=r,this.$id=ti++,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 cr(this.path),n=this.path.reduce(function(t,e){return he(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 Be.traceViewServiceEvent("Loaded",t),t.controller=e.controller,he(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 nr("",n,r).get(t)},t}(),ri=function(){function t(){var t=this;this._useHttp=It.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 nr("",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 nr("",i,n).get(r)},t.prototype.makeComponentTemplate=function(t,e,r,n){n=n||{};var i=It.version.minor>=3?"::":"",o=function(t){var e=G(t);return/^(x|data)-/.exec(e)?"x-"+e:e},a=mt(r).map(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+"'"}).join(" "),u=o(r);return"<"+u+" "+a+">"},t}(),ni=function(t){return ii(Xt(t.bindToController)?t.bindToController:t.scope)},ii=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]}})},oi=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}(),ai=function(t){return function(e,r){var n=e[t],i="onExit"===t?"from":"to";return n?function(t,e){var r=new cr(t.treeChanges(i)),o=he(yi(r),{$state$:e,$transition$:t});return ae.$injector.invoke(n,this,o)}:void 0}},ui=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 me(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}(),si=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=new Dr(function(){return t(ae.$injector,e._router.locationService)},f);return this._urlRouter.rule(r),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}();It.module("ui.router.angular1",[]);var ci=It.module("ui.router.init",[]),fi=It.module("ui.router.util",["ng","ui.router.init"]),li=It.module("ui.router.router",["ui.router.util"]),hi=It.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),pi=It.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),di=(It.module("ui.router.compat",["ui.router"]),null);yt.$inject=["$locationProvider"];var vi=function(t){return["$uiRouterProvider",function(e){var r=e.router[t];return r.$get=function(){return r},r}]};gt.$inject=["$injector","$q","$uiRouter"];_t.$inject=["$rootScope"],ci.provider("$uiRouter",yt),li.provider("$urlRouter",["$uiRouterProvider",function(t){return t.urlRouterProvider=new si(t)}]),fi.provider("$urlService",vi("urlService")),fi.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return di.urlMatcherFactory}]),fi.provider("$templateFactory",function(){return new ri}),hi.provider("$stateRegistry",vi("stateRegistry")),hi.provider("$uiRouterGlobals",vi("globals")),hi.provider("$transitions",vi("transitionService")),hi.provider("$state",["$uiRouterProvider",function(){return he(di.stateProvider,{$get:function(){return di.stateService}})}]),hi.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),pi.factory("$view",function(){return di.viewService}),pi.service("$trace",function(){return Be}),pi.run(_t),fi.run(["$urlMatcherFactory",function(t){}]),hi.run(["$state",function(t){}]),li.run(["$urlRouter",function(t){}]),ci.run(gt);var mi,yi=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,{})};mi=["$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=bt(i),f=a[1]||a[0],l=null,h={},p=function(){return St(r,i,h)},d=wt(o.uiSref);h.uiState=d.state,h.uiStateOpts=o.uiSrefOpts?n.$eval(o.uiSrefOpts):{},d.paramExpr&&(n.$watch(d.paramExpr,function(t){h.uiStateParams=he({},t),u()},!0),h.uiStateParams=he({},n.$eval(d.paramExpr))),u(),n.$on("$destroy",t.stateRegistry.onStatesChanged(u)),n.$on("$destroy",t.transitionService.onSuccess({},u)),c.clickable&&(s=Rt(i,r,e,c,p),Tt(i,n,s,h.uiStateOpts))}}}];var gi;gi=["$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=bt(i),f=a[1]||a[0],h=null,p={},d=function(){return St(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=Rt(i,r,e,c,d),Tt(i,n,s,p.uiStateOpts))}}}];var _i;_i=["$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,l)}function u(e,r,n){var o={state:t.get(e,$t(i))||{name:e},params:r,activeClass:n};return p.push(o),function(){me(p)(o)}}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(Re,[])},o=n(p).concat(r(c)).reduce(Te,[]),a=n(p.filter(function(e){return t.includes(e.state.name,e.params)})),u=!!p.filter(function(e){return t.is(e.state.name,e.params)}).length?r(c):[],s=a.concat(u).reduce(Te,[]),l=o.filter(function(t){return!ve(s,t)});e.$evalAsync(function(){s.forEach(function(t){return i.addClass(t)}),l.forEach(function(t){return i.removeClass(t)})})}var c,h,p=[];c=r(o.uiSrefActiveEq||"",!1)(e);try{h=e.$eval(o.uiSrefActive)}catch(t){}h=h||r(o.uiSrefActive||"",!1)(e),Xt(h)&&le(h,function(t,r){if(Zt(t)){var n=wt(t);u(n.state,e.$eval(n.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(Xt(h)&&p.length>0)){var r=u(t,e,h);return s(),r}},e.$on("$stateChangeSuccess",s),e.$on("$destroy",n.transitionService.onStart({},a)),n.globals.transition&&a(n.globals.transition),s()}]}}],It.module("ui.router.state").directive("uiSref",mi).directive("uiSrefActive",_i).directive("uiSrefActiveEq",_i).directive("uiState",gi),Ct.$inject=["$state"],Pt.$inject=["$state"],It.module("ui.router.state").filter("isState",Ct).filter("includedByState",Pt);var wi;wi=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){It.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){It.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(){if(d&&(Be.traceUIViewEvent("Removing (previous) el",d.data("$uiView")),d.remove(),d=null),m&&(Be.traceUIViewEvent("Destroying scope",R),m.$destroy(),m=null),v){var t=v.data("$uiViewAnim");Be.traceUIViewEvent("Animate out",t),w.leave(v,function(){t.$$animLeave.resolve(),d=null}),d=v,v=null}}function p(t){var n=e.$new(),o=i.defer(),a=i.defer(),u={$cfg:t,$uiView:R},s={$animEnter:o.promise,$animLeave:a.promise,$$animLeave:a};n.$emit("$viewContentLoading",b);var l=f(n,function(t){t.data("$uiViewAnim",s),t.data("$uiView",u),w.enter(t,c,function(){o.resolve(),m&&m.$emit("$viewContentAnimationEnded"),(zt(_)&&!_||e.$eval(_))&&r(t)}),h()});v=l,(m=n).$emit("$viewContentLoaded",t||$),m.$eval(g)}var d,v,m,y,g=l.onload||"",_=l.autoscroll,w=o(),$=void 0,S=c.inheritedData("$uiView")||u,b=n(l.uiView||l.name||"")(e)||"$default",R={$type:"ng1",id:s.count++,name:b,fqn:S.$uiView.fqn?S.$uiView.fqn+"."+b:b,config:null,configUpdated:function(t){(!t||t instanceof ei)&&(a($,t)||(Be.traceUIViewConfigUpdated(R,t&&t.viewDecl&&t.viewDecl.$context),$=t,p(t)))},get creationContext(){var t=At("$cfg.viewDecl.$context")(S),e=At("$uiView.creationContext")(S);return t||e}};Be.traceUIViewEvent("Linking",R),c.data("$uiView",{$uiView:R}),p(),y=t.registerUIView(R),e.$on("$destroy",function(){Be.traceUIViewEvent("Destroying/Unregistering",R),y()})}}};return s}],kt.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var $i="function"==typeof It.module("ui.router").component,Si=0;It.module("ui.router.state").directive("uiView",wi),It.module("ui.router.state").directive("uiView",kt),It.module("ui.router.state").provider("$uiViewScroll",function(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]});t.default="ui.router",t.core=Zn,t.watchDigests=_t,t.getLocals=yi,t.getNg1ViewConfigFactory=dt,t.ng1ViewsBuilder=vt,t.Ng1ViewConfig=ei,t.StateProvider=oi,t.UrlRouterProvider=si,t.root=ue,t.fromJson=ce,t.toJson=fe,t.forEach=le,t.extend=he,t.equals=pe,t.identity=f,t.noop=l,t.createProxyFunctions=h,t.inherit=de,t.inArray=ve,t._inArray=p,t.removeFrom=me,t._removeFrom=d,t.pushTo=ye,t._pushTo=v,t.deregAll=ge,t.defaults=m,t.mergeR=_e,t.ancestors=y,t.pick=g,t.omit=_,t.pluck=w,t.filter=$,t.find=S,t.mapObj=we,t.map=b,t.values=$e,t.allTrueR=Se,t.anyTrueR=be,t.unnestR=Re,t.flattenR=Ee,t.pushR=R,t.uniqR=Te,t.unnest=Ce,t.flatten=Pe,t.assertPredicate=ke,t.assertMap=Oe,t.assertFn=E,t.pairs=xe,t.arrayTuples=T,t.applyPairs=C,t.tail=P,t.copy=k,t._extend=O,t.silenceUncaughtInPromise=Ie,t.silentRejection=je,t.notImplemented=oe,t.services=ae,t.Glob=Lt,t.curry=r,t.compose=n,t.pipe=i,t.prop=jt,t.propEq=Vt,t.parse=At,t.not=Ht,t.and=o,t.or=a,t.all=qt,t.any=Dt,t.is=Ft,t.eq=Nt,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=Ve,t.maxLength=M,t.padString=B,t.kebobString=G,t.functionToString=W,t.fnToString=z,t.stringify=J,t.beforeAfterSubstr=vr,t.hostRegex=mr,t.stripFile=yr,t.splitHash=gr,t.splitQuery=_r,t.splitEqual=wr,t.trimHashVal=$r,t.splitOnDelim=Q,t.joinNeighborsR=K,t.Trace=Me,t.trace=Be,t.Param=Xe,t.ParamTypes=Sr,t.StateParams=Rr,t.ParamType=Ke,t.PathNode=tr,t.PathUtils=er,t.resolvePolicies=ir,t.defaultResolvePolicy=rr,t.Resolvable=nr,t.NATIVE_INJECTOR_TOKEN=sr,t.ResolveContext=cr,t.resolvablesBuilder=rt,t.StateBuilder=kr,t.StateObject=Mt,t.StateMatcher=Or,t.StateQueueManager=xr,t.StateRegistry=Ir,t.StateService=On,t.TargetState=Ge,t.HookBuilder=Qe,t.matchState=A,t.RegisteredHook=Je,t.makeEvent=H,t.Rejection=He,t.Transition=hr,t.TransitionHook=ze,t.TransitionEventType=En,t.defaultTransOpts=Pn,t.TransitionService=kn,t.UrlMatcher=Ar,t.UrlMatcherFactory=Hr,t.UrlRouter=Mr,t.UrlRuleFactory=qr,t.BaseUrlRule=Dr,t.UrlService=Zr,t.ViewService=Br,t.UIRouterGlobals=Gr,t.UIRouter=tn,t.$q=xn,t.$injector=An,t.BaseLocationServices=Fn,t.HashLocationService=Un,t.MemoryLocationService=Mn,t.PushStateLocationService=Gn,t.MemoryLocationConfig=Wn,t.BrowserLocationConfig=zn,t.keyValsToObjectR=Hn,t.getParams=qn,t.parseUrl=lt,t.buildUrl=Dn,t.locationPluginFactory=ht,t.servicesPlugin=pt,t.hashLocationPlugin=Jn,t.pushStateLocationPlugin=Qn,t.memoryLocationPlugin=Kn,t.UIRouterPluginBase=Yn,Object.defineProperty(t,"__esModule",{value:!0})}); +//# sourceMappingURL=angular-ui-router.min.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js.map new file mode 100644 index 00000000..d364253a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/angular-ui-router.min.js.map @@ -0,0 +1,1679 @@ +{ + "version": 3, + "file": "angular-ui-router.min.js", + "sources": [ + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/hof.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/predicates.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/common.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/trace.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/hookRegistry.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/hookBuilder.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/paramType.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/param.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/strings.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateBuilder.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlMatcher.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlRouter.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/coreResolvables.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/onEnterExitRetain.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/lazyLoad.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/ignoredTransition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/invalidTransition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/utils.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/plugins.ts", + "@uirouter/angularjs/src/statebuilders/views.ts", + "@uirouter/angularjs/src/templateFactory.ts", + "@uirouter/angularjs/src/services.ts", + "@uirouter/angularjs/src/directives/stateDirectives.ts", + "@uirouter/angularjs/src/stateFilters.ts", + "@uirouter/angularjs/src/directives/viewDirective.ts", + "@uirouter/angularjs/src/angular.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/glob.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateObject.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/coreservices.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/common/@uirouter/core/common/queue.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/rejectFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/interface.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/targetState.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionHook.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/path/@uirouter/core/path/pathNode.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/path/@uirouter/core/path/pathFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/resolvable.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/interface.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/resolve/@uirouter/core/resolve/resolveContext.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transition.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/paramTypes.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/params/@uirouter/core/params/stateParams.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateMatcher.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateQueueManager.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateRegistry.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlMatcherFactory.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlRule.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/view/@uirouter/core/view/view.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/globals.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/url/@uirouter/core/url/urlService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/router.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/redirectTo.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/resolve.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/views.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/updateGlobals.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/hooks/@uirouter/core/hooks/url.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionEventType.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/transition/@uirouter/core/transition/transitionService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/state/@uirouter/core/state/stateService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/q.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/injector.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/baseLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/hashLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/memoryLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/pushStateLocationService.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/memoryLocationConfig.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/vanilla/@uirouter/core/vanilla/browserLocationConfig.ts", + "@uirouter/angularjs/node_modules/@uirouter/core/lib-esm/@uirouter/core/interface.ts", + "@uirouter/angularjs/src/stateProvider.ts", + "@uirouter/angularjs/src/statebuilders/onEnterExitRetain.ts", + "@uirouter/angularjs/src/locationServices.ts", + "@uirouter/angularjs/src/urlRouterProvider.ts", + "@uirouter/angularjs/src/viewScroll.ts", + "@uirouter/angularjs/src/index.ts" + ], + "sourcesContent": [ + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n", + "/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n", + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n", + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n", + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}", + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n", + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n", + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n", + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n", + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n", + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n", + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n", + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n", + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n", + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n", + "/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the
    directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n", + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n", + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n", + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n", + "/**\n * @coreapi\n * @module core\n */\n/** \n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n", + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n", + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n", + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];", + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n", + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n", + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n", + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport { fromJson, toJson, identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n", + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n", + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}", + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n", + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n", + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n", + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n", + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n", + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n", + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;", + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n", + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}", + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n *
    \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n", + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n", + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n", + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n", + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ], + "names": [ + "fn", + "args", + "length", + "func_args_length", + "apply", + "curried", + "concat", + "slice", + "arguments", + "initial_args", + "start", + "i", + "result", + "this", + "call", + "_i", + "funcs", + "compose", + "reverse", + "fn1", + "fn2", + "fnName", + "obj", + "struct", + "x", + "val", + "isArray", + "head", + "tail", + "filter", + "not", + "isString", + "isFunction", + "source", + "target", + "bind", + "fnNames", + "latebind", + "bindFunction", + "makeLateRebindFn", + "Object", + "keys", + "reduce", + "acc", + "name", + "array", + "indexOf", + "idx", + "splice", + "arr", + "push", + "opts", + "defaultsList", + "_defaultsList", + "defaultVals", + "extend", + "pick", + "first", + "second", + "path", + "n", + "propNames", + "objCopy", + "prop_1", + "inArray", + "key", + "collection", + "propName", + "map", + "prop", + "callback", + "accept", + "forEach", + "item", + "predicateOrMap", + "errMsg", + "Error", + "maxArrayLen", + "min", + "Math", + "memo", + "keyValTuple", + "value", + "undefined", + "src", + "dest", + "toObj", + "j", + "o1", + "o2", + "t1", + "tup", + "all", + "_arraysEq", + "isDate", + "getTime", + "isRegExp", + "toString", + "any", + "b", + "_equals", + "a1", + "a2", + "arrayTuples", + "t", + "uiview", + "state", + "creationContext", + "id", + "$type", + "fqn", + "input", + "isNumber", + "Category", + "criterion", + "toMatch", + "_state", + "globStrings", + "glob", + "Glob", + "matches", + "registry", + "transitionService", + "eventType", + "matchObject", + "options", + "registeredHook", + "RegisteredHook", + "removeHookFn", + "hooks", + "deregister", + "_registeredHooks", + "removeFrom", + "hookRegistrationFn", + "reverseDepthSort", + "l", + "r", + "factor", + "depthDelta", + "node", + "hook", + "priority", + "type", + "mode", + "isDefined", + "allTruthyMode", + "arrayWrap", + "arrayUnwrap", + "val1", + "val2", + "left", + "right", + "paramTypeFn", + "wrapperFn", + "arrayEqualsHandler", + "arrayHandler", + "_this", + "dynamic", + "pattern", + "inherit", + "is", + "$arrayMode", + "cfg", + "isShorthand", + "getStaticDefaultValue", + "$$fn", + "isInjectable", + "urlType", + "location", + "paramTypes", + "DefType", + "CONFIG", + "PATH", + "SEARCH", + "ParamType", + "config", + "isOptional", + "defaultPolicy", + "squash", + "arrayMode", + "replace", + "configuredKeys", + "from", + "to", + "max", + "str", + "substr", + "camelCase", + "$1", + "toLowerCase", + "fnStr", + "fnToString", + "namedFunctionMatch", + "match", + "toStr", + "_fn", + "o", + "isObject", + "seen", + "stringifyPattern", + "JSON", + "stringify", + "format", + "delim", + "re", + "RegExp", + "split", + "identity", + "pushR", + "self", + "$$state", + "parent", + "data", + "includes", + "annotate", + "$injector", + "services", + "strictDi", + "token", + "p", + "provide", + "literal2Resolvable", + "Resolvable", + "resolveFn", + "deps", + "policy", + "useFactory", + "dependencies", + "useClass", + "useValue", + "useExisting", + "tuple2Resolvable", + "pipe", + "tuple", + "item2Resolvable", + "decl", + "resolve", + "resolveObj", + "resolvePolicies", + "objects2Tuples", + "resolvePolicy", + "string", + "param", + "surroundPattern", + "url", + "isHtml5", + "absolute", + "baseHref", + "stripFile", + "handler", + "TargetState", + "isDef", + "trans", + "addResolvable", + "UIRouter", + "router", + "Transition", + "params", + "entering", + "hookName", + "transition", + "hookFn", + "lazyLoadFn", + "lazyLoad", + "promise", + "$q", + "when", + "then", + "Array", + "states", + "stateRegistry", + "register", + "err", + "reject", + "ignoredReason", + "_ignoredReason", + "trace", + "traceTransitionIgnored", + "pending", + "globals", + "abort", + "Rejection", + "ignored", + "toPromise", + "valid", + "error", + "orEmptyString", + "_a", + "beforehash", + "hash", + "_b", + "search", + "serviceClass", + "configurationClass", + "service", + "locationService", + "configuration", + "locationConfig", + "dispose", + "templateFactory", + "view", + "get", + "Ng1ViewConfig", + "ctrlKeys", + "compKeys", + "nonCompKeys", + "allViewKeys", + "views", + "hasAnyKey", + "join", + "viewsObject", + "$default", + "component", + "resolveAs", + "$context", + "$name", + "normalized", + "ViewService", + "normalizeUIViewTarget", + "$uiViewName", + "uiViewName", + "$uiViewContextAnchor", + "uiViewContextAnchor", + "cmpDefs", + "getBindings", + "unnestR", + "$locationProvider", + "$location", + "$browser", + "$sniffer", + "$rootScope", + "$http", + "$templateCache", + "ng1LocationService", + "_runtimeServices", + "stateProvider", + "StateProvider", + "stateService", + "decorator", + "ng1ViewsBuilder", + "getStateHookBuilder", + "viewService", + "_pluginapi", + "_viewConfigFactory", + "getNg1ViewConfigFactory", + "Ng1LocationServices", + "monkeyPatchPathParameterType", + "$get", + "$inject", + "$uiRouter", + "resolvables", + "resolvable", + "$watch", + "approximateDigests", + "ref", + "parsed", + "paramsOnly", + "paramExpr", + "el", + "$uiView", + "inheritedData", + "parse", + "$state", + "$element", + "def", + "uiState", + "current", + "uiStateOpts", + "defaultOpts", + "href", + "uiStateParams", + "isSvg", + "prototype", + "isForm", + "nodeName", + "attr", + "isAnchor", + "toUpperCase", + "clickable", + "$timeout", + "getDef", + "e", + "button", + "which", + "ctrlKey", + "metaKey", + "shiftKey", + "go", + "preventDefault", + "ignorePreventDefaultCount", + "cancel", + "relative", + "stateContext", + "$current", + "element", + "scope", + "events", + "on", + "events_1", + "event_1", + "$on", + "off", + "events_2", + "event_2", + "isFilter", + "$stateful", + "includesFilter", + "$compile", + "$controller", + "$transitions", + "$view", + "getControllerAs", + "getResolveAs", + "restrict", + "compile", + "tElement", + "initial", + "html", + "empty", + "contents", + "$cfg", + "viewDecl", + "getTemplate", + "noop", + "resolveCtx", + "ResolveContext", + "traceUIViewFill", + "link", + "controller", + "controllerAs", + "locals", + "getLocals", + "controllerInstance", + "$scope", + "children", + "registerControllerCallbacks", + "cmp_1", + "kebobName", + "kebobString", + "tagRegexp_1", + "deregisterWatch_1", + "directiveEl", + "tagName", + "exec", + "angular", + "ctrlInstance", + "$onInit", + "hasComponentImpl", + "viewState", + "hookOptions", + "uiOnParamsChanged", + "viewCreationTrans_1", + "getResolvable", + "onSuccess", + "$transition$", + "exiting", + "toParams", + "fromParams", + "toSchema", + "treeChanges", + "paramSchema", + "fromSchema", + "changedToParams", + "equals", + "changedKeys_1", + "newValues", + "uiCanExit", + "id_1", + "_uiCanExitId", + "prevTruthyAnswer_1", + "redirectedFrom", + "criteria", + "onBefore", + "ids", + "ng_from_global", + "ng", + "ng_from_import", + "ng_from_import.module", + "propEq", + "curry", + "ctor", + "constructor", + "eq", + "other", + "v", + "text", + "regexpString", + "seg", + "regexp", + "test", + "StateObject", + "create", + "stateDecl", + "isStateClass", + "__stateObjectCache", + "nameGlob", + "fromString", + "root", + "defaults", + "matchingKeys", + "parameters", + "values", + "hasOwnProperty", + "parameter", + "find", + "tis", + "isUndefined", + "isNull", + "isNullOrUndefined", + "or", + "isState", + "isPromise", + "and", + "notImplemented", + "fnname", + "global", + "fromJson", + "toJson", + "cb", + "assign", + "_extend", + "extra", + "_inArray", + "_removeFrom", + "pushTo", + "_pushTo", + "deregAll", + "functions", + "mergeR", + "mapObj", + "allTrueR", + "elem", + "anyTrueR", + "flattenR", + "uniqR", + "unnest", + "flatten", + "assertPredicate", + "assertFn", + "assertMap", + "pairs", + "silenceUncaughtInPromise", + "catch", + "silentRejection", + "_items", + "_limit", + "Queue", + "items", + "shift", + "size", + "RejectType", + "message", + "detail", + "d", + "detailString", + "_transitionRejection", + "rejection", + "SUPERSEDED", + "redirected", + "superseded", + "INVALID", + "IGNORED", + "ABORTED", + "ERROR", + "errored", + "viewConfigString", + "viewConfig", + "$id", + "consoleLog", + "Function", + "console", + "log", + "consoletable", + "table", + "_tid", + "_rid", + "transLbl", + "Trace", + "enabled", + "categories", + "k", + "parseInt", + "isNaN", + "normalizedCat", + "category", + "_enabled", + "_set", + "TRANSITION", + "step", + "HOOK", + "event", + "context", + "functionToString", + "maxLength", + "hookResult", + "transitionOptions", + "RESOLVE", + "reason", + "finalState", + "viewData", + "UIVIEW", + "padString", + "uiViewString", + "traceUIViewEvent", + "VIEWCONFIG", + "mapping", + "uiViewData", + "ui-view fqn", + "state: view name", + "sort", + "a", + "localeCompare", + "TransitionHookPhase", + "TransitionHookScope", + "_stateRegistry", + "_identifier", + "_params", + "_options", + "_definition", + "matcher", + "base", + "stateName", + "newParams", + "newOpts", + "defaultOptions", + "traceData", + "hookPhase", + "RUN", + "isActive", + "TransitionHook", + "defaultErrorHandler", + "_deregistered", + "notCurrent", + "getNotCurrentRejection", + "traceHookInvocation", + "handleError", + "getErrorHandler", + "handleResult", + "getResultHandler", + "synchronous", + "normalize", + "invokeLimit", + "invokeCount", + "handleHookResult", + "traceHookResult", + "aborted", + "isTargetState", + "_disposed", + "_aborted", + "isSuperseded", + "waitFor", + "prev", + "nextHook", + "invokeHook", + "doneCallback", + "remainingHooks", + "chain", + "logError", + "tranSvc", + "matchCriteria", + "removeHookFromRegistry", + "nodes", + "matching", + "matchState", + "_getPathTypes", + "_getDefaultMatchCriteria", + "mn", + "pathtype", + "isStateHook", + "STATE", + "_matchingNodes", + "_getMatchingNodes", + "every", + "HookBuilder", + "phase", + "_getEvents", + "buildHooks", + "hookType", + "matchingHooks", + "getMatchingHooks", + "baseHookOptions", + "criteriaMatchPath", + "transitionHook", + "tupleSort", + "reverseSort", + "isCreate", + "CREATE", + "reg", + "getHooks", + "sub", + "decode", + "isSearch", + "ArrayType", + "hasOwn", + "urlMatcherFactory", + "getType", + "unwrapShorthand", + "arrayDefaults", + "arrayParamNomenclature", + "getArrayMode", + "$asArray", + "raw", + "getSquashPolicy", + "defaultSquashPolicy", + "getReplace", + "Param", + "replaceSpecialValues", + "_defaultValueCache", + "defaultValue", + "invoke", + "getDefaultValue", + "$normalize", + "encoded", + "encode", + "paramValues", + "params_1", + "values1", + "values2", + "changed", + "validates", + "stateOrNode", + "PathNode", + "res", + "clone", + "getParamVal", + "paramDef", + "pDef", + "applyPairs", + "paramsFn", + "diff", + "PathUtils", + "targetState", + "applyRawParams", + "fromPath", + "toPath", + "buildPath", + "inheritParams", + "viewDecls", + "subPath", + "viewConfigs", + "createViewConfig", + "toKeys", + "noInherit", + "toNode", + "toParamVals", + "incomingParamVals", + "omit", + "fromParamVals", + "nodeParamVals", + "ownParamVals", + "reloadState", + "keep", + "node1", + "node2", + "nonDynamicParams", + "nodesMatch", + "retained", + "retainedWithToParams", + "retainedNode", + "cloned", + "pathA", + "pathB", + "done", + "nodeA", + "nodeB", + "predicate", + "elementIdx", + "defaultResolvePolicy", + "async", + "arg1", + "resolved", + "literal", + "thisPolicy", + "statePolicy", + "resolveContext", + "findNode", + "maybeWaitForRx", + "getPolicy", + "observable$", + "cached", + "cache", + "take", + "getDependencies", + "resolvedDeps", + "resolvedValue", + "traceResolvableResolved", + "LAZY", + "EAGER", + "WAIT", + "NOWAIT", + "RXWAIT", + "whens", + "ALL_WHENS", + "EAGER_WHENS", + "NATIVE_INJECTOR_TOKEN", + "_path", + "newResolvables", + "matchedWhens", + "traceResolvePath", + "matchesPolicy", + "acceptedVals", + "whenOrAsync", + "promises", + "nodeResolvables", + "nowait", + "wait", + "subContext", + "getResult", + "_injector", + "UIInjectorImpl", + "availableResolvables", + "_node", + "fromInjector", + "injector", + "getNative", + "native", + "stateSelf", + "defer", + "_deferred", + "_targetState", + "_transitionCount", + "buildToPath", + "_treeChanges", + "createTransitionHookRegFns", + "onCreateHooks", + "_hookBuilder", + "buildHooksForPhase", + "invokeHooks", + "applyViewConfigs", + "makeEvent", + "enteringStates", + "$from", + "$to", + "compare", + "pathname", + "freeze", + "pathName", + "getTokens", + "topath", + "targetNode", + "addResolvables", + "rf", + "originalTransition", + "redirects", + "redirectOpts", + "newOptions", + "withOptions", + "newTransition", + "originalEnteringNodes", + "redirectEnteringNodes", + "nodeIsReloading", + "tc", + "reload", + "nodeSchemas", + "schema", + "toVals", + "fromVals", + "changes", + "_changedParams", + "same", + "newTC", + "pendTC", + "runAllHooks", + "getHooksFor", + "allBeforeHooks", + "BEFORE", + "lastStartedTransitionId", + "transitionHistory", + "enqueue", + "traceTransitionStart", + "allRunHooks", + "traceSuccess", + "success", + "SUCCESS", + "traceError", + "_error", + "abstract", + "paramDefs", + "invalidParams", + "fromStateOrName", + "toStateOrName", + "avoidEmptyHash", + "stringifyPatternFn", + "isRejection", + "isRejectionPromise", + "beforeAfterSubstr", + "char", + "hostRegex", + "splitHash", + "splitQuery", + "splitEqual", + "trimHashVal", + "ParamTypes", + "types", + "defaultTypes", + "definition", + "definitionFn", + "typeQueue", + "_flushTypeQueue", + "makeDefaultType", + "valToString", + "defaultTypeBase", + "String", + "query", + "int", + "bool", + "Boolean", + "date", + "getFullYear", + "getMonth", + "getDate", + "capture", + "Date", + "valueOf", + "json", + "initDefaultTypes", + "defaultRuleSortFn", + "StateParams", + "parentParams", + "parents", + "ancestors", + "inherited", + "inheritList", + "parseUrl", + "charAt", + "substring", + "getUrlBuilder", + "$urlMatcherFactoryProvider", + "stateDec", + "paramMap", + "paramConfig", + "reloadOnSearch", + "isMatcher", + "navigable", + "append", + "getNavigableBuilder", + "isRoot", + "getParamsBuilder", + "paramFactory", + "urlParams", + "nonUrlParams", + "fromConfig", + "builders", + "nameBuilder", + "selfBuilder", + "parentName", + "dataBuilder", + "pathBuilder", + "includesBuilder", + "resolvablesBuilder", + "StateBuilder", + "parentFn", + "segments", + "pop", + "_states", + "StateMatcher", + "stateOrName", + "matchGlob", + "isStr", + "isRelative", + "resolvePath", + "baseState", + "splitName", + "pathLength", + "relName", + "$registry", + "$urlRouter", + "builder", + "listeners", + "queue", + "StateQueueManager", + "flush", + "registered", + "orphans", + "previousQueueLength", + "getState", + "name_1", + "build", + "orphanIdx", + "existingState", + "existingFutureState", + "attachRoute", + "listener", + "s", + "rule", + "urlRuleFactory", + "_router", + "stateQueue", + "urlRouter", + "_registerRoot", + "StateRegistry", + "rootStateDef", + "#", + "_root", + "stateDefinition", + "getChildren", + "deregistered", + "$ur", + "rules", + "removeRule", + "deregisteredStates", + "_deregisterTree", + "found", + "func", + "memoizeTo", + "splitOnSlash", + "splitOnDelim", + "strict", + "caseInsensitive", + "m", + "segment", + "placeholder", + "searchPlaceholder", + "last", + "patterns", + "checkParamErrors", + "UrlMatcher", + "nameValidator", + "matchDetails", + "index", + "makeRegexpType", + "_segments", + "lastIndex", + "fromSearch", + "_compiled", + "quoteRegExp", + "_children", + "_cache", + "allParams", + "pathParams", + "searchParams", + "nPathSegments", + "urlm", + "reverseString", + "decodePathArray", + "findParam", + "validParamVal", + "isValid", + "isDefaultValue", + "urlMatchers", + "pathSegmentsAndParams", + "getDetails", + "queryParams", + "pathString", + "encodeDashes", + "encodeURIComponent", + "queryString", + "paramDetails", + "c", + "charCodeAt", + "joinNeighborsR", + "weights", + "weightsA", + "weightsB", + "padVal", + "len", + "padArrays", + "cmp", + "_isStrictMode", + "_isCaseInsensitive", + "UrlMatcherFactory", + "_defaultSquashPolicy", + "_getConfig", + "object", + "UrlRuleFactory", + "what", + "makeRule", + "_what", + "fromUrlMatcher", + "fromState", + "fromRegExp", + "BaseUrlRule", + "urlMatcher", + "_handler", + "details", + "matchPriority", + "optional", + "transitionTo", + "sticky", + "Number", + "prioritySort", + "typeSort", + "URLMATCHER", + "REGEXP", + "RAW", + "OTHER", + "urlMatcherSort", + "idSort", + "useMatchPriority", + "createProxyFunctions", + "UrlRouter", + "listen", + "_rules", + "_otherwiseFn", + "compareFn", + "stableSort", + "_sortFn", + "_sorted", + "arrOfWrapper", + "wrapperA", + "wrapperB", + "cmpDiff", + "wrapper", + "ensureSorted", + "best", + "weight", + "checkRule", + "evt", + "defaultPrevented", + "$url", + "urlService", + "newurl", + "applyResult", + "_stopFn", + "onChange", + "sync", + "read", + "html5Mode", + "hashPrefix", + "appendBasePath", + "slash", + "port", + "protocol", + "host", + "isUrlRule", + "_id", + "handlerFn", + "getHandlerFn", + "urlParts", + "interceptDeferred", + "_rootViewContext", + "_registeredUIViews", + "_uiViews", + "_activeViewConfigs", + "_viewConfigs", + "_rootContext", + "viewType", + "factory", + "_viewConfigFactories", + "cfgFactory", + "cfgs", + "traceViewServiceEvent", + "count", + "uiViewsByFqn", + "uiv", + "depthCompare", + "depthFn", + "posNeg", + "uiView", + "stateDepth", + "matchingConfigs", + "viewConfigDepth", + "traceViewSync", + "configUpdated", + "traceViewServiceUIViewEvent", + "uiViews", + "rawViewName", + "viewAtContext", + "relativeViewNameSugar", + "anchor", + "vc", + "vcSegments", + "uivSegments", + "negOffset", + "fqnToFirstSegment", + "uiViewContext", + "UIRouterGlobals", + "clear", + "successfulTransitions", + "makeStub", + "locationServicesFns", + "locationConfigFns", + "umfFns", + "rulesFns", + "syncFns", + "lateBind", + "locationServices", + "umf", + "UrlService", + "_routerInstance", + "locationServiceStub", + "locationConfigStub", + "TransitionService", + "StateService", + "disposable", + "_disposables", + "plugin", + "pluginInstance", + "_plugins", + "pluginName", + "registerAddCoreResolvables", + "onCreate", + "addCoreResolvables", + "redirectToHook", + "redirect", + "redirectTo", + "registerRedirectToHook", + "onStart", + "onExitHook", + "makeEnterExitRetainHook", + "registerOnExitHook", + "onExit", + "onRetainHook", + "registerOnRetainHook", + "onRetain", + "onEnterHook", + "registerOnEnterHook", + "onEnter", + "eagerResolvePath", + "registerEagerResolvePath", + "lazyResolveState", + "registerLazyResolveState", + "loadEnteringViews", + "enteringViews", + "load", + "registerLoadEnteringViews", + "onFinish", + "activateViews", + "exitingViews", + "deactivateViewConfig", + "activateViewConfig", + "registerActivateViews", + "updateGlobalState", + "clearCurrentTransition", + "copy", + "registerUpdateGlobalState", + "updateUrl", + "urlOptions", + "update", + "registerUpdateUrl", + "lazyLoadHook", + "lazyLoadState", + "orig", + "identifier", + "parts", + "registerLazyLoadHook", + "hookOrder", + "HANDLE_RESULT", + "REJECT_ERROR", + "registerIgnoredTransitionHook", + "ignoredHook", + "registerInvalidTransitionHook", + "invalidTransitionHook", + "defaultTransOpts", + "notify", + "custom", + "_deregisterHookFns", + "_defineCorePaths", + "_defineCoreEvents", + "_registerCoreTransitionHooks", + "hooksArray", + "Phase", + "TH", + "paths", + "_criteriaPaths", + "_defineEvent", + "LOG_REJECTED_RESULT", + "THROW_ERROR", + "LOG_ERROR", + "_definePathType", + "TransitionEventType", + "_eventTypes", + "cmpByPhase", + "hookScope", + "fns", + "addCoreResolves", + "invalid", + "eagerResolve", + "lazyResolve", + "loadViews", + "updateGlobals", + "$error$", + "stack", + "getters", + "boundFns", + "invalidCallbacks", + "toState", + "nextCallback", + "callbackQueue", + "dequeue", + "checkForRedirect", + "invokeNextCallback", + "makeTargetState", + "latestThing", + "peekTail", + "latest", + "transOpts", + "latestSuccess", + "currentPath", + "getCurrentPath", + "exists", + "_handleInvalidTargetState", + "rejectedTransitionHandler", + "isLatest", + "run", + "errorHandler", + "transitionToPromise", + "include", + "lossy", + "$inherit", + "nav", + "_defaultErrorHandler", + "Promise", + "deferred", + "STRIP_COMMENTS", + "ARGUMENT_NAMES", + "has", + "ensureExist", + "keyValsToObjectR", + "accum", + "getParams", + "buildUrl", + "loc", + "searchObject", + "fireAfterUpdate", + "_listeners", + "_get", + "_location", + "_history", + "history", + "BaseLocationServices", + "_super", + "addEventListener", + "_listener", + "__extends", + "HashLocationService", + "title", + "removeEventListener", + "MemoryLocationService", + "_url", + "_config", + "PushStateLocationService", + "basePrefix", + "_getBasePrefix", + "exactMatch", + "startsWith", + "fullUrl", + "replaceState", + "pushState", + "_port", + "_protocol", + "_host", + "_baseHref", + "newval", + "_hashPrefix", + "_isHtml5", + "BrowserLocationConfig", + "hostname", + "newprefix", + "applyDocumentBaseHref", + "baseTag", + "document", + "getElementsByTagName", + "origin", + "hashLocationPlugin", + "locationPluginFactory", + "pushStateLocationPlugin", + "memoryLocationPlugin", + "MemoryLocationConfig", + "UIRouterPluginBase", + "makeComponentTemplate", + "bindings", + "template", + "getController", + "results", + "provider", + "controllerProvider", + "providerFn", + "version", + "minor", + "$templateRequest", + "TemplateFactory", + "_useHttp", + "asTemplate", + "asComponent", + "templateUrl", + "fromUrl", + "templateProvider", + "fromProvider", + "componentProvider", + "fromComponentProvider", + "headers", + "Accept", + "response", + "prefix", + "kebob", + "kebobed", + "attrs", + "getComponentBindings", + "attrName", + "resolveName", + "scopeBindings", + "bindToController", + "bindingsObj", + "onInvalid", + "$state$", + "_lp", + "_urlListeners", + "newUrl", + "_loc", + "_browser", + "pathType", + "~", + "/", + "~~", + "~2F", + "_urlRouter", + "UrlRouterProvider", + "ruleFn", + "otherwise", + "injectableHandler", + "$match", + "$stateParams", + "deferIntercept", + "module", + "mod_init", + "mod_util", + "mod_rtr", + "mod_state", + "mod_main", + "getProviderFor", + "serviceName", + "$urp", + "runBlock", + "watchDigests", + "uiRouter", + "urlRouterProvider", + "$urlMatcherFactory", + "uiSref", + "ctx", + "require", + "uiSrefActive", + "unlinkInfoFn", + "active", + "$$addStateInfo", + "$set", + "getTypeInfo", + "rawDef", + "processedDef", + "parseStateRef", + "uiSrefOpts", + "$eval", + "onStatesChanged", + "clickHook", + "bindEvents", + "inputAttrs", + "watchDeregFns", + "field", + "$observe", + "expr", + "$interpolate", + "$attrs", + "stateParams", + "activeClass", + "stateInfo", + "splitClasses", + "getClasses", + "stateList", + "allClasses", + "activeEqClass", + "fuzzyClasses", + "exactClasses", + "addClasses", + "removeClasses", + "cls", + "$evalAsync", + "className", + "addClass", + "removeClass", + "uiSrefActiveEq", + "addState", + "newState", + "updateAfterTransition", + "directive", + "$IsStateFilter", + "$IncludedByStateFilter", + "$animate", + "$uiViewScroll", + "enter", + "leave", + "config1", + "config2", + "rootData", + "terminal", + "transclude", + "tAttrs", + "$transclude", + "previousEl", + "remove", + "currentScope", + "activeUIView", + "$destroy", + "currentEl", + "_viewData_1", + "renderer", + "$$animLeave", + "newScope", + "$new", + "animEnter", + "animLeave", + "$uiViewData", + "$uiViewAnim", + "$animEnter", + "$animLeave", + "$emit", + "autoScrollExp", + "cleanupLastView", + "onloadExp", + "unregister", + "getRenderer", + "configsEqual", + "traceUIViewConfigUpdated", + "updateView", + "fromParentTagConfig", + "fromParentTag", + "registerUIView", + "$ViewDirectiveFill", + "useAnchorScroll", + "$anchorScroll", + "scrollIntoView" + ], + "mappings": ";;;;;;;;;;kPAoDA,WAAsBA,GAIpB,WAAiBC,GACf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zP,IAAM,IAAMlE,EAAOA,EAClEmI,OAAQ,KACRk9B,cAYF,SAA+Bl9B,KACzBA,GAAYA,aAAkB+H,MAC9BwrC,EAAah7B,EAAYvY,KAC7BqG,GAAMmtC,yBAAyBrB,EAAcnyC,GAAUA,EAAOsP,UAAYtP,EAAOsP,SAAS3G,UAE1F4P,EAAavY,EACbyzC,EAAWzzC,MAjBXpE,sBACE,IAAI83C,EAAsBhoC,GAAM,yBAANA,CAAgCgjB,GAGtDilB,EAAgBjoC,GAAM,0BAANA,CAAiCgjB,GACrD,OAAOglB,GAAuBC,IAIlCttC,GAAMuU,iBAAiB,UAAWu3B,GAWlCvmC,EAASvJ,KAAK,WAAamJ,QAAS2mC,IAEpCsB,IAEAJ,EAAa1kC,EAAMilC,eAAezB,GAClCvkC,EAAMK,IAAI,WAAY,WACpB5H,GAAMuU,iBAAiB,2BAA4Bu3B,GACnDkB,SA4FR,OAAOnC,IAGT2C,GAAmBhpC,SAAW,WAAY,cAAe,eAAgB,QAAS,KAAM,YAoFxF,IAAImG,GAAgF,mBAArDH,GAAgB08B,OAAO,aAAwB,UAE1El7B,GAAe,EAyEnBxB,GAAQ08B,OAAO,mBAAmB2D,UAAU,SAAgBrU,IAC5DhsB,GAAQ08B,OAAO,mBAAmB2D,UAAU,SAAgB2C,IgD1c5DhjC,GAAQ08B,OAAO,mBAAmBjD,SAAS,gBArB3C,WAEE,IAAIwJ,GAAkB,EAEtBh+C,KAAKg+C,gBAAkB,WACrBA,GAAkB,GAGpBh+C,KAAK8U,MAAQ,gBAAiB,WAAY,SAAUmpC,EAAqCnnC,GACvF,OAAIknC,EACKC,EAGF,SAAUnoC,GACf,OAAOgB,EAAS,WACdhB,EAAS,GAAGooC,kBACX,GAAG,kBCjBG" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js new file mode 100644 index 00000000..75c65827 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js @@ -0,0 +1,83 @@ +/** + * State-based routing for AngularJS 1.x + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@uirouter/core'), require('angular')) : + typeof define === 'function' && define.amd ? define(['exports', '@uirouter/core', 'angular'], factory) : + (factory((global['@uirouter/angularjs-resolve-service'] = {}),global['@uirouter/core'],global.angular)); +}(this, (function (exports,core,angular) { 'use strict'; + +/** @module ng1 */ /** */ +/** + * Implementation of the legacy `$resolve` service for angular 1. + */ +var $resolve = { + /** + * Asynchronously injects a resolve block. + * + * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API. + * + * ### Not bundled by default + * + * This API is no longer not part of the standard `@uirouter/angularjs` bundle. + * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle. + * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`. + * + * --- + * + * Given an object `invocables`, where keys are strings and values are injectable functions, + * injects each function, and waits for the resulting promise to resolve. + * When all resulting promises are resolved, returns the results as an object. + * + * #### Example: + * ```js + * let invocables = { + * foo: [ '$http', ($http) => + * $http.get('/api/foo').then(resp => resp.data) ], + * bar: [ 'foo', '$http', (foo, $http) => + * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ] + * } + * $resolve.resolve(invocables) + * .then(results => console.log(results.foo, results.bar)) + * // Logs foo and bar: + * // { id: 123, barId: 456, fooData: 'foo data' } + * // { id: 456, barData: 'bar data' } + * ``` + * + * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions + * @param locals key/value pre-resolved data (locals) + * @param parent a promise for a "parent resolve" + */ + resolve: function (invocables, locals, parent) { + if (locals === void 0) { locals = {}; } + var parentNode = new core.PathNode(new core.StateObject({ params: {}, resolvables: [] })); + var node = new core.PathNode(new core.StateObject({ params: {}, resolvables: [] })); + var context = new core.ResolveContext([parentNode, node]); + context.addResolvables(core.resolvablesBuilder({ resolve: invocables }), node.state); + var resolveData = function (parentLocals) { + var rewrap = function (_locals) { return core.resolvablesBuilder({ resolve: core.mapObj(_locals, function (local) { return function () { return local; }; }) }); }; + context.addResolvables(rewrap(parentLocals), parentNode.state); + context.addResolvables(rewrap(locals), node.state); + var tuples2ObjR = function (acc, tuple) { + acc[tuple.token] = tuple.value; + return acc; + }; + return context.resolvePath().then(function (results) { return results.reduce(tuples2ObjR, {}); }); + }; + return parent ? parent.then(resolveData) : resolveData({}); + } +}; +/** @hidden */ +var resolveFactory = function () { return $resolve; }; +// The old $resolve service +angular.module('ui.router').factory('$resolve', resolveFactory); + +exports.resolveFactory = resolveFactory; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=resolveService.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js.map new file mode 100644 index 00000000..943fe6d7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.js.map @@ -0,0 +1,19 @@ +{ + "version": 3, + "file": "resolveService.js", + "sources": [ + "@uirouter/angularjs/src/legacy/resolveService.ts" + ], + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from \"@uirouter/core\";\nimport * as angular from \"angular\";\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nvar $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise) => {\n let parentNode = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let node = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder( { resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder( { resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any, value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n }\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', resolveFactory);\n" + ], + "names": [ + "PathNode", + "StateObject", + "ResolveContext", + "resolvablesBuilder", + "mapObj", + "angular.module" + ], + "mappings": ";;;;;;;;;;;;AAAA;AACA,AAGA;;;AAGA,IAAI,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqCb,O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WAAW,EAAE,EAAE,CAAC,GAAA,CAAC,CAAC;SAC/E,CAAC;QAEF,OAAO,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;KAC5D;CACF,CAAC;;AAGF,AAAO,IAAM,cAAc,GAAG,cAAM,OAAA,QAAQ,GAAA,CAAC;;AAG7CC,cAAc,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAQ,cAAc,CAAC,CAAC;;;;;;;;;;;;" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js new file mode 100644 index 00000000..00c54e1e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js @@ -0,0 +1,8 @@ +/** + * State-based routing for AngularJS 1.x + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@uirouter/core"),require("angular")):"function"==typeof define&&define.amd?define(["exports","@uirouter/core","angular"],r):r(e["@uirouter/angularjs-resolve-service"]={},e["@uirouter/core"],e.angular)}(this,function(e,r,t){"use strict";var o={resolve:function(e,t,o){void 0===t&&(t={});var n=new r.PathNode(new r.StateObject({params:{},resolvables:[]})),u=new r.PathNode(new r.StateObject({params:{},resolvables:[]})),a=new r.ResolveContext([n,u]);a.addResolvables(r.resolvablesBuilder({resolve:e}),u.state);var s=function(e){var o=function(e){return r.resolvablesBuilder({resolve:r.mapObj(e,function(e){return function(){return e}})})};a.addResolvables(o(e),n.state),a.addResolvables(o(t),u.state);var s=function(e,r){return e[r.token]=r.value,e};return a.resolvePath().then(function(e){return e.reduce(s,{})})};return o?o.then(s):s({})}},n=function(){return o};t.module("ui.router").factory("$resolve",n),e.resolveFactory=n,Object.defineProperty(e,"__esModule",{value:!0})}); +//# sourceMappingURL=resolveService.min.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js.map new file mode 100644 index 00000000..a3d70a14 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/resolveService.min.js.map @@ -0,0 +1,47 @@ +{ + "version": 3, + "file": "resolveService.min.js", + "sources": [ + "@uirouter/angularjs/src/legacy/resolveService.ts" + ], + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from \"@uirouter/core\";\nimport * as angular from \"angular\";\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nvar $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise) => {\n let parentNode = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let node = new PathNode(new StateObject( { params: {}, resolvables: [] }));\n let context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder( { resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder( { resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any, value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n }\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', resolveFactory);\n" + ], + "names": [ + "$resolve", + "resolve", + "invocables", + "locals", + "parent", + "parentNode", + "PathNode", + "StateObject", + "params", + "resolvables", + "node", + "context", + "ResolveContext", + "addResolvables", + "resolvablesBuilder", + "state", + "resolveData", + "parentLocals", + "rewrap", + "_locals", + "mapObj", + "local", + "tuples2ObjR", + "acc", + "tuple", + "token", + "value", + "resolvePath", + "then", + "results", + "reduce", + "resolveFactory", + "angular.module", + "factory" + ], + "mappings": ";;;;;;mUAOA,IAAIA,GAqCFC,QAAS,SAACC,EAAyCC,EAAaC,gBAAbD,MACjD,IAAIE,EAAa,IAAIC,WAAS,IAAIC,eAAoBC,UAAYC,kBAC9DC,EAAO,IAAIJ,WAAS,IAAIC,eAAoBC,UAAYC,kBACxDE,EAAU,IAAIC,kBAAgBP,EAAYK,IAE9CC,EAAQE,eAAeC,sBAA2Bb,QAASC,IAAeQ,EAAKK,OAE/E,IAAMC,EAAc,SAACC,GACnB,IAAMC,EAAS,SAACC,GAAiB,OAAAL,sBAA2Bb,QAASmB,SAAOD,EAAS,SAAAE,GAAS,OAAA,WAAM,OAAAA,QACpGV,EAAQE,eAAeK,EAAOD,GAAeZ,EAAWU,OACxDJ,EAAQE,eAAeK,EAAOf,GAASO,EAAKK,OAE5C,IAAMO,EAAc,SAACC,EAAUC,GAE7B,OADAD,EAAIC,EAAMC,OAASD,EAAME,MAClBH,GAET,OAAOZ,EAAQgB,cAAcC,KAAK,SAAAC,GAAW,OAAAA,EAAQC,OAAOR,SAG9D,OAAOlB,EAASA,EAAOwB,KAAKZ,GAAeA,QAKlCe,EAAiB,WAAM,OAAA/B,GAGpCgC,SAAe,aAAaC,QAAQ,WAAkBF" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js new file mode 100644 index 00000000..87621c82 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js @@ -0,0 +1,294 @@ +/** + * State-based routing for AngularJS 1.x + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('angular')) : + typeof define === 'function' && define.amd ? define(['exports', 'angular'], factory) : + (factory((global['@uirouter/angularjs-state-events'] = {}),global.angular)); +}(this, (function (exports,ng_from_import) { 'use strict'; + +var ng_from_global = angular; +var ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global; + +/** + * # Legacy state events + * + * Polyfill implementation of the UI-Router 0.2.x state events. + * + * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they + * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary + * to implement meaningful application behaviors. + * + * To enable these state events, include the `stateEvents.js` file in your project, e.g., + * ``` + * + * ``` + * and also make sure you depend on the `ui.router.state.events` angular module, e.g., + * ``` + * angular.module("myApplication", ['ui.router', 'ui.router.state.events'] + * ``` + * + * @module ng1_state_events + */ /** */ +/** + * An event broadcast on `$rootScope` when the state transition **begins**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] + * + * #### Example: + * ```js + * $rootScope.$on('$stateChangeStart', function(event, transition) { + * event.preventDefault(); + * // transitionTo() promise will be rejected with + * // a 'transition prevented' error + * }) + * ``` + * + * @event $stateChangeStart + * @deprecated + */ +var $stateChangeStart; +/** + * An event broadcast on `$rootScope` if a transition is **cancelled**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] instead + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that was cancelled + * + * @event $stateChangeCancel + * @deprecated + */ +var $stateChangeCancel; +/** + * An event broadcast on `$rootScope` once the state transition is **complete**. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]] + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that just succeeded + * + * @event $stateChangeSuccess + * @deprecated + */ +var $stateChangeSuccess; +/** + * An event broadcast on `$rootScope` when an **error occurs** during transition. + * + * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]] + * + * It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * Additional arguments to the event handler are provided: + * - `toState`: the Transition Target state + * - `toParams`: the Transition Target Params + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `error`: The reason the transition errored. + * - `options`: any Transition Options + * - `$transition$`: the [[Transition]] that errored + * + * @event $stateChangeError + * @deprecated + */ +var $stateChangeError; +/** + * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name. + * + * ### Deprecation warning: use [[StateService.onInvalid]] instead + * + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler, + * you can see its properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `transitionTo()` will be rejected with a + * `'transition aborted'` error. + * + * Additional arguments to the event handler are provided: + * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties. + * - `fromState`: the state the transition is coming from + * - `fromParams`: the parameters from the state the transition is coming from + * - `options`: any Transition Options + * + * #### Example: + * ```js + * // somewhere, assume lazy.state has not been defined + * $state.go("lazy.state", { a: 1, b: 2 }, { inherit: false }); + * + * // somewhere else + * $scope.$on('$stateNotFound', function(event, transition) { + * function(event, unfoundState, fromState, fromParams){ + * console.log(unfoundState.to); // "lazy.state" + * console.log(unfoundState.toParams); // {a:1, b:2} + * console.log(unfoundState.options); // {inherit:false} + default options + * }); + * ``` + * + * @event $stateNotFound + * @deprecated + */ +var $stateNotFound; +(function () { + var isFunction = ng.isFunction, isString = ng.isString; + function applyPairs(memo, keyValTuple) { + var key, value; + if (Array.isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; + } + function stateChangeStartHandler($transition$) { + if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) + return; + var $injector = $transition$.injector(); + var $stateEvents = $injector.get('$stateEvents'); + var $rootScope = $injector.get('$rootScope'); + var $state = $injector.get('$state'); + var $urlRouter = $injector.get('$urlRouter'); + var enabledEvents = $stateEvents.provider.enabled(); + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + if (enabledEvents.$stateChangeSuccess) { + var startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + if (startEvent.defaultPrevented) { + if (enabledEvents.$stateChangeCancel) { + $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + } + //Don't update and resync url if there's been a new transition started. see issue #2238, #600 + if ($state.transition == null) + $urlRouter.update(); + return false; + } + // right after global state is updated + var successOpts = { priority: 9999 }; + $transition$.onSuccess({}, function () { + $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$); + }, successOpts); + } + if (enabledEvents.$stateChangeError) { + $transition$.promise["catch"](function (error) { + if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */)) + return; + var evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$); + if (!evt.defaultPrevented) { + $urlRouter.update(); + } + }); + } + } + stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter']; + function stateNotFoundHandler($to$, $from$, injector) { + var $state = injector.get('$state'); + var $rootScope = injector.get('$rootScope'); + var $urlRouter = injector.get('$urlRouter'); + var redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() }; + var e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params()); + if (e.defaultPrevented || e.retry) + $urlRouter.update(); + function redirectFn() { + return $state.target(redirect.to, redirect.toParams, redirect.options); + } + if (e.defaultPrevented) { + return false; + } + else if (e.retry || !!$state.get(redirect.to)) { + return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn(); + } + } + $StateEventsProvider.$inject = ['$stateProvider']; + function $StateEventsProvider($stateProvider) { + $StateEventsProvider.prototype.instance = this; + var runtime = false; + var allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError']; + var enabledStateEvents = allEvents.map(function (e) { return [e, true]; }).reduce(applyPairs, {}); + function assertNotRuntime() { + if (runtime) + throw new Error("Cannot enable events at runtime (use $stateEventsProvider"); + } + /** + * Enables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.enable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return enabledStateEvents[event] = true; }); + }; + /** + * Disables the deprecated UI-Router 0.2.x State Events + * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ] + */ + this.disable = function () { + var events = []; + for (var _i = 0; _i < arguments.length; _i++) { + events[_i] = arguments[_i]; + } + assertNotRuntime(); + if (!events || !events.length) + events = allEvents; + events.forEach(function (event) { return delete enabledStateEvents[event]; }); + }; + this.enabled = function () { return enabledStateEvents; }; + this.$get = $get; + $get.$inject = ['$transitions']; + function $get($transitions) { + runtime = true; + if (enabledStateEvents["$stateNotFound"]) + $stateProvider.onInvalid(stateNotFoundHandler); + if (enabledStateEvents.$stateChangeStart) + $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 }); + return { + provider: $StateEventsProvider.prototype.instance + }; + } + } + ng.module('ui.router.state.events', ['ui.router.state']) + .provider("$stateEvents", $StateEventsProvider) + .run(['$stateEvents', function ($stateEvents) { + }]); +})(); + +exports.$stateChangeStart = $stateChangeStart; +exports.$stateChangeCancel = $stateChangeCancel; +exports.$stateChangeSuccess = $stateChangeSuccess; +exports.$stateChangeError = $stateChangeError; +exports.$stateNotFound = $stateNotFound; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=stateEvents.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js.map new file mode 100644 index 00000000..6f39c939 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.js.map @@ -0,0 +1,17 @@ +{ + "version": 3, + "file": "stateEvents.js", + "sources": [ + "@uirouter/angularjs/src/angular.ts", + "@uirouter/angularjs/src/legacy/stateEvents.ts" + ], + "sourcesContent": [ + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n", + "/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * \n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @module ng1_state_events\n */ /** */\nimport { ng as angular } from \"../angular\";\nimport { IScope, IAngularEvent, IServiceProviderFactory } from \"angular\";\nimport {\n Obj, TargetState, StateService, Transition, TransitionService, UrlRouter, HookResult, UIInjector\n} from \"@uirouter/core\";\nimport { StateProvider } from \"../stateProvider\";\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport var $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport var $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport var $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport var $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport var $stateNotFound: IAngularEvent;\n\n\n(function () {\n let { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored())\n return;\n\n let $injector = $transition$.injector();\n let $stateEvents = $injector.get('$stateEvents');\n let $rootScope = $injector.get('$rootScope');\n let $state = $injector.get('$state');\n let $urlRouter = $injector.get('$urlRouter');\n\n let enabledEvents = $stateEvents.provider.enabled();\n\n\n let toParams = $transition$.params(\"to\");\n let fromParams = $transition$.params(\"from\");\n\n if (enabledEvents.$stateChangeSuccess) {\n let startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }\n //Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n let successOpts = { priority: 9999 };\n $transition$.onSuccess({}, function () {\n $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }, successOpts);\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise[\"catch\"](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */))\n return;\n\n\n let evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$);\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n let $state: StateService = injector.get('$state');\n let $rootScope: IScope = injector.get('$rootScope');\n let $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise;\n }\n\n let redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n let e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry)\n $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n let allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n let enabledStateEvents = allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error(\"Cannot enable events at runtime (use $stateEventsProvider\");\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => enabledStateEvents[event] = true);\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents[\"$stateNotFound\"])\n $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart)\n $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance\n };\n }\n }\n\n\n angular.module('ui.router.state.events', ['ui.router.state'])\n .provider(\"$stateEvents\", $StateEventsProvider)\n .run(['$stateEvents', function ($stateEvents: any) { /* Invokes $get() */\n }]);\n})();\n" + ], + "names": [ + "ng_from_import.module", + "angular" + ], + "mappings": ";;;;;;;;;;;;AAMA,IAAI,cAAc,GAAG,OAAO,CAAC;AAE7B,AAAO,IAAM,EAAE,GAAG,CAAC,cAAc,IAAIA,qBAAqB,IAAI,cAAc,GA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Events.min.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.min.js new file mode 100644 index 00000000..6945cc78 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/stateEvents.min.js @@ -0,0 +1,8 @@ +/** + * State-based routing for AngularJS 1.x + * @version v1.0.10 + * @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-state-events"]={},t.angular)}(this,function(t,e){"use strict";var r=angular,n=e&&e.module?e:r;!function(){function t(t,e){var r,n;if(Array.isArray(e)&&(r=e[0],n=e[1]),!s(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function e(t){if(t.options().notify&&t.valid()&&!t.ignored()){var e=t.injector(),r=e.get("$stateEvents"),n=e.get("$rootScope"),o=e.get("$state"),a=e.get("$urlRouter"),s=r.provider.enabled(),i=t.params("to"),u=t.params("from");if(s.$stateChangeSuccess){if(n.$broadcast("$stateChangeStart",t.to(),i,t.from(),u,t.options(),t).defaultPrevented)return s.$stateChangeCancel&&n.$broadcast("$stateChangeCancel",t.to(),i,t.from(),u,t.options(),t),null==o.transition&&a.update(),!1;var c={priority:9999};t.onSuccess({},function(){n.$broadcast("$stateChangeSuccess",t.to(),i,t.from(),u,t.options(),t)},c)}s.$stateChangeError&&t.promise.catch(function(e){(!e||2!==e.type&&3!==e.type)&&(n.$broadcast("$stateChangeError",t.to(),i,t.from(),u,e,t.options(),t).defaultPrevented||a.update())})}}function r(t,e,r){function n(){return o.target(u.to,u.toParams,u.options)}var o=r.get("$state"),s=r.get("$rootScope"),i=r.get("$urlRouter"),u={to:t.identifier(),toParams:t.params(),options:t.options()},c=s.$broadcast("$stateNotFound",u,e.state(),e.params());return(c.defaultPrevented||c.retry)&&i.update(),!c.defaultPrevented&&(c.retry||o.get(u.to)?c.retry&&a(c.retry.then)?c.retry.then(n):n():void 0)}function o(n){function a(){if(i)throw new Error("Cannot enable events at runtime (use $stateEventsProvider")}function s(t){return i=!0,c.$stateNotFound&&n.onInvalid(r),c.$stateChangeStart&&t.onBefore({},e,{priority:1e3}),{provider:o.prototype.instance}}o.prototype.instance=this;var i=!1,u=["$stateChangeStart","$stateNotFound","$stateChangeSuccess","$stateChangeError"],c=u.map(function(t){return[t,!0]}).reduce(t,{});this.enable=function(){for(var t=[],e=0;e\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @module ng1_state_events\n */ /** */\nimport { ng as angular } from \"../angular\";\nimport { IScope, IAngularEvent, IServiceProviderFactory } from \"angular\";\nimport {\n Obj, TargetState, StateService, Transition, TransitionService, UrlRouter, HookResult, UIInjector\n} from \"@uirouter/core\";\nimport { StateProvider } from \"../stateProvider\";\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport var $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport var $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport var $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport var $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport var $stateNotFound: IAngularEvent;\n\n\n(function () {\n let { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored())\n return;\n\n let $injector = $transition$.injector();\n let $stateEvents = $injector.get('$stateEvents');\n let $rootScope = $injector.get('$rootScope');\n let $state = $injector.get('$state');\n let $urlRouter = $injector.get('$urlRouter');\n\n let enabledEvents = $stateEvents.provider.enabled();\n\n\n let toParams = $transition$.params(\"to\");\n let fromParams = $transition$.params(\"from\");\n\n if (enabledEvents.$stateChangeSuccess) {\n let startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }\n //Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n let successOpts = { priority: 9999 };\n $transition$.onSuccess({}, function () {\n $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$.options(), $transition$);\n }, successOpts);\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise[\"catch\"](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3 /* RejectType.ABORTED */))\n return;\n\n\n let evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error, $transition$.options(), $transition$);\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n let $state: StateService = injector.get('$state');\n let $rootScope: IScope = injector.get('$rootScope');\n let $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise;\n }\n\n let redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n let e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry)\n $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n let allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n let enabledStateEvents = allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error(\"Cannot enable events at runtime (use $stateEventsProvider\");\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => enabledStateEvents[event] = true);\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents[\"$stateNotFound\"])\n $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart)\n $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance\n };\n }\n }\n\n\n angular.module('ui.router.state.events', ['ui.router.state'])\n .provider(\"$stateEvents\", $StateEventsProvider)\n .run(['$stateEvents', function ($stateEvents: any) { /* Invokes $get() */\n }]);\n})();\n" + ], + "names": [ + "ng_from_global", + "angular", + "ng", + "ng_from_import", + "ng_from_import.module", + "memo", + "keyValTuple", + "key", + "value", + "Array", + "isArray", + "isString", + "Error", + "$transition$", + "options", + "notify", + "valid", + "ignored", + "$injector", + "injector", + "$stateEvents", + "get", + "$rootScope", + "$state", + "$urlRouter", + "enabledEvents", + "provider", + "enabled", + "toParams", + "params", + "fromParams", + "$stateChangeSuccess", + "$broadcast", + "to", + "from", + "defaultPrevented", + "$stateChangeCancel", + "transition", + "update", + "successOpts", + "priority", + "onSuccess", + "$stateChangeError", + "promise", + "error", + "type", + "$to$", + "$from$", + "target", + "redirect", + "identifier", + "e", + "state", + "retry", + "isFunction", + "then", + "redirectFn", + "$stateProvider", + "runtime", + "$transitions", + "enabledStateEvents", + "onInvalid", + "stateNotFoundHandler", + "$stateChangeStart", + "onBefore", + "stateChangeStartHandler", + "$StateEventsProvider", + "prototype", + "instance", + "this", + "allEvents", + "map", + "reduce", + "applyPairs", + "enable", + "_i", + "events", + "assertNotRuntime", + "length", + "forEach", + "event", + "disable", + "$get", + "$inject", + "module", + "run", + "$stateNotFound" + ], + "mappings": ";;;;;;+PAMA,IAAIA,EAAiBC,QAERC,EAAMC,GAAkBC,SAAyBD,EAAiBH,GCmJ/E,WAGE,WAAoBK,EAAWC,GAC7B,IAAIC,EAAaC,EAEjB,GADIC,MAAMC,QAAQJ,KAAeC,OAAKC,SACjCG,EAASJ,GAAM,MAAM,IAAIK,MAAM,oCAEpC,OADAP,EAAKE,GAAOC,EACLH,EAGT,WAAiCQ,GAC/B,GAAKA,EAAaC,UAAUC,QAAWF,EAAaG,UAAWH,EAAaI,UAA5E,CAGA,IAAIC,EAAYL,EAAaM,WACzBC,EAAeF,EAAUG,IAAI,gBAC7BC,EAAaJ,EAAUG,IAAI,cAC3BE,EAASL,EAAUG,IAAI,UACvBG,EAAaN,EAAUG,IAAI,cAE3BI,EAAgBL,EAAaM,SAASC,UAGtCC,EAAWf,EAAagB,OAAO,MAC/BC,EAAajB,EAAagB,OAAO,QAErC,GAAIJ,EAAcM,oBAAqB,CAGrC,GAFiBT,EAAWU,WAAW,oBAAqBnB,EAAaoB,KAAML,EAAUf,EAAaqB,OAAQJ,EAAYjB,EAAaC,UAAWD,GAEnIsB,iBAMb,OALIV,EAAcW,oBAChBd,EAAWU,WAAW,qBAAsBnB,EAAaoB,KAAML,EAAUf,EAAaqB,OAAQJ,EAAYjB,EAAaC,UAAWD,GAG3G,MAArBU,EAAOc,YAAoBb,EAAWc,UACnC,EAIT,IAAIC,GAAgBC,SAAU,MAC9B3B,EAAa4B,aAAc,WACzBnB,EAAWU,WAAW,sBAAuBnB,EAAaoB,KAAML,E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KAAKK,OAAS,eAAU,aAAAC,mBAAAA,IAAAC,kBACtBC,IACKD,GAAWA,EAAOE,SAAQF,EAASN,GACxCM,EAAOG,QAAQ,SAAAC,GAAS,OAAApB,EAAmBoB,IAAS,KAOtDX,KAAKY,QAAU,eAAU,aAAAN,mBAAAA,IAAAC,kBACvBC,IACKD,GAAWA,EAAOE,SAAQF,EAASN,GACxCM,EAAOG,QAAQ,SAAAC,GAAS,cAAOpB,EAAmBoB,MAGpDX,KAAK1C,QAAU,WAAM,OAAAiC,GAErBS,KAAKa,KAAOA,EACZA,EAAKC,SAAW,gBAlIZ,IAAA7B,eAAY3C,aA4DlBmD,EAAqBqB,SAAW,OAAQ,SAAU,SAAU,aAAc,cA2B1EjB,EAAqBiB,SAAW,kBA2DhClF,EAAQmF,OAAO,0BAA2B,oBACrC1D,SAAS,eAA0CwC,GACnDmB,KAAK,eAAgB,SAAUjE,OArJtC,4BAnGW2C,4BAkBA3B,6BAkBAL,2BAwBAW,wBAoCA4C" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js new file mode 100644 index 00000000..e4ccc1d0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js @@ -0,0 +1,2014 @@ +/** + * State-based routing for AngularJS 1.x + * This bundle requires the ui-router-core.js bundle from the @uirouter/core package. + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('angular'), require('@uirouter/core')) : + typeof define === 'function' && define.amd ? define(['exports', 'angular', '@uirouter/core'], factory) : + (factory((global['@uirouter/angularjs'] = {}),global.angular,global['@uirouter/core'])); +}(this, (function (exports,ng_from_import,core) { 'use strict'; + +var ng_from_global = angular; +var ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global; + +function getNg1ViewConfigFactory() { + var templateFactory = null; + return function (path, view) { + templateFactory = templateFactory || core.services.$injector.get("$templateFactory"); + return [new Ng1ViewConfig(path, view, templateFactory)]; + }; +} +var hasAnyKey = function (keys, obj) { + return keys.reduce(function (acc, key) { return acc || core.isDefined(obj[key]); }, false); +}; +/** + * This is a [[StateBuilder.builder]] function for angular1 `views`. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * handles the `views` property with logic specific to @uirouter/angularjs (ng1). + * + * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object + * and applies the state-level configuration to a view named `$default`. + */ +function ng1ViewsBuilder(state) { + // Do not process root state + if (!state.parent) + return {}; + var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys); + // Do not allow a state to have both state-level props and also a `views: {}` property. + // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state. + // However, the `$default` approach should not be mixed with a separate `views: ` block. + if (core.isDefined(state.views) && hasAnyKey(allViewKeys, state)) { + throw new Error("State '" + state.name + "' has a 'views' object. " + + "It cannot also have \"view properties\" at the state level. " + + "Move the following properties into a view (in the 'views' object): " + + (" " + allViewKeys.filter(function (key) { return core.isDefined(state[key]); }).join(", "))); + } + var views = {}, viewsObject = state.views || { "$default": core.pick(state, allViewKeys) }; + core.forEach(viewsObject, function (config, name) { + // Account for views: { "": { template... } } + name = name || "$default"; + // Account for views: { header: "headerComponent" } + if (core.isString(config)) + config = { component: config }; + // Make a shallow copy of the config object + config = core.extend({}, config); + // Do not allow a view to mix props for component-style view with props for template/controller-style view + if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) { + throw new Error("Cannot combine: " + compKeys.join("|") + " with: " + nonCompKeys.join("|") + " in stateview: '" + name + "@" + state.name + "'"); + } + config.resolveAs = config.resolveAs || '$resolve'; + config.$type = "ng1"; + config.$context = state; + config.$name = name; + var normalized = core.ViewService.normalizeUIViewTarget(config.$context, config.$name); + config.$uiViewName = normalized.uiViewName; + config.$uiViewContextAnchor = normalized.uiViewContextAnchor; + views[name] = config; + }); + return views; +} +var id = 0; +var Ng1ViewConfig = /** @class */ (function () { + function Ng1ViewConfig(path, viewDecl, factory) { + var _this = this; + this.path = path; + this.viewDecl = viewDecl; + this.factory = factory; + this.$id = id++; + this.loaded = false; + this.getTemplate = function (uiView, context) { + return _this.component ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings) : _this.template; + }; + } + Ng1ViewConfig.prototype.load = function () { + var _this = this; + var $q = core.services.$q; + var context = new core.ResolveContext(this.path); + var params = this.path.reduce(function (acc, node) { return core.extend(acc, node.paramValues); }, {}); + var promises = { + template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), + controller: $q.when(this.getController(context)) + }; + return $q.all(promises).then(function (results) { + core.trace.traceViewServiceEvent("Loaded", _this); + _this.controller = results.controller; + core.extend(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" } + return _this; + }); + }; + /** + * Gets the controller for a view configuration. + * + * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. + */ + Ng1ViewConfig.prototype.getController = function (context) { + var provider = this.viewDecl.controllerProvider; + if (!core.isInjectable(provider)) + return this.viewDecl.controller; + var deps = core.services.$injector.annotate(provider); + var providerFn = core.isArray(provider) ? core.tail(provider) : provider; + var resolvable = new core.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + return Ng1ViewConfig; +}()); + +/** @module view */ +/** for typedoc */ +/** + * Service which manages loading of templates from a ViewConfig. + */ +var TemplateFactory = /** @class */ (function () { + function TemplateFactory() { + var _this = this; + /** @hidden */ this._useHttp = ng.version.minor < 3; + /** @hidden */ this.$get = ['$http', '$templateCache', '$injector', function ($http, $templateCache, $injector) { + _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest'); + _this.$http = $http; + _this.$templateCache = $templateCache; + return _this; + }]; + } + /** @hidden */ + TemplateFactory.prototype.useHttpService = function (value) { + this._useHttp = value; + }; + + /** + * Creates a template from a configuration object. + * + * @param config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param params Parameters to pass to the template function. + * @param context The resolve context associated with the template's view + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + TemplateFactory.prototype.fromConfig = function (config, params, context) { + var defaultTemplate = ""; + var asTemplate = function (result) { return core.services.$q.when(result).then(function (str) { return ({ template: str }); }); }; + var asComponent = function (result) { return core.services.$q.when(result).then(function (str) { return ({ component: str }); }); }; + return (core.isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) : + core.isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) : + core.isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) : + core.isDefined(config.component) ? asComponent(config.component) : + core.isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) : + asTemplate(defaultTemplate)); + }; + + /** + * Creates a template from a string or a function returning a string. + * + * @param template html template as a string or function that returns an html template as a string. + * @param params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + TemplateFactory.prototype.fromString = function (template, params) { + return core.isFunction(template) ? template(params) : template; + }; + + /** + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromUrl = function (url, params) { + if (core.isFunction(url)) + url = url(params); + if (url == null) + return null; + if (this._useHttp) { + return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) + .then(function (response) { + return response.data; + }); + } + return this.$templateRequest(url); + }; + + /** + * Creates a template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + TemplateFactory.prototype.fromProvider = function (provider, params, context) { + var deps = core.services.$injector.annotate(provider); + var providerFn = core.isArray(provider) ? core.tail(provider) : provider; + var resolvable = new core.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + + /** + * Creates a component's template by invoking an injectable provider function. + * + * @param provider Function to invoke via `locals` + * @param {Function} injectFn a function used to invoke the template provider + * @return {string} The template html as a string: "". + */ + TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) { + var deps = core.services.$injector.annotate(provider); + var providerFn = core.isArray(provider) ? core.tail(provider) : provider; + var resolvable = new core.Resolvable("", providerFn, deps); + return resolvable.get(context); + }; + + /** + * Creates a template from a component's name + * + * This implements route-to-component. + * It works by retrieving the component (directive) metadata from the injector. + * It analyses the component's bindings, then constructs a template that instantiates the component. + * The template wires input and output bindings to resolves or from the parent component. + * + * @param uiView {object} The parent ui-view (for binding outputs to callbacks) + * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) + * @param component {string} Component's name in camel case. + * @param bindings An object defining the component's bindings: {foo: '<'} + * @return {string} The template as a string: "". + */ + TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) { + 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 = core.kebobString(camelCase); + return /^(x|data)-/.exec(kebobed) ? "x-" + kebobed : kebobed; + }; + var attributeTpl = function (input) { + var name = input.name, type = input.type; + 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 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 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)" + if (type === '&') { + var res = context.getResolvable(resolveName); + var fn = res && res.data; + var args = fn && core.services.$injector.annotate(fn) || []; + // account for array style injection, i.e., ['foo', function(foo) {}] + var arrayIdxStr = core.isArray(fn) ? "[" + (fn.length - 1) + "]" : ''; + return attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; + } + // some-attr="::$resolve.someResolveName" + return attrName + "='" + prefix + "$resolve." + resolveName + "'"; + }; + var attrs = getComponentBindings(component).map(attributeTpl).join(" "); + var kebobName = kebob(component); + return "<" + kebobName + " " + attrs + ">"; + }; + + return TemplateFactory; +}()); +// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&') +function getComponentBindings(name) { + var cmpDefs = core.services.$injector.get(name + "Directive"); // could be multiple + if (!cmpDefs || !cmpDefs.length) + throw new Error("Unable to find component named '" + name + "'"); + return cmpDefs.map(getBindings).reduce(core.unnestR, []); +} +// Given a directive definition, find its object input attributes +// Use different properties, depending on the type of directive (component, bindToController, normal) +var getBindings = function (def) { + if (core.isObject(def.bindToController)) + return scopeBindings(def.bindToController); + return scopeBindings(def.scope); +}; +// for ng 1.2 style, process the scope: { input: "=foo" } +// for ng 1.3 through ng 1.5, process the component's bindToController: { input: "=foo" } object +var scopeBindings = function (bindingsObj) { return Object.keys(bindingsObj || {}) + .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; }) + .filter(function (tuple) { return core.isDefined(tuple) && core.isArray(tuple[1]); }) + .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); }; + +/** @module ng1 */ /** for typedoc */ +/** + * The Angular 1 `StateProvider` + * + * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +var StateProvider = /** @class */ (function () { + function StateProvider(stateRegistry, stateService) { + this.stateRegistry = stateRegistry; + this.stateService = stateService; + core.createProxyFunctions(core.val(StateProvider.prototype), this, core.val(this)); + } + /** + * Decorates states when they are registered + * + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by [[StateRegistry]]. + * This can be used to add custom functionality to ui-router, + * for example inferring templateUrl based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * #### Example: + * Override the internal 'views' builder with a function that takes the state + * definition, and a reference to the internal function being overridden: + * ```js + * $stateProvider.decorator('views', function (state, parent) { + * let result = {}, + * views = parent(state); + * + * angular.forEach(views, function (config, name) { + * let autoName = (state.name + '.' + name).replace('.', '/'); + * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; + * result[name] = config; + * }); + * return result; + * }); + * + * $stateProvider.state('home', { + * views: { + * 'contact.list': { controller: 'ListController' }, + * 'contact.item': { controller: 'ItemController' } + * } + * }); + * ``` + * + * + * ```js + * // Auto-populates list and item views with /partials/home/contact/list.html, + * // and /partials/home/contact/item.html, respectively. + * $state.go('home'); + * ``` + * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + StateProvider.prototype.decorator = function (name, func) { + return this.stateRegistry.decorator(name, func) || this; + }; + StateProvider.prototype.state = function (name, definition) { + if (core.isObject(name)) { + definition = name; + } + else { + definition.name = name; + } + this.stateRegistry.register(definition); + return this; + }; + /** + * Registers an invalid state handler + * + * This is a passthrough to [[StateService.onInvalid]] for ng1. + */ + StateProvider.prototype.onInvalid = function (callback) { + return this.stateService.onInvalid(callback); + }; + return StateProvider; +}()); + +/** @module ng1 */ /** */ +/** + * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, + * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * ensures that those hooks are injectable for @uirouter/angularjs (ng1). + */ +var getStateHookBuilder = function (hookName) { + return function stateHookBuilder(state, parentFn) { + var hook = state[hookName]; + var pathname = hookName === 'onExit' ? 'from' : 'to'; + function decoratedNg1Hook(trans, state) { + var resolveContext = new core.ResolveContext(trans.treeChanges(pathname)); + var locals = core.extend(getLocals(resolveContext), { $state$: state, $transition$: trans }); + return core.services.$injector.invoke(hook, this, locals); + } + return hook ? decoratedNg1Hook : undefined; + }; +}; + +/** + * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service + */ +var Ng1LocationServices = /** @class */ (function () { + function Ng1LocationServices($locationProvider) { + // .onChange() registry + this._urlListeners = []; + this.$locationProvider = $locationProvider; + var _lp = core.val($locationProvider); + core.createProxyFunctions(_lp, this, _lp, ['hashPrefix']); + } + Ng1LocationServices.prototype.dispose = function () { }; + Ng1LocationServices.prototype.onChange = function (callback) { + var _this = this; + this._urlListeners.push(callback); + return function () { return core.removeFrom(_this._urlListeners)(callback); }; + }; + Ng1LocationServices.prototype.html5Mode = function () { + var html5Mode = this.$locationProvider.html5Mode(); + html5Mode = core.isObject(html5Mode) ? html5Mode.enabled : html5Mode; + return html5Mode && this.$sniffer.history; + }; + Ng1LocationServices.prototype.url = function (newUrl, replace, state) { + if (replace === void 0) { replace = false; } + if (newUrl) + this.$location.url(newUrl); + if (replace) + this.$location.replace(); + if (state) + this.$location.state(state); + return this.$location.url(); + }; + Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser) { + var _this = this; + this.$location = $location; + this.$sniffer = $sniffer; + // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange + $rootScope.$on("$locationChangeSuccess", function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); }); + var _loc = core.val($location); + var _browser = core.val($browser); + // Bind these LocationService functions to $location + core.createProxyFunctions(_loc, this, _loc, ["replace", "path", "search", "hash"]); + // Bind these LocationConfig functions to $location + core.createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']); + // Bind these LocationConfig functions to $browser + core.createProxyFunctions(_browser, this, _browser, ['baseHref']); + }; + /** + * Applys ng1-specific path parameter encoding + * + * The Angular 1 `$location` service is a bit weird. + * It doesn't allow slashes to be encoded/decoded bi-directionally. + * + * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 + * + * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F + * + * @param router + */ + Ng1LocationServices.monkeyPatchPathParameterType = function (router) { + var pathType = router.urlMatcherFactory.type('path'); + pathType.encode = function (val$$1) { + return val$$1 != null ? val$$1.toString().replace(/(~|\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : val$$1; + }; + pathType.decode = function (val$$1) { + return val$$1 != null ? val$$1.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : val$$1; + }; + }; + return Ng1LocationServices; +}()); + +/** @module url */ /** */ +/** + * Manages rules for client-side URL + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class manages the router rules for what to do when the URL changes. + * + * This provider remains for backwards compatibility. + * + * @deprecated + */ +var UrlRouterProvider = /** @class */ (function () { + /** @hidden */ + function UrlRouterProvider(router) { + this._router = router; + this._urlRouter = router.urlRouter; + } + /** @hidden */ + UrlRouterProvider.prototype.$get = function () { + var urlRouter = this._urlRouter; + urlRouter.update(true); + if (!urlRouter.interceptDeferred) + urlRouter.listen(); + return urlRouter; + }; + /** + * Registers a url handler function. + * + * Registers a low level url handler (a `rule`). + * A rule detects specific URL patterns and returns a redirect, or performs some action. + * + * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // Here's an example of how you might allow case insensitive urls + * $urlRouterProvider.rule(function ($injector, $location) { + * var path = $location.path(), + * normalized = path.toLowerCase(); + * + * if (path !== normalized) { + * return normalized; + * } + * }); + * }); + * ``` + * + * @param ruleFn + * Handler function that takes `$injector` and `$location` services as arguments. + * You can use them to detect a url and return a different url as a string. + * + * @return [[UrlRouterProvider]] (`this`) + */ + UrlRouterProvider.prototype.rule = function (ruleFn) { + var _this = this; + if (!core.isFunction(ruleFn)) + throw new Error("'rule' must be a function"); + var match = function () { + return ruleFn(core.services.$injector, _this._router.locationService); + }; + var rule = new core.BaseUrlRule(match, core.identity); + this._urlRouter.rule(rule); + return this; + }; + + /** + * Defines the path or behavior to use when no url can be matched. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * // if the path doesn't match any of the urls you configured + * // otherwise will take care of routing the user to the + * // specified url + * $urlRouterProvider.otherwise('/index'); + * + * // Example of using function rule as param + * $urlRouterProvider.otherwise(function ($injector, $location) { + * return '/a/valid/url'; + * }); + * }); + * ``` + * + * @param rule + * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. + * The function version is passed two params: `$injector` and `$location` services, and should return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + UrlRouterProvider.prototype.otherwise = function (rule) { + var _this = this; + var urlRouter = this._urlRouter; + if (core.isString(rule)) { + urlRouter.otherwise(rule); + } + else if (core.isFunction(rule)) { + urlRouter.otherwise(function () { return rule(core.services.$injector, _this._router.locationService); }); + } + else { + throw new Error("'rule' must be a string or function"); + } + return this; + }; + + /** + * Registers a handler for a given url matching. + * + * If the handler is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. + * It gets invoked if `$location` matches. + * You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router.router']); + * + * app.config(function ($urlRouterProvider) { + * $urlRouterProvider.when($state.url, function ($match, $stateParams) { + * if ($state.$current.navigable !== state || + * !equalForKeys($match, $stateParams) { + * $state.transitionTo(state, $match, false); + * } + * }); + * }); + * ``` + * + * @param what A pattern string to match, compiled as a [[UrlMatcher]]. + * @param handler The path (or function that returns a path) that you want to redirect your user to. + * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] + * + * Note: the handler may also invoke arbitrary code, such as `$state.go()` + */ + UrlRouterProvider.prototype.when = function (what, handler) { + if (core.isArray(handler) || core.isFunction(handler)) { + handler = UrlRouterProvider.injectableHandler(this._router, handler); + } + this._urlRouter.when(what, handler); + return this; + }; + + UrlRouterProvider.injectableHandler = function (router, handler) { + return function (match) { + return core.services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); + }; + }; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * var app = angular.module('app', ['ui.router']); + * + * app.config(function ($urlRouterProvider) { + * // Prevent $urlRouter from automatically intercepting URL changes; + * $urlRouterProvider.deferIntercept(); + * }) + * + * app.run(function (MyService, $urlRouter, $http) { + * $http.get("/stuff").then(function(resp) { + * MyService.doStuff(resp.data); + * $urlRouter.listen(); + * $urlRouter.sync(); + * }); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + UrlRouterProvider.prototype.deferIntercept = function (defer) { + this._urlRouter.deferIntercept(defer); + }; + + return UrlRouterProvider; +}()); + +/** + * # Angular 1 types + * + * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. + * The customizations to the core types for Angular UI-Router are documented here. + * + * The optional [[$resolve]] service is also documented here. + * + * @module ng1 + * @preferred + */ +/** for typedoc */ +ng.module("ui.router.angular1", []); +var mod_init = ng.module('ui.router.init', []); +var mod_util = ng.module('ui.router.util', ['ng', 'ui.router.init']); +var mod_rtr = ng.module('ui.router.router', ['ui.router.util']); +var mod_state = ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']); +var mod_main = ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']); +var mod_cmpt = ng.module('ui.router.compat', ['ui.router']); // tslint:disable-line +var router = null; +$uiRouter.$inject = ['$locationProvider']; +/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */ +function $uiRouter($locationProvider) { + // Create a new instance of the Router when the $uiRouterProvider is initialized + router = this.router = new core.UIRouter(); + router.stateProvider = new StateProvider(router.stateRegistry, router.stateService); + // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties + router.stateRegistry.decorator("views", ng1ViewsBuilder); + router.stateRegistry.decorator("onExit", getStateHookBuilder("onExit")); + router.stateRegistry.decorator("onRetain", getStateHookBuilder("onRetain")); + router.stateRegistry.decorator("onEnter", getStateHookBuilder("onEnter")); + router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory()); + var ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider); + Ng1LocationServices.monkeyPatchPathParameterType(router); + // backwards compat: also expose router instance as $uiRouterProvider.router + router['router'] = router; + router['$get'] = $get; + $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache']; + function $get($location, $browser, $sniffer, $rootScope, $http, $templateCache) { + ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser); + delete router['router']; + delete router['$get']; + return router; + } + return router; +} +var getProviderFor = function (serviceName) { return ['$uiRouterProvider', function ($urp) { + var service = $urp.router[serviceName]; + service["$get"] = function () { return service; }; + return service; + }]; }; +// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime) +runBlock.$inject = ['$injector', '$q', '$uiRouter']; +function runBlock($injector, $q, $uiRouter) { + core.services.$injector = $injector; + core.services.$q = $q; + // The $injector is now available. + // Find any resolvables that had dependency annotation deferred + $uiRouter.stateRegistry.get() + .map(function (x) { return x.$$state().resolvables; }) + .reduce(core.unnestR, []) + .filter(function (x) { return x.deps === "deferred"; }) + .forEach(function (resolvable) { return resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi); }); +} +// $urlRouter service and $urlRouterProvider +var getUrlRouterProvider = function (uiRouter) { + return uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter); +}; +// $state service and $stateProvider +// $urlRouter service and $urlRouterProvider +var getStateProvider = function () { + return core.extend(router.stateProvider, { $get: function () { return router.stateService; } }); +}; +watchDigests.$inject = ['$rootScope']; +function watchDigests($rootScope) { + $rootScope.$watch(function () { core.trace.approximateDigests++; }); +} +mod_init.provider("$uiRouter", $uiRouter); +mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]); +mod_util.provider('$urlService', getProviderFor('urlService')); +mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]); +mod_util.provider('$templateFactory', function () { return new TemplateFactory(); }); +mod_state.provider('$stateRegistry', getProviderFor('stateRegistry')); +mod_state.provider('$uiRouterGlobals', getProviderFor('globals')); +mod_state.provider('$transitions', getProviderFor('transitionService')); +mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]); +mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]); +mod_main.factory('$view', function () { return router.viewService; }); +mod_main.service("$trace", function () { return core.trace; }); +mod_main.run(watchDigests); +mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]); +mod_state.run(['$state', function ($state) { }]); +mod_rtr.run(['$urlRouter', function ($urlRouter) { }]); +mod_init.run(runBlock); +/** @hidden TODO: find a place to move this */ +var getLocals = function (ctx) { + var tokens = ctx.getTokens().filter(core.isString); + var tuples = tokens.map(function (key) { + var resolvable = ctx.getResolvable(key); + var waitPolicy = ctx.getPolicy(resolvable).async; + return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data]; + }); + return tuples.reduce(core.applyPairs, {}); +}; + +/** + * # Angular 1 injectable services + * + * This is a list of the objects which can be injected using angular's injector. + * + * There are three different kind of injectable objects: + * + * ## **Provider** objects + * #### injectable into a `.config()` block during configtime + * + * - [[$uiRouterProvider]]: The UI-Router instance + * - [[$stateProvider]]: State registration + * - [[$transitionsProvider]]: Transition hooks + * - [[$urlServiceProvider]]: All URL related public APIs + * + * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling + * - [[$urlRouterProvider]]: (deprecated) Url matching rules + * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config + * + * ## **Service** objects + * #### injectable globally during runtime + * + * - [[$uiRouter]]: The UI-Router instance + * - [[$trace]]: Enable transition trace/debug + * - [[$transitions]]: Transition hooks + * - [[$state]]: Imperative state related APIs + * - [[$stateRegistry]]: State registration + * - [[$urlService]]: All URL related public APIs + * - [[$uiRouterGlobals]]: Global variables + * - [[$uiViewScroll]]: Scroll an element into view + * + * - [[$stateParams]]: (deprecated) Global state param values + * - [[$urlRouter]]: (deprecated) URL synchronization + * - [[$urlMatcherFactory]]: (deprecated) URL parsing config + * + * ## **Per-Transition** objects + * + * - These kind of objects are injectable into: + * - Resolves ([[Ng1StateDeclaration.resolve]]), + * - Transition Hooks ([[TransitionService.onStart]], etc), + * - Routed Controllers ([[Ng1ViewDeclaration.controller]]) + * + * #### Different instances are injected based on the [[Transition]] + * + * - [[$transition$]]: The current Transition object + * - [[$stateParams]]: State param values for pending Transition (deprecated) + * - Any resolve data defined using [[Ng1StateDeclaration.resolve]] + * + * @ng1api + * @preferred + * @module injectables + */ /** */ +/** + * The current (or pending) State Parameters + * + * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition. + * + * The values are not updated until *after* a `Transition` successfully completes. + * + * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running. + * + * ### Deprecation warning: + * + * The value injected for `$stateParams` is different depending on where it is injected. + * + * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`. + * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`. + * + * Because of these confusing details, this service is deprecated. + * + * ### Instead of using the global `$stateParams` service object, + * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]] + * + * ```js + * MyService.$inject = ['$uiRouterGlobals']; + * function MyService($uiRouterGlobals) { + * return { + * paramValues: function () { + * return $uiRouterGlobals.params; + * } + * } + * } + * ``` + * + * ### Instead of using the per-transition `$stateParams` object, + * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]] + * + * ```js + * MyController.$inject = ['$transition$']; + * function MyController($transition$) { + * var username = $transition$.params().username; + * // .. do something with username + * } + * ``` + * + * --- + * + * This object can be injected into other services. + * + * #### Deprecated Example: + * ```js + * SomeService.$inject = ['$http', '$stateParams']; + * function SomeService($http, $stateParams) { + * return { + * getUser: function() { + * return $http.get('/api/users/' + $stateParams.username); + * } + * } + * }; + * angular.service('SomeService', SomeService); + * ``` + * @deprecated + */ + +/** + * # Angular 1 Directives + * + * These are the directives included in UI-Router for Angular 1. + * These directives are used in templates to create viewports and link/navigate to states. + * + * @ng1api + * @preferred + * @module directives + */ /** for typedoc */ +/** @hidden */ +function parseStateRef(ref) { + var paramsOnly = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (paramsOnly) + ref = '(' + paramsOnly[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/); + if (!parsed || parsed.length !== 4) + throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1] || null, paramExpr: parsed[3] || null }; +} +/** @hidden */ +function stateContext(el) { + var $uiView = el.parent().inheritedData('$uiView'); + var path = core.parse('$cfg.path')($uiView); + return path ? core.tail(path).state.name : undefined; +} +/** @hidden */ +function processedDef($state, $element, def) { + var uiState = def.uiState || $state.current.name; + var uiStateOpts = core.extend(defaultOpts($element, $state), def.uiStateOpts || {}); + var href = $state.href(uiState, def.uiStateParams, uiStateOpts); + return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href }; +} +/** @hidden */ +function getTypeInfo(el) { + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; + var isForm = el[0].nodeName === "FORM"; + return { + attr: isForm ? "action" : (isSvg ? 'xlink:href' : 'href'), + isAnchor: el.prop("tagName").toUpperCase() === "A", + clickable: !isForm + }; +} +/** @hidden */ +function clickHook(el, $state, $timeout, type, getDef) { + return function (e) { + var button = e.which || e.button, target = getDef(); + if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function () { + $state.go(target.uiState, target.uiStateParams, target.uiStateOpts); + }); + e.preventDefault(); + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0; + e.preventDefault = function () { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }; +} +/** @hidden */ +function defaultOpts(el, $state) { + return { + relative: stateContext(el) || $state.$current, + inherit: true, + source: "sref" + }; +} +/** @hidden */ +function bindEvents(element, scope, hookFn, uiStateOpts) { + var events; + if (uiStateOpts) { + events = uiStateOpts.events; + } + if (!core.isArray(events)) { + events = ['click']; + } + var on = element.on ? 'on' : 'bind'; + for (var _i = 0, events_1 = events; _i < events_1.length; _i++) { + var event_1 = events_1[_i]; + element[on](event_1, hookFn); + } + scope.$on('$destroy', function () { + var off = element.off ? 'off' : 'unbind'; + for (var _i = 0, events_2 = events; _i < events_2.length; _i++) { + var event_2 = events_2[_i]; + element[off](event_2, hookFn); + } + }); +} +/** + * `ui-sref`: A directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of the `ui-sref` is the name of the state to link to. + * + * #### Example: + * This will activate the `home` state when the link is clicked. + * ```html + * Home + * ``` + * + * ### Relative Links + * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]). + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create a relative `ui-sref` which always targets the same destination. + * + * #### Example: + * Both these links are relative to the parent state, even when a child state is currently active. + * ```html + * child 1 state + * child 2 state + * ``` + * + * This link activates the parent state. + * ```html + * Return + * ``` + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * #### Example: + * Assuming the `users` state has a url of `/users/` + * ```html + * Users + * ``` + * + * ### Parameter Values + * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state. + * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses. + * The content inside the parentheses is an expression, evaluated to the parameter values. + * + * #### Example: + * This example renders a list of links to users. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ user.displayName }} + *
  • + * ``` + * + * Note: + * The parameter values expression is `$watch`ed for updates. + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-sref-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Examples + * If you have the following template: + * + * ```html + * Home + * About + * Next page + * + * + * ``` + * + * Then (assuming the current state is `contacts`) the rendered html including hrefs would be: + * + * ```html + * Home + * About + * Next page + * + *
      + *
    • + * Joe + *
    • + *
    • + * Alice + *
    • + *
    • + * Bob + *
    • + *
    + * + * Home + * ``` + * + * ### Notes + * + * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses. + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * + * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). + * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. + */ +var uiSref; +uiSref = ['$uiRouter', '$timeout', + function $StateRefDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var ref = parseStateRef(attrs.uiSref); + rawDef.uiState = ref.state; + rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {}; + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function (val$$1) { + rawDef.uiStateParams = core.extend({}, val$$1); + update(); + }, true); + rawDef.uiStateParams = core.extend({}, scope.$eval(ref.paramExpr)); + } + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-state`: A fully dynamic directive for linking to a state + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.** + * + * A directive which links to a state (and optionally, parameters). + * When clicked, this directive activates the linked state with the supplied parameter values. + * + * ### Linked State + * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to. + * **This is in contrast with `ui-sref`, which takes a state name as a string literal.** + * + * #### Example: + * Create a list of links. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Relative Links + * If the expression evaluates to a relative path, it is processed like [[uiSref]]. + * You just need to be aware that the path is relative to the state that *created* the link. + * This allows a state to create relative `ui-state` which always targets the same destination. + * + * ### hrefs + * If the linked state has a URL, the directive will automatically generate and + * update the `href` attribute (using the [[StateService.href]] method). + * + * ### Parameter Values + * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state. + * Param values should be provided using the `ui-state-params` attribute. + * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression. + * + * #### Example: + * This example renders a list of links with param values. + * The state's `userId` parameter value comes from each user's `user.id` property. + * ```html + *
  • + * {{ link.displayName }} + *
  • + * ``` + * + * ### Transition Options + * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute. + * Options are restricted to `location`, `inherit`, and `reload`. + * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression. + * + * #### Example: + * ```html + * Home + * ``` + * + * ### Other DOM Events + * + * You can also customize which DOM events to respond to (instead of `click`) by + * providing an `events` array in the `ui-state-opts` attribute. + * + * #### Example: + * ```html + * + * ``` + * + * ### Highlighting the active link + * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. + * + * ### Notes + * + * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`. + * However, it might be simpler to use [[uiSref]] parameter-only links. + * + * #### Example: + * Sets the `lang` parameter to `en` and remains on the same state. + * + * ```html + * English + * ``` + * + * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. + * ``` + */ +var uiState; +uiState = ['$uiRouter', '$timeout', + function $StateRefDynamicDirective($uiRouter, $timeout) { + var $state = $uiRouter.stateService; + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function (scope, element, attrs, uiSrefActive) { + var type = getTypeInfo(element); + var active = uiSrefActive[1] || uiSrefActive[0]; + var unlinkInfoFn = null; + var hookFn; + var rawDef = {}; + var getDef = function () { return processedDef($state, element, rawDef); }; + var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts']; + var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return (acc[attr] = core.noop, acc); }, {}); + function update() { + var def = getDef(); + if (unlinkInfoFn) + unlinkInfoFn(); + if (active) + unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); + if (def.href != null) + attrs.$set(type.attr, def.href); + } + inputAttrs.forEach(function (field) { + rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null; + attrs.$observe(field, function (expr) { + watchDeregFns[field](); + watchDeregFns[field] = scope.$watch(expr, function (newval) { + rawDef[field] = newval; + update(); + }, true); + }); + }); + update(); + scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); + scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); + if (!type.clickable) + return; + hookFn = clickHook(element, $state, $timeout, type, getDef); + bindEvents(element, scope, hookFn, rawDef.uiStateOpts); + } + }; + }]; +/** + * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active + * + * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the + * related directive's state is active (and remove them when it is inactive). + * + * The primary use-case is to highlight the active link in navigation menus, + * distinguishing it from the inactive menu items. + * + * ### Linking to a `ui-sref` or `ui-state` + * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element. + * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**. + * + * ### Matching + * + * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**. + * This is a "fuzzy match" which uses [[StateService.includes]]. + * + * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active). + * This is an "exact match" which uses [[StateService.is]]. + * + * ### Parameter values + * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted. + * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted. + * + * #### Example: + * ```html + *
  • + * {{ user.lastName }} + *
  • + * ``` + * + * ### Examples + * + * Given the following template: + * #### Example: + * ```html + * + * ``` + * + * When the app state is `app.user` (or any child state), + * and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + * + * ```html + * + * ``` + * + * ### Glob mode + * + * It is possible to pass `ui-sref-active` an expression that evaluates to an object. + * The objects keys represent active class names and values represent the respective state names/globs. + * `ui-sref-active` will match if the current active state **includes** any of + * the specified state names/globs, even the abstract ones. + * + * #### Example: + * Given the following template, with "admin" being an abstract state: + * ```html + *
    + * Roles + *
    + * ``` + * + * When the current state is "admin.roles" the "active" class will be applied to both the
    and elements. + * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`. + * + * ### Notes: + * + * - The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` + */ +var uiSrefActive; +uiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter', + function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', + function ($scope, $element, $attrs) { + var states = [], activeEqClass, uiSrefActive; + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); + try { + uiSrefActive = $scope.$eval($attrs.uiSrefActive); + } + catch (e) { + // Do nothing. uiSrefActive is not a valid expression. + // Fall back to using $interpolate below + } + uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); + if (core.isObject(uiSrefActive)) { + core.forEach(uiSrefActive, function (stateOrName, activeClass) { + if (core.isString(stateOrName)) { + var ref = parseStateRef(stateOrName); + addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); + } + }); + } + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$addStateInfo = function (newState, newParams) { + // we already got an explicit state provided by ui-sref-active, so we + // shadow the one that comes from ui-sref + if (core.isObject(uiSrefActive) && states.length > 0) { + return; + } + var deregister = addState(newState, newParams, uiSrefActive); + update(); + return deregister; + }; + function updateAfterTransition(trans) { + trans.promise.then(update, core.noop); + } + $scope.$on('$stateChangeSuccess', update); + $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition)); + if ($uiRouter.globals.transition) { + updateAfterTransition($uiRouter.globals.transition); + } + function addState(stateName, stateParams, activeClass) { + var state = $state.get(stateName, stateContext($element)); + var stateInfo = { + state: state || { name: stateName }, + params: stateParams, + activeClass: activeClass + }; + states.push(stateInfo); + return function removeState() { + core.removeFrom(states)(stateInfo); + }; + } + // Update route state + function update() { + var splitClasses = function (str) { + return str.split(/\s/).filter(core.identity); + }; + var getClasses = function (stateList) { + return stateList.map(function (x) { return x.activeClass; }).map(splitClasses).reduce(core.unnestR, []); + }; + var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(core.uniqR, []); + var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); })); + var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length; + var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : []; + var addClasses = fuzzyClasses.concat(exactClasses).reduce(core.uniqR, []); + var removeClasses = allClasses.filter(function (cls) { return !core.inArray(addClasses, cls); }); + $scope.$evalAsync(function () { + addClasses.forEach(function (className) { return $element.addClass(className); }); + removeClasses.forEach(function (className) { return $element.removeClass(className); }); + }); + } + update(); + }] + }; + }]; +ng.module('ui.router.state') + .directive('uiSref', uiSref) + .directive('uiSrefActive', uiSrefActive) + .directive('uiSrefActiveEq', uiSrefActive) + .directive('uiState', uiState); + +/** @module ng1 */ /** for typedoc */ +/** + * `isState` Filter: truthy if the current state is the parameter + * + * Translates to [[StateService.is]] `$state.is("stateName")`. + * + * #### Example: + * ```html + *
    show if state is 'stateName'
    + * ``` + */ +$IsStateFilter.$inject = ['$state']; +function $IsStateFilter($state) { + var isFilter = function (state, params, options) { + return $state.is(state, params, options); + }; + isFilter.$stateful = true; + return isFilter; +} +/** + * `includedByState` Filter: truthy if the current state includes the parameter + * + * Translates to [[StateService.includes]]` $state.is("fullOrPartialStateName")`. + * + * #### Example: + * ```html + *
    show if state includes 'fullOrPartialStateName'
    + * ``` + */ +$IncludedByStateFilter.$inject = ['$state']; +function $IncludedByStateFilter($state) { + var includesFilter = function (state, params, options) { + return $state.includes(state, params, options); + }; + includesFilter.$stateful = true; + return includesFilter; +} +ng.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); + +/** + * @ng1api + * @module directives + */ /** for typedoc */ +/** + * `ui-view`: A viewport directive which is filled in by a view from the active state. + * + * ### Attributes + * + * - `name`: (Optional) A view name. + * The name should be unique amongst the other views in the same state. + * You can have views of the same name that live in different states. + * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). + * + * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. + * Uses [[$uiViewScroll]] to do the scrolling. + * + * - `onload`: Expression to evaluate whenever the view updates. + * + * #### Example: + * A view can be unnamed or named. + * ```html + * + *
    + * + * + *
    + * + * + * + * ``` + * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + * + * ```html + *
    + * $stateProvider.state("home", { + * template: "

    HELLO!

    " + * }) + * ``` + * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the + * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + * + * ```html + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "main": { + * template: "

    HELLO!

    " + * } + * } + * }) + * ``` + * + * Really though, you'll use views to set up multiple views: + * + * ```html + *
    + *
    + *
    + * ``` + * + * ```js + * $stateProvider.state("home", { + * views: { + * "": { + * template: "

    HELLO!

    " + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + * ``` + * + * #### Examples for `autoscroll`: + * ```html + * + * + * + * + * + * + * + * ``` + * + * Resolve data: + * + * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this + * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. + * + * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the + * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which + * depends on `$resolve` data. + * + * #### Example: + * ```js + * $stateProvider.state('home', { + * template: '', + * resolve: { + * user: function(UserService) { return UserService.fetchUser(); } + * } + * }); + * ``` + */ +var uiView; +uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q', + function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) { + function getRenderer(attrs, scope) { + return { + enter: function (element, target, cb) { + if (ng.version.minor > 2) { + $animate.enter(element, null, target).then(cb); + } + else { + $animate.enter(element, null, target, cb); + } + }, + leave: function (element, cb) { + if (ng.version.minor > 2) { + $animate.leave(element).then(cb); + } + else { + $animate.leave(element, cb); + } + } + }; + } + function configsEqual(config1, config2) { + return config1 === config2; + } + var rootData = { + $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } }, + $uiView: {} + }; + var directive = { + count: 0, + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, unregister, onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(attrs, scope), viewConfig = undefined, inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default'; + var activeUIView = { + $type: 'ng1', + id: directive.count++, + name: name, + fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + "." + name : name, + config: null, + configUpdated: configUpdatedCallback, + get creationContext() { + var fromParentTagConfig = core.parse('$cfg.viewDecl.$context')(inherited); + // Allow + // See https://github.com/angular-ui/ui-router/issues/3355 + var fromParentTag = core.parse('$uiView.creationContext')(inherited); + return fromParentTagConfig || fromParentTag; + } + }; + core.trace.traceUIViewEvent("Linking", activeUIView); + function configUpdatedCallback(config) { + if (config && !(config instanceof Ng1ViewConfig)) + return; + if (configsEqual(viewConfig, config)) + return; + core.trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context); + viewConfig = config; + updateView(config); + } + $element.data('$uiView', { $uiView: activeUIView }); + updateView(); + unregister = $view.registerUIView(activeUIView); + scope.$on("$destroy", function () { + core.trace.traceUIViewEvent("Destroying/Unregistering", activeUIView); + unregister(); + }); + function cleanupLastView() { + if (previousEl) { + core.trace.traceUIViewEvent("Removing (previous) el", previousEl.data('$uiView')); + previousEl.remove(); + previousEl = null; + } + if (currentScope) { + core.trace.traceUIViewEvent("Destroying scope", activeUIView); + currentScope.$destroy(); + currentScope = null; + } + if (currentEl) { + var _viewData_1 = currentEl.data('$uiViewAnim'); + core.trace.traceUIViewEvent("Animate out", _viewData_1); + renderer.leave(currentEl, function () { + _viewData_1.$$animLeave.resolve(); + previousEl = null; + }); + previousEl = currentEl; + currentEl = null; + } + } + function updateView(config) { + var newScope = scope.$new(); + var animEnter = $q.defer(), animLeave = $q.defer(); + var $uiViewData = { + $cfg: config, + $uiView: activeUIView, + }; + var $uiViewAnim = { + $animEnter: animEnter.promise, + $animLeave: animLeave.promise, + $$animLeave: animLeave + }; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoading + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {string} viewName Name of the view. + */ + newScope.$emit('$viewContentLoading', name); + var cloned = $transclude(newScope, function (clone) { + clone.data('$uiViewAnim', $uiViewAnim); + clone.data('$uiView', $uiViewData); + renderer.enter(clone, $element, function onUIViewEnter() { + animEnter.resolve(); + if (currentScope) + currentScope.$emit('$viewContentAnimationEnded'); + if (core.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + currentEl = cloned; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded', config || viewConfig); + currentScope.$eval(onloadExp); + } + }; + } + }; + return directive; + }]; +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout']; +/** @hidden */ +function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q, $timeout) { + var getControllerAs = core.parse('viewDecl.controllerAs'); + var getResolveAs = core.parse('viewDecl.resolveAs'); + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + tElement.empty(); + return function (scope, $element) { + var data = $element.data('$uiView'); + if (!data) { + $element.html(initial); + $compile($element.contents())(scope); + return; + } + var cfg = data.$cfg || { viewDecl: {}, getTemplate: ng_from_import.noop }; + var resolveCtx = cfg.path && new core.ResolveContext(cfg.path); + $element.html(cfg.getTemplate($element, resolveCtx) || initial); + core.trace.traceUIViewFill(data.$uiView, $element.html()); + var link = $compile($element.contents()); + var controller = cfg.controller; + var controllerAs = getControllerAs(cfg); + var resolveAs = getResolveAs(cfg); + var locals = resolveCtx && getLocals(resolveCtx); + scope[resolveAs] = locals; + if (controller) { + var controllerInstance = $controller(controller, core.extend({}, locals, { $scope: scope, $element: $element })); + if (controllerAs) { + scope[controllerAs] = controllerInstance; + scope[controllerAs][resolveAs] = locals; + } + // TODO: Use $view service as a central point for registering component-level hooks + // Then, when a component is created, tell the $view service, so it can invoke hooks + // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element }); + // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element })); + $element.data('$ngControllerController', controllerInstance); + $element.children().data('$ngControllerController', controllerInstance); + registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg); + } + // Wait for the component to appear in the DOM + if (core.isString(cfg.viewDecl.component)) { + var cmp_1 = cfg.viewDecl.component; + var kebobName = core.kebobString(cmp_1); + var tagRegexp_1 = new RegExp("^(x-|data-)?" + kebobName + "$", "i"); + var getComponentController = function () { + var directiveEl = [].slice.call($element[0].children) + .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); }); + return directiveEl && ng.element(directiveEl).data("$" + cmp_1 + "Controller"); + }; + var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) { + if (!ctrlInstance) + return; + registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg); + deregisterWatch_1(); + }); + } + link(scope); + }; + } + }; +} +/** @hidden */ +var hasComponentImpl = typeof ng.module('ui.router')['component'] === 'function'; +/** @hidden incrementing id */ +var _uiCanExitId = 0; +/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */ +function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) { + // Call $onInit() ASAP + if (core.isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) { + controllerInstance.$onInit(); + } + var viewState = core.tail(cfg.path).state.self; + var hookOptions = { bind: controllerInstance }; + // Add component-level hook for onParamsChange + if (core.isFunction(controllerInstance.uiOnParamsChanged)) { + var resolveContext = new core.ResolveContext(cfg.path); + var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data; + // Fire callback on any successful transition + var paramsUpdated = function ($transition$) { + // Exit early if the $transition$ is the same as the view was created within. + // Exit early if the $transition$ will exit the state the view is for. + if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1) + return; + var toParams = $transition$.params("to"); + var fromParams = $transition$.params("from"); + var toSchema = $transition$.treeChanges().to.map(function (node) { return node.paramSchema; }).reduce(core.unnestR, []); + var fromSchema = $transition$.treeChanges().from.map(function (node) { return node.paramSchema; }).reduce(core.unnestR, []); + // Find the to params that have different values than the from params + var changedToParams = toSchema.filter(function (param) { + var idx = fromSchema.indexOf(param); + return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]); + }); + // Only trigger callback if a to param has changed or is new + if (changedToParams.length) { + var changedKeys_1 = changedToParams.map(function (x) { return x.id; }); + // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params. + var newValues = core.filter(toParams, function (val$$1, key) { return changedKeys_1.indexOf(key) !== -1; }); + controllerInstance.uiOnParamsChanged(newValues, $transition$); + } + }; + $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions)); + } + // Add component-level hook for uiCanExit + if (core.isFunction(controllerInstance.uiCanExit)) { + var id_1 = _uiCanExitId++; + var cacheProp_1 = '_uiCanExitIds'; + // Returns true if a redirect transition already answered truthy + var prevTruthyAnswer_1 = function (trans) { + return !!trans && (trans[cacheProp_1] && trans[cacheProp_1][id_1] === true || prevTruthyAnswer_1(trans.redirectedFrom())); + }; + // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition + var wrappedHook = function (trans) { + var promise, ids = trans[cacheProp_1] = trans[cacheProp_1] || {}; + if (!prevTruthyAnswer_1(trans)) { + promise = $q.when(controllerInstance.uiCanExit(trans)); + promise.then(function (val$$1) { return ids[id_1] = (val$$1 !== false); }); + } + return promise; + }; + var criteria = { exiting: viewState.name }; + $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions)); + } +} +ng.module('ui.router.state').directive('uiView', uiView); +ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill); + +/** @module ng1 */ /** */ +/** @hidden */ +function $ViewScrollProvider() { + var useAnchorScroll = false; + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + return function ($element) { + return $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} +ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); + +/** + * Main entry point for angular 1.x build + * @module ng1 + */ /** */ +var index = "ui.router"; + +exports['default'] = index; +exports.core = core; +exports.watchDigests = watchDigests; +exports.getLocals = getLocals; +exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory; +exports.ng1ViewsBuilder = ng1ViewsBuilder; +exports.Ng1ViewConfig = Ng1ViewConfig; +exports.StateProvider = StateProvider; +exports.UrlRouterProvider = UrlRouterProvider; +Object.keys(core).forEach(function (key) { exports[key] = core[key]; }); + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=ui-router-angularjs.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js.map new file mode 100644 index 00000000..66dbe4cc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.js.map @@ -0,0 +1,70 @@ +{ + "version": 3, + "file": "ui-router-angularjs.js", + "sources": [ + "@uirouter/angularjs/src/angular.ts", + "@uirouter/angularjs/src/statebuilders/views.ts", + "@uirouter/angularjs/src/templateFactory.ts", + "@uirouter/angularjs/src/stateProvider.ts", + "@uirouter/angularjs/src/statebuilders/onEnterExitRetain.ts", + "@uirouter/angularjs/src/locationServices.ts", + "@uirouter/angularjs/src/urlRouterProvider.ts", + "@uirouter/angularjs/src/services.ts", + "@uirouter/angularjs/src/injectables.ts", + "@uirouter/angularjs/src/directives/stateDirectives.ts", + "@uirouter/angularjs/src/stateFilters.ts", + "@uirouter/angularjs/src/directives/viewDirective.ts", + "@uirouter/angularjs/src/viewScroll.ts", + "@uirouter/angularjs/src/index.ts" + ], + "sourcesContent": [ + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n", + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n", + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n *
    \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n", + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n", + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n", + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n", + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n", + "/**\n * # Angular 1 injectable services\n *\n * This is a list of the objects which can be injected using angular's injector.\n *\n * There are three different kind of injectable objects:\n *\n * ## **Provider** objects\n * #### injectable into a `.config()` block during configtime\n *\n * - [[$uiRouterProvider]]: The UI-Router instance\n * - [[$stateProvider]]: State registration\n * - [[$transitionsProvider]]: Transition hooks\n * - [[$urlServiceProvider]]: All URL related public APIs\n *\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\n *\n * ## **Service** objects\n * #### injectable globally during runtime\n *\n * - [[$uiRouter]]: The UI-Router instance\n * - [[$trace]]: Enable transition trace/debug\n * - [[$transitions]]: Transition hooks\n * - [[$state]]: Imperative state related APIs\n * - [[$stateRegistry]]: State registration\n * - [[$urlService]]: All URL related public APIs\n * - [[$uiRouterGlobals]]: Global variables\n * - [[$uiViewScroll]]: Scroll an element into view\n *\n * - [[$stateParams]]: (deprecated) Global state param values\n * - [[$urlRouter]]: (deprecated) URL synchronization\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\n *\n * ## **Per-Transition** objects\n *\n * - These kind of objects are injectable into:\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\n * - Transition Hooks ([[TransitionService.onStart]], etc),\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\n *\n * #### Different instances are injected based on the [[Transition]]\n *\n * - [[$transition$]]: The current Transition object\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\n *\n * @ng1api\n * @preferred\n * @module injectables\n */ /** */\n\nimport { StateProvider } from \"./stateProvider\";\nimport {\n StateService, TransitionService, Transition, UrlRouter, UrlMatcherFactory,\n StateParams, StateRegistry, UIRouterGlobals, UIRouter, Trace, UrlService\n} from \"@uirouter/core\";\nimport { UIViewScrollProvider } from \"./viewScroll\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\n\n/**\n * The current (or pending) State Parameters\n *\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\n *\n * The values are not updated until *after* a `Transition` successfully completes.\n *\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\n *\n * ### Deprecation warning:\n *\n * The value injected for `$stateParams` is different depending on where it is injected.\n *\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\n *\n * Because of these confusing details, this service is deprecated.\n *\n * ### Instead of using the global `$stateParams` service object,\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\n *\n * ```js\n * MyService.$inject = ['$uiRouterGlobals'];\n * function MyService($uiRouterGlobals) {\n * return {\n * paramValues: function () {\n * return $uiRouterGlobals.params;\n * }\n * }\n * }\n * ```\n *\n * ### Instead of using the per-transition `$stateParams` object,\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\n *\n * ```js\n * MyController.$inject = ['$transition$'];\n * function MyController($transition$) {\n * var username = $transition$.params().username;\n * // .. do something with username\n * }\n * ```\n *\n * ---\n *\n * This object can be injected into other services.\n *\n * #### Deprecated Example:\n * ```js\n * SomeService.$inject = ['$http', '$stateParams'];\n * function SomeService($http, $stateParams) {\n * return {\n * getUser: function() {\n * return $http.get('/api/users/' + $stateParams.username);\n * }\n * }\n * };\n * angular.service('SomeService', SomeService);\n * ```\n * @deprecated\n */\nvar $stateParams: StateParams;\n\n/**\n * Global UI-Router variables\n *\n * The router global state as a **Service Object** (injectable during runtime).\n *\n * This object contains globals such as the current state and current parameter values.\n */\nvar $uiRouterGlobals: UIRouterGlobals;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time.\n */\nlet $uiRouter: UIRouter ;\n\n/**\n * The UI-Router instance\n *\n * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).\n *\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\n * It has references to the other UI-Router services\n *\n * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime.\n */\nvar $uiRouterProvider: UIRouter;\n\n/**\n * Transition debug/tracing\n *\n * The [[Trace]] singleton as a **Service Object** (injectable during runtime).\n *\n * Enables or disables Transition tracing which can help to debug issues.\n */\nvar $trace: Trace;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.\n */\nvar $transitions: TransitionService;\n\n/**\n * The Transition Service\n *\n * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)\n *\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\n * used to register global transition hooks.\n *\n * #### Note: This object is also exposed as [[$transitions]] for injection during runtime.\n */\nvar $transitionsProvider: TransitionService;\n\n/**\n * The current [[Transition]] object\n *\n * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)\n *\n * This object returns information about the current transition, including:\n *\n * - To/from states\n * - To/from parameters\n * - Transition options\n * - States being entered, exited, and retained\n * - Resolve data\n * - A Promise for the transition\n * - Any transition failure information\n * - An injector for both Service and Per-Transition Objects\n */\nvar $transition$: Transition;\n\n/**\n * The State Service\n *\n * The [[StateService]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service used to manage and query information on registered states.\n * It exposes state related APIs including:\n *\n * - Start a [[Transition]]\n * - Imperatively lazy load states\n * - Check if a state is currently active\n * - Look up states by name\n * - Build URLs for a state+parameters\n * - Configure the global Transition error handler\n *\n * This angular service exposes the [[StateService]] singleton.\n */\nvar $state: StateService;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.\n */\nvar $stateRegistry: StateRegistry;\n\n/**\n * The State Registry\n *\n * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to register/deregister states.\n * It has state registration related APIs including:\n *\n * - Register/deregister states\n * - Listen for state registration/deregistration\n * - Get states by name\n * - Add state decorators (to customize the state creation process)\n *\n * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.\n */\nvar $stateRegistryProvider: StateRegistry;\n\n/**\n * The View Scroll provider\n *\n * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[UIViewScrollProvider]] singleton and is\n * used to disable UI-Router's scroll behavior.\n */\nvar $uiViewScrollProvider: UIViewScrollProvider;\n\n/**\n * The View Scroll function\n *\n * The View Scroll function as a **Service Object** (injectable during runtime).\n *\n * This is a function that scrolls an element into view.\n * The element is scrolled after a `$timeout` so the DOM has time to refresh.\n *\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].\n *\n * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true.\n */\nvar $uiViewScroll: ($element: JQuery) => void;\n\n/**\n * The StateProvider\n *\n * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).\n *\n * This angular service exposes the [[StateProvider]] singleton.\n *\n * The `StateProvider` is primarily used to register states or add custom state decorators.\n *\n * ##### Note: This provider is a ng1 vestige.\n * It is a passthrough to [[$stateRegistry]] and [[$state]].\n */\nvar $stateProvider: StateProvider;\n\n/**\n * The URL Service Provider\n *\n * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).\n *\n * A service used to configure and interact with the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during runtime as [[$urlService]].\n */\nvar $urlServiceProvider: UrlService;\n\n/**\n * The URL Service\n *\n * The [[UrlService]] singleton as a **Service Object** (injectable during runtime).\n *\n * Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n *\n * Used to configure the URL.\n * It has URL related APIs including:\n *\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\n * - get or set the current url: [[UrlService.url]]\n *\n * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\n */\nvar $urlService: UrlService;\n\n/**\n * The URL Router Provider\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead.\n *\n * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time).\n *\n * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlRouterProvider: UrlRouterProvider;\n\n/**\n * The Url Router\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime).\n *\n * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlRouter: UrlRouter;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time.\n *\n * @deprecated\n */\nvar $urlMatcherFactory: UrlMatcherFactory;\n\n/**\n * The URL Matcher Factory\n *\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\n *\n * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time).\n *\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\n *\n * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime.\n *\n * @deprecated\n */\nvar $urlMatcherFactoryProvider: UrlMatcherFactory;\n\n\n\n", + "/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n", + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n", + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n", + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ], + "names": [ + "ng_from_import.module", + "services", + "isDefined", + "pick", + "forEach", + "isString", + "extend", + "ViewService", + "ResolveContext", + "trace", + "isInjectable", + "isArray", + "tail", + "Resolvable", + "angular", + "isFunction", + "kebobString", + "unnestR", + "isObject", + "createProxyFunctions", + "val", + "removeFrom", + "BaseUrlRule", + "identity", + "UIRouter", + "applyPairs", + "parse", + "noop", + "uniqR", + "inArray", + "filter" + ], + "mappings": ";;;;;;;;;;;;;AAMA,IAAI,cAAc,GAAG,OAAO,CAAC;AAE7B,AAAO,IAAM,EAAE,GAAG,CAAC,cAAc,IAAIA,qBAAqB,IAAI,cAAc,GAAG,cAAc;;;ICI3F,IAAI,eAAe,GAAoB,IAAI,CAAC;IAC5C,OAAO,UAAC,IAAI,EAAE,IAAI;QAChB,eAAe,GAAG,eAAe,IAAIC,aAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;KACzD,CAAC;CACH;AAED,IAAM,SAAS,GAAG,UAAC,IAAI,EAAE,GAAG;IACxB,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,IAA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AAC,CAAC,cAAc,EAAE,CAAC;iBAC9B,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;aACd,CAAC;SACH,CAAC,CAAC;CACJ;AAEDA,EAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA4B,mBAAmB,CAAC,CAAC;;ACvC3G;;;;AAMA,AAWA,YAAe,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js new file mode 100644 index 00000000..7e88d5bf --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js @@ -0,0 +1,9 @@ +/** + * State-based routing for AngularJS 1.x + * This bundle requires the ui-router-core.js bundle from the @uirouter/core package. + * @version v1.0.10 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t(e["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(e,t,r){"use strict";function n(){var e=null;return function(t,n){return e=e||r.services.$injector.get("$templateFactory"),[new C(t,n,e)]}}function i(e){if(!e.parent)return{};var t=["controller","controllerProvider","controllerAs","resolveAs"],n=["component","bindings","componentProvider"],i=["templateProvider","templateUrl","template","notify","async"].concat(t),o=n.concat(i);if(r.isDefined(e.views)&&R(o,e))throw new Error("State '"+e.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+o.filter(function(t){return r.isDefined(e[t])}).join(", "));var a={},u=e.views||{$default:r.pick(e,o)};return r.forEach(u,function(t,o){if(o=o||"$default",r.isString(t)&&(t={component:t}),t=r.extend({},t),R(n,t)&&R(i,t))throw new Error("Cannot combine: "+n.join("|")+" with: "+i.join("|")+" in stateview: '"+o+"@"+e.name+"'");t.resolveAs=t.resolveAs||"$resolve",t.$type="ng1",t.$context=e,t.$name=o;var u=r.ViewService.normalizeUIViewTarget(t.$context,t.$name);t.$uiViewName=u.uiViewName,t.$uiViewContextAnchor=u.uiViewContextAnchor,a[o]=t}),a}function o(e){var t=r.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(b).reduce(r.unnestR,[])}function a(e){function t(e,t,r,n,i,a){return o._runtimeServices(n,e,r,t),delete U.router,delete U.$get,U}(U=this.router=new r.UIRouter).stateProvider=new j(U.stateRegistry,U.stateService),U.stateRegistry.decorator("views",i),U.stateRegistry.decorator("onExit",A("onExit")),U.stateRegistry.decorator("onRetain",A("onRetain")),U.stateRegistry.decorator("onEnter",A("onEnter")),U.viewService._pluginapi._viewConfigFactory("ng1",n());var o=U.locationService=U.locationConfig=new V(e);return V.monkeyPatchPathParameterType(U),U.router=U,U.$get=t,t.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"],U}function u(e,t,n){r.services.$injector=e,r.services.$q=t,n.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(r.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(t){return t.deps=e.annotate(t.resolveFn,e.strictDi)})}function c(e){e.$watch(function(){r.trace.approximateDigests++})}function s(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function l(e){var t=e.parent().inheritedData("$uiView"),n=r.parse("$cfg.path")(t);return n?r.tail(n).state.name:void 0}function f(e,t,n){var i=n.uiState||e.current.name,o=r.extend($(t,e),n.uiStateOpts||{}),a=e.href(i,n.uiStateParams,o);return{uiState:i,uiStateParams:n.uiStateParams,uiStateOpts:o,href:a}}function v(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function p(e,t,r,n,i){return function(o){var a=o.which||o.button,u=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||e.attr("target"))){var c=r(function(){t.go(u.uiState,u.uiStateParams,u.uiStateOpts)});o.preventDefault();var s=n.isAnchor&&!u.href?1:0;o.preventDefault=function(){s--<=0&&r.cancel(c)}}}}function $(e,t){return{relative:l(e)||t.$current,inherit:!0,source:"sref"}}function d(e,t,n,i){var o;i&&(o=i.events),r.isArray(o)||(o=["click"]);for(var a=e.on?"on":"bind",u=0,c=o;u
    ")},e.prototype.fromString=function(e,t){return r.isFunction(e)?e(t):e},e.prototype.fromUrl=function(e,t){return r.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var i=r.services.$injector.annotate(e),o=r.isArray(e)?r.tail(e):e;return new r.Resolvable("",o,i).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var i=r.services.$injector.annotate(e),o=r.isArray(e)?r.tail(e):e;return new r.Resolvable("",o,i).get(n)},e.prototype.makeComponentTemplate=function(e,t,n,i){i=i||{};var a=S.version.minor>=3?"::":"",u=function(e){var t=r.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t},c=o(n).map(function(n){var o=n.name,c=n.type,s=u(o);if(e.attr(s)&&!i[o])return s+"='"+e.attr(s)+"'";var l=i[o]||o;if("@"===c)return s+"='{{"+a+"$resolve."+l+"}}'";if("&"===c){var f=t.getResolvable(l),v=f&&f.data,p=v&&r.services.$injector.annotate(v)||[];return s+"='$resolve."+l+(r.isArray(v)?"["+(v.length-1)+"]":"")+"("+p.join(",")+")'"}return s+"='"+a+"$resolve."+l+"'"}).join(" "),s=u(n);return"<"+s+" "+c+">"},e}(),b=function(e){return E(r.isObject(e.bindToController)?e.bindToController:e.scope)},E=function(e){return Object.keys(e||{}).map(function(t){return[t,/^([=<@&])[?]?(.*)/.exec(e[t])]}).filter(function(e){return r.isDefined(e)&&r.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},j=function(){function e(t,n){this.stateRegistry=t,this.stateService=n,r.createProxyFunctions(r.val(e.prototype),this,r.val(this))}return e.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},e.prototype.state=function(e,t){return r.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},e.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},e}(),A=function(e){return function(t,n){var i=t[e],o="onExit"===e?"from":"to";return i?function(e,t){var n=new r.ResolveContext(e.treeChanges(o)),a=r.extend(T(n),{$state$:t,$transition$:e});return r.services.$injector.invoke(i,this,a)}:void 0}},V=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=r.val(e);r.createProxyFunctions(t,this,t,["hashPrefix"])}return e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return r.removeFrom(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=r.isObject(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.url=function(e,t,r){return void 0===t&&(t=!1),e&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,i){var o=this;this.$location=t,this.$sniffer=n,e.$on("$locationChangeSuccess",function(e){return o._urlListeners.forEach(function(t){return t(e)})});var a=r.val(t),u=r.val(i);r.createProxyFunctions(a,this,a,["replace","path","search","hash"]),r.createProxyFunctions(a,this,a,["port","protocol","host"]),r.createProxyFunctions(u,this,u,["baseHref"])},e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},e}(),D=function(){function e(e){this._router=e,this._urlRouter=e.urlRouter}return e.prototype.$get=function(){var e=this._urlRouter;return e.update(!0),e.interceptDeferred||e.listen(),e},e.prototype.rule=function(e){var t=this;if(!r.isFunction(e))throw new Error("'rule' must be a function");var n=new r.BaseUrlRule(function(){return e(r.services.$injector,t._router.locationService)},r.identity);return this._urlRouter.rule(n),this},e.prototype.otherwise=function(e){var t=this,n=this._urlRouter;if(r.isString(e))n.otherwise(e);else{if(!r.isFunction(e))throw new Error("'rule' must be a string or function");n.otherwise(function(){return e(r.services.$injector,t._router.locationService)})}return this},e.prototype.when=function(t,n){return(r.isArray(n)||r.isFunction(n))&&(n=e.injectableHandler(this._router,n)),this._urlRouter.when(t,n),this},e.injectableHandler=function(e,t){return function(n){return r.services.$injector.invoke(t,null,{$match:n,$stateParams:e.globals.params})}},e.prototype.deferIntercept=function(e){this._urlRouter.deferIntercept(e)},e}();S.module("ui.router.angular1",[]);var F=S.module("ui.router.init",[]),_=S.module("ui.router.util",["ng","ui.router.init"]),I=S.module("ui.router.router",["ui.router.util"]),q=S.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),O=S.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),U=(S.module("ui.router.compat",["ui.router"]),null);a.$inject=["$locationProvider"];var k=function(e){return["$uiRouterProvider",function(t){var r=t.router[e];return r.$get=function(){return r},r}]};u.$inject=["$injector","$q","$uiRouter"];c.$inject=["$rootScope"],F.provider("$uiRouter",a),I.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new D(e)}]),_.provider("$urlService",k("urlService")),_.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return U.urlMatcherFactory}]),_.provider("$templateFactory",function(){return new P}),q.provider("$stateRegistry",k("stateRegistry")),q.provider("$uiRouterGlobals",k("globals")),q.provider("$transitions",k("transitionService")),q.provider("$state",["$uiRouterProvider",function(){return r.extend(U.stateProvider,{$get:function(){return U.stateService}})}]),q.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),O.factory("$view",function(){return U.viewService}),O.service("$trace",function(){return r.trace}),O.run(c),_.run(["$urlMatcherFactory",function(e){}]),q.run(["$state",function(e){}]),I.run(["$urlRouter",function(e){}]),F.run(u);var L,T=function(e){return e.getTokens().filter(r.isString).map(function(t){var r=e.getResolvable(t);return[t,"NOWAIT"===e.getPolicy(r).async?r.promise:r.data]}).reduce(r.applyPairs,{})};L=["$uiRouter","$timeout",function(e,t){var n=e.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){function c(){var e=w();m&&m(),h&&(m=h.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&a.$set($.attr,e.href)}var l,$=v(o),h=u[1]||u[0],m=null,g={},w=function(){return f(n,o,g)},y=s(a.uiSref);g.uiState=y.state,g.uiStateOpts=a.uiSrefOpts?i.$eval(a.uiSrefOpts):{},y.paramExpr&&(i.$watch(y.paramExpr,function(e){g.uiStateParams=r.extend({},e),c()},!0),g.uiStateParams=r.extend({},i.$eval(y.paramExpr))),c(),i.$on("$destroy",e.stateRegistry.onStatesChanged(c)),i.$on("$destroy",e.transitionService.onSuccess({},c)),$.clickable&&(l=p(o,n,t,$,w),d(o,i,l,g.uiStateOpts))}}}];var M;M=["$uiRouter","$timeout",function(e,t){var n=e.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){function c(){var e=g();h&&h(),$&&(h=$.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&a.$set(l.attr,e.href)}var s,l=v(o),$=u[1]||u[0],h=null,m={},g=function(){return f(n,o,m)},w=["uiState","uiStateParams","uiStateOpts"],y=w.reduce(function(e,t){return e[t]=r.noop,e},{});w.forEach(function(e){m[e]=a[e]?i.$eval(a[e]):null,a.$observe(e,function(t){y[e](),y[e]=i.$watch(t,function(t){m[e]=t,c()},!0)})}),c(),i.$on("$destroy",e.stateRegistry.onStatesChanged(c)),i.$on("$destroy",e.transitionService.onSuccess({},c)),l.clickable&&(s=p(o,n,t,l,g),d(o,i,s,m.uiStateOpts))}}}];var N;N=["$state","$stateParams","$interpolate","$uiRouter",function(e,t,n,i){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,o,a){function u(e){e.promise.then(f,r.noop)}function c(t,n,i){var a={state:e.get(t,l(o))||{name:t},params:n,activeClass:i};return $.push(a),function(){r.removeFrom($)(a)}}function f(){var n=function(e){return e.split(/\s/).filter(r.identity)},i=function(e){return e.map(function(e){return e.activeClass}).map(n).reduce(r.unnestR,[])},a=i($).concat(n(v)).reduce(r.uniqR,[]),u=i($.filter(function(t){return e.includes(t.state.name,t.params)})),c=!!$.filter(function(t){return e.is(t.state.name,t.params)}).length?n(v):[],s=u.concat(c).reduce(r.uniqR,[]),l=a.filter(function(e){return!r.inArray(s,e)});t.$evalAsync(function(){s.forEach(function(e){return o.addClass(e)}),l.forEach(function(e){return o.removeClass(e)})})}var v,p,$=[];v=n(a.uiSrefActiveEq||"",!1)(t);try{p=t.$eval(a.uiSrefActive)}catch(e){}p=p||n(a.uiSrefActive||"",!1)(t),r.isObject(p)&&r.forEach(p,function(e,n){if(r.isString(e)){var i=s(e);c(i.state,t.$eval(i.paramExpr),n)}}),this.$$addStateInfo=function(e,t){if(!(r.isObject(p)&&$.length>0)){var n=c(e,t,p);return f(),n}},t.$on("$stateChangeSuccess",f),t.$on("$destroy",i.transitionService.onStart({},u)),i.globals.transition&&u(i.globals.transition),f()}]}}],S.module("ui.router.state").directive("uiSref",L).directive("uiSrefActive",N).directive("uiSrefActiveEq",N).directive("uiState",M),h.$inject=["$state"],m.$inject=["$state"],S.module("ui.router.state").filter("isState",h).filter("includedByState",m);var H;H=["$view","$animate","$uiViewScroll","$interpolate","$q",function(e,t,n,i,o){function a(e,r){return{enter:function(e,r,n){S.version.minor>2?t.enter(e,null,r).then(n):t.enter(e,null,r,n)},leave:function(e,r){S.version.minor>2?t.leave(e).then(r):t.leave(e,r)}}}function u(e,t){return e===t}var c={$cfg:{viewDecl:{$context:e._pluginapi._rootViewContext()}},$uiView:{}},s={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(t,l,f){return function(t,l,v){function p(){if(d&&(r.trace.traceUIViewEvent("Removing (previous) el",d.data("$uiView")),d.remove(),d=null),m&&(r.trace.traceUIViewEvent("Destroying scope",b),m.$destroy(),m=null),h){var e=h.data("$uiViewAnim");r.trace.traceUIViewEvent("Animate out",e),S.leave(h,function(){e.$$animLeave.resolve(),d=null}),d=h,h=null}}function $(e){var i=t.$new(),a=o.defer(),u=o.defer(),c={$cfg:e,$uiView:b},s={$animEnter:a.promise,$animLeave:u.promise,$$animLeave:u};i.$emit("$viewContentLoading",P);var v=f(i,function(e){e.data("$uiViewAnim",s),e.data("$uiView",c),S.enter(e,l,function(){a.resolve(),m&&m.$emit("$viewContentAnimationEnded"),(r.isDefined(y)&&!y||t.$eval(y))&&n(e)}),p()});h=v,(m=i).$emit("$viewContentLoaded",e||R),m.$eval(w)}var d,h,m,g,w=v.onload||"",y=v.autoscroll,S=a(),R=void 0,x=l.inheritedData("$uiView")||c,P=i(v.uiView||v.name||"")(t)||"$default",b={$type:"ng1",id:s.count++,name:P,fqn:x.$uiView.fqn?x.$uiView.fqn+"."+P:P,config:null,configUpdated:function(e){(!e||e instanceof C)&&(u(R,e)||(r.trace.traceUIViewConfigUpdated(b,e&&e.viewDecl&&e.viewDecl.$context),R=e,$(e)))},get creationContext(){var e=r.parse("$cfg.viewDecl.$context")(x),t=r.parse("$uiView.creationContext")(x);return e||t}};r.trace.traceUIViewEvent("Linking",b),l.data("$uiView",{$uiView:b}),$(),g=e.registerUIView(b),t.$on("$destroy",function(){r.trace.traceUIViewEvent("Destroying/Unregistering",b),g()})}}};return s}],g.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var B="function"==typeof S.module("ui.router").component,K=0;S.module("ui.router.state").directive("uiView",H),S.module("ui.router.state").directive("uiView",g),S.module("ui.router.state").provider("$uiViewScroll",function(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,r){return e?t:function(e){return r(function(){e[0].scrollIntoView()},0,!1)}}]});e.default="ui.router",e.core=r,e.watchDigests=c,e.getLocals=T,e.getNg1ViewConfigFactory=n,e.ng1ViewsBuilder=i,e.Ng1ViewConfig=C,e.StateProvider=j,e.UrlRouterProvider=D,Object.keys(r).forEach(function(t){e[t]=r[t]}),Object.defineProperty(e,"__esModule",{value:!0})}); +//# sourceMappingURL=ui-router-angularjs.min.js.map diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js.map b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js.map new file mode 100644 index 00000000..04feeeaf --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/release/ui-router-angularjs.min.js.map @@ -0,0 +1,541 @@ +{ + "version": 3, + "file": "ui-router-angularjs.min.js", + "sources": [ + "@uirouter/angularjs/src/statebuilders/views.ts", + "@uirouter/angularjs/src/templateFactory.ts", + "@uirouter/angularjs/src/services.ts", + "@uirouter/angularjs/src/directives/stateDirectives.ts", + "@uirouter/angularjs/src/stateFilters.ts", + "@uirouter/angularjs/src/directives/viewDirective.ts", + "@uirouter/angularjs/src/angular.ts", + "@uirouter/angularjs/src/stateProvider.ts", + "@uirouter/angularjs/src/statebuilders/onEnterExitRetain.ts", + "@uirouter/angularjs/src/locationServices.ts", + "@uirouter/angularjs/src/urlRouterProvider.ts", + "@uirouter/angularjs/src/viewScroll.ts", + "@uirouter/angularjs/src/index.ts" + ], + "sourcesContent": [ + "/** @module ng1 */ /** */\nimport { ng as angular } from \"../angular\";\nimport {\n StateObject, pick, forEach, tail, extend,\n isArray, isInjectable, isDefined, isString, services, trace,\n ViewConfig, ViewService, ViewConfigFactory, PathNode, ResolveContext, Resolvable, IInjectable\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration } from \"../interface\";\nimport { TemplateFactory } from \"../templateFactory\";\nimport IInjectorService = angular.auto.IInjectorService;\n\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get(\"$templateFactory\");\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\nconst hasAnyKey = (keys, obj) =>\n keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n let tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(`State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(\", \")}`);\n }\n\n let views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { \"$default\": pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || \"$default\";\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(`Cannot combine: ${compKeys.join(\"|\")} with: ${nonCompKeys.join(\"|\")} in stateview: '${name}@${state.name}'`);\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = \"ng1\";\n config.$context = state;\n config.$name = name;\n\n let normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\nlet id = 0;\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded: boolean = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) { }\n\n load() {\n let $q = services.$q;\n let context = new ResolveContext(this.path);\n let params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n let promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context))\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent(\"Loaded\", this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings) : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): (IInjectable|string|Promise) {\n let provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n }\n}\n", + "/** @module view */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport { IAugmentedJQuery } from \"angular\";\nimport {\n isArray, isDefined, isFunction, isObject, services, Obj, IInjectable, tail, kebobString, unnestR, ResolveContext,\n Resolvable, RawParams\n} from \"@uirouter/core\";\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from \"./interface\";\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = ['$http', '$templateCache', '$injector', ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n }];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n };\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(config: Ng1ViewDeclaration, params: any, context: ResolveContext): Promise<{ template?: string, component?: string }> {\n const defaultTemplate = \"\";\n\n const asTemplate = (result) => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then(str => ({ component: str }));\n\n return (\n isDefined(config.template) ? asTemplate(this.fromString(config.template, params)) :\n isDefined(config.templateUrl) ? asTemplate(this.fromUrl(config.templateUrl, params)) :\n isDefined(config.templateProvider) ? asTemplate(this.fromProvider(config.templateProvider, params, context)) :\n isDefined(config.component) ? asComponent(config.component) :\n isDefined(config.componentProvider) ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) :\n asTemplate(defaultTemplate)\n );\n };\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: (string | Function), params?: RawParams) {\n return isFunction(template) ? ( template)(params) : template;\n };\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: (string | Function), params: any) {\n if (isFunction(url)) url = ( url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n };\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n let deps = services.$injector.annotate(provider);\n let providerFn = isArray(provider) ? tail( provider) : provider;\n let resolvable = new Resolvable(\"\", providerFn, deps);\n return resolvable.get(context);\n };\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? \"::\" : \"\";\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n\n const attributeTpl = (input: BindingTuple) => {\n let { name, type } = input;\n let attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return `${attrName}='${uiView.attr(attrName)}'`;\n\n let resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n let res = context.getResolvable(resolveName);\n let fn = res && res.data;\n let args = fn && services.$injector.annotate(fn) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n let arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(\",\")})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n let attrs = getComponentBindings(component).map(attributeTpl).join(\" \");\n let kebobName = kebob(component);\n return `<${kebobName} ${attrs}>`;\n };\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n let cmpDefs = services.$injector.get(name + \"Directive\"); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n\n", + "/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @module ng1\n * @preferred\n */\n/** for typedoc */\nimport { ng as angular } from \"./angular\";\nimport {\n IRootScopeService, IQService, ILocationService, ILocationProvider, IHttpService, ITemplateCacheService\n} from \"angular\";\nimport {\n services, applyPairs, isString, trace, extend, UIRouter, StateService, UrlRouter, UrlMatcherFactory, ResolveContext,\n unnestR, TypedMap\n} from \"@uirouter/core\";\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from \"./statebuilders/views\";\nimport { TemplateFactory } from \"./templateFactory\";\nimport { StateProvider } from \"./stateProvider\";\nimport { getStateHookBuilder } from \"./statebuilders/onEnterExitRetain\";\nimport { Ng1LocationServices } from \"./locationServices\";\nimport { UrlRouterProvider } from \"./urlRouterProvider\";\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module(\"ui.router.angular1\", []);\nlet mod_init = angular.module('ui.router.init', []);\nlet mod_util = angular.module('ui.router.util', ['ng', 'ui.router.init']);\nlet mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nlet mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nlet mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nlet mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouter.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouter($locationProvider: ILocationProvider) {\n\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator(\"views\", ng1ViewsBuilder);\n router.stateRegistry.decorator(\"onExit\", getStateHookBuilder(\"onExit\"));\n router.stateRegistry.decorator(\"onRetain\", getStateHookBuilder(\"onRetain\"));\n router.stateRegistry.decorator(\"onEnter\", getStateHookBuilder(\"onEnter\"));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n let ng1LocationService = router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider);\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location: ILocationService, $browser: any, $sniffer: any, $rootScope: ng.IScope, $http: IHttpService, $templateCache: ITemplateCacheService) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [ '$uiRouterProvider', ($urp) => {\n let service = $urp.router[serviceName];\n service[\"$get\"] = () => service;\n return service;\n}];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = $q;\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry.get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === \"deferred\")\n .forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) =>\n uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter);\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () =>\n extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() { trace.approximateDigests++; });\n}\n\nmod_init .provider(\"$uiRouter\", $uiRouter);\nmod_rtr .provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util .provider('$urlService', getProviderFor('urlService'));\nmod_util .provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util .provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory ('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main .factory ('$view', () => router.viewService);\nmod_main .service (\"$trace\", () => trace);\n\nmod_main .run (watchDigests);\nmod_util .run (['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) { }]);\nmod_state.run (['$state', function ($state: StateService) { }]);\nmod_rtr .run (['$urlRouter', function ($urlRouter: UrlRouter) { }]);\nmod_init .run (runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap => {\n let tokens = ctx.getTokens().filter(isString);\n\n let tuples = tokens .map(key => {\n let resolvable = ctx.getResolvable(key);\n let waitPolicy = ctx.getPolicy(resolvable).async;\n return [ key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data ];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n\n", + "/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @ng1api\n * @preferred\n * @module directives\n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from \"angular\";\n\nimport {\n Obj, extend, forEach, tail, isString, isObject, isArray, parse, noop, unnestR, identity, uniqR, inArray, removeFrom,\n RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter\n} from \"@uirouter/core\";\nimport { UIViewData } from \"./viewDirective\";\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, \" \").match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n let $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n let path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n let uiState = def.uiState || $state.current.name;\n let uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n let href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === \"FORM\";\n\n return {\n attr: isForm ? \"action\" : (isSvg ? 'xlink:href' : 'href'),\n isAnchor: el.prop(\"tagName\").toUpperCase() === \"A\",\n clickable: !isForm\n };\n}\n\n/** @hidden */\nfunction clickHook(el: IAugmentedJQuery, $state: StateService, $timeout: ITimeoutService, type: TypeInfo, getDef: () => Def) {\n return function (e: JQueryMouseEventObject) {\n var button = e.which || e.button, target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition = $timeout(function () {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the
    directive.\n var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: \"sref\"\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n let on = element.on ? 'on' : 'bind';\n for (let event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n let off = element.off ? 'off' : 'unbind';\n for (let event of events) {\n element[off](event, hookFn);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSref: ng1_directive;\nuiSref = ['$uiRouter', '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiState: ng1_directive;\nuiState = ['$uiRouter', '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n let $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n let type = getTypeInfo(element);\n let active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n let rawDef = {} as Def;\n let getDef = () => processedDef($state, element, rawDef);\n\n let inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n let watchDeregFns = inputAttrs.reduce((acc, attr) => (acc[attr] = noop, acc), {});\n\n function update() {\n let def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, (newval) => {\n rawDef[field] = newval;\n update();\n }, true);\n })\n });\n\n update();\n\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n }\n };\n }];\n\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the
    and elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActive: ng1_directive;\nuiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',\n function $StateRefActiveDirective($state: StateService, $stateParams: Obj, $interpolate: IInterpolateService, $uiRouter: UIRouter) {\n return {\n restrict: \"A\",\n controller: ['$scope', '$element', '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [],\n activeEqClass: string,\n uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n if (isObject(uiSrefActive)) {\n forEach(uiSrefActive, function (stateOrName: StateOrName, activeClass: string) {\n if (isString(stateOrName)) {\n let ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n }\n });\n }\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n let deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n\n $scope.$on('$stateChangeSuccess', update);\n $scope.$on('$destroy', $uiRouter.transitionService.onStart({}, updateAfterTransition));\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n var state = $state.get(stateName, stateContext($element));\n\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n }\n }\n\n // Update route state\n function update() {\n const splitClasses = str =>\n str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList.map(x => x.activeClass).map(splitClasses).reduce(unnestR, []);\n\n let allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n let fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n let exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n let exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n let addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n let removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n }]\n };\n }];\n\n/** @hidden */\ninterface Def { uiState: string; href: string; uiStateParams: Obj; uiStateOpts: any; }\n/** @hidden */\ninterface StateData { state: StateDeclaration; params: RawParams; activeClass: string; }\n\nangular.module('ui.router.state')\n .directive('uiSref', uiSref)\n .directive('uiSrefActive', uiSrefActive)\n .directive('uiSrefActiveEq', uiSrefActive)\n .directive('uiState', uiState);\n", + "/** @module ng1 */ /** for typedoc */\n\nimport { ng as angular } from \"./angular\";\nimport { Obj, StateService, StateOrName } from \"@uirouter/core\";\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nexport function $IsStateFilter($state: StateService) {\n var isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nexport function $IncludedByStateFilter($state: StateService) {\n var includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n", + "/** \n * @ng1api \n * @module directives \n */ /** for typedoc */\nimport { ng as angular } from \"../angular\";\nimport {\n IInterpolateService, IScope, ITranscludeFunction, IAugmentedJQuery,\n ICompileService, IControllerService, ITimeoutService, noop\n} from \"angular\";\n\nimport {\n extend, unnestR, filter, tail, isDefined, isFunction, isString, trace, parse,\n ActiveUIView, TransitionService, ResolveContext, Transition, PathNode, StateDeclaration,\n Param, kebobString, HookRegOptions, ViewService, $QLike, Obj, TypedMap\n} from \"@uirouter/core\";\nimport {Ng1ViewConfig} from \"../statebuilders/views\";\nimport {Ng1Controller, Ng1StateDeclaration} from \"../interface\";\nimport {getLocals} from \"../services\";\nimport { ng1_directive } from \"./stateDirectives\";\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n}\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise;\n $animLeave: Promise;\n $$animLeave: { resolve: () => any; } // \"deferred\"\n}\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',\nfunction $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $interpolate: IInterpolateService, $q: $QLike) {\n\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n }\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n let rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: { }\n };\n\n let directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n let previousEl: JQuery, currentEl: JQuery,\n currentScope: IScope, unregister: Function,\n onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n viewConfig = undefined as Ng1ViewConfig,\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (
    \n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + \".\" + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() { // The context in which this ui-view \"tag\" was created\n let fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n let fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n }\n };\n\n trace.traceUIViewEvent(\"Linking\", activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on(\"$destroy\", function() {\n trace.traceUIViewEvent(\"Destroying/Unregistering\", activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent(\"Removing (previous) el\", previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent(\"Destroying scope\", activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n let _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent(\"Animate out\", _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n let newScope = scope.$new();\n let animEnter = $q.defer(), animLeave = $q.defer();\n\n let $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n let $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n let cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if (isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n }\n };\n\n return directive;\n}];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n/** @hidden */\nfunction $ViewDirectiveFill($compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n let initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n let data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n\n let cfg: Ng1ViewConfig = data.$cfg || { viewDecl: {}, getTemplate: noop };\n let resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n let link = $compile($element.contents());\n let controller = cfg.controller;\n let controllerAs: string = getControllerAs(cfg);\n let resolveAs: string = getResolveAs(cfg);\n let locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n let controllerInstance = $controller(controller, extend({}, locals, { $scope: scope, $element: $element }));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.viewDecl.component)) {\n let cmp = cfg.viewDecl.component;\n let kebobName = kebobString(cmp);\n let tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, \"i\");\n\n let getComponentController = () => {\n let directiveEl = [].slice.call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName)) ;\n \n return directiveEl && angular.element(directiveEl).data(`$${cmp}Controller`);\n };\n\n let deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n }\n };\n}\n\n/** @hidden */\nlet hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks($q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n let viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n let hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onParamsChange\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n let resolveContext: ResolveContext = new ResolveContext(cfg.path);\n let viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1) return;\n\n let toParams = $transition$.params(\"to\") as TypedMap;\n let fromParams = $transition$.params>(\"from\") as TypedMap;\n let toSchema: Param[] = $transition$.treeChanges().to.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n let fromSchema: Param[] = $transition$.treeChanges().from.map((node: PathNode) => node.paramSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n let changedToParams = toSchema.filter((param: Param) => {\n let idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n let changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n let newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n let id = _uiCanExitId++;\n let cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && (trans[cacheProp] && trans[cacheProp][id] === true || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise, ids = trans[cacheProp] = trans[cacheProp] || {};\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => ids[id] = (val !== false));\n }\n return promise;\n };\n\n let criteria = {exiting: viewState.name};\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', uiView);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n", + "/**\n * @hidden\n * @module ng1\n */ /** */\ndeclare var angular;\nimport * as ng_from_import from \"angular\";\nlet ng_from_global = angular;\n\nexport const ng = (ng_from_import && ng_from_import.module) ? ng_from_import : ng_from_global;\n", + "/** @module ng1 */ /** for typedoc */\nimport {\n val, isObject, createProxyFunctions, BuilderFunction, StateRegistry, StateService, OnInvalidCallback\n} from \"@uirouter/core\";\nimport { Ng1StateDeclaration } from \"./interface\";\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n *
    \n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * \n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * \n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * \n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * \n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * \n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * \n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * \n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * \n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * \n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * \n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * \n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * \n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n", + "/** @module ng1 */ /** */\nimport {\n StateObject, TransitionStateHookFn, HookResult, Transition, services, ResolveContext, extend, BuilderFunction\n} from \"@uirouter/core\";\nimport { getLocals } from \"../services\";\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n */\nexport const getStateHookBuilder = (hookName: \"onEnter\"|\"onExit\"|\"onRetain\") =>\nfunction stateHookBuilder(state: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n let hook = state[hookName];\n let pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n let resolveContext = new ResolveContext(trans.treeChanges(pathname));\n let locals = extend(getLocals(resolveContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n};\n", + "/**\n * @internalapi\n * @module ng1\n */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType } from \"@uirouter/core\";\nimport { val, createProxyFunctions, removeFrom, isObject } from \"@uirouter/core\";\nimport { ILocationService, ILocationProvider } from \"angular\";\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n baseHref;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n dispose() { }\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n let _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (newUrl) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on(\"$locationChangeSuccess\", evt => this._urlListeners.forEach(fn => fn(evt)));\n let _loc = val($location);\n let _browser = val($browser);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, [\"replace\", \"path\", \"search\", \"hash\"]);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n // Bind these LocationConfig functions to $browser\n createProxyFunctions(_browser, this, _browser, ['baseHref']);\n }\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n let pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (val: any) =>\n val != null ? val.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;\n\n pathType.decode = (val: string) =>\n val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;\n\n }\n}\n", + "/** @module url */ /** */\nimport {\n UIRouter, UrlRouter, LocationServices, $InjectorLike, BaseUrlRule, UrlRuleHandlerFn, UrlMatcher,\n IInjectable\n} from \"@uirouter/core\";\nimport { services, isString, isFunction, isArray, identity } from \"@uirouter/core\";\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string|void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @deprecated\n */\nexport class UrlRouterProvider {\n /** @hidden */ _router: UIRouter;\n /** @hidden */ _urlRouter: UrlRouter;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this._urlRouter = router.urlRouter;\n }\n\n /** @hidden */\n $get() {\n let urlRouter = this._urlRouter;\n urlRouter.update(true);\n if (!urlRouter.interceptDeferred) urlRouter.listen();\n return urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () =>\n ruleFn(services.$injector, this._router.locationService);\n\n let rule = new BaseUrlRule(match, identity);\n this._urlRouter.rule(rule);\n return this;\n };\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n let urlRouter = this._urlRouter;\n\n if (isString(rule)) {\n urlRouter.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRouter.otherwise(() => rule(services.$injector, this._router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n };\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: (RegExp|UrlMatcher|string), handler: string|IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this._router, handler);\n }\n\n this._urlRouter.when(what, handler as any);\n return this;\n };\n\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match =>\n services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this._urlRouter.deferIntercept(defer);\n };\n}\n", + "/** @module ng1 */ /** */\nimport { ng as angular } from \"./angular\";\nimport { IServiceProviderFactory } from \"angular\";\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n\n var useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n", + "/**\n * Main entry point for angular 1.x build\n * @module ng1\n */ /** */\n\nexport * from \"./interface\";\nexport * from \"./services\";\nexport * from \"./statebuilders/views\";\nexport * from \"./stateProvider\";\nexport * from \"./urlRouterProvider\";\n\nimport \"./injectables\";\nimport \"./directives/stateDirectives\";\nimport \"./stateFilters\";\nimport \"./directives/viewDirective\";\nimport \"./viewScroll\";\n\nexport default \"ui.router\";\n\nimport * as core from \"@uirouter/core\";\nexport { core };\nexport * from \"@uirouter/core\";\n\n" + ], + "names": [ + "templateFactory", + "path", + "view", + "services", + "$injector", + "get", + "Ng1ViewConfig", + "state", + "parent", + "ctrlKeys", + "compKeys", + "nonCompKeys", + "concat", + "allViewKeys", + "isDefined", + "views", + "hasAnyKey", + "Error", + "name", + "filter", + "key", + "join", + "viewsObject", + "$default", + "pick", + "forEach", + "config", + "isString", + "component", + "extend", + "resolveAs", + "$type", + "$context", + "$name", + "normalized", + "ViewService", + "normalizeUIViewTarget", + "$uiViewName", + "uiViewName", + "$uiViewContextAnchor", + "uiViewContextAnchor", + "cmpDefs", + "length", + "map", + "getBindings", + "reduce", + "unnestR", + "$locationProvider", + "$location", + "$browser", + "$sniffer", + "$rootScope", + "$http", + "$templateCache", + "ng1LocationService", + "_runtimeServices", + "router", + "this", + "UIRouter", + "stateProvider", + "StateProvider", + "stateRegistry", + "stateService", + "decorator", + "ng1ViewsBuilder", + "getStateHookBuilder", + "viewService", + "_pluginapi", + "_viewConfigFactory", + "getNg1ViewConfigFactory", + "locationService", + "locationConfig", + "Ng1LocationServices", + "monkeyPatchPathParameterType", + "$get", + "$inject", + "$q", + "$uiRouter", + "x", + "$$state", + "resolvables", + "deps", + "resolvable", + "annotate", + "resolveFn", + "strictDi", + "$watch", + "trace", + "approximateDigests", + "ref", + "parsed", + "paramsOnly", + "match", + "replace", + "paramExpr", + "el", + "$uiView", + "inheritedData", + "parse", + "tail", + "undefined", + "$state", + "$element", + "def", + "uiState", + "current", + "uiStateOpts", + "defaultOpts", + "href", + "uiStateParams", + "isSvg", + "Object", + "prototype", + "toString", + "call", + "prop", + "isForm", + "nodeName", + "attr", + "isAnchor", + "toUpperCase", + "clickable", + "$timeout", + "type", + "getDef", + "e", + "button", + "which", + "target", + "ctrlKey", + "metaKey", + "shiftKey", + "transition", + "go", + "preventDefault", + "ignorePreventDefaultCount", + "cancel", + "relative", + "stateContext", + "$current", + "inherit", + "source", + "element", + "scope", + "hookFn", + "events", + "isArray", + "on", + "events_1", + "_i", + "event_1", + "$on", + "off", + "events_2", + "event_2", + "isFilter", + "params", + "options", + "is", + "$stateful", + "includesFilter", + "includes", + "$compile", + "$controller", + "$transitions", + "$view", + "getControllerAs", + "getResolveAs", + "restrict", + "priority", + "compile", + "tElement", + "initial", + "html", + "empty", + "data", + "contents", + "cfg", + "$cfg", + "viewDecl", + "getTemplate", + "noop", + "resolveCtx", + "ResolveContext", + "traceUIViewFill", + "link", + "controller", + "controllerAs", + "locals", + "getLocals", + "controllerInstance", + "$scope", + "children", + "registerControllerCallbacks", + "cmp_1", + "kebobName", + "kebobString", + "tagRegexp_1", + "RegExp", + "deregisterWatch_1", + "directiveEl", + "slice", + "tagName", + "exec", + "angular", + "ctrlInstance", + "isFunction", + "$onInit", + "hasComponentImpl", + "viewState", + "self", + "hookOptions", + "bind", + "uiOnParamsChanged", + "viewCreationTrans_1", + "getResolvable", + "onSuccess", + "$transition$", + "exiting", + "indexOf", + "toParams", + "fromParams", + "toSchema", + "treeChanges", + "to", + "node", + "paramSchema", + "fromSchema", + "from", + "changedToParams", + "param", + "idx", + "equals", + "id", + "changedKeys_1", + "newValues", + "val", + "uiCanExit", + "id_1", + "_uiCanExitId", + "prevTruthyAnswer_1", + "trans", + "redirectedFrom", + "criteria", + "onBefore", + "promise", + "ids", + "when", + "then", + "ng_from_global", + "ng", + "ng_from_import", + "ng_from_import.module", + "keys", + "obj", + "acc", + "factory", + "uiView", + "context", + "_this", + "makeComponentTemplate", + "bindings", + "template", + "paramValues", + "promises", + "fromConfig", + "getController", + "all", + "results", + "traceViewServiceEvent", + "provider", + "controllerProvider", + "isInjectable", + "providerFn", + "Resolvable", + "version", + "minor", + "$templateRequest", + "has", + "TemplateFactory", + "value", + "_useHttp", + "asTemplate", + "result", + "str", + "asComponent", + "fromString", + "templateUrl", + "fromUrl", + "templateProvider", + "fromProvider", + "componentProvider", + "fromComponentProvider", + "url", + "cache", + "headers", + "Accept", + "response", + "prefix", + "kebob", + "camelCase", + "kebobed", + "attrs", + "getComponentBindings", + "input", + "attrName", + "resolveName", + "res", + "fn", + "args", + "scopeBindings", + "isObject", + "bindToController", + "bindingsObj", + "tuple", + "createProxyFunctions", + "func", + "definition", + "register", + "callback", + "onInvalid", + "hookName", + "parentFn", + "hook", + "pathname", + "resolveContext", + "$state$", + "invoke", + "_lp", + "_urlListeners", + "push", + "removeFrom", + "html5Mode", + "enabled", + "history", + "newUrl", + "evt", + "_loc", + "_browser", + "pathType", + "urlMatcherFactory", + "encode", + "m", + "~", + "/", + "decode", + "~~", + "~2F", + "_router", + "_urlRouter", + "urlRouter", + "UrlRouterProvider", + "update", + "interceptDeferred", + "listen", + "ruleFn", + "rule", + "BaseUrlRule", + "identity", + "otherwise", + "what", + "handler", + "injectableHandler", + "$match", + "$stateParams", + "globals", + "defer", + "deferIntercept", + "module", + "mod_init", + "mod_util", + "mod_rtr", + "mod_state", + "mod_main", + "getProviderFor", + "serviceName", + "$urp", + "service", + "runBlock", + "watchDigests", + "uiRouter", + "urlRouterProvider", + "run", + "$urlMatcherFactory", + "$urlRouter", + "uiSref", + "ctx", + "getTokens", + "getPolicy", + "async", + "applyPairs", + "require", + "uiSrefActive", + "unlinkInfoFn", + "active", + "$$addStateInfo", + "$set", + "getTypeInfo", + "rawDef", + "processedDef", + "parseStateRef", + "uiSrefOpts", + "$eval", + "onStatesChanged", + "transitionService", + "clickHook", + "bindEvents", + "inputAttrs", + "watchDeregFns", + "field", + "$observe", + "expr", + "newval", + "$interpolate", + "$attrs", + "stateName", + "stateParams", + "activeClass", + "stateInfo", + "states", + "splitClasses", + "split", + "getClasses", + "stateList", + "allClasses", + "activeEqClass", + "uniqR", + "fuzzyClasses", + "exactClasses", + "addClasses", + "removeClasses", + "cls", + "inArray", + "$evalAsync", + "className", + "addClass", + "removeClass", + "uiSrefActiveEq", + "stateOrName", + "addState", + "newState", + "newParams", + "deregister", + "onStart", + "updateAfterTransition", + "directive", + "$IsStateFilter", + "$IncludedByStateFilter", + "$animate", + "$uiViewScroll", + "enter", + "cb", + "leave", + "config1", + "config2", + "rootData", + "_rootViewContext", + "count", + "terminal", + "transclude", + "tAttrs", + "$transclude", + "previousEl", + "traceUIViewEvent", + "remove", + "currentScope", + "activeUIView", + "$destroy", + "currentEl", + "_viewData_1", + "renderer", + "$$animLeave", + "resolve", + "newScope", + "$new", + "animEnter", + "animLeave", + "$uiViewData", + "$uiViewAnim", + "$animEnter", + "$animLeave", + "$emit", + "cloned", + "clone", + "autoScrollExp", + "cleanupLastView", + "viewConfig", + "onloadExp", + "unregister", + "getRenderer", + "inherited", + "fqn", + "configUpdated", + "configsEqual", + "traceUIViewConfigUpdated", + "updateView", + "creationContext", + "fromParentTagConfig", + "fromParentTag", + "registerUIView", + "$ViewDirectiveFill", + "useAnchorScroll", + "$anchorScroll", + "scrollIntoView" + ], + "mappings": ";;;;;;;gUAYE,IAAIA,EAAmC,KACvC,OAAO,SAACC,EAAMC,GAEZ,OADAF,EAAkBA,GAAmBG,WAASC,UAAUC,IAAI,qBACpD,IAAIC,EAAcL,EAAMC,EAAMF,KAgB1C,WAAgCO,GAE9B,IAAKA,EAAMC,OAAQ,SAEnB,IACIC,GAAY,aAAc,qBAAsB,eAAgB,aAChEC,GAAY,YAAa,WAAY,qBACrCC,GAHW,mBAAoB,cAAe,WAAY,SAAU,SAG9CC,OAAOH,GAC7BI,EAAcH,EAASE,OAAOD,GAKlC,GAAIG,YAAUP,EAAMQ,QAAUC,EAAUH,EAAaN,GACnD,MAAM,IAAIU,MAAM,UAAUV,EAAMW,iKAGxBL,EAAYM,OAAO,SAAAC,GAAO,OAAAN,YAAUP,EAAMa,MAAOC,KAAK,OAGhE,IAAIN,KACAO,EAAcf,EAAMQ,QAAWQ,SAAYC,OAAKjB,EAAOM,IA2B3D,OAzBAY,UAAQH,EAAa,SAAUI,EAA4BR,GAUzD,GARAA,EAAOA,GAAQ,WAEXS,WAASD,KAASA,GAAWE,UAAoBF,IAGrDA,EAASG,YAAWH,GAGhBV,EAAUN,EAAUgB,IAAWV,EAAUL,EAAae,GACxD,MAAM,IAAIT,MAAM,mBAAmBP,EAASW,KAAK,eAAcV,EAAYU,KAAK,wBAAuBH,MAAQX,EAAMW,UAGvHQ,EAAO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y,QAAM,yBAANA,CAAgCwY,GAGtDQ,EAAgBhZ,QAAM,0BAANA,CAAiCwY,GACrD,OAAOO,GAAuBC,IAIlC3Z,QAAMwX,iBAAiB,UAAWG,GAWlC5W,EAASyE,KAAK,WAAa/E,QAASkX,IAEpC6B,IAEAP,EAAanU,EAAM8U,eAAejC,GAClCnU,EAAMQ,IAAI,WAAY,WACpBhE,QAAMwX,iBAAiB,2BAA4BG,GACnDsB,SA4FR,OAAO3C,IAGTuD,EAAmBza,SAAW,WAAY,cAAe,eAAgB,QAAS,KAAM,YAoFxF,IAAIqI,EAAgF,mBAArDJ,EAAgBoK,OAAO,aAAwB,UAE1EjI,EAAe,EAyEnBnC,EAAQoK,OAAO,mBAAmB6E,UAAU,SAAgB5L,GAC5DrD,EAAQoK,OAAO,mBAAmB6E,UAAU,SAAgBuD,GM1c5DxS,EAAQoK,OAAO,mBAAmBlG,SAAS,gBArB3C,WAEE,IAAIuO,GAAkB,EAEtB5b,KAAK4b,gBAAkB,WACrBA,GAAkB,GAGpB5b,KAAKiB,MAAQ,gBAAiB,WAAY,SAAU4a,EAAqC5X,GACvF,OAAI2X,EACKC,EAGF,SAAUhZ,GACf,OAAOoB,EAAS,WACdpB,EAAS,GAAGiZ,kBACX,GAAG,kBCjBG" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/rollup.config.js b/public/app/vendor/node_modules/@uirouter/angularjs/rollup.config.js new file mode 100644 index 00000000..3da2f59a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/rollup.config.js @@ -0,0 +1,116 @@ +import nodeResolve from 'rollup-plugin-node-resolve'; +import uglify from 'rollup-plugin-uglify'; +import progress from 'rollup-plugin-progress'; +import sourcemaps from 'rollup-plugin-sourcemaps'; +import visualizer from 'rollup-plugin-visualizer'; + +const MINIFY = process.env.MINIFY; +const MONOLITHIC = process.env.MONOLITHIC; +const ROUTER = process.env.ROUTER; +const EVENTS = process.env.EVENTS; +const RESOLVE = process.env.RESOLVE; + +const pkg = require('./package.json'); +let banner = +`/** + * ${pkg.description}`; +if (ROUTER && MONOLITHIC) { + banner += ` + * 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 https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles` +} else if (ROUTER) { + banner += ` + * This bundle requires the ui-router-core.js bundle from the @uirouter/core package.` +} +banner += ` + * @version v${pkg.version} + * @link ${pkg.homepage} + * @license MIT License, http://www.opensource.org/licenses/MIT + */`; + +const uglifyOpts = { output: {} }; +// retain multiline comment with @license +uglifyOpts.output.comments = (node, comment) => +comment.type === 'comment2' && /@license/i.test(comment.value); + +const onwarn = (warning) => { + // Suppress this error message... https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined + const ignores = ['THIS_IS_UNDEFINED']; + if (!ignores.some(code => code === warning.code)) { + console.error(warning.message); + } +}; + +const plugins = [ + nodeResolve({jsnext: true}), + progress({ clearLine: false }), + sourcemaps(), +]; + +if (MINIFY) plugins.push(uglify(uglifyOpts)); +if (ROUTER && MINIFY) plugins.push(visualizer({ sourcemap: true })); + +const extension = MINIFY ? ".min.js" : ".js"; + +const BASE_CONFIG = { + sourcemap: true, + exports: 'named', + plugins: plugins, + banner: banner, + onwarn: onwarn, +}; + +const ROUTER_CONFIG = Object.assign({ + input: 'lib-esm/index.js', + external: ['angular', '@uirouter/core'], + output: { + file: 'release/ui-router-angularjs' + extension, + format: 'umd', + name: '@uirouter/angularjs', + globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' }, + }, +}, BASE_CONFIG); + +// Also bundles the code from @uirouter/core into the same bundle +const MONOLITHIC_ROUTER_CONFIG = Object.assign({ + input: 'lib-esm/index.js', + external: 'angular', + output: { + file: 'release/angular-ui-router' + extension, + format: 'umd', + name: '@uirouter/angularjs', + globals: { angular: 'angular' }, + }, +}, BASE_CONFIG); + +const EVENTS_CONFIG = Object.assign({}, BASE_CONFIG, { + input: 'lib-esm/legacy/stateEvents.js', + external: ['angular', '@uirouter/core'], + output: { + file: 'release/stateEvents' + extension, + format: 'umd', + name: '@uirouter/angularjs-state-events', + globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' }, + }, +}); + +const RESOLVE_CONFIG = Object.assign({}, BASE_CONFIG, { + input: 'lib-esm/legacy/resolveService.js', + external: ['angular', '@uirouter/core'], + output: { + file: 'release/resolveService' + extension, + format: 'umd', + name: '@uirouter/angularjs-resolve-service', + globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' }, + }, +}); + +const CONFIG = + RESOLVE ? RESOLVE_CONFIG : + EVENTS ? EVENTS_CONFIG : + MONOLITHIC ? MONOLITHIC_ROUTER_CONFIG : + ROUTER ? ROUTER_CONFIG : ROUTER_CONFIG; + +export default CONFIG; diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/stats.html b/public/app/vendor/node_modules/@uirouter/angularjs/stats.html new file mode 100644 index 00000000..2e0c4ec1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/stats.html @@ -0,0 +1,152 @@ + + RollUp Visualizer + + +
    +
    +

    RollUp Visualizer

    + +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/angularjs/yarn.lock b/public/app/vendor/node_modules/@uirouter/angularjs/yarn.lock new file mode 100644 index 00000000..61d0c158 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/angularjs/yarn.lock @@ -0,0 +1,3984 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/angular-animate@^1.5.5": + version "1.5.8" + resolved "https://registry.yarnpkg.com/@types/angular-animate/-/angular-animate-1.5.8.tgz#578e058ee0ca5539e1795421a91ae2f52581dc8f" + dependencies: + "@types/angular" "*" + +"@types/angular-mocks@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@types/angular-mocks/-/angular-mocks-1.5.11.tgz#d5bbefbf742f2196071bda0fe051878b6f4fd72c" + dependencies: + "@types/angular" "*" + +"@types/angular@*", "@types/angular@^1.5.14": + version "1.6.25" + resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.25.tgz#d403e94b40e06af3d9b76da5031795a9b929d08a" + +"@types/fs-extra@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-0.0.33.tgz#a8719c417b080c012d3497b28e228ac09745fdf2" + dependencies: + "@types/node" "*" + +"@types/handlebars@^4.0.31": + version "4.0.33" + resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.33.tgz#ee45696b067e4bdf15c3956710a4c36c17d8f8f0" + +"@types/highlight.js@^9.1.8": + version "9.1.9" + resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.1.9.tgz#ed6336955eaf233b75eb7923b9b1f373d045ef01" + +"@types/jasmine@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.0.tgz#997b41a27752b4850af2683bc4a8d8222c25bd02" + +"@types/jquery@^1.10.31": + version "1.10.33" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-1.10.33.tgz#6c4c279f8d06839b184950432e880e0a469a64a1" + +"@types/lodash@^4.14.37": + version "4.14.67" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.67.tgz#4714714434da110306b9862fbd36b30b55eb850a" + +"@types/marked@0.0.28": + version "0.0.28" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.0.28.tgz#44ba754e9fa51432583e8eb30a7c4dd249b52faa" + +"@types/minimatch@^2.0.29": + version "2.0.29" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" + +"@types/node@*": + version "8.0.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.6.tgz#ed2c3e011cb51ccd3cf874989130f1b9ffe06069" + +"@types/shelljs@^0.3.32": + version "0.3.33" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.3.33.tgz#df613bddb88225ed09ce5c835f620dcaaf155e6b" + dependencies: + "@types/node" "*" + +"@uirouter/core@5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@uirouter/core/-/core-5.0.11.tgz#bec461fcda767d79c98f6647cc9313ef9e5de03a" + +"@uirouter/publish-scripts@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@uirouter/publish-scripts/-/publish-scripts-2.0.2.tgz#dcdcd158623c8151b9ca4d71aeca97c917469c51" + dependencies: + conventional-changelog "^1.1.4" + conventional-changelog-ui-router-core "^1.4.2" + find-parent-dir "^0.3.0" + git-semver-tags "^1.2.1" + readline-sync "^1.4.7" + shelljs "^0.7.8" + shx "^0.2.2" + tweak-sourcemap-paths "0.0.3" + yargs "^9.0.1" + +JSONStream@^1.0.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +accepts@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" + +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + +ajv-keywords@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.1.5: + version "5.2.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + json-schema-traverse "^0.3.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.0" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.0.tgz#fd17474700cb5cc9c2b709f0be9d23ce3c198c33" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1.js@^4.0.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +async@~0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64-js@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.3.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +body-parser@^1.16.1: + version "1.17.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.17.2.tgz#f8892abc8f9e627d42aedafbca66bf5ab99104ee" + dependencies: + bytes "2.4.0" + content-type "~1.0.2" + debug "2.6.7" + depd "~1.1.0" + http-errors "~1.6.1" + iconv-lite "0.4.15" + on-finished "~2.3.0" + qs "6.4.0" + raw-body "~2.2.0" + type-is "~1.6.15" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + dependencies: + expand-range "^0.1.0" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browser-resolve@^1.11.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.8" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.8.tgz#c8fa3b1b7585bb7ba77c5560b60996ddec6d5309" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0, builtin-modules@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +bytes@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.1, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.4.1, chokidar@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +colors@^1.1.0, colors@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combine-lists@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + dependencies: + lodash "^4.5.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.10.0.tgz#e1f5d3245de246d1a5ca04702fa1ad1bd7e405fe" + dependencies: + graceful-readlink ">= 1.0.0" + +commander@~2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +compare-func@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + dependencies: + array-ify "^1.0.0" + dot-prop "^3.0.0" + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +connect@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.2.tgz#694e8d20681bfe490282c8ab886be98f09f42fe7" + dependencies: + debug "2.6.7" + finalhandler "1.0.3" + parseurl "~1.3.1" + utils-merge "1.0.0" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +conventional-changelog-angular@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.3.4.tgz#7d7cdfbd358948312904d02229a61fd6075cf455" + dependencies: + compare-func "^1.3.1" + github-url-from-git "^1.4.0" + q "^1.4.1" + +conventional-changelog-angular@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.1.tgz#974e73aa1c39c392e4364f2952bd9a62904e9ea3" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-atom@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.0.tgz#67a47c66a42b2f8909ef1587c9989ae1de730b92" + dependencies: + q "^1.4.1" + +conventional-changelog-atom@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" + dependencies: + q "^1.4.1" + +conventional-changelog-cli@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.4.tgz#38f7ff7ac7bca92ea110897ea08b473f2055a27c" + dependencies: + add-stream "^1.0.0" + conventional-changelog "^1.1.6" + lodash "^4.1.0" + meow "^3.7.0" + tempfile "^1.1.1" + +conventional-changelog-codemirror@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334" + dependencies: + q "^1.4.1" + +conventional-changelog-codemirror@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459" + dependencies: + q "^1.4.1" + +conventional-changelog-core@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" + dependencies: + conventional-changelog-writer "^1.1.0" + conventional-commits-parser "^1.0.0" + dateformat "^1.0.12" + get-pkg-repo "^1.0.0" + git-raw-commits "^1.2.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^1.2.0" + lodash "^4.0.0" + normalize-package-data "^2.3.5" + q "^1.4.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" + +conventional-changelog-core@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.2.tgz#a09b6b959161671ff45b93cc9efb0444e7c845c0" + dependencies: + conventional-changelog-writer "^2.0.1" + conventional-commits-parser "^2.0.0" + dateformat "^1.0.12" + get-pkg-repo "^1.0.0" + git-raw-commits "^1.2.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^1.2.2" + lodash "^4.0.0" + normalize-package-data "^2.3.5" + q "^1.4.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" + +conventional-changelog-ember@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" + dependencies: + q "^1.4.1" + +conventional-changelog-ember@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.8.tgz#65e686da83d23b67133d1f853908c87f948035c0" + dependencies: + q "^1.4.1" + +conventional-changelog-eslint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2" + dependencies: + q "^1.4.1" + +conventional-changelog-eslint@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1" + dependencies: + q "^1.4.1" + +conventional-changelog-express@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce" + dependencies: + q "^1.4.1" + +conventional-changelog-express@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d" + dependencies: + q "^1.4.1" + +conventional-changelog-jquery@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" + dependencies: + q "^1.4.1" + +conventional-changelog-jscs@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" + dependencies: + q "^1.4.1" + +conventional-changelog-jshint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-jshint@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-ui-router-core@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-ui-router-core/-/conventional-changelog-ui-router-core-1.4.2.tgz#56d5787163f883e25d3e1f573aef563f85411df7" + dependencies: + compare-func "^1.3.1" + github-url-from-git "^1.4.0" + q "^1.4.1" + +conventional-changelog-writer@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^1.0.0" + dateformat "^1.0.11" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.0.0" + meow "^3.3.0" + semver "^5.0.1" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog-writer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^1.0.0" + dateformat "^1.0.11" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.0.0" + meow "^3.3.0" + semver "^5.0.1" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog@1.1.6, conventional-changelog@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.6.tgz#ebd9b1ab63766c715f903f654626b6b1c0da7762" + dependencies: + conventional-changelog-angular "^1.5.1" + conventional-changelog-atom "^0.1.1" + conventional-changelog-codemirror "^0.2.0" + conventional-changelog-core "^1.9.2" + conventional-changelog-ember "^0.2.8" + conventional-changelog-eslint "^0.2.0" + conventional-changelog-express "^0.2.0" + conventional-changelog-jquery "^0.1.0" + conventional-changelog-jscs "^0.1.0" + conventional-changelog-jshint "^0.2.0" + +conventional-changelog@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" + dependencies: + conventional-changelog-angular "^1.3.4" + conventional-changelog-atom "^0.1.0" + conventional-changelog-codemirror "^0.1.0" + conventional-changelog-core "^1.9.0" + conventional-changelog-ember "^0.2.6" + conventional-changelog-eslint "^0.1.0" + conventional-changelog-express "^0.1.0" + conventional-changelog-jquery "^0.1.0" + conventional-changelog-jscs "^0.1.0" + conventional-changelog-jshint "^0.1.0" + +conventional-commits-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + +conventional-commits-parser@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-commits-parser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +core-js@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.1.tgz#948945efc6757a400d6e5e5af47194d10064279f" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + dependencies: + number-is-nan "^1.0.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^1.0.11, dateformat@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +debug@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" + dependencies: + ms "2.0.0" + +debug@^2.2.0: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.0, depd@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + +diff@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dom-serialize@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +dot-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + dependencies: + is-obj "^1.0.0" + +dts-downlevel@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/dts-downlevel/-/dts-downlevel-0.3.0.tgz#74af735427dbf8a9860ea692da02f9082167a1a5" + dependencies: + replace-in-file "^2.5.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +engine.io-client@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "2.3.3" + engine.io-parser "1.3.2" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + ws "1.1.2" + xmlhttprequest-ssl "1.5.3" + yeast "0.1.2" + +engine.io-parser@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + dependencies: + after "0.8.2" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.7" + wtf-8 "1.0.0" + +engine.io@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + dependencies: + accepts "1.3.3" + base64id "1.0.0" + cookie "0.3.1" + debug "2.3.3" + engine.io-parser "1.3.2" + ws "1.1.2" + +enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + +errno@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.30" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-object-assign@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" + +es6-promise@~4.0.3: + version "4.0.5" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esrecurse@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" + dependencies: + estraverse "^4.1.0" + object-assign "^4.0.1" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + +estree-walker@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +execa@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" + dependencies: + cross-spawn "^4.0.0" + get-stream "^2.2.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-braces@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + dependencies: + array-slice "^0.2.3" + array-unique "^0.2.1" + braces "^0.1.2" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + dependencies: + is-number "^0.1.1" + repeat-string "^0.2.2" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extract-zip@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.5.0.tgz#92ccf6d81ef70a9fa4c1747114ccef6d8688a6c4" + dependencies: + concat-stream "1.5.0" + debug "0.7.4" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.3.tgz#ef47e77950e999780e86022a560e3217e0d0cc89" + dependencies: + debug "2.6.7" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-parent-dir@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +fork-ts-checker-webpack-plugin@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.2.8.tgz#66dc841c29ff8345e0a30755ddeb4ccc3213e210" + dependencies: + babel-code-frame "^6.22.0" + chalk "^1.1.3" + chokidar "^1.7.0" + lodash.endswith "^4.2.1" + lodash.isfunction "^3.0.8" + lodash.isstring "^4.0.1" + lodash.startswith "^4.2.1" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-access@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + dependencies: + null-check "^1.0.0" + +fs-extra@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + +fs-extra@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.36" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +git-raw-commits@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^1.2.0, git-semver-tags@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" + dependencies: + meow "^3.3.0" + semver "^5.0.1" + +git-semver-tags@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.2.tgz#a2139be1bf6e337e125f3eb8bb8fc6f5d4d6445f" + dependencies: + meow "^3.3.0" + semver "^5.0.1" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + dependencies: + ini "^1.3.2" + +github-url-from-git@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +handlebars@4.0.5, handlebars@^4.0.2: + version "4.0.5" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hasha@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + dependencies: + is-stream "^1.0.1" + pinkie-promise "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +highlight.js@^9.0.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +http-errors@~1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" + dependencies: + depd "1.1.0" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-proxy@^1.13.0: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.2, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + +is-my-json-valid@^2.12.4: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + +is-text-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + dependencies: + text-extensions "^1.0.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isbinaryfile@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jasmine-core@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" + +js-tokens@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +karma-chrome-launcher@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" + dependencies: + fs-access "^1.0.0" + which "^1.2.1" + +karma-jasmine@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.0.tgz#22e4c06bf9a182e5294d1f705e3733811b810acf" + +karma-phantomjs-launcher@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz#d23ca34801bda9863ad318e3bb4bd4062b13acd2" + dependencies: + lodash "^4.0.1" + phantomjs-prebuilt "^2.1.7" + +karma-sourcemap-loader@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz#91322c77f8f13d46fed062b042e1009d4c4505d8" + dependencies: + graceful-fs "^4.1.2" + +karma-webpack@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-2.0.4.tgz#3e2d4f48ba94a878e1c66bb8e1ae6128987a175b" + dependencies: + async "~0.9.0" + loader-utils "^0.2.5" + lodash "^3.8.0" + source-map "^0.1.41" + webpack-dev-middleware "^1.0.11" + +karma@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + chokidar "^1.4.1" + colors "^1.1.0" + combine-lists "^1.0.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + expand-braces "^0.1.1" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^3.8.0" + log4js "^0.6.31" + mime "^1.3.4" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "1.7.3" + source-map "^0.5.3" + tmp "0.0.31" + useragent "^2.1.12" + +kew@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.5: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.endswith@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" + +lodash.isfunction@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz#4db709fc81bc4a8fd7127a458a5346c5cdce2c6b" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.startswith@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.startswith/-/lodash.startswith-4.2.1.tgz#c598c4adce188a27e53145731cdc6c0e7177600c" + +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash@^3.8.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.0.1, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.2.1, lodash@^4.5.0, lodash@^4.5.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +log4js@^0.6.31: + version "0.6.38" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + dependencies: + readable-stream "~1.0.2" + semver "~4.3.3" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@2.2.x: + version "2.2.4" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +marked@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +modify-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-libs-browser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-pre-gyp@^0.6.36: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +null-check@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4" + dependencies: + execa "^0.5.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-github-repo-url@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parsejson@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.14" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +phantomjs-prebuilt@^2.1.7: + version "2.1.14" + resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz#d53d311fcfb7d1d08ddb24014558f1188c516da0" + dependencies: + es6-promise "~4.0.3" + extract-zip "~1.5.0" + fs-extra "~1.0.0" + hasha "~2.2.0" + kew "~0.7.0" + progress "~1.1.8" + request "~2.79.0" + request-progress "~2.0.1" + which "~1.2.10" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@^0.11.0: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress@^1.1.8, progress@~1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qjobs@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" + +qs@6.4.0, qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.15" + unpipe "1.0.0" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0, read-pkg@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readable-stream@~1.0.2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +readline-sync@^1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.7.tgz#001bfdd4c06110c3c084c63bf7c6a56022213f30" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-in-file@2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-2.6.4.tgz#a80e25c5c0e0efe9d04afe01a4a57ff98e8b6461" + dependencies: + chalk "^2.1.0" + glob "^7.1.2" + yargs "^8.0.2" + +replace-in-file@^2.5.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-2.5.2.tgz#0f0f7c128b2a62d84327b3211986efdfbbf4e680" + dependencies: + chalk "^1.1.3" + glob "^7.1.2" + yargs "^8.0.2" + +request-progress@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + dependencies: + throttleit "^1.0.0" + +request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +requires-port@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.6, resolve@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.5.1, rimraf@^2.6.0, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +rollup-plugin-node-resolve@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0" + dependencies: + browser-resolve "^1.11.0" + builtin-modules "^1.1.0" + is-module "^1.0.0" + resolve "^1.1.6" + +rollup-plugin-progress@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-progress/-/rollup-plugin-progress-0.4.0.tgz#ec0b4ee3396434645412327292628b87b3b44f1e" + dependencies: + chalk "^1.1.3" + rollup-pluginutils "^1.5.1" + +rollup-plugin-sourcemaps@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz#62125aa94087aadf7b83ef4dfaf629b473135e87" + dependencies: + rollup-pluginutils "^2.0.1" + source-map-resolve "^0.5.0" + +rollup-plugin-uglify@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz#67b37ad1efdafbd83af4c36b40c189ee4866c969" + dependencies: + uglify-js "^3.0.9" + +rollup-plugin-visualizer@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-0.3.1.tgz#651b93e1eda3df603ed7f80963539d1faf264f70" + dependencies: + source-map "^0.5.6" + +rollup-pluginutils@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup-pluginutils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" + dependencies: + estree-walker "^0.3.0" + micromatch "^2.3.11" + +rollup@0.50.0: + version "0.50.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.50.0.tgz#4c158f4e780e6cb33ff0dbfc184a52cc58cd5f3b" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +semver@~4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.9" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.9.tgz#98f64880474b74f4a38b8da9d3c0f2d104633e7d" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shelljs@^0.7.0, shelljs@^0.7.3, shelljs@^0.7.8: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shx@0.2.2, shx@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/shx/-/shx-0.2.2.tgz#0a304d020b0edf1306ad81570e80f0346df58a39" + dependencies: + es6-object-assign "^1.0.3" + minimist "^1.2.0" + shelljs "^0.7.3" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +socket.io-adapter@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + dependencies: + debug "2.3.3" + socket.io-parser "2.3.1" + +socket.io-client@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "2.3.3" + engine.io-client "1.8.3" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.5" + socket.io-parser "2.3.1" + to-array "0.1.4" + +socket.io-parser@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + dependencies: + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + dependencies: + debug "2.3.3" + engine.io "1.8.3" + has-binary "0.1.7" + object-assign "4.1.0" + socket.io-adapter "0.5.0" + socket.io-client "1.7.3" + socket.io-parser "2.3.1" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-map-resolve@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.0.tgz#fcad0b64b70afb27699e425950cb5ebcd410bc20" + dependencies: + atob "^2.0.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@^0.1.41: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +split2@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" + dependencies: + through2 "^2.0.2" + +split@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.0.tgz#c4395ce683abcd254bc28fe1dabb6e5c27dcffae" + dependencies: + through "2" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.3.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.2.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^4.0.0, supports-color@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +tempfile@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +text-extensions@^1.0.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + +through2@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" + dependencies: + readable-stream "~2.0.0" + xtend "~4.0.0" + +through2@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@2, "through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +timers-browserify@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" + dependencies: + setimmediate "^1.0.4" + +tmp@0.0.31, tmp@0.0.x: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + +ts-loader@^2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-2.3.7.tgz#a9028ced473bee12f28a75f9c5b139979d33f2fc" + dependencies: + chalk "^2.0.1" + enhanced-resolve "^3.0.0" + loader-utils "^1.0.2" + semver "^5.0.1" + +tslib@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" + +tslint@5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.7.0.tgz#c25e0d0c92fa1201c2bc30e844e08e682b4f3552" + dependencies: + babel-code-frame "^6.22.0" + colors "^1.1.2" + commander "^2.9.0" + diff "^3.2.0" + glob "^7.1.1" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.7.1" + tsutils "^2.8.1" + +tsutils@^2.8.1: + version "2.10.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.10.0.tgz#ae94511df2656eb06e4424056fba5c388887040c" + dependencies: + tslib "^1.7.1" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweak-sourcemap-paths@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tweak-sourcemap-paths/-/tweak-sourcemap-paths-0.0.3.tgz#a06bf69768e71966c4e0e7664749bdeac8922522" + dependencies: + glob "^7.1.2" + yargs "^9.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +typedoc-default-themes@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.4.4.tgz#abe997dcf17462b627438bc63b65c50d363c252f" + +typedoc-plugin-external-module-name@^1.0.2: + version "1.0.9" + resolved "https://registry.yarnpkg.com/typedoc-plugin-external-module-name/-/typedoc-plugin-external-module-name-1.0.9.tgz#8e95e4b6680ef36c8da678c63edeb770e408959e" + +typedoc-plugin-internal-external@^1.0.0: + version "1.0.9" + resolved "https://registry.yarnpkg.com/typedoc-plugin-internal-external/-/typedoc-plugin-internal-external-1.0.9.tgz#ba476d138e81c50836e982665cdfea815bc83d1a" + +typedoc-plugin-ui-router@^1.0.0: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typedoc-plugin-ui-router/-/typedoc-plugin-ui-router-1.0.6.tgz#6d452d499d1bd35701ebfdeb2beee670d8530e8b" + +typedoc@~0.5.0: + version "0.5.10" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.5.10.tgz#4bd60c53c423811931fc519ffb36e58338824335" + dependencies: + "@types/fs-extra" "0.0.33" + "@types/handlebars" "^4.0.31" + "@types/highlight.js" "^9.1.8" + "@types/lodash" "^4.14.37" + "@types/marked" "0.0.28" + "@types/minimatch" "^2.0.29" + "@types/shelljs" "^0.3.32" + fs-extra "^2.0.0" + handlebars "4.0.5" + highlight.js "^9.0.0" + lodash "^4.13.1" + marked "^0.3.5" + minimatch "^3.0.0" + progress "^1.1.8" + shelljs "^0.7.0" + typedoc-default-themes "^0.4.2" + typescript "2.2.2" + +typescript@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.2.2.tgz#606022508479b55ffa368b58fee963a03dfd7b0c" + +typescript@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d" + +uglify-js@^2.6, uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-js@^3.0.9: + version "3.1.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.2.tgz#b50bcf15a5fd9e9ed40afbcdef3b59d6891b291f" + dependencies: + commander "~2.11.0" + source-map "~0.5.1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +ui-router-typedoc-themes@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ui-router-typedoc-themes/-/ui-router-typedoc-themes-1.0.2.tgz#3274960b8ee61e026b405ce3afcd9a2925992861" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +useragent@^2.1.12: + version "2.1.13" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.1.13.tgz#bba43e8aa24d5ceb83c2937473e102e21df74c10" + dependencies: + lru-cache "2.2.x" + tmp "0.0.x" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + +watch@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + +watchpack@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" + dependencies: + async "^2.1.2" + chokidar "^1.7.0" + graceful-fs "^4.1.2" + +webpack-dev-middleware@^1.0.11: + version "1.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.11.0.tgz#09691d0973a30ad1f82ac73a12e2087f0a4754f9" + dependencies: + memory-fs "~0.4.1" + mime "^1.3.4" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + +webpack-sources@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" + dependencies: + source-list-map "^2.0.0" + source-map "~0.5.3" + +webpack@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.6.0.tgz#a89a929fbee205d35a4fa2cc487be9cbec8898bc" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +which@^1.2.9, which@~1.2.10: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +ws@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + +xmlhttprequest-ssl@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + +xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^4.2.0: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" diff --git a/public/app/vendor/node_modules/@uirouter/core/CHANGELOG.md b/public/app/vendor/node_modules/@uirouter/core/CHANGELOG.md new file mode 100644 index 00000000..7b9790a0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/CHANGELOG.md @@ -0,0 +1,1498 @@ +## 5.0.11 (2017-10-14) +[Compare `@uirouter/core` versions 5.0.10 and 5.0.11](https://github.com/ui-router/core/compare/5.0.10...5.0.11) + +### Bug Fixes + +* **ie9:** make console.bind work in ie9 ([#85](https://github.com/ui-router/core/issues/85)) ([318214b](https://github.com/ui-router/core/commit/318214b)) + + + +## 5.0.10 (2017-10-06) +[Compare `@uirouter/core` versions 5.0.9 and 5.0.10](https://github.com/ui-router/core/compare/5.0.9...5.0.10) + +### Bug Fixes + +* **angular/cli:** Use package.json fields: 'typings', 'main', 'jsnext:main' ([74143d9](https://github.com/ui-router/core/commit/74143d9)) +* **isomorphic:** Remove use of CustomEvent. Detect root scope (global/window/self) for nodejs, browser, or web-worker. ([2d206ba](https://github.com/ui-router/core/commit/2d206ba)) +* **typings:** Use StateObject for parameter to hook criteria functions ([5b58566](https://github.com/ui-router/core/commit/5b58566)) + + + +## 5.0.9 (2017-10-02) +[Compare `@uirouter/core` versions 5.0.8 and 5.0.9](https://github.com/ui-router/core/compare/5.0.8...5.0.9) + +### Bug Fixes + +* **redirectTo:** Allow void in RedirectToResult + +### Features + +* **TransitionHook:** Add hook registration option `invokeLimit` to limit the number of times a hook is invoked before being auto-deregistered. ([2cb17ef](https://github.com/ui-router/core/commit/2cb17ef)) + + +## 5.0.8 (2017-09-30) +[Compare `@uirouter/core` versions 5.0.7 and 5.0.8](https://github.com/ui-router/core/compare/5.0.7...5.0.8) + +### Bug Fixes + +* **bundle:** Rollup: Do not warn on THIS_IS_UNDEFINED ([a4581b1](https://github.com/ui-router/core/commit/a4581b1)) +* **redirectTo:** Fix typings for redirectTo. Allow a function that returns a target state or a promise for one. ([3904487](https://github.com/ui-router/core/commit/3904487)) + + +### Features + +* **TargetState:** Add builder methods .withState, .withParams, and .withOptions ([6b93142](https://github.com/ui-router/core/commit/6b93142)) + + + +## 5.0.7 (2017-09-23) +[Compare `@uirouter/core` versions 5.0.6 and 5.0.7](https://github.com/ui-router/core/compare/5.0.6...5.0.7) + +### Bug Fixes + +* **globals:** Use shallow copy to update the globals.params / $state.params object ([e883afc](https://github.com/ui-router/core/commit/e883afc)) +* **Injector:** When getting tokens from native injector, only throw on undefined (not on falsey values) ([ada9ca2](https://github.com/ui-router/core/commit/ada9ca2)) +* **trace:** Fall back to console.log if .table is unavailable (IE) ([c8110fc](https://github.com/ui-router/core/commit/c8110fc)) +* **trace:** Support tracing of object-parameters with circular references ([2f1ae9a](https://github.com/ui-router/core/commit/2f1ae9a)) +* **url:** Add CustomEvent polyfill for IE ([a50db21](https://github.com/ui-router/core/commit/a50db21)) +* **vanilla:** fix base path handling for vanilla push state ([ad61d74](https://github.com/ui-router/core/commit/ad61d74)) +* **vanilla:** Use `self` instead of `window` for webworker compat ([a4629ee](https://github.com/ui-router/core/commit/a4629ee)) + + + +## Changes in `@uirouter/core` between versions [5.0.5 and 5.0.6](https://github.com/ui-router/core/compare/5.0.5...5.0.6) (2017-08-12) + + +### Bug Fixes + +* **sourceMaps:** Embed typescript sources in sourcemaps ([10558a3](https://github.com/ui-router/core/commit/10558a3)) +* **typescript:** Fix strictNullCheck type error ([0ae585e](https://github.com/ui-router/core/commit/0ae585e)) +* **urlRouter:** Fix absolute 'href' generation by using location.hostname (not location.host) ([a28b68a](https://github.com/ui-router/core/commit/a28b68a)) +* **urlService:** Fix priority sorting of URL rules ([73a1fe0](https://github.com/ui-router/core/commit/73a1fe0)) + + + +## Changes in `@uirouter/core` between versions [5.0.4 and 5.0.5](https://github.com/ui-router/core/compare/5.0.4...5.0.5) (2017-06-29) + + +### Bug Fixes + +* **typescript:** Update to typescript 2.4 ([ce1669b](https://github.com/ui-router/core/commit/ce1669b)) + + +### Features + +* **urlMatcher:** add support for multiline urls ([5b11ce0](https://github.com/ui-router/core/commit/5b11ce0)) + + + +### @uirouter/core changes +## [5.0.4](https://github.com/ui-router/core/compare/5.0.3...5.0.4) (2017-06-06) + + +### Bug Fixes + +* **future:** Allow future states to specify a `parent:` ([de68fe1](https://github.com/ui-router/core/commit/de68fe1)) +* **view:** only sync views which are of the same name *and type* ([49b5594](https://github.com/ui-router/core/commit/49b5594)) + + +### Features + +* **invalidTransition:** Better error messaging when param values are invalid ([fd45f44](https://github.com/ui-router/core/commit/fd45f44)) +* **trace:** Trace view synchronization. Allow trace.enable(...string) ([29503a0](https://github.com/ui-router/core/commit/29503a0)) + + + +### @uirouter/core changes +## [5.0.3](https://github.com/ui-router/core/compare/5.0.2...5.0.3) (2017-05-07) + + +### Bug Fixes + +* **common:** Re-fix implementation of 'pick' using for .. in ([f2da7f4](https://github.com/ui-router/core/commit/f2da7f4)) + + + +### @uirouter/core changes +## [5.0.2](https://github.com/ui-router/core/compare/5.0.1...5.0.2) (2017-05-06) + + +### Bug Fixes + +* **common:** Fix implementation of 'pick' -- use hasOwnProperty ([09848a4](https://github.com/ui-router/core/commit/09848a4)) + + +### Features + +* **build:** Build and distribute UMD bundles ([0a8da85](https://github.com/ui-router/core/commit/0a8da85)) + + + +### @uirouter/core changes +## [5.0.1](https://github.com/ui-router/core/compare/5.0.0...5.0.1) (2017-05-03) + + +### Bug Fixes + +* **transition:** Do not ignore transitions which have states being entered or exited ([175717e](https://github.com/ui-router/core/commit/175717e)) + + + +### @uirouter/core changes +# [5.0.0](https://github.com/ui-router/core/compare/4.0.0...v5.0.0) (2017-04-21) + + +### Bug Fixes + +* **BrowserLocationConfig:** fixed protocol + port value ([#38](https://github.com/ui-router/core/issues/38)) ([5559382](https://github.com/ui-router/core/commit/5559382)) +* **lazyLoad:** Wait for future state to be replaced before registering lazy children ([4bdce47](https://github.com/ui-router/core/commit/4bdce47)) +* **noImplicitAny:** Fix noimplicitany compliance ([1a6cdfc](https://github.com/ui-router/core/commit/1a6cdfc)) +* **redirect:** Do not update URL after redirect with { location: false } ([652a760](https://github.com/ui-router/core/commit/652a760)) +* **tfs:** Rename $q.ts and $injector.ts files, removing leading dollar signs ([cb653ee](https://github.com/ui-router/core/commit/cb653ee)) +* **trace:** Re-add transitionStart trace ([b019036](https://github.com/ui-router/core/commit/b019036)) +* **transitionHook:** Do not process transition hooks after router has been disposed. ([666c6d7](https://github.com/ui-router/core/commit/666c6d7)) +* **TransitionHook:** Transition hooks no longer expose the internal StateObject ([2b0e48b](https://github.com/ui-router/core/commit/2b0e48b)) +* **typings:** Allow strictNullChecks for HookMatchCriteria ([d92d4d5](https://github.com/ui-router/core/commit/d92d4d5)) +* **ui-sref:** Improve performance of generating hrefs ([c3967bd](https://github.com/ui-router/core/commit/c3967bd)) +* **view:** Do not throw when uiView doesn't have a state context ([f76ee2a](https://github.com/ui-router/core/commit/f76ee2a)) +* **view:** Update views in order of ui-view depth and also by state depth ([46dea2b](https://github.com/ui-router/core/commit/46dea2b)) + + +### Features + +* **abort:** Add API to manually abort/cancel a transition ([39f8a53](https://github.com/ui-router/core/commit/39f8a53)) +* **common:** Perf improvements in hot functions: ([4193244](https://github.com/ui-router/core/commit/4193244)) +* **core:** Switch to [@uirouter](https://github.com/uirouter)/core npm module ([e3f389f](https://github.com/ui-router/core/commit/e3f389f)) +* **decorators:** Add state, resolve and resolve data decorators ([642df0b](https://github.com/ui-router/core/commit/642df0b)) +* **defaultErrorHandler:** Do not invoke default error handler for ABORTED transitions ([b07a24b](https://github.com/ui-router/core/commit/b07a24b)) +* **Globals:** implement Disposable and delete global transition data ([a794018](https://github.com/ui-router/core/commit/a794018)) +* **onBefore:** Run onBefore hooks asynchronously. ([30b82aa](https://github.com/ui-router/core/commit/30b82aa)) +* **onEnter/Exit/Retain:** Use onExit/onEnter/onRetain from 56955state(), not state.self ([bc1f554](https://github.com/ui-router/core/commit/bc1f554)) +* **Rejection:** Add $id to ease debugging of transition rejections ([d456d54](https://github.com/ui-router/core/commit/d456d54)) +* **State:** Support registration of ES6 state classes (as opposed to object literals) ([3a5d055](https://github.com/ui-router/core/commit/3a5d055)) +* **State:** Switch Internal State Object to prototypally inherit from the State Declaration ([027c995](https://github.com/ui-router/core/commit/027c995)), closes [#34](https://github.com/ui-router/core/issues/34) +* **StateObject:** Rename internal `State` object to `StateObject` ([feceaf9](https://github.com/ui-router/core/commit/feceaf9)) +* **StateRegistry:** improve perf for: `.register()` and `StateMatcher.find()` misses ([fdb3ab9](https://github.com/ui-router/core/commit/fdb3ab9)) +* **transition:** Ignore duplicate transitions (double clicks) ([bd1bd0b](https://github.com/ui-router/core/commit/bd1bd0b)) +* **transition:** Improve supersede logic: Do not supersede if the new trans is aborted before onStart ([3141a8f](https://github.com/ui-router/core/commit/3141a8f)) +* **transition:** Run hooks synchronously in current stack, when possible ([953e618](https://github.com/ui-router/core/commit/953e618)) +* **Transition:** deprecate `Transition.is()` which was never implemented ([1edff4b](https://github.com/ui-router/core/commit/1edff4b)) +* **Transition:** Normalize all transition errors to a Rejection. ([a7464bb](https://github.com/ui-router/core/commit/a7464bb)) +* **UrlService:** (`UrlRouter`) improve perf of registering Url Rules and sorting Url Rules ([64fbfff](https://github.com/ui-router/core/commit/64fbfff)) +* **UrlService:** Add `rules.initial("/home")` to config initial state (like otherwise) ([bbe4209](https://github.com/ui-router/core/commit/bbe4209)) + + +### BREAKING CHANGES + +## **TransitionHook:** Transition hooks no longer expose the internal `State` object (now named `StateObject`) + +#### Before: + +```js +import { State } from "@uirouter/core"; +const match = { to: (state: State) => state.data.auth }; +transitionsvc.onEnter(match, (trans: Transition, state: State) => { + // state is the internal State object + if (state.includes["foo"]) { // internal ui-router API + return false; + } +} +``` + +#### Now: + +```js +import { StateDeclaration } from "@uirouter/core"; +const match = { to: (state: StateDeclaration) => state.data.auth }; +transitionsvc.onEnter(match, (trans: Transition, state: StateDeclaration) => { + // state === the state object you registered + // Access internal ui-router API using $$state() + if (state.$$state().includes["foo"]) { + return false; + } +} +``` + +#### Motivation: + +The `State` object (now named `StateObject`) is an internal API and should not be exposed via any public APIs. +If you depend on the internal APIs, you can still access the internal object by calling `state.$$state()`. + +#### BC Likelihood + +How likely is this BC to affect me? + +Medium: You will likely be affected you 1) have transition hooks, 2) are using typescript and/or 3) use the internal ui-router State API. + +#### BC Severity + +How severe is this BC? + +Low: Access to the internal api is still available using `$$state()`. + +## **StateObject:** Renamed internal API `State` object to `StateObject` + +#### Before: + +``` +import {State} from "@uirouter/core"; +``` + +#### Now: + +``` +import {StateObject} from "@uirouter/core"; +``` + +#### Motivation: + +We'd like to use the `State` name/symbol as a public API. It will be an +ES7/TS decorator for ES6/TS state definition classes, i.e: + +```js +@State("foo") +export class FooState implements StateDeclaration { + url = "/foo"; + component = FooComponent; + + @Resolve({ deps: [FooService] }) + fooData(fooService) { + return fooService.getFoos(); + } +} +``` + +#### BC Likelihood + +How likely is this to affect me? + +Low: This only affects code that imports the internal API symbol `State`. +You will likely be affected you 1) import that symbol, 2) are using typescript and 3) explicitly +typed a variable such as `let internalStateObject = state.$$state();` + +#### BC Severity + +How severe is this change? + +Low: Find all places where `State` is imported and rename to `StateObject` + + +## **Transition:** All Transition errors are now wrapped in a Rejection object. + +#### Before: + +Previously, if a transition hook returned a rejected promise: +```js +.onStart({}, () => Promise.reject('reject transition')); +``` + +In `onError` or `transtion.promise.catch()`, the raw rejection was returned: +```js +.onError({}, (trans, err) => err === 'reject transition') +``` + +#### Now: + +Now, the error is wrapped in a Rejection object. + +- The detail (thrown error or rejected value) is still available as `.detail`. + +```js +.onError({}, (trans, err) => + err instanceof Rejection && err.detail === 'reject transition') +``` + +- The Rejection object indicates the `.type` of transition rejection (ABORTED, ERROR, SUPERSEDED and/or redirection). +```js +.onError({}, (trans, err) => { + err.type === RejectType.ABORTED === 3 +}); +``` + +#### Motivation: + +Errors *thrown from* a hook and rejection values *returned from* a hook can now be processed in the same way. + +#### BC Likelihood + +How likely is this to affect me? + +Medium: apps which have onError handlers for rejected values + +#### BC Severity + +How severe is this change? + +Low: Find all error handlers (or .catch/.then chains) that do not understand Rejection. Add `err.detail` processing. + +## **onBefore:** `onBefore` hooks are now run asynchronously like all the other hooks. + +#### Old behavior + +Previously, the `onBefore` hooks were run in the same stackframe as `transitionTo`. +If they threw an error, it could be caught using try/catch. + +```js +transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); +try { + stateService.go('foo'); +} catch (error) { + // handle error +} +``` + +#### New behavior + +Now, `onBefore` hooks are processed asynchronously. +To handle errors, use any of the async error handling paradigms: + +- Chain off the promise + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + stateService.go('foo').catch(error => { //handle error }); + ``` +- Define an error handler + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + transitionService.onError({ to: 'foo' }), () => { // handle error }); + stateService.go('foo'); + ``` +- Use the global defaultErrorHandler + ```js + transitionService.onBefore({ to: 'foo' }), () => { throw new Error('doh'); }); + stateService.go('foo'); + stateService.defaultErrorHandler(error => { // global error handler }); + ``` + +#### Motivation + +Why introduce a BC? + +- No subtle behavior differences by hook type +- Simpler code and mental model +- Fewer edge cases to account for + +#### BC Liklihood + +How likely is this to affect my app? + +Very Low: Apps that registered onBefore hooks and depend on +synchronous execution are affected. + +#### BC Severity + +How severe is this BC? + +Low: Switch to asynchronous handling, such as chaining off the +transition promise + +## **defaultErrorHandler:** ABORTED transitions do not invoke the `defaultErrorHandler` + +Returning `false` from a transition hook will abort the transition. + +#### Old behavior + +Previously, this case was considered an error and was logged by +`defaultErrorHandler`. +After your feedback, we agree that this is not typically an error. + +#### New behavior + +Now, aborted transitions do not trigger the `defaultErrorHandler` + +#### Motivation: + +> Why introduce a BC? + +Most users do not consider ABORT to be an error. The default error +handler should match this assumption. + +#### BC liklihood + +> How likely am I to be affected? + +Low: Most users do not consider ABORT to be an error. For most users +this will not be a BC. + +#### BC severity + +> How severe is this BC? + +Low: Users who want to handle all transition rejections can +register a `.onError` handler and filter/process accordingly. + + + +### @uirouter/core changes +# [4.0.0](https://github.com/ui-router/core/compare/3.1.1...v4.0.0) (2017-01-22) + + +### Bug Fixes + +* **resolve:** Allow hook and resolve's state context to be injected as `$state$` ([a06948b](https://github.com/ui-router/core/commit/a06948b)) + + +### Features + +* **core:** Export all vanilla.* code from `@uirouter/core` ([f3392d1](https://github.com/ui-router/core/commit/f3392d1)) +* **globals:** Removed `UIRouterGlobals` interface. Renamed `Globals` class to `UIRouterGlobals` ([8719334](https://github.com/ui-router/core/commit/8719334)) + + +### BREAKING CHANGES + +* BREAKING CHANGE: + +This change will likely only affect a small subset of typescript users and probably only those using `ui-router-ng2`. +If you're injecting the `Globals` class somewhere, e.g.: +``` +@Injectable() +class MyService { + _globals: UIRouterGlobals; + constructor(globals: Globals) { + this._globals = globals; + } +} +``` +you should now inject `UIRouterGlobals`, e.g.: +``` +@Injectable() +class MyService { + constructor(public globals: UIRouterGlobals) { } +} +``` + +Likewise, if you were casting the `UIRouter.globals` object as a `UIRouterGlobals`, it is no longer necessary: + +```js +function myHook(trans: Transition) { + let globals: UIRouterGlobals = trans.router.globals; // cast is no longer necessary +} +``` + +Closes https://github.com/ui-router/core/issues/31 + + + +### @uirouter/core changes +## [3.1.1](https://github.com/ui-router/core/compare/3.1.0...v3.1.1) (2017-01-16) + + +### Bug Fixes + +* **lazyLoad:** Allow `lazyLoad` stateBuilder: Get lazyLoad fn from internal State object, not StateDeclaration ([9313880](https://github.com/ui-router/core/commit/9313880)) +* **lazyLoad:** Fix `State.lazyLoad` type def ([9313880](https://github.com/ui-router/core/commit/9313880)) +* **pushStateLocation:** call listeners in url() ([#24](https://github.com/ui-router/core/issues/24)) ([7c90911](https://github.com/ui-router/core/commit/7c90911)), closes [#23](https://github.com/ui-router/core/issues/23) + + +### Features + +* **UIRouter:** Add `trace` global to the `UIRouter` object ([48c5af6](https://github.com/ui-router/core/commit/48c5af6)) +* **View:** Allow targeting views on own state using `viewname@.` (normalizeUIViewTarget) ([7078216](https://github.com/ui-router/core/commit/7078216)), closes [#25](https://github.com/ui-router/core/issues/25) + + + +### @uirouter/core changes +# [3.1.0](https://github.com/ui-router/core/compare/3.0.0...v3.1.0) (2017-01-09) + + +### Bug Fixes + +* **UrlRouter:** Use { location: 'replace' } whenever a url redirect happens ([6cf9b8f](https://github.com/ui-router/core/commit/6cf9b8f)) + + + +### @uirouter/core changes +# [3.0.0](https://github.com/ui-router/core/compare/2.0.0...3.0.0) (2017-01-08) + + +### Bug Fixes + +* **lazyLoad:** Use UrlService.match() to retry url sync after successful lazy load triggered by url ([8c2461d](https://github.com/ui-router/core/commit/8c2461d)), closes [#19](https://github.com/ui-router/core/issues/19) +* **Params:** `params: { foo: { raw: true } }` overrides `ParamType.raw` ([aefeabf](https://github.com/ui-router/core/commit/aefeabf)) +* **Params:** Mark all query parameters as optional ([7334d98](https://github.com/ui-router/core/commit/7334d98)) +* **Params:** Check for null in `int` param type `is()` check ([aa551e4](https://github.com/ui-router/core/commit/aa551e4)), closes [#3197](https://github.com/ui-router/core/issues/3197) +* **Transition:** Use { location: replace } when redirecting a transtition in response to a URL sync ([23e2b78](https://github.com/ui-router/core/commit/23e2b78)) +* **UrlService:** Wire urlMatcherFactory and urlRouter functions ([a7b58d6](https://github.com/ui-router/core/commit/a7b58d6)) +* **vanilla:** vanilla locations: do not parse "empty string" query key parameter ([f949480](https://github.com/ui-router/core/commit/f949480)) + + +### Features + +* (CoreServices) Move `location` and `locationConfig` from `services` to `UIRouter.locationService` and `UIRouter.locationConfig`. ([029fb00](https://github.com/ui-router/core/commit/029fb00)) +* Built-in `string` parameter type no longer encodes slashes as `~2F` nor tildes as `~~` ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* Move `html5Mode` and `hashPrefix` from `LocationServices` to `LocationConfig` interface ([9d316a7](https://github.com/ui-router/core/commit/9d316a7)) +* Order URL Matching Rules by priority, not registration order ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* Path/Query parameters no longer default to `string` param type ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* Remove `getResolveValue` and `getResolvable` methods from `Transition` in favor of `injector().get()` and `injector().getAsync()` ([111d259](https://github.com/ui-router/core/commit/111d259)) +* Replace `LocationServices.setUrl` with `LocationServices.url` ([4c39dcb](https://github.com/ui-router/core/commit/4c39dcb)) +* Replace UrlRouterProvider/UrlRouter with just UrlRouter ([fddd1e2](https://github.com/ui-router/core/commit/fddd1e2)) +* **hash:** Change the hash parameter type (`'#'`) to `inherit: false` so it is cleared out when another transition occurs. ([849f84f](https://github.com/ui-router/core/commit/849f84f)), closes [#3245](https://github.com/ui-router/core/issues/3245) [#3218](https://github.com/ui-router/core/issues/3218) [#3017](https://github.com/ui-router/core/issues/3017) +* **LocationServices:** Add a `parts()` method which returns the URL parts as an object ([32e64f0](https://github.com/ui-router/core/commit/32e64f0)) +* **Params:** Add `path` and `query` param types ([72bb2d8](https://github.com/ui-router/core/commit/72bb2d8)) +* **Params:** add option to use generic type for Transition.params ([#17](https://github.com/ui-router/core/issues/17)) ([eb12ec8](https://github.com/ui-router/core/commit/eb12ec8)), closes [#16](https://github.com/ui-router/core/issues/16) +* **Params:** Allow `inherit: false` specified per parameter or type ([849f84f](https://github.com/ui-router/core/commit/849f84f)) +* **Resolve:** implement NOWAIT policy: Do not wait for resolves before completing a transition. ([05d4c73](https://github.com/ui-router/core/commit/05d4c73)), closes [#3243](https://github.com/ui-router/core/issues/3243) [#2691](https://github.com/ui-router/core/issues/2691) +* **Transition:** Add Transition.originalTransition() to return the initial transition in a chain of redirects ([4fe39e3](https://github.com/ui-router/core/commit/4fe39e3)) +* **Transition:** Allow `injector()` to retrieve resolves for the exiting states/path ([df502e8](https://github.com/ui-router/core/commit/df502e8)) +* **Transition:** Allow a plain object `ResolvableLiteral` in `Transition.addResolvable` ([ad9ae81](https://github.com/ui-router/core/commit/ad9ae81)) +* **Transition:** Make Transition.params() immutable to avoid confusion about mutability ([0162212](https://github.com/ui-router/core/commit/0162212)) +* **UrlMatcher:** Add comparison function by UrlMatcher specificity ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* **UrlRouter:** sort url rules by specificity, not by registration order. ([eb2f5d7](https://github.com/ui-router/core/commit/eb2f5d7)) +* **UrlService:** allow eager or lazy binding of location objects during construction ([7e0a8af](https://github.com/ui-router/core/commit/7e0a8af)) +* **UrlService:** Add `match()`: given a URL, return the best matching Url Rule ([32e64f0](https://github.com/ui-router/core/commit/32e64f0)) + + +### BREAKING CHANGES + +* BREAKING CHANGE: Remove `getResolveValue` and `getResolvable` methods from `Transition` in favor of `injector().get()` and `injector().getAsync()` + +In beta.3, the Transition APIs: `injector()`, `getResolvable`, and `getResolveValue` duplicated functionality. + +Instead of: +```js +trans.getResolveValue('myResolve'); +``` +use: +```js +trans.injector().get('myResolve') +``` +* BREAKING CHANGE: Order URL Matching Rules by priority, not registration order + +URL Rules can come from registered states' `.url`s, calling `.when()`, or calling `.rule()`. +It's possible that two or more URL Rules could match the URL. + +### Previously + +Previously, url rules were matched in the order in which they were registered. +The rule which was registered first would handle the URL change. + +### Now + +Now, the URL rules are sorted according to a sort function. +More specific rules are preferred over less specific rules + +### Why + +It's possible to have multiple url rules that match a given URL. +Consider the following states: + + - `{ name: 'books', url: '/books/index' }''` + - `{ name: 'book', url: '/books/:bookId' }''` + +Both states match when the url is `/books/index`. +Additionally, you might have some custom url rewrite rules such as: + + `.when('/books/list', '/books/index')`. + +The `book` state also matches when the rewrite rule is matched. + +Previously, we simply used the first rule that matched. However, now that lazy loading is officially supported, it can be difficult for developers to ensure the rules are registered in the right order. + +Instead, we now prioritize url rules by how specific they are. More specific rules are matched earlier than less specific rules. +We split the path on `/`. A static segment (such as `index` in the example) is more specific than a parameter (such as`:bookId`). + +### More Details + +The built-in rule sorting function (see `UrlRouter.defaultRuleSortFn`) sorts rules in this order: + +- Explicit priority: `.when('/foo', '/bar', { priority: 1 })` (default priority is 0) +- Rule Type: + - UrlMatchers first (registered states and `.when(string, ...)`) + - then regular Expressions (`.when(regexp, ...)`) + - finally, everything else (`.rule()`) +- UrlMatcher specificity: static path segments are more specific than variables (see `UrlMatcher.compare`) +- Registration order (except for UrlMatcher based rules) + +For complete control, a custom sort function can be registered with `UrlService.rules.sort(sortFn)` + +### Query params + +Because query parameters are optional, they are not considered during sorting. +For example, both these rules will match when the url is `'/foo/bar'`: + +``` +.when('/foo/bar', doSomething); +.when('/foo/bar?queryparam', doSomethingElse); +``` + +To choose the most specific rule, we match both rules, then choose the rule with the "best ratio" of matched optional parameters (see `UrlRuleFactory.fromUrlMatcher`) + +This allows child states to be defined with only query params for a URL. +The state only activates when the query parameter is present. + +``` +.state('parent', { url: '/parent' }); +.state('parent.child', { url: '?queryParam' }); +``` + +## Restoring the previous behavior + +For backwards compatibility, register a sort function which sorts by the registration order: + +```js +myApp.config(function ($urlServiceProvider) { + + function sortByRegistrationOrder(a, b) { + return a.$id - b.$id; + } + + $urlServiceProvider.rules.sort(sortByRegistrationOrder); + +}); +``` +* BREAKING CHANGE: Replace `LocationServices.setUrl` with `LocationServices.url` + +This makes `url()` a getter/setter. It also adds the optional `state` parameter to pass through to the browser history when using pushstate. +End users should not notice this change, but plugin authors may. +* BREAKING CHANGE: Replace UrlRouterProvider/UrlRouter with just UrlRouter + +The configuration functions from the provider object have been integrated into the normal UrlRouter object. +The `UIRouter` object no longer has a `uriRouterProvider`, but the equivalent functions can be found on `uiRouter` + +One difference between the old functions on `urlRouterProvider` and the new ones on `uriRouter` is that new functions do not accept injectable functions. +* BREAKING CHANGE: Built-in `string` parameter type no longer encodes slashes as `~2F` nor tildes as `~~` + +Previously, the `string` parameter type pre-encoded tilde chars (`~`) as two tilde chars (`~~`) and slashes (`/`) as `~2F`. + +Now, the `string` parameter type does not pre-encode slashes nor tildes. +If you rely on the previous encoding, create a custom parameter type that implements the behavior: + +```js +urlMatcherFactory.type('tildes', { + encode: (val: any) => + val != null ? val.toString().replace(/(~|\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val; + decode: (val: string) => + val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val; + pattern: /[^/]*/ +}); +``` +* BREAKING CHANGE: Path/Query parameters no longer default to `string` param type + +Previously, if a url parameter's type was not specified (in either the path or query), it defaulted to the `string` type. + +Now, path parameters default to the new `path` type and query parameters default to the new `query` type. + +**In Angular 1 only**, the new `path` parameter type retains the old behavior of pre-encoding `~` to `~~` and `/` to `~2F` +* BREAKING CHANGE: (CoreServices) Move `location` and `locationConfig` from `services` to `UIRouter.locationService` and `UIRouter.locationConfig`. + +The core `services` object is a mutable object which each framework was monkey patching. +This change removes the requirement to monkey patch a global mutable object. +Instead, framework implementors should pass the `LocationServices` and `LocationConfig` implementations into the `UIRouter` constructor. + +### End Users + +End users who were accessing `services.location` or `services.locationConfig` should access these off the `UIRouter` instance instead. +* BREAKING CHANGE: Move `html5Mode` and `hashPrefix` from `LocationServices` to `LocationConfig` interface + +### End users should not notice + + + +### @uirouter/core changes +# [2.0.0](https://github.com/ui-router/core/compare/1.0.1...2.0.0) (2016-12-09) + + +### Bug Fixes + +* **lazyLoad:** Sync by URL after nested lazy load triggered by URL ([1c6220c](https://github.com/ui-router/core/commit/1c6220c)) +* **redirect:** Do not allow `onBefore` hooks to cause infinite redirect loops ([5c5f7eb](https://github.com/ui-router/core/commit/5c5f7eb)), closes [#6](https://github.com/ui-router/core/issues/6) +* **redirectTo:** Do not puke when redirectTo returns undefined ([bde9c0f](https://github.com/ui-router/core/commit/bde9c0f)) +* **redirectTo:** fix TS type signature of `redirectTo` ([2c059c4](https://github.com/ui-router/core/commit/2c059c4)) +* **StateQueueManager:** Compare parsed url parameters using typed parameters ([beca1f5](https://github.com/ui-router/core/commit/beca1f5)) +* **StateRegistry:** Fix error message: State '' is already defined ([f5bd96b](https://github.com/ui-router/core/commit/f5bd96b)) +* **StateService:** Compare typed parameters in .is() and .includes() ([b1a5155](https://github.com/ui-router/core/commit/b1a5155)) +* **TargetState:** Narrow `name()` return type to `String` ([a02f4a7](https://github.com/ui-router/core/commit/a02f4a7)) +* **typescript:** Emit TS 1.8 compatible .d.ts files ([65badf4](https://github.com/ui-router/core/commit/65badf4)) +* **view:** Load view prerequisites in `onFinish` ([cc85e76](https://github.com/ui-router/core/commit/cc85e76)) +* **view.load:** Allow view.load to return synchronously ([8619cf9](https://github.com/ui-router/core/commit/8619cf9)) + + +### Features + +* Create router.dispose() to dispose a router instance and resources. ([0690917](https://github.com/ui-router/core/commit/0690917)) +* **assertMap:** Add a [].map() helper that asserts that each element is truthy ([f044f53](https://github.com/ui-router/core/commit/f044f53)) +* **futureState:** States with a `.**` name suffix (i.e., `foo.**`) are considered future states ([ec50da4](https://github.com/ui-router/core/commit/ec50da4)), closes [#8](https://github.com/ui-router/core/issues/8) [#4](https://github.com/ui-router/core/issues/4) +* **HookBuilder:** Allow custom hook types (to be defined by a plugin) ([3f146e6](https://github.com/ui-router/core/commit/3f146e6)) +* **onCreate:** Add onCreate transition hook ([f486ced](https://github.com/ui-router/core/commit/f486ced)) +* **plugin:** Allow all plugins to be gotted. ([e324973](https://github.com/ui-router/core/commit/e324973)) +* **plugin:** Allow registration by ES6 class, JS constructor fn, JS factory fn ([b9f4541](https://github.com/ui-router/core/commit/b9f4541)) +* **plugin:** Create plugin API ([36a5215](https://github.com/ui-router/core/commit/36a5215)), closes [#7](https://github.com/ui-router/core/issues/7) +* **Transition:** Support treechange paths in API for Resolve+transition ([beedc82](https://github.com/ui-router/core/commit/beedc82)) +* **vanilla:** Implement in-memory-only location api ([f64aace](https://github.com/ui-router/core/commit/f64aace)) + + +### BREAKING CHANGES + +* **typescript:** move `ViewService.viewConfigFactory` and `rootContext` to `_pluginapi.*` +This BC happened in commit 6c42285 + +* **futureState:** Previously, a state with a `lazyLoad` function was considered a future state. +Now, a state whose name ends with `.**` (i.e., a glob pattern which matches all children) is a future state. + +### All future states should be given a name that ends in `.**`. + +Change your future states from: +``` +{ name: 'future', url: '/future', lazyLoad: () => ... } +``` +to: +``` +{ name: 'future.**', url: '/future', lazyLoad: () => ... } +``` + +* **onCreate:** Hook errors are all normalized to a "Rejection" type. To access the detail of the error thrown (`throw "Error 123"`), use `.detail`, i.e.: +### Before +```js +$state.go('foo').catch(err => { if (err === "Error 123") .. }); +``` +### New way +```js +$state.go('foo').catch(err => { if (err.detail === "Error 123") .. }); +``` + + + + +## [1.0.1](https://github.com/ui-router/core/compare/1.0.0...v1.0.1) (2016-10-24) + + +### Bug Fixes + +* **onBefore:** Skip remaining hooks after the ([#2](https://github.com/ui-router/core/issues/2)) ([8a45d04](https://github.com/ui-router/core/commit/8a45d04)) +* **typings:** Allow urlRouter.rule to return void ([0b78bdf](https://github.com/ui-router/core/commit/0b78bdf)) + + + + +# [1.0.0](https://github.com/ui-router/core/compare/1.0.0-beta.3...1.0.0) (2016-10-20) + + +### Features + +- This is the 1.0.0 release of @uirouter/core. +- We've moved @uirouter/core to its new home at https://github.com/ui-router/core +- @uirouter/core will now follow SemVer. + +# BREAKING CHANGE + +commonjs files now output to `/lib` and ES5 + ES6 module now output to `/lib-esm`. +No bundles are being created. + + + +# [1.0.0-beta.3 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-beta.2...1.0.0-beta.3) (2016-09-23) + +[Read more on the blog](https://ui-router.github.io/blog/uirouter-1.0.0-beta.3/) + +This release adds Angular 2.0.0 final support. +It changes the NgModule mechanism to use `UIRouterModule.forRoot()` and `UIRouterModule.forChild()`. +See the blog and the breaking changes section. + +### Bug Fixes + +This release fixes bugs for both ng1 and ng2 + +* **common:** Remove `url()` from LocationService interface ([#2990](https://github.com/angular-ui/ui-router/issues/2990)) ([d6c2580](https://github.com/angular-ui/ui-router/commit/d6c2580)) +* **lazyLoad:** Always delete the lazy load promise after it settles. ([dd2f101](https://github.com/angular-ui/ui-router/commit/dd2f101)) +* **ng1.StateProvider:** Export StateProvider class so type can be used ([167770d](https://github.com/angular-ui/ui-router/commit/167770d)) +* **ng1.uiView:** Remove deprecated jquery functions bind/unbind in favor of on/off ([60ebd44](https://github.com/angular-ui/ui-router/commit/60ebd44)) +* **ng2:** Angular 2.0.0 final compatibility ([7c54b75](https://github.com/angular-ui/ui-router/commit/7c54b75)), closes [#2991](https://github.com/angular-ui/ui-router/issues/2991) +* **ng2.NgModule:** Allow apps with no forChild modules ([d3bd332](https://github.com/angular-ui/ui-router/commit/d3bd332)), closes [#3009](https://github.com/angular-ui/ui-router/issues/3009) +* **ng2.uiView:** Use ReflectorReader to get component inputs +* **resolve:** Don't re-resolve data when redirected to same state, but only dynamic params changed. ([98cd2d2](https://github.com/angular-ui/ui-router/commit/98cd2d2)), closes [#3033](https://github.com/angular-ui/ui-router/issues/3033) +* **trace:** Show function definition during logging of trace.enable('HOOK') ([190d122](https://github.com/angular-ui/ui-router/commit/190d122)) +* **transition:** Fail a transition if a new one has started while resolves are loading ([bc87d9e](https://github.com/angular-ui/ui-router/commit/bc87d9e)), closes [#2972](https://github.com/angular-ui/ui-router/issues/2972) +* **urlMatcherFactory:** fix tilde edge case with "string" encoding ([#3018](https://github.com/angular-ui/ui-router/issues/3018)) ([a201906](https://github.com/angular-ui/ui-router/commit/a201906)) +* **viewService:** Allow root ui-view to be wrapped in ng-if ([32f718a](https://github.com/angular-ui/ui-router/commit/32f718a)), closes [#3004](https://github.com/angular-ui/ui-router/issues/3004) + +### Features + +* **StateBuilder:** Calculate parent state name when ends in two wildcards `**` ([b4621f3](https://github.com/angular-ui/ui-router/commit/b4621f3)) + + +### BREAKING CHANGES + +#### BC in Core +* Remove `UIInjector.native` infavor of `UIInjector.getNative()` ([d11b7dc](https://github.com/angular-ui/ui-router/commit/d11b7dc)) +* Remove `stateProvider` from @uirouter/core. Use `stateRegistry` and `stateService` in 88c6494 +* We now enforce states with an explicit `parent:` may NOT ALSO specify a parent state in their name (i.e., `parent.child`) + +#### BC in Angular 2 + +Major breaking changes for Angular 2 bootstrap between beta.2 and beta.3 + +- Removed `@UIRouterModule` decorator. +- Added `UIRouterModule.forRoot()` and `UIRouterModule.forChild()` factory methods +- See https://ui-router.github.io/docs/latest/classes/ng2.uiroutermodule.html + +``` +@NgModule({ + imports: [ + UIRouterModule.forRoot({ + states: INITIAL_STATES, + useHash: true, + configClass: MyUIRouterConfig + }), + BrowserModule, + FeatureModule, + ], + declarations: INITIAL_COMPONENTS +}) +class RootAppModule {} + +@NgModule({ + imports: [ + UIRouterModule.forChild({ + states: FEATURE_STATES, + configClass: FeatureConfig + }), + CommonModule, + ], + declarations: FEATURE_COMPONENTS +}) +``` + + +# [1.0.0-beta.2 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-beta.1...1.0.0-beta.2) (2016-09-09) + +[Read more on the blog](https://ui-router.github.io/blog/uirouter-1.0.0-beta.2/) + +### Features + +#### Core + +* **lazyLoad:** Add state.lazyLoad hook to lazy load a tree of states ([bef5257](https://github.com/angular-ui/ui-router/commit/bef5257)) ([8ecb6c6](https://github.com/angular-ui/ui-router/commit/8ecb6c6)), closes [#146](https://github.com/angular-ui/ui-router/issues/146) [#2739](https://github.com/angular-ui/ui-router/issues/2739) +* **StateRegistry:** Add `deregister` method. ([44579ec](https://github.com/angular-ui/ui-router/commit/44579ec)), closes [#1095](https://github.com/angular-ui/ui-router/issues/1095) [#2711](https://github.com/angular-ui/ui-router/issues/2711) +* **redirectTo:** Process `redirectTo` property of a state as a redirect string/object/hook function ([6becb12](https://github.com/angular-ui/ui-router/commit/6becb12)), closes [#27](https://github.com/angular-ui/ui-router/issues/27) [#948](https://github.com/angular-ui/ui-router/issues/948) +* **redirect:** Error after 20+ redirected transitions ([88052bf](https://github.com/angular-ui/ui-router/commit/88052bf)) +* **rejectFactory:** separate transition aborted and transition errored reject types ([55995fd](https://github.com/angular-ui/ui-router/commit/55995fd)) +* **Resolve:** support ng2-like provide object literals ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Resolve:** Switch state.resolve to be an array of Resolvables ([6743a60](https://github.com/angular-ui/ui-router/commit/6743a60)) +* **Transition:** Add the transition source (url/sref) to TransitionOptions ([5d42d79](https://github.com/angular-ui/ui-router/commit/5d42d79)) +* **Transition:** Added `getResolvable(token)` method ([3aee2b7](https://github.com/angular-ui/ui-router/commit/3aee2b7)) +* **Transition:** expose the current `UiRouter` object as a public property ([52f1308](https://github.com/angular-ui/ui-router/commit/52f1308)) +* **Transition:** expose the transition rejection reason as `Transition.error()` ([7a9e383](https://github.com/angular-ui/ui-router/commit/7a9e383)), closes [#2866](https://github.com/angular-ui/ui-router/issues/2866) +* **Transition:** Expose the transition's TargetState as targetState() ([f06f6b6](https://github.com/angular-ui/ui-router/commit/f06f6b6)) +* **urlRouter:** Allow a rule to be deleted. ([55f3d3d](https://github.com/angular-ui/ui-router/commit/55f3d3d)) + +#### ng2 +* **ng2.rx:** Added RxJS Observables for transitions and states: ([2a2f381](https://github.com/angular-ui/ui-router/commit/2a2f381)) +* **ng2:** Add [@UIRouterModule](https://github.com/UIRouterModule) decorator ([e7bedc2](https://github.com/angular-ui/ui-router/commit/e7bedc2)), closes [#2922](https://github.com/angular-ui/ui-router/issues/2922) +* **ng2:** Improve ng2 bootstrap flexibility with provideUIRouter() provider factory function ([bc17066](https://github.com/angular-ui/ui-router/commit/bc17066)), closes [#2958](https://github.com/angular-ui/ui-router/issues/2958) +* **ng2.UrlRouter:** Implement { location: replace } ([b8c6146](https://github.com/angular-ui/ui-router/commit/b8c6146)), closes [#2850](https://github.com/angular-ui/ui-router/issues/2850) +* **ng2.NgModule:** Add module's states to DI using UIROUTER_STATES_TOKEN ([0cb628e](https://github.com/angular-ui/ui-router/commit/0cb628e)) +* **ng2.stateRegistry:** Automatically register states defined on a UIRouterModule ([58a3c84](https://github.com/angular-ui/ui-router/commit/58a3c84)) +* **ng2.UIView:** Use merged NgModule/ParentComp to inject routed component ([37241e7](https://github.com/angular-ui/ui-router/commit/37241e7)) +* **ng2.upgrade:** Enable ng1-to-ng2 ([0bf4eb4](https://github.com/angular-ui/ui-router/commit/0bf4eb4)) +* **uiView:** Support Components loaded via AppModule ([696148f](https://github.com/angular-ui/ui-router/commit/696148f)) + + +### Bug Fixes + +#### Core + +* **defaultErrorHandler:** Invoke handler when a transition is Canceled. ([4fcccd8](https://github.com/angular-ui/ui-router/commit/4fcccd8)), closes [#2924](https://github.com/angular-ui/ui-router/issues/2924) +* **defaultErrorHandler:** log Error and Error.stack by default ([e102a85](https://github.com/angular-ui/ui-router/commit/e102a85)) +* **defaultErrorHandler:** Reduce console.error noise when redirected ([8c0344f](https://github.com/angular-ui/ui-router/commit/8c0344f)) +* **common:** Add concrete import to interface.ts to fix unit tests ([2d16740](https://github.com/angular-ui/ui-router/commit/2d16740)) +* **redirect:** fix bug where redirected transitions with reload: true got wrong resolve values copied ([bd0e3a3](https://github.com/angular-ui/ui-router/commit/bd0e3a3)) +* **redirectTo:** fix redirectTo definition (interface) ([eff7195](https://github.com/angular-ui/ui-router/commit/eff7195)), closes [#2871](https://github.com/angular-ui/ui-router/issues/2871) +* **Rejection:** Silence "Error: Uncaught (in Exception)" ([38432f4](https://github.com/angular-ui/ui-router/commit/38432f4)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **Resolve:** prevent RXWAIT from waiting for the observable to complete ([a02caf3](https://github.com/angular-ui/ui-router/commit/a02caf3)) +* **ResolvePolicy:** Fix resolve policy config loading ([4440811](https://github.com/angular-ui/ui-router/commit/4440811)), closes [#2945](https://github.com/angular-ui/ui-router/issues/2945) +* **stateService:** change reloadState parameter in reload function is optional ([#2973](https://github.com/angular-ui/ui-router/issues/2973)) ([839dc4a](https://github.com/angular-ui/ui-router/commit/839dc4a)) +* **StateService:** remove jQuery deprecated feature ([fa40acc](https://github.com/angular-ui/ui-router/commit/fa40acc)) +* **trace:** make TRANSITION trace less noisy when a transition is redirected ([a65c58f](https://github.com/angular-ui/ui-router/commit/a65c58f)) +* **Trace:** Fix error in console after $trace.enable() ([013c77a](https://github.com/angular-ui/ui-router/commit/013c77a)), closes [#2752](https://github.com/angular-ui/ui-router/issues/2752) +* **transitionHook:** Prevent queued hookFn to be called if deregistered ([#2939](https://github.com/angular-ui/ui-router/issues/2939)) ([39e1ba7](https://github.com/angular-ui/ui-router/commit/39e1ba7)), closes [#2928](https://github.com/angular-ui/ui-router/issues/2928) +* **typescript:** Make UI-Router `noImplicitAny` safe. ([0769bc2](https://github.com/angular-ui/ui-router/commit/0769bc2)), closes [#2693](https://github.com/angular-ui/ui-router/issues/2693) +* **typescript:** Remove angular1 specific types from @uirouter/core methods ([30124bd](https://github.com/angular-ui/ui-router/commit/30124bd)), closes [#2693](https://github.com/angular-ui/ui-router/issues/2693) + + +#### ng1 + +* **ng1.stateService:** Coerce 'null' `params` value to empty object ([f674151](https://github.com/angular-ui/ui-router/commit/f674151)), closes [#2952](https://github.com/angular-ui/ui-router/issues/2952) +* **ng1.uiSref:** Allow nested UISrefs by stopping event propagation on-click ([b4a2499](https://github.com/angular-ui/ui-router/commit/b4a2499)), closes [#2962](https://github.com/angular-ui/ui-router/issues/2962) +* **ng1.uiSrefActive:** update sref-active after existing transition-in-progress completes ([0994c71](https://github.com/angular-ui/ui-router/commit/0994c71)), closes [#2908](https://github.com/angular-ui/ui-router/issues/2908) +* **uiSref, uiState:** added click unbind to prevent memory leaks ([79d501e](https://github.com/angular-ui/ui-router/commit/79d501e)) +* **uiView:** separate $uiView and $uiViewAnim element.data() ([a94117d](https://github.com/angular-ui/ui-router/commit/a94117d)), closes [#2763](https://github.com/angular-ui/ui-router/issues/2763) + +#### ng2 + +* **ng2.pushState:** Properly match urls when base path set ([b9be2dc](https://github.com/angular-ui/ui-router/commit/b9be2dc)), closes [#2745](https://github.com/angular-ui/ui-router/issues/2745) +* **ng2.UIRouterConfig:** Allow new UIRouter() to finish before configuring it ([a151f71](https://github.com/angular-ui/ui-router/commit/a151f71)) +* **ng2.uiSrefActive:** Allow uiSrefActive on ancestor element. ([874fc07](https://github.com/angular-ui/ui-router/commit/874fc07)), closes [#2950](https://github.com/angular-ui/ui-router/issues/2950) +* **ng2.uiSrefActive:** don't puke on sref to invalid target state ([c9b6570](https://github.com/angular-ui/ui-router/commit/c9b6570)) +* **ng2.UISrefActive:** Use [@ContentChildren](https://github.com/ContentChildren) to query for the nested UISref ([999c42a](https://github.com/angular-ui/ui-router/commit/999c42a)), closes [#2950](https://github.com/angular-ui/ui-router/issues/2950) +* **ng2.UiView:** fix input resolve binding ([4f53f81](https://github.com/angular-ui/ui-router/commit/4f53f81)) +* **ng2.UIView:** Make routed to component appear *inside* UIView, not next to it. ([558fc80](https://github.com/angular-ui/ui-router/commit/558fc80)) + +### BREAKING CHANGES: + +1) State Glob patterns have been changed slightly. + +Previously, a single wildcard `foo.*` could match "missing segments" on the end of a state name. +For example, `foo.*` would match the state `foo`. +Likewise, `foo.*.*.*` would also match the `foo` state. + +Now, a single wildcard matches exactly one segment. +`foo.*` will match `foo.bar` and `foo.baz`, but neither `foo` nor `foo.bar.baz`. + +If you previously relied on the single wildcard to match missing segments, use a double wildcard, `foo.**`. + +Double wildcards match 0 or more segments. + +[Read more about Glob matching](https://ui-router.github.io/docs/latest/classes/common.glob.html) + +2) (obscure) Angular 1 DI token `ng1UIRouter` renamed to `$uiRouter` + +3) (obscure) Renamed `Transition.previous()` to `Transition.redirectedFrom()` + + + +# [1.0.0-beta.1 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.5...1.0.0-beta.1) (2016-06-30) + +# UI-Router 1.0 is in beta + +## UI-Router has a new home! + +https://ui-router.github.io/new-ui-router-site/ + + +# BREAKING CHANGES + +These breaking changes are for users upgrading from a previous alpha, not from 0.x legacy series. +This list is extensive, but typical users won't be affected by most of these changes. + +The most common breaks will be #1 and #2 + +1) BC-BREAK: renamed all Ui* (lowercase 'i') symbols to UI* (uppercase 'I') for more consistent naming. + - UiView -> UIView + - UiSref -> UISref (and related directives) + - UiInjector -> UIInjector + +2) BC-BREAK: Transition Hooks are no longer injected (onBefore/onStart/onExit/onRetain/onEnter/onFinish/onSuccess/onError) + + Previously, a hook like `['$state', ($state) => $state.target('foo')]` would get `$state` injected. + Now, all hooks receive two parameters: + - transition: the current Transition, which has an `injector()` function + - state: for onEnter/onRetain/onExit hooks only, the State which the hook is being run for. This value will be null for onBefore/onStart/onFinish/onSuccess/onError hooks. + + Refactor your hooks + from: `['$state', 'mySvc', ($state, mySvc) => mySvc.foo() ? $state.target('foo')] : true` + to: `(trans) => trans.injector().get('mySvc').foo() ? trans.router.stateService.target('foo') : true` + + Note: for backwards compatiblity, angular 1 onEnter/onExit/onRetain hooks are still injected + +3) BC-BREAK: - The (internal API) State object's .resolve property is now an array of Resolvables, built from your state definitions by the StateBuilder + +4) BC-BREAK: - Removed the default resolve called `$resolve$`, which was added in a previous alpha + +5) BC-BREAK: - `Transition.addResolves()`  replaced with `Transition.addResolvable()` + +6) BC-BREAK: remove `ResolveContext.getResolvables()` in favor of `.getToken()`` and `.getResolvable()` + +7) BC-BREAK: remove `ResolveContext.invokeLater()` and `.invokeNow()` + +8) BC-BREAK: remove support for `JIT` resolves. This also eliminated the need for the `loadAllControllerLocals` hook which was also removed + +9) BC-BREAK: Replaced `ViewConfig.node` with `ViewConfig.path`. Angular 1's `$(element).data('$uiView')` is affected. + Previously the .node was the node for the view. Now the last element in the path is the node for the view. + +10) BC-BREAK: Nodes no longer have (stateful) `.resolveContext` properties. Instead, a new ResolveContext is wrapped over a Path of Nodes.  Removed `PathFactory.bindResolveContexts()`. + +11) BC-BREAK: ResolveContext.resolvePath returns a promise for resolved data as an array of tuples, instead of a promise for an object of resolved data.  Removed `ResolveContext.resolvePathElement()`. + +12) BC-BREAK: Removed ResolvePolicy enum in favor of the ResolvePolicy interface `{ when: "", async: "" }` + +13) BC-BREAK: renamed `ResolveContext.isolateRootTo` to `subContext` + +14) BC-BREAK: rename `UIRouterGlobals` class to `Globals`; add `UIRouterGlobals` back as an interface + +15) BC-BREAK: Moved `defaultErrorHandler` from `TransitionService` to `StateService` + + + + +### Features + +* **Resolve:** Switch state.resolve to be an array of Resolvables ([6743a60](https://github.com/angular-ui/ui-router/commit/6743a60)) +* **Resolve:** support ng2-like provide object literals. Support injection of arbitrary tokens, not just strings. ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Resolve:** support ng2-like provide object literals ([a7e5ea6](https://github.com/angular-ui/ui-router/commit/a7e5ea6)) +* **Transition:** expose the current `UiRouter` object as a public property ([52f1308](https://github.com/angular-ui/ui-router/commit/52f1308)) +* **redirectTo:** Process `redirectTo` property of a state as a redirect string/object/hook function ([6becb12](https://github.com/angular-ui/ui-router/commit/6becb12)), closes [#27](https://github.com/angular-ui/ui-router/issues/27) [#948](https://github.com/angular-ui/ui-router/issues/948) +* **rejectFactory:** separate transition aborted and transition errored reject types ([55995fd](https://github.com/angular-ui/ui-router/commit/55995fd)) +* **ParamType:** allow a custom parameter Type to specify a default value for a parameter's `dynamic` property +* **Resolvable:** Added a new Resolve Policy 'RXWAIT'. If an Observable is returned, pass the observable as the value, but also wait for it to emit its first value + +### Bug Fixes + +* **ng2.pushState:** Properly match urls when base path set ([b9be2dc](https://github.com/angular-ui/ui-router/commit/b9be2dc)), closes [#2745](https://github.com/angular-ui/ui-router/issues/2745) +* **ng2.UIRouterConfig:** Allow new UIRouter() to finish before configuring it ([a151f71](https://github.com/angular-ui/ui-router/commit/a151f71)) +* **ng2.UiView:** fix input resolve binding ([4f53f81](https://github.com/angular-ui/ui-router/commit/4f53f81)) +* **ng2.UIView:** Make routed to component appear *inside* UIView, not next to it. ([558fc80](https://github.com/angular-ui/ui-router/commit/558fc80)) +* **redirect:** fix bug where redirected transitions with reload: true got wrong resolve values copied ([bd0e3a3](https://github.com/angular-ui/ui-router/commit/bd0e3a3)) +* **Rejection:** Silence "Error: Uncaught (in Exception)" ([38432f4](https://github.com/angular-ui/ui-router/commit/38432f4)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **Trace:** Fix error in console after $trace.enable() ([013c77a](https://github.com/angular-ui/ui-router/commit/013c77a)), closes [#2752](https://github.com/angular-ui/ui-router/issues/2752) +* **ng2.UIView:** Trigger change detection once for routed components + + + + + +# [1.0.0-alpha.5 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.4...1.0.0-alpha.5) (2016-05-13) + + +### Bug Fixes + +## Core +* **attachRoute:** Do not update URL after syncing from url([8742511](https://github.com/angular-ui/ui-router/commit/8742511)), closes [#2730](https://github.com/angular-ui/ui-router/issues/2730) +* **common:** only use window if available([32ff988](https://github.com/angular-ui/ui-router/commit/32ff988)) +* **coreservices:** Use Promise.reject()/resolve()/all()([62b2ebc](https://github.com/angular-ui/ui-router/commit/62b2ebc)), closes [#2683](https://github.com/angular-ui/ui-router/issues/2683) +* **paramTypes.hash:** Update hash for each transition([79d4fd7](https://github.com/angular-ui/ui-router/commit/79d4fd7)), closes [#2742](https://github.com/angular-ui/ui-router/issues/2742) +* **Rejection:** Dont log an ignored trans as console.error([7522c26](https://github.com/angular-ui/ui-router/commit/7522c26)), closes [#2676](https://github.com/angular-ui/ui-router/issues/2676) +* **resolve:** Fix regression; Allow resolve values to be service names([a34fd3b](https://github.com/angular-ui/ui-router/commit/a34fd3b)), closes [#2588](https://github.com/angular-ui/ui-router/issues/2588) +* **StateQueueManager:** Do not throw on orphan states.([95ae0cf](https://github.com/angular-ui/ui-router/commit/95ae0cf)), closes [#2546](https://github.com/angular-ui/ui-router/issues/2546) +* **TransitionManager:** Update url even when the Transition is ignored.([f9c3e3c](https://github.com/angular-ui/ui-router/commit/f9c3e3c)), closes [#2723](https://github.com/angular-ui/ui-router/issues/2723) + +## ng1 +* **ng1.component:** Allow route-to-component "@" and optional bindings([71b3393](https://github.com/angular-ui/ui-router/commit/71b3393)), closes [#2708](https://github.com/angular-ui/ui-router/issues/2708) +* **view:** only run ng1 route-to-component code if component: is a string([ec1c534](https://github.com/angular-ui/ui-router/commit/ec1c534)) + +## ng2 +* **ng2.uiSrefStatus:** Avoid "dehydrated detector" error([9111727](https://github.com/angular-ui/ui-router/commit/9111727)), closes [#2684](https://github.com/angular-ui/ui-router/issues/2684) +* **ng2.uiView:** Fix "Invalid left-hand in assignment"([3f711a1](https://github.com/angular-ui/ui-router/commit/3f711a1)) +* **build:** declare external dep on `angular/core` in webpack bundle([adfbde3](https://github.com/angular-ui/ui-router/commit/adfbde3)), closes [#2687](https://github.com/angular-ui/ui-router/issues/2687) + + + +### Features + +## ng2 +* **ng2.uiView:** bind resolve data to input[] and [@Input](https://github.com/Input)(), process bindings:([f6dae28](https://github.com/angular-ui/ui-router/commit/f6dae28)) +* **ng2.urlRouter:** HTML5 PushState support([9842fb7](https://github.com/angular-ui/ui-router/commit/9842fb7)), closes [#2688](https://github.com/angular-ui/ui-router/issues/2688) +* **ng2.UIRouter:** update to ng2 beta.17([45c0758](https://github.com/angular-ui/ui-router/commit/45c0758)) +* **ng2.UIRouter:** Update ui-router for ng2 rc.1([3219406](https://github.com/angular-ui/ui-router/commit/3219406)), closes [#2722](https://github.com/angular-ui/ui-router/issues/2722) + + + + +# [1.0.0-alpha.4 commits](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.3...1.0.0-alpha.4) (2016-04-06) + +### Bug Fixes + +* **ng2.uiView:** Fix "Invalid left-hand in assignment" ([3f711a1](https://github.com/angular-ui/ui-router/commit/3f711a1)) +* **view:** only run ng1 route-to-component code if component: is a string ([ec1c534](https://github.com/angular-ui/ui-router/commit/ec1c534)) + +### Features + +* **uiView:** add support for hybrid ng1/ng2 ui-router apps via ng-upgrade and http://github.com/ui-router/ng1-to-ng2 +* **ng2.uiView:** bind resolve data to input[] and @Input(), process bindings: ([f6dae28](https://github.com/angular-ui/ui-router/commit/f6dae28)) + + + + +# [1.0.0-alpha.2](https://github.com/angular-ui/ui-router/compare/1.0.0-alpha.1...v1.0.0-alpha.2) (2016-04-03) + +Changes between 1.0.0-alpha.1 and 1.0.0-alpha.2 + +## Angular 2 +This is the first release with angular 2 support. See http://github.com/ui-router/quickstart-ng2 for a small ui-router-ng2 app + +### Bug Fixes + +* **ViewHooks:** Avoid calling $onInit if angular 1.5 will call it for us ([d42b617](https://github.com/angular-ui/ui-router/commit/d42b617)), closes [#2660](https://github.com/angular-ui/ui-router/issues/2660) +* **ViewHooks:** Fix problem with injecting uiCanExit ([76ab22d](https://github.com/angular-ui/ui-router/commit/76ab22d)), closes [#2661](https://github.com/angular-ui/ui-router/issues/2661) +* **view:** temporary sanity check that a node exists ([1c0edeb](https://github.com/angular-ui/ui-router/commit/1c0edeb)), closes [#2657](https://github.com/angular-ui/ui-router/issues/2657) +* **justjs.$q:** Fix $q.all([..]) and $q.all({...}) ([b1624c6](https://github.com/angular-ui/ui-router/commit/b1624c6)) +* **ng2.uiSref:** Fix anchor href generation ([98b5b42](https://github.com/angular-ui/ui-router/commit/98b5b42)) +* **ng2.uiSrefStatus:** calculate target state parameters ([46cdf4c](https://github.com/angular-ui/ui-router/commit/46cdf4c)) +* **ng2.uiView:** Dispose prev comp on empty viewconfig ([f28e0c3](https://github.com/angular-ui/ui-router/commit/f28e0c3)) + +### Features + +* **UIRouterConfig:** Define UIRouterConfig class for router bootstrap ([c16b9e6](https://github.com/angular-ui/ui-router/commit/c16b9e6)) +* **UIRouterGlobals:** Create UIRouterGlobals ([0eb7406](https://github.com/angular-ui/ui-router/commit/0eb7406)), closes [#2525](https://github.com/angular-ui/ui-router/issues/2525) +* **ui-router-ng2:** Update providers and viewsBuilder to match new 1.0 API ([ff54d61](https://github.com/angular-ui/ui-router/commit/ff54d61)) +* **ng2.uiSrefActive:** Implement uiSrefStatus, uiSrefActive, uiSrefActiveEq ([fcb15c5](https://github.com/angular-ui/ui-router/commit/fcb15c5)) + + + + +# [1.0.0-alpha.1 commits](https://github.com/angular-ui/ui-router/compare/1.0.0alpha0...1.0.0-alpha.1) (2016-03-27) + +## We will maintain a list of [Known BC from 0.2.x to 1.0 final](https://github.com/angular-ui/ui-router/issues/2219) to help people upgrade to the 1.0 release. + +## Bug fixes and features since 1.0.0alpha0 + +### Bug Fixes + +* **date:** Compare dates only using year, month, date ([7a68ade](https://github.com/angular-ui/ui-router/commit/7a68ade)), closes [#2484](https://github.com/angular-ui/ui-router/issues/2484) +* **params:** Clone all properties of a Node. Introduce applyRawParams() ([88c624d](https://github.com/angular-ui/ui-router/commit/88c624d)) +* **RejectFactory:** stringify rejections with circular dependency-aware stringify ([199db79](https://github.com/angular-ui/ui-router/commit/199db79)), closes [#2538](https://github.com/angular-ui/ui-router/issues/2538) +* **src/resolve:** use injector's strictDi value in calls to .annotate ([4c5b5d8](https://github.com/angular-ui/ui-router/commit/4c5b5d8)) +* **stateQueueManager:** Use `location: true` for url-matched transitions ([25e0c04](https://github.com/angular-ui/ui-router/commit/25e0c04)), closes [#2455](https://github.com/angular-ui/ui-router/issues/2455) +* **stateService:** Process reload: in the StateService.target() ([081da32](https://github.com/angular-ui/ui-router/commit/081da32)), closes [#2537](https://github.com/angular-ui/ui-router/issues/2537) +* **Transition:** Do not reuse resolves for reloaded state during redirect ([0c123c3](https://github.com/angular-ui/ui-router/commit/0c123c3)), closes [#2539](https://github.com/angular-ui/ui-router/issues/2539) +* **Transition:** Reject Transition promise when onBefore error ([4b6d56f](https://github.com/angular-ui/ui-router/commit/4b6d56f)), closes [#2561](https://github.com/angular-ui/ui-router/issues/2561) +* **Transition:** Reset URL to current state after aborted transition ([3a1308b](https://github.com/angular-ui/ui-router/commit/3a1308b)), closes [#2611](https://github.com/angular-ui/ui-router/issues/2611) +* **transition/transitionService:** uses console.error to log error in default error handler ([43a8fc5](https://github.com/angular-ui/ui-router/commit/43a8fc5)) +* **ui-sref:** update ui-sref-active/eq info when params change ([dcbaebf](https://github.com/angular-ui/ui-router/commit/dcbaebf)), closes [#2554](https://github.com/angular-ui/ui-router/issues/2554) +* **ui-state:** update ui-sref-active/eq info ([025ebc8](https://github.com/angular-ui/ui-router/commit/025ebc8)), closes [#2488](https://github.com/angular-ui/ui-router/issues/2488) +* **UrlMatcher:** Format parent/child UrlMatchers properly ([86e07ef](https://github.com/angular-ui/ui-router/commit/86e07ef)), closes [##2504](https://github.com/#/issues/2504) +* **UrlMatcher:** isOptional always false for empty parameter ([4e85db4](https://github.com/angular-ui/ui-router/commit/4e85db4)) + +### Features + +* **params:** Add uiOnParamsChanged controller callback ([961c96d](https://github.com/angular-ui/ui-router/commit/961c96d)), closes [#2608](https://github.com/angular-ui/ui-router/issues/2608) [#2470](https://github.com/angular-ui/ui-router/issues/2470) [#2391](https://github.com/angular-ui/ui-router/issues/2391) [#1967](https://github.com/angular-ui/ui-router/issues/1967) +* **resolve:** Allow all resolved data for a node to be injected as `$resolve$` ([e432c27](https://github.com/angular-ui/ui-router/commit/e432c27)) +* **state:** Expose the internal state API via `$$state()` ([92053f1](https://github.com/angular-ui/ui-router/commit/92053f1)), closes [#13](https://github.com/angular-ui/ui-router/issues/13) +* **ui-router-ng2:** Initial angular2 support ([217de70](https://github.com/angular-ui/ui-router/commit/217de70)) +* **uiCanExit:** Add controller lifecycle hook "uiCanExit" ([afcfe95](https://github.com/angular-ui/ui-router/commit/afcfe95)) +* **uiView:** Expose the resolved data for a state as $scope.$resolve ([0f6aea6](https://github.com/angular-ui/ui-router/commit/0f6aea6)), closes [#2175](https://github.com/angular-ui/ui-router/issues/2175) [#2547](https://github.com/angular-ui/ui-router/issues/2547) +* **uiView:** Fire the $onInit hook ([c8afc38](https://github.com/angular-ui/ui-router/commit/c8afc38)), closes [#2559](https://github.com/angular-ui/ui-router/issues/2559) +* **uiView:** Put $animate promises on element.data('$uiView') ([a5578de](https://github.com/angular-ui/ui-router/commit/a5578de)), closes [#2562](https://github.com/angular-ui/ui-router/issues/2562) [#2579](https://github.com/angular-ui/ui-router/issues/2579) +* **view:** Route a view to a directive using `component:` ([1552032](https://github.com/angular-ui/ui-router/commit/1552032)), closes [#2627](https://github.com/angular-ui/ui-router/issues/2627) + + + +## Other commits + +Many of these commits are merged from 0.2.x `legacy` branch + +* **uiSrefActive:** allow multiple classes ([120d7ad](https://github.com/angular-ui/ui-router/commit/120d7ad)), closes [#2481](https://github.com/angular-ui/ui-router/issues/2481) [#2482](https://github.com/angular-ui/ui-router/issues/2482) +* **justjs:** provide naive implementation of most of the coreservices api ([426f134](https://github.com/angular-ui/ui-router/commit/426f134)) +* **resolve:** add $resolve service back to 1.0 ([70c6659](https://github.com/angular-ui/ui-router/commit/70c6659)) +* **uiSrefActive:** allow active & active-eq on same element ([d9a676b](https://github.com/angular-ui/ui-router/commit/d9a676b)), closes [#1997](https://github.com/angular-ui/ui-router/issues/1997) +* **uiSrefActive:** provide a ng-{class,style} like interface ([a9ff6fe](https://github.com/angular-ui/ui-router/commit/a9ff6fe)), closes [#1431](https://github.com/angular-ui/ui-router/issues/1431) +* **uiSrefActive:** Added support for multiple nested uiSref directives ([b184494](https://github.com/angular-ui/ui-router/commit/b184494)) +* **uiState:** add ui-state directive ([3831af1](https://github.com/angular-ui/ui-router/commit/3831af1)), closes [#395](https://github.com/angular-ui/ui-router/issues/395) [#900](https://github.com/angular-ui/ui-router/issues/900) [#1932](https://github.com/angular-ui/ui-router/issues/1932) +* **urlMatcher:** add support for optional spaces ([4b7f304](https://github.com/angular-ui/ui-router/commit/4b7f304)) +* **urlMatcher:** Add param only type names ([6a371f9](https://github.com/angular-ui/ui-router/commit/6a371f9)) +* **$IncludedByStateFilter:** add parameters to $IncludedByStateFilter ([963f6e7](https://github.com/angular-ui/ui-router/commit/963f6e7)), closes [#1735](https://github.com/angular-ui/ui-router/issues/1735) +* **$state:** make state data inheritance prototypical ([c4fec8c](https://github.com/angular-ui/ui-router/commit/c4fec8c)) +* **$state:** Inject templateProvider with resolved values ([afa20f2](https://github.com/angular-ui/ui-router/commit/afa20f2)) +* **$state:** added 'state' to state reload method (feat no.1612) ([b8f0457](https://github.com/angular-ui/ui-router/commit/b8f0457)) +* **$state:** broadcast $stateChangeCancel event when event.preventDefault() is called in $sta ([ecefb75](https://github.com/angular-ui/ui-router/commit/ecefb75)) +* **$state:** inject resolve params into controllerProvider ([b380c22](https://github.com/angular-ui/ui-router/commit/b380c22)), closes [#1131](https://github.com/angular-ui/ui-router/issues/1131) +* **$state:** support URLs with #fragments ([3da0a17](https://github.com/angular-ui/ui-router/commit/3da0a17)) +* **$uiViewScroll:** change function to return promise ([c2a9a31](https://github.com/angular-ui/ui-router/commit/c2a9a31)), closes [#1702](https://github.com/angular-ui/ui-router/issues/1702) + + + + +### 0.2.18 (2016-02-07) + +This is a maintenance release which fixes a few known bugs introduced in 0.2.16. + +#### Bug Fixes + +* **$urlRouter:** revert BC: resolve clashing of routes This reverts commit b5c57c8ec2e14e17e75104 ([2f1ebefc](https://github.com/angular-ui/ui-router/commit/2f1ebefc242ff48960e0bf63da359296a38f6852), closes [#2501](https://github.com/angular-ui/ui-router/issues/2501)) +* **uiState:** Corrected typo for 'ref' variable (#2488, #2508) ([b8f3c144](https://github.com/angular-ui/ui-router/commit/b8f3c144b913e620f177b78f3b4f52afa61d41a6)) +* **$urlMatcherFactory:** Fix to make the YUI Javascript compressor work ([ad9c41d2](https://github.com/angular-ui/ui-router/commit/ad9c41d2e723d50e30dd3452fbd274b7057dc3d9)) +* **stateBuilder:** fix non-url params on a state without a url. The parameters are now applied when ([d6d8c332](https://github.com/angular-ui/ui-router/commit/d6d8c3322c4dde8bb5b8dde25f9fcda49e9c4c81), closes [#2025](https://github.com/angular-ui/ui-router/issues/2025)) +* **ui-view:** (ui-view) use static renderer when no animation is present for a ui-view ([2523bbdb](https://github.com/angular-ui/ui-router/commit/2523bbdb5542483a489c22804f1751b8b9f71703), closes [#2485](https://github.com/angular-ui/ui-router/issues/2485)). This allows a ui-view scope to be destroyed when switching states, before the next view is initialized. + + +#### Features + +* **ui-view:** Add noanimation attribute to specify static renderer. ([2523bbdb](https://github.com/angular-ui/ui-router/commit/2523bbdb5542483a489c22804f1751b8b9f71703), closes [#2485](https://github.com/angular-ui/ui-router/issues/2485)). This allows a ui-view scope to be destroyed before the next ui-view is initialized, when ui-view animation is not present. + + + +### 0.2.17 (2016-01-25) + + +#### Bug Fixes + +* **uiSrefActive:** allow multiple classes ([a89114a0](https://github.com/angular-ui/ui-router/commit/a89114a083813c1a7280c48fc18e626caa5a31f4), closes [#2481](https://github.com/angular-ui/ui-router/issues/2481), [#2482](https://github.com/angular-ui/ui-router/issues/2482)) + + + +### 0.2.16 (2016-01-24) + + +#### Bug Fixes + +* **$state:** + * statechangeCancel: Avoid infinite digest in .otherwise/redirect case. Don't clobber url if a new transition has started. Closes #222 ([e00aa695](https://github.com/angular-ui/ui-router/commit/e00aa695e41ddc5ebd5d2b226aa0917a751b11aa), closes [#2238](https://github.com/angular-ui/ui-router/issues/2238)) + * transitionTo: Allow hash (#) value to be read as toParams['#'] in events. Re-add the saved hash before broadcasting $stateChangeStart event. ([8c1bf30d](https://github.com/angular-ui/ui-router/commit/8c1bf30d2a3b78ba40b330f12d854c885d6cc117)) +* **$stateParams:** Fix for testing: reset service instance between tests ([2aeb0c4b](https://github.com/angular-ui/ui-router/commit/2aeb0c4b205baf6cfa2ef25bb986bb160dc13bf9)) +* **$urlRouter:** + * Sort URL rules by specificity. Potential minor BC if apps were relying on rule registration order. ([b5c57c8e](https://github.com/angular-ui/ui-router/commit/b5c57c8ec2e14e17e75104c1424654f126ea4011)) + * Use $sniffer for pushstate compat check ([c219e801](https://github.com/angular-ui/ui-router/commit/c219e801797f340ef9c5c919ab890ef003a7a042)) +* **UrlMatcher:** + * Properly encode/decode slashes in parameters Closes #2172 Closes #2250 Closes #1 ([02e98660](https://github.com/angular-ui/ui-router/commit/02e98660a80dfd1ca4b113dd24ee304af91e9f8c), closes [#2339](https://github.com/angular-ui/ui-router/issues/2339)) + * Array types: Fix default value for array query parameters. Pass empty arrays through in handler. ([20d6e243](https://github.com/angular-ui/ui-router/commit/20d6e243f1745ddbf257217245a1dc22eabe13da), closes [#2222](https://github.com/angular-ui/ui-router/issues/2222)) + * Remove trailing slash, if parameter is optional and was squashed from URL ([77fa11bf](https://github.com/angular-ui/ui-router/commit/77fa11bf0787d0f6da97ab0003ab29afb7411391), closes [#1902](https://github.com/angular-ui/ui-router/issues/1902)) + * Allow a parameter declaration to configure the parameter type by name. closes #2294 ([e4010249](https://github.com/angular-ui/ui-router/commit/e40102492d40fe1cf6ba14d955fcc9f345c16458)) + * include the slash when recognizing squashed params in url ([b5130bb1](https://github.com/angular-ui/ui-router/commit/b5130bb1215e15f832ea6daa670410b9a950c0d4), closes [#2064](https://github.com/angular-ui/ui-router/issues/2064)) + * Allow url query param names to contain periods ([d31b3337](https://github.com/angular-ui/ui-router/commit/d31b3337cc2ce71d87c92fdded629e46558d0b49)) +* **reloadOnSearch:** Update `locals.globals.$stateParams` when reloadOnSearch=false ([350d3e87](https://github.com/angular-ui/ui-router/commit/350d3e87783a2263fd7d23913da34f1268c3300b), closes [#2356](https://github.com/angular-ui/ui-router/issues/2356)) +* **ui-view:** + * fix $animate usage for ng 1.4+ ([9b6d9a2d](https://github.com/angular-ui/ui-router/commit/9b6d9a2d0ce4ae08384165cb517bddea59b67892)) + * change $viewContentLoading to pair with $viewContentLoaded ([f9b43d66](https://github.com/angular-ui/ui-router/commit/f9b43d66833f0e17de41fd8d1cc3b491e3ba4a0e), closes [#685](https://github.com/angular-ui/ui-router/issues/685)) + * $destroy event is triggered before animation ends ([1be13795](https://github.com/angular-ui/ui-router/commit/1be13795686ab78abb2d5094bc8addcacb928975)) +* **uiSref:** + * Ensure URL once param checks pass ([9dc31c54](https://github.com/angular-ui/ui-router/commit/9dc31c5465328e5666468b0c2319ce205f4b72f8), closes [#2091](https://github.com/angular-ui/ui-router/issues/2091)) + * uiSrefActive: update the active classes after linking directive ([7c914030](https://github.com/angular-ui/ui-router/commit/7c914030f13e05e45a941c1b723cb785db729890)) + + +#### Features + +* **$IncludedByStateFilter:** add parameters to $IncludedByStateFilter ([963f6e71](https://github.com/angular-ui/ui-router/commit/963f6e71633b9c3a266f3991d79089b7d14786b4), closes [#1735](https://github.com/angular-ui/ui-router/issues/1735)) +* **isStateFilter:** Include optional state params. ([71d74699](https://github.com/angular-ui/ui-router/commit/71d7469987ee9ca86a41c8c6393ccd5d8913c3d6)) +* **$state:** make state data inheritance prototypical ([c4fec8c7](https://github.com/angular-ui/ui-router/commit/c4fec8c7998113902af4152d716c42dada6eb465)) +* **$stateChangeStart:** Add options to event ([a1f07559](https://github.com/angular-ui/ui-router/commit/a1f07559ec74e10ff80bc4be81f287e3772b8fcb)) +* **UrlMatcher:** Add param only type names ([6a371f9b](https://github.com/angular-ui/ui-router/commit/6a371f9b70e37a82eb324122879e4473c3f6d526)) +* **uiSrefActive:** + * provide a ng-{class,style} like interface ([a9ff6feb](https://github.com/angular-ui/ui-router/commit/a9ff6febb469e0d5cd49054216c4472df7a6259d)) + * allow active & active-eq on same element ([d9a676ba](https://github.com/angular-ui/ui-router/commit/d9a676ba2c4d9e954be224c60496bcb38f6074e3)) +* **uiState:** add ui-state directive ([3831af1d](https://github.com/angular-ui/ui-router/commit/3831af1dc71b601351e6694af0665a77297f8f7f), closes [#395](https://github.com/angular-ui/ui-router/issues/395), [#900](https://github.com/angular-ui/ui-router/issues/900), [#1932](https://github.com/angular-ui/ui-router/issues/1932)) +* **urlMatcher:** add support for optional spaces in params ([4b7f3046](https://github.com/angular-ui/ui-router/commit/4b7f304617f0b3590b532103b5c2fb526c98a9e4)) + + + +### 0.2.15 (2015-05-19) + + +#### Bug Fixes + +* **$state:** reloadOnSearch should not affect non-search param changes. ([6ca0d770](https://github.com/angular-ui/ui-router/commit/6ca0d7704cf7de9c6e6b7bb64df2f9c68fe081cc), closes [#1079](https://github.com/angular-ui/ui-router/issues/1079)) +* **urlMatcherFactory:** Revert to 0.2.13 behavior where all string parameters are considered optional fi ([495a02c3](https://github.com/angular-ui/ui-router/commit/495a02c3cbde501c1c149bce137806669209bc29), closes [#1963](https://github.com/angular-ui/ui-router/issues/1963)) +* **urlRouter:** allow .when() to redirect, even after a successful $state.go() - This partially ([48aeaff6](https://github.com/angular-ui/ui-router/commit/48aeaff645baf3f42f5a8940ebd97563791ad9f8), closes [#1584](https://github.com/angular-ui/ui-router/issues/1584)) + + +#### Features + +* **$state:** Inject templateProvider with resolved values ([afa20f22](https://github.com/angular-ui/ui-router/commit/afa20f22373b7176b26daa7e1099750c4254a354)) + + + +### 0.2.14 (2015-04-23) + + +#### Bug Fixes + +* **$StateRefDirective:** resolve missing support for svg anchor elements #1667 ([0149a7bb](https://github.com/angular-ui/ui-router/commit/0149a7bb38b7af99388a1ad7cc9909a7b7c4439d)) +* **$urlMatcherFactory:** + * regex params should respect case-sensitivity ([1e10519f](https://github.com/angular-ui/ui-router/commit/1e10519f3be6bbf0cefdcce623cd2ade06e649e5), closes [#1671](https://github.com/angular-ui/ui-router/issues/1671)) + * unquote all dashes from array params ([06664d33](https://github.com/angular-ui/ui-router/commit/06664d330f882390655dcfa83e10276110d0d0fa)) + * add Type.$normalize function ([b0c6aa23](https://github.com/angular-ui/ui-router/commit/b0c6aa2350fdd3ce8483144774adc12f5a72b7e9)) + * make optional params regex grouping optional ([06f73794](https://github.com/angular-ui/ui-router/commit/06f737945e83e668d09cfc3bcffd04a500ff1963), closes [#1576](https://github.com/angular-ui/ui-router/issues/1576)) +* **$state:** allow about.*.** glob patterns ([e39b27a2](https://github.com/angular-ui/ui-router/commit/e39b27a2cb7d88525c446a041f9fbf1553202010)) +* **uiSref:** + * use Object's toString instead of Window's toString ([2aa7f4d1](https://github.com/angular-ui/ui-router/commit/2aa7f4d139dbd5b9fcc4afdcf2ab6642c87f5671)) + * add absolute to allowed transition options ([ae1b3c4e](https://github.com/angular-ui/ui-router/commit/ae1b3c4eedc37983400d830895afb50457c63af4)) +* **uiSrefActive:** Apply active classes on lazy loaded states ([f0ddbe7b](https://github.com/angular-ui/ui-router/commit/f0ddbe7b4a91daf279c3b7d0cee732bb1f3be5b4)) +* **uiView:** add `$element` to locals for view controller ([db68914c](https://github.com/angular-ui/ui-router/commit/db68914cd6c821e7dec8155bd33142a3a97f5453)) + + +#### Features + +* **$state:** + * support URLs with #fragments ([3da0a170](https://github.com/angular-ui/ui-router/commit/3da0a17069e27598c0f9d9164e104dd5ce05cdc6)) + * inject resolve params into controllerProvider ([b380c223](https://github.com/angular-ui/ui-router/commit/b380c223fe12e2fde7582c0d6b1ed7b15a23579b), closes [#1131](https://github.com/angular-ui/ui-router/issues/1131)) + * added 'state' to state reload method (feat no.1612) - modiefied options.reload ([b8f04575](https://github.com/angular-ui/ui-router/commit/b8f04575a8557035c1858c4d5c8dbde3e1855aaa)) + * broadcast $stateChangeCancel event when event.preventDefault() is called in $sta ([ecefb758](https://github.com/angular-ui/ui-router/commit/ecefb758cb445e41620b62a272aafa3638613d7a)) +* **$uiViewScroll:** change function to return promise ([c2a9a311](https://github.com/angular-ui/ui-router/commit/c2a9a311388bb212e5a2e820536d1d739f829ccd), closes [#1702](https://github.com/angular-ui/ui-router/issues/1702)) +* **uiSrefActive:** Added support for multiple nested uiSref directives ([b1844948](https://github.com/angular-ui/ui-router/commit/b18449481d152b50705abfce2493a444eb059fa5)) + + + +### 0.2.13 (2014-11-20) + +This release primarily fixes issues reported against 0.2.12 + +#### Bug Fixes + +* **$state:** fix $state.includes/.is to apply param types before comparisions fix(uiSref): ma ([19715d15](https://github.com/angular-ui/ui-router/commit/19715d15e3cbfff724519e9febedd05b49c75baa), closes [#1513](https://github.com/angular-ui/ui-router/issues/1513)) + * Avoid re-synchronizing from url after .transitionTo ([b267ecd3](https://github.com/angular-ui/ui-router/commit/b267ecd348e5c415233573ef95ebdbd051875f52), closes [#1573](https://github.com/angular-ui/ui-router/issues/1573)) +* **$urlMatcherFactory:** + * Built-in date type uses local time zone ([d726bedc](https://github.com/angular-ui/ui-router/commit/d726bedcbb5f70a5660addf43fd52ec730790293)) + * make date type fn check .is before running ([aa94ce3b](https://github.com/angular-ui/ui-router/commit/aa94ce3b86632ad05301530a2213099da73a3dc0), closes [#1564](https://github.com/angular-ui/ui-router/issues/1564)) + * early binding of array handler bypasses type resolution ([ada4bc27](https://github.com/angular-ui/ui-router/commit/ada4bc27df5eff3ba3ab0de94a09bd91b0f7a28c)) + * add 'any' Type for non-encoding non-url params ([3bfd75ab](https://github.com/angular-ui/ui-router/commit/3bfd75ab445ee2f1dd55275465059ed116b10b27), closes [#1562](https://github.com/angular-ui/ui-router/issues/1562)) + * fix encoding slashes in params ([0c983a08](https://github.com/angular-ui/ui-router/commit/0c983a08e2947f999683571477debd73038e95cf), closes [#1119](https://github.com/angular-ui/ui-router/issues/1119)) + * fix mixed path/query params ordering problem ([a479fbd0](https://github.com/angular-ui/ui-router/commit/a479fbd0b8eb393a94320973e5b9a62d83912ee2), closes [#1543](https://github.com/angular-ui/ui-router/issues/1543)) +* **ArrayType:** + * specify empty array mapping corner case ([74aa6091](https://github.com/angular-ui/ui-router/commit/74aa60917e996b0b4e27bbb4eb88c3c03832021d), closes [#1511](https://github.com/angular-ui/ui-router/issues/1511)) + * fix .equals for array types ([5e6783b7](https://github.com/angular-ui/ui-router/commit/5e6783b77af9a90ddff154f990b43dbb17eeda6e), closes [#1538](https://github.com/angular-ui/ui-router/issues/1538)) +* **Param:** fix default value shorthand declaration ([831d812a](https://github.com/angular-ui/ui-router/commit/831d812a524524c71f0ee1c9afaf0487a5a66230), closes [#1554](https://github.com/angular-ui/ui-router/issues/1554)) +* **common:** fixed the _.filter clone to not create sparse arrays ([750f5cf5](https://github.com/angular-ui/ui-router/commit/750f5cf5fd91f9ada96f39e50d39aceb2caf22b6), closes [#1563](https://github.com/angular-ui/ui-router/issues/1563)) +* **ie8:** fix calls to indexOf and filter ([dcb31b84](https://github.com/angular-ui/ui-router/commit/dcb31b843391b3e61dee4de13f368c109541813e), closes [#1556](https://github.com/angular-ui/ui-router/issues/1556)) + + +#### Features + +* add json parameter Type ([027f1fcf](https://github.com/angular-ui/ui-router/commit/027f1fcf9c0916cea651e88981345da6f9ff214a)) + + + +### 0.2.12 (2014-11-13) + +#### Bug Fixes + +* **$resolve:** use resolve fn result, not parent resolved value of same name ([67f5e00c](https://github.com/angular-ui/ui-router/commit/67f5e00cc9aa006ce3fe6cde9dff261c28eab70a), closes [#1317], [#1353]) +* **$state:** + * populate default params in .transitionTo. ([3f60fbe6](https://github.com/angular-ui/ui-router/commit/3f60fbe6d65ebeca8d97952c05aa1d269f1b7ba1), closes [#1396]) + * reload() now reinvokes controllers ([73443420](https://github.com/angular-ui/ui-router/commit/7344342018847902594dc1fc62d30a5c30f01763), closes [#582]) + * do not emit $viewContentLoading if notify: false ([74255feb](https://github.com/angular-ui/ui-router/commit/74255febdf48ae082a02ca1e735165f2c369a463), closes [#1387](https://github.com/angular-ui/ui-router/issues/1387)) + * register states at config-time ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) + * handle parent.name when parent is obj ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) +* **$urlMatcherFactory:** + * register types at config ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a), closes [#1476]) + * made path params default value "" for backwards compat ([8f998e71](https://github.com/angular-ui/ui-router/commit/8f998e71e43a0b31293331c981f5db0f0097b8ba)) + * Pre-replace certain param values for better mapping ([6374a3e2](https://github.com/angular-ui/ui-router/commit/6374a3e29ab932014a7c77d2e1ab884cc841a2e3)) + * fixed ParamSet.$$keys() ordering ([9136fecb](https://github.com/angular-ui/ui-router/commit/9136fecbc2bfd4fda748a9914f0225a46c933860)) + * empty string policy now respected in Param.value() ([db12c85c](https://github.com/angular-ui/ui-router/commit/db12c85c16f2d105415f9bbbdeb11863f64728e0)) + * "string" type now encodes/decodes slashes ([3045e415](https://github.com/angular-ui/ui-router/commit/3045e41577a8b8b8afc6039f42adddf5f3c061ec), closes [#1119]) + * allow arrays in both path and query params ([fdd2f2c1](https://github.com/angular-ui/ui-router/commit/fdd2f2c191c4a67c874fdb9ec9a34f8dde9ad180), closes [#1073], [#1045], [#1486], [#1394]) + * typed params in search ([8d4cab69](https://github.com/angular-ui/ui-router/commit/8d4cab69dd67058e1a716892cc37b7d80a57037f), closes [#1488](https://github.com/angular-ui/ui-router/issues/1488)) + * no longer generate unroutable urls ([cb9fd9d8](https://github.com/angular-ui/ui-router/commit/cb9fd9d8943cb26c7223f6990db29c82ae8740f8), closes [#1487](https://github.com/angular-ui/ui-router/issues/1487)) + * handle optional parameter followed by required parameter in url format. ([efc72106](https://github.com/angular-ui/ui-router/commit/efc72106ddcc4774b48ea176a505ef9e95193b41)) + * default to parameter string coersion. ([13a468a7](https://github.com/angular-ui/ui-router/commit/13a468a7d54c2fb0751b94c0c1841d580b71e6dc), closes [#1414](https://github.com/angular-ui/ui-router/issues/1414)) + * concat respects strictMode/caseInsensitive ([dd72e103](https://github.com/angular-ui/ui-router/commit/dd72e103edb342d9cf802816fe127e1bbd68fd5f), closes [#1395]) +* **ui-sref:** + * Allow sref state options to take a scope object ([b5f7b596](https://github.com/angular-ui/ui-router/commit/b5f7b59692ce4933e2d63eb5df3f50a4ba68ccc0)) + * replace raw href modification with attrs. ([08c96782](https://github.com/angular-ui/ui-router/commit/08c96782faf881b0c7ab00afc233ee6729548fa0)) + * nagivate to state when url is "" fix($state.href): generate href for state with ([656b5aab](https://github.com/angular-ui/ui-router/commit/656b5aab906e5749db9b5a080c6a83b95f50fd91), closes [#1363](https://github.com/angular-ui/ui-router/issues/1363)) + * Check that state is defined in isMatch() ([92aebc75](https://github.com/angular-ui/ui-router/commit/92aebc7520f88babdc6e266536086e07263514c3), closes [#1314](https://github.com/angular-ui/ui-router/issues/1314), [#1332](https://github.com/angular-ui/ui-router/issues/1332)) +* **uiView:** + * allow inteprolated ui-view names ([81f6a19a](https://github.com/angular-ui/ui-router/commit/81f6a19a432dac9198fd33243855bfd3b4fea8c0), closes [#1324](https://github.com/angular-ui/ui-router/issues/1324)) + * Made anim work with angular 1.3 ([c3bb7ad9](https://github.com/angular-ui/ui-router/commit/c3bb7ad903da1e1f3c91019cfd255be8489ff4ef), closes [#1367](https://github.com/angular-ui/ui-router/issues/1367), [#1345](https://github.com/angular-ui/ui-router/issues/1345)) +* **urlRouter:** html5Mode accepts an object from angular v1.3.0-rc.3 ([7fea1e9d](https://github.com/angular-ui/ui-router/commit/7fea1e9d0d8c6e09cc6c895ecb93d4221e9adf48)) +* **stateFilters:** mark state filters as stateful. ([a00b353e](https://github.com/angular-ui/ui-router/commit/a00b353e3036f64a81245c4e7898646ba218f833), closes [#1479]) +* **ui-router:** re-add IE8 compatibility for map/filter/keys ([8ce69d9f](https://github.com/angular-ui/ui-router/commit/8ce69d9f7c886888ab53eca7e53536f36b428aae), closes [#1518], [#1383]) +* **package:** point 'main' to a valid filename ([ac903350](https://github.com/angular-ui/ui-router/commit/ac9033501debb63364539d91fbf3a0cba4579f8e)) +* **travis:** make CI build faster ([0531de05](https://github.com/angular-ui/ui-router/commit/0531de052e414a8d839fbb4e7635e923e94865b3)) + + +#### Features + +##### Default and Typed params + +This release includes a lot of bug fixes around default/optional and typed parameters. As such, 0.2.12 is the first release where we recommend those features be used. + +* **$state:** + * add state params validation ([b1379e6a](https://github.com/angular-ui/ui-router/commit/b1379e6a4d38f7ed7436e05873932d7c279af578), closes [#1433](https://github.com/angular-ui/ui-router/issues/1433)) + * is/includes/get work on relative stateOrName ([232e94b3](https://github.com/angular-ui/ui-router/commit/232e94b3c2ca2c764bb9510046e4b61690c87852)) + * .reload() returns state transition promise ([639e0565](https://github.com/angular-ui/ui-router/commit/639e0565dece9d5544cc93b3eee6e11c99bd7373)) +* **$templateFactory:** request templateURL as text/html ([ccd60769](https://github.com/angular-ui/ui-router/commit/ccd6076904a4b801d77b47f6e2de4c06ce9962f8), closes [#1287]) +* **$urlMatcherFactory:** Made a Params and ParamSet class ([0cc1e6cc](https://github.com/angular-ui/ui-router/commit/0cc1e6cc461a4640618e2bb594566551c54834e2)) + + + + +### 0.2.11 (2014-08-26) + + +#### Bug Fixes + +* **$resolve:** Resolves only inherit from immediate parent fixes #702 ([df34e20c](https://github.com/angular-ui/ui-router/commit/df34e20c576299e7a3c8bd4ebc68d42341c0ace9)) +* **$state:** + * change $state.href default options.inherit to true ([deea695f](https://github.com/angular-ui/ui-router/commit/deea695f5cacc55de351ab985144fd233c02a769)) + * sanity-check state lookups ([456fd5ae](https://github.com/angular-ui/ui-router/commit/456fd5aec9ea507518927bfabd62b4afad4cf714), closes [#980](https://github.com/angular-ui/ui-router/issues/980)) + * didn't comply to inherit parameter ([09836781](https://github.com/angular-ui/ui-router/commit/09836781f126c1c485b06551eb9cfd4fa0f45c35)) + * allow view content loading broadcast ([7b78edee](https://github.com/angular-ui/ui-router/commit/7b78edeeb52a74abf4d3f00f79534033d5a08d1a)) +* **$urlMatcherFactory:** + * detect injected functions ([91f75ae6](https://github.com/angular-ui/ui-router/commit/91f75ae66c4d129f6f69e53bd547594e9661f5d5)) + * syntax ([1ebed370](https://github.com/angular-ui/ui-router/commit/1ebed37069bae8614d41541d56521f5c45f703f3)) +* **UrlMatcher:** + * query param function defaults ([f9c20530](https://github.com/angular-ui/ui-router/commit/f9c205304f10d8a4ebe7efe9025e642016479a51)) + * don't decode default values ([63607bdb](https://github.com/angular-ui/ui-router/commit/63607bdbbcb432d3fb37856a1cb3da0cd496804e)) +* **travis:** update Node version to fix build ([d6b95ef2](https://github.com/angular-ui/ui-router/commit/d6b95ef23d9dacb4eba08897f5190a0bcddb3a48)) +* **uiSref:** + * Generate an href for states with a blank url. closes #1293 ([691745b1](https://github.com/angular-ui/ui-router/commit/691745b12fa05d3700dd28f0c8d25f8a105074ad)) + * should inherit params by default ([b973dad1](https://github.com/angular-ui/ui-router/commit/b973dad155ad09a7975e1476bd096f7b2c758eeb)) + * cancel transition if preventDefault() has been called ([2e6d9167](https://github.com/angular-ui/ui-router/commit/2e6d9167d3afbfbca6427e53e012f94fb5fb8022)) +* **uiView:** Fixed infinite loop when is called .go() from a controller. ([e13988b8](https://github.com/angular-ui/ui-router/commit/e13988b8cd6231d75c78876ee9d012cc87f4a8d9), closes [#1194](https://github.com/angular-ui/ui-router/issues/1194)) +* **docs:** + * Fixed link to milestones ([6c0ae500](https://github.com/angular-ui/ui-router/commit/6c0ae500cc238ea9fc95adcc15415c55fc9e1f33)) + * fix bug in decorator example ([4bd00af5](https://github.com/angular-ui/ui-router/commit/4bd00af50b8b88a49d1545a76290731cb8e0feb1)) + * Removed an incorrect semi-colon ([af97cef8](https://github.com/angular-ui/ui-router/commit/af97cef8b967f2e32177e539ef41450dca131a7d)) + * Explain return value of rule as function ([5e887890](https://github.com/angular-ui/ui-router/commit/5e8878900a6ffe59a81aed531a3925e34a297377)) + + +#### Features + +* **$state:** + * allow parameters to pass unharmed ([8939d057](https://github.com/angular-ui/ui-router/commit/8939d0572ab1316e458ef016317ecff53131a822)) + * **BREAKING CHANGE**: state parameters are no longer automatically coerced to strings, and unspecified parameter values are now set to undefined rather than null. + * allow prevent syncUrl on failure ([753060b9](https://github.com/angular-ui/ui-router/commit/753060b910d5d2da600a6fa0757976e401c33172)) +* **typescript:** Add typescript definitions for component builds ([521ceb3f](https://github.com/angular-ui/ui-router/commit/521ceb3fd7850646422f411921e21ce5e7d82e0f)) +* **uiSref:** extend syntax for ui-sref ([71cad3d6](https://github.com/angular-ui/ui-router/commit/71cad3d636508b5a9fe004775ad1f1adc0c80c3e)) +* **uiSrefActive:** + * Also activate for child states. ([bf163ad6](https://github.com/angular-ui/ui-router/commit/bf163ad6ce176ce28792696c8302d7cdf5c05a01), closes [#818](https://github.com/angular-ui/ui-router/issues/818)) + * **BREAKING CHANGE** Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance. + + * uiSrefActiveEq: new directive with old ui-sref-active behavior +* **$urlRouter:** + * defer URL change interception ([c72d8ce1](https://github.com/angular-ui/ui-router/commit/c72d8ce11916d0ac22c81b409c9e61d7048554d7)) + * force URLs to have valid params ([d48505cd](https://github.com/angular-ui/ui-router/commit/d48505cd328d83e39d5706e085ba319715f999a6)) + * abstract $location handling ([08b4636b](https://github.com/angular-ui/ui-router/commit/08b4636b294611f08db35f00641eb5211686fb50)) +* **$urlMatcherFactory:** + * fail on bad parameters ([d8f124c1](https://github.com/angular-ui/ui-router/commit/d8f124c10d00c7e5dde88c602d966db261aea221)) + * date type support ([b7f074ff](https://github.com/angular-ui/ui-router/commit/b7f074ff65ca150a3cdbda4d5ad6cb17107300eb)) + * implement type support ([450b1f0e](https://github.com/angular-ui/ui-router/commit/450b1f0e8e03c738174ff967f688b9a6373290f4)) +* **UrlMatcher:** + * handle query string arrays ([9cf764ef](https://github.com/angular-ui/ui-router/commit/9cf764efab45fa9309368688d535ddf6e96d6449), closes [#373](https://github.com/angular-ui/ui-router/issues/373)) + * injectable functions as defaults ([00966ecd](https://github.com/angular-ui/ui-router/commit/00966ecd91fb745846039160cab707bfca8b3bec)) + * default values & type decoding for query params ([a472b301](https://github.com/angular-ui/ui-router/commit/a472b301389fbe84d1c1fa9f24852b492a569d11)) + * allow shorthand definitions ([5b724304](https://github.com/angular-ui/ui-router/commit/5b7243049793505e44b6608ea09878c37c95b1f5)) + * validates whole interface ([32b27db1](https://github.com/angular-ui/ui-router/commit/32b27db173722e9194ef1d5c0ea7d93f25a98d11)) + * implement non-strict matching ([a3e21366](https://github.com/angular-ui/ui-router/commit/a3e21366bee0475c9795a1ec76f70eec41c5b4e3)) + * add per-param config support ([07b3029f](https://github.com/angular-ui/ui-router/commit/07b3029f4d409cf955780113df92e36401b47580)) + * **BREAKING CHANGE**: the `params` option in state configurations must now be an object keyed by parameter name. + +### 0.2.10 (2014-03-12) + + +#### Bug Fixes + +* **$state:** use $browser.baseHref() when generating urls with .href() ([cbcc8488](https://github.com/angular-ui/ui-router/commit/cbcc84887d6b6d35258adabb97c714cd9c1e272d)) +* **bower.json:** JS files should not be ignored ([ccdab193](https://github.com/angular-ui/ui-router/commit/ccdab193315f304eb3be5f5b97c47a926c79263e)) +* **dev:** karma:background task is missing, can't run grunt:dev. ([d9f7b898](https://github.com/angular-ui/ui-router/commit/d9f7b898e8e3abb8c846b0faa16a382913d7b22b)) +* **sample:** Contacts menu button not staying active when navigating to detail states. Need t ([2fcb8443](https://github.com/angular-ui/ui-router/commit/2fcb84437cb43ade12682a92b764f13cac77dfe7)) +* **uiSref:** support mock-clicks/events with no data ([717d3ff7](https://github.com/angular-ui/ui-router/commit/717d3ff7d0ba72d239892dee562b401cdf90e418)) +* **uiView:** + * Do NOT autoscroll when autoscroll attr is missing ([affe5bd7](https://github.com/angular-ui/ui-router/commit/affe5bd785cdc3f02b7a9f64a52e3900386ec3a0), closes [#807](https://github.com/angular-ui/ui-router/issues/807)) + * Refactoring uiView directive to copy ngView logic ([548fab6a](https://github.com/angular-ui/ui-router/commit/548fab6ab9debc9904c5865c8bc68b4fc3271dd0), closes [#857](https://github.com/angular-ui/ui-router/issues/857), [#552](https://github.com/angular-ui/ui-router/issues/552)) + + +#### Features + +* **$state:** includes() allows glob patterns for state matching. ([2d5f6b37](https://github.com/angular-ui/ui-router/commit/2d5f6b37191a3135f4a6d9e8f344c54edcdc065b)) +* **UrlMatcher:** Add support for case insensitive url matching ([642d5247](https://github.com/angular-ui/ui-router/commit/642d524799f604811e680331002feec7199a1fb5)) +* **uiSref:** add support for transition options ([2ed7a728](https://github.com/angular-ui/ui-router/commit/2ed7a728cee6854b38501fbc1df6139d3de5b28a)) +* **uiView:** add controllerAs config with function ([1ee7334a](https://github.com/angular-ui/ui-router/commit/1ee7334a73efeccc9b95340e315cdfd59944762d)) + + +### 0.2.9 (2014-01-17) + + +This release is identical to 0.2.8. 0.2.8 was re-tagged in git to fix a problem with bower. + + +### 0.2.8 (2014-01-16) + + +#### Bug Fixes + +* **$state:** allow null to be passed as 'params' param ([094dc30e](https://github.com/angular-ui/ui-router/commit/094dc30e883e1bd14e50a475553bafeaade3b178)) +* **$state.go:** param inheritance shouldn't inherit from siblings ([aea872e0](https://github.com/angular-ui/ui-router/commit/aea872e0b983cb433436ce5875df10c838fccedb)) +* **bower.json:** fixes bower.json ([eed3cc4d](https://github.com/angular-ui/ui-router/commit/eed3cc4d4dfef1d3ef84b9fd063127538ebf59d3)) +* **uiSrefActive:** annotate controller injection ([85921422](https://github.com/angular-ui/ui-router/commit/85921422ff7fb0effed358136426d616cce3d583), closes [#671](https://github.com/angular-ui/ui-router/issues/671)) +* **uiView:** + * autoscroll tests pass on 1.2.4 & 1.1.5 ([86eacac0](https://github.com/angular-ui/ui-router/commit/86eacac09ca5e9000bd3b9c7ba6e2cc95d883a3a)) + * don't animate initial load ([83b6634d](https://github.com/angular-ui/ui-router/commit/83b6634d27942ca74766b2b1244a7fc52c5643d9)) + * test pass against 1.0.8 and 1.2.4 ([a402415a](https://github.com/angular-ui/ui-router/commit/a402415a2a28b360c43b9fe8f4f54c540f6c33de)) + * it should autoscroll when expr is missing. ([8bb9e27a](https://github.com/angular-ui/ui-router/commit/8bb9e27a2986725f45daf44c4c9f846385095aff)) + + +#### Features + +* **uiSref:** add target attribute behaviour ([c12bf9a5](https://github.com/angular-ui/ui-router/commit/c12bf9a520d30d70294e3d82de7661900f8e394e)) +* **uiView:** + * merge autoscroll expression test. ([b89e0f87](https://github.com/angular-ui/ui-router/commit/b89e0f871d5cc35c10925ede986c10684d5c9252)) + * cache and test autoscroll expression ([ee262282](https://github.com/angular-ui/ui-router/commit/ee2622828c2ce83807f006a459ac4e11406d9258)) diff --git a/public/app/vendor/node_modules/@uirouter/core/CONTRIBUTING.md b/public/app/vendor/node_modules/@uirouter/core/CONTRIBUTING.md new file mode 100644 index 00000000..0fc34e58 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/CONTRIBUTING.md @@ -0,0 +1,61 @@ + +# Report an Issue + +Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure +it hasn't already been reported. You can [search through existing issues](https://github.com/angular-ui/ui-router/search?q=wat%3F&type=Issues) +to see if someone's reported one similar to yours. + +If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code +as possible: the more minimalist, the faster we can debug it). + +Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem, +and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to +that plunkr you created! + +**Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure +is a bug, it's best to talk it out on +[StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This +keeps development streamlined, and helps us focus on building great software. + + +Issues only! | +-------------| +Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). | + +####Purple Labels +A purple label means that **you** need to take some further action. + - ![Not Actionable - Need Info](ngdoc_assets/incomplete.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue. + - ![Plunkr Please](ngdoc_assets/example.png): Please [create a plunkr](http://bit.ly/UIR-Plunk) + - ![StackOverflow](ngdoc_assets/so.png): We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why. + +If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately. + +# Contribute + +**(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine. + +**(2)** Check out the [roadmap](https://github.com/angular-ui/ui-router/milestones) to see where the project is headed, and if your feature idea fits with where we're headed. + +**(3)** If you're not sure, [open an RFC](https://github.com/angular-ui/ui-router/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea. + +**(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules: + +- *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests +- Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one +- Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release. +- Changes should always respect the coding style of the project + + + +# Developing + +UI-Router uses npm and webpack. +After cloning the ui-router repository, fetch the dependencies for building from source and running tests: + +* run `$ npm install` from the project directory + +There are a number of scripts in the package.json that are used to generate builds and run tests: + +* `npm test`: runs the entire test suite. +* `npm run build`: Perform a full build. +* `npm run watch`: Continuously runs the tests when source or tests change. diff --git a/public/app/vendor/node_modules/@uirouter/core/LICENSE b/public/app/vendor/node_modules/@uirouter/core/LICENSE new file mode 100644 index 00000000..6413b092 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013-2015 The AngularUI Team, Karsten Sperling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/app/vendor/node_modules/@uirouter/core/README.md b/public/app/vendor/node_modules/@uirouter/core/README.md new file mode 100644 index 00000000..48eff3ea --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/README.md @@ -0,0 +1,80 @@ +# UI-Router Core  [![Build Status](https://travis-ci.org/ui-router/core.svg?branch=master)](https://travis-ci.org/ui-router/core) + +UI-Router core provides client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application) +routing for JavaScript. +This core is framework agnostic. +It is used to build +[UI-Router for Angular 1](//ui-router.github.io/ng1), +[UI-Router for Angular 2](//ui-router.github.io/ng2), and +[UI-Router React](//ui-router.github.io/react). + +## SPA Routing + +Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows +changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a +location deep within the SPA. + +UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a +[*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine) to manage the transitions between those +application states in a transaction-like manner. + +## Features + +UI-Router Core provides the following features: + +- State-machine based routing + - Hierarchical states + - Enter/Exit hooks +- Name based hierarchical state addressing + - Absolute, e.g., `admin.users` + - Relative, e.g., `.users` +- Flexible Views + - Nested Views + - Multiple Named Views +- Flexible URLs and parameters + - Path, Query, and non-URL parameters + - Typed parameters + - Built in: `int`, `string`, `date`, `json` + - Custom: define your own encoding/decoding + - Optional or required parameters + - Default parameter values (optionally squashed from URL) +- Transaction-like state transitions + - Transition Lifecycle Hooks + - First class async support + +## Get Started + +Get started using one of the existing UI-Router projects: + +- [UI-Router for Angular 1](https://ui-router.github.io/ng1) +- [UI-Router for Angular 2](https://ui-router.github.io/ng2) +- [UI-Router for React](https://ui-router.github.io/react) + +## Build your own + +UI-Router core can be used implement a router for any web-based component framework. +There are four basic things to build for a specific component framework: + +### UIView + +A UIView is a component which acts as a viewport for another component, defined by a state. +When the state is activated, the UIView should render the state's component. + +### UISref (optional, but useful) + +A `UISref` is a link (absolute, or relative) which activates a specific state and/or parameters. +When the `UISref` is clicked, it should initiate a transition to the linked state. + +### UISrefActive (optional) + +When combined with a `UISref`, a `UISrefActive` toggles a CSS class on/off when its `UISref` is active/inactive. + +### Bootstrap mechanism (optional) + +Implement framework specific bootstrap requirements, if any. +For example, UI-Router for Angular 1 and Angular 2 integrates with the ng1/ng2 Dependency Injection lifecycles. +On the other hand, UI-Router for React uses a simple JavaScript based bootstrap, i.e., `new UIRouterReact().start();`. + +## Getting help + +[Create an issue](https://github.com/ui-router/core/issues) or contact us on [Gitter](https://gitter.im/angular-ui/ui-router). diff --git a/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js new file mode 100644 index 00000000..2239e0b5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js @@ -0,0 +1,7911 @@ +/** + * UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps + * @version v5.0.11 + * @link https://ui-router.github.io + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global['@uirouter/core'] = global['@uirouter/core'] || {}))); +}(this, (function (exports) { 'use strict'; + +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +function curry(fn) { + var initial_args = [].slice.apply(arguments, [1]); + var func_args_length = fn.length; + function curried(args) { + if (args.length >= func_args_length) + return fn.apply(null, args); + return function () { + return curried(args.concat([].slice.apply(arguments))); + }; + } + return curried(initial_args); +} +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +function compose() { + var args = arguments; + var start = args.length - 1; + return function () { + var i = start, result = args[start].apply(this, arguments); + while (i--) + result = args[i].call(this, result); + return result; + }; +} +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +function pipe() { + var funcs = []; + for (var _i = 0; _i < arguments.length; _i++) { + funcs[_i] = arguments[_i]; + } + return compose.apply(null, [].slice.call(arguments).reverse()); +} +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +var prop = function (name) { + return function (obj) { return obj && obj[name]; }; +}; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +var propEq = curry(function (name, val, obj) { return obj && obj[name] === val; }); +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +var parse = function (name) { + return pipe.apply(null, name.split(".").map(prop)); +}; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +var not = function (fn) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return !fn.apply(null, args); + }; +}; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +function and(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) && fn2.apply(null, args); + }; +} +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +function or(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) || fn2.apply(null, args); + }; +} +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +var all = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; +}; +var any = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; +}; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +var is = function (ctor) { + return function (obj) { + return (obj != null && obj.constructor === ctor || obj instanceof ctor); + }; +}; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +var eq = function (val) { return function (other) { + return val === other; +}; }; +/** Given a value, returns a function which returns the value */ +var val = function (v) { return function () { return v; }; }; +function invoke(fnName, args) { + return function (obj) { + return obj[fnName].apply(obj, args); + }; +} +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +function pattern(struct) { + return function (x) { + for (var i = 0; i < struct.length; i++) { + if (struct[i][0](x)) + return struct[i][1](x); + } + }; +} + +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +var Glob = /** @class */ (function () { + function Glob(text) { + this.text = text; + this.glob = text.split('.'); + var regexpString = this.text.split('.') + .map(function (seg) { + if (seg === '**') + return '(?:|(?:\\.[^.]*)*)'; + if (seg === '*') + return '\\.[^.]*'; + return '\\.' + seg; + }).join(''); + this.regexp = new RegExp("^" + regexpString + "$"); + } + Glob.prototype.matches = function (name) { + return this.regexp.test('.' + name); + }; + /** Returns true if the string has glob-like characters in it */ + Glob.is = function (text) { + return !!/[!,*]+/.exec(text); + }; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + Glob.fromString = function (text) { + return Glob.is(text) ? new Glob(text) : null; + }; + return Glob; +}()); + +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +var StateObject = /** @class */ (function () { + /** @deprecated use State.create() */ + function StateObject(config) { + return StateObject.create(config || {}); + } + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + StateObject.create = function (stateDecl) { + stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl; + var state = inherit(inherit(stateDecl, StateObject.prototype)); + stateDecl.$$state = function () { return state; }; + state.self = stateDecl; + state.__stateObjectCache = { + nameGlob: Glob.fromString(state.name) // might return null + }; + return state; + }; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + StateObject.prototype.is = function (ref) { + return this === ref || this.self === ref || this.fqn() === ref; + }; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + StateObject.prototype.fqn = function () { + if (!this.parent || !(this.parent instanceof this.constructor)) + return this.name; + var name = this.parent.fqn(); + return name ? name + "." + this.name : this.name; + }; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + StateObject.prototype.root = function () { + return this.parent && this.parent.root() || this; + }; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + StateObject.prototype.parameters = function (opts) { + opts = defaults(opts, { inherit: true, matchingKeys: null }); + var inherited = opts.inherit && this.parent && this.parent.parameters() || []; + return inherited.concat(values(this.params)) + .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); }); + }; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + StateObject.prototype.parameter = function (id, opts) { + if (opts === void 0) { opts = {}; } + return (this.url && this.url.parameter(id, opts) || + find(values(this.params), propEq('id', id)) || + opts.inherit && this.parent && this.parent.parameter(id)); + }; + StateObject.prototype.toString = function () { + return this.fqn(); + }; + /** Predicate which returns true if the object is an class with @State() decorator */ + StateObject.isStateClass = function (stateDecl) { + return isFunction(stateDecl) && stateDecl['__uiRouterState'] === true; + }; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + StateObject.isState = function (obj) { + return isObject(obj['__stateObjectCache']); + }; + return StateObject; +}()); + +/** Predicates + * + * These predicates return true/false based on the input. + * Although these functions are exported, they are subject to change without notice. + * + * @module common_predicates + */ +/** */ +var toStr = Object.prototype.toString; +var tis = function (t) { return function (x) { return typeof (x) === t; }; }; +var isUndefined = tis('undefined'); +var isDefined = not(isUndefined); +var isNull = function (o) { return o === null; }; +var isNullOrUndefined = or(isNull, isUndefined); +var isFunction = tis('function'); +var isNumber = tis('number'); +var isString = tis('string'); +var isObject = function (x) { return x !== null && typeof x === 'object'; }; +var isArray = Array.isArray; +var isDate = (function (x) { return toStr.call(x) === '[object Date]'; }); +var isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; }); +var isState = StateObject.isState; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +function isInjectable(val$$1) { + if (isArray(val$$1) && val$$1.length) { + var head = val$$1.slice(0, -1), tail = val$$1.slice(-1); + return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length); + } + return isFunction(val$$1); +} +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +var isPromise = and(isObject, pipe(prop('then'), isFunction)); + +var notImplemented = function (fnname) { return function () { + throw new Error(fnname + "(): No coreservices implementation for UI-Router is loaded."); +}; }; +var services = { + $q: undefined, + $injector: undefined, +}; + +/** + * Random utility functions used in the UI-Router code + * + * These functions are exported, but are subject to change without notice. + * + * @preferred + * @module common + */ +/** for typedoc */ +var root = (typeof self === 'object' && self.self === self && self) || + (typeof global === 'object' && global.global === global && global) || undefined; +var angular = root.angular || {}; +var fromJson = angular.fromJson || JSON.parse.bind(JSON); +var toJson = angular.toJson || JSON.stringify.bind(JSON); +var forEach = angular.forEach || _forEach; +var extend = Object.assign || _extend; +var equals = angular.equals || _equals; +function identity(x) { return x; } +function noop() { } +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +function createProxyFunctions(source, target, bind, fnNames, latebind) { + if (latebind === void 0) { latebind = false; } + var bindFunction = function (fnName) { + return source()[fnName].bind(bind()); + }; + var makeLateRebindFn = function (fnName) { return function lateRebindFunction() { + target[fnName] = bindFunction(fnName); + return target[fnName].apply(null, arguments); + }; }; + fnNames = fnNames || Object.keys(source()); + return fnNames.reduce(function (acc, name) { + acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name); + return acc; + }, target); +} +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +var inherit = function (parent, extra) { + return extend(Object.create(parent), extra); +}; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +var inArray = curry(_inArray); +function _inArray(array, obj) { + return array.indexOf(obj) !== -1; +} +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +var removeFrom = curry(_removeFrom); +function _removeFrom(array, obj) { + var idx = array.indexOf(obj); + if (idx >= 0) + array.splice(idx, 1); + return array; +} +/** pushes a values to an array and returns the value */ +var pushTo = curry(_pushTo); +function _pushTo(arr, val$$1) { + return (arr.push(val$$1), val$$1); +} +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +var deregAll = function (functions) { + return functions.slice().forEach(function (fn) { + typeof fn === 'function' && fn(); + removeFrom(functions, fn); + }); +}; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +function defaults(opts) { + var defaultsList = []; + for (var _i = 1; _i < arguments.length; _i++) { + defaultsList[_i - 1] = arguments[_i]; + } + var _defaultsList = defaultsList.concat({}).reverse(); + var defaultVals = extend.apply(null, _defaultsList); + return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals))); +} +/** Reduce function that merges each element of the list into a single object, using extend */ +var mergeR = function (memo, item) { return extend(memo, item); }; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +function ancestors(first, second) { + var path = []; + for (var n in first.path) { + if (first.path[n] !== second.path[n]) + break; + path.push(first.path[n]); + } + return path; +} +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +function pick(obj, propNames) { + 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. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +function omit(obj, propNames) { + return Object.keys(obj) + .filter(not(inArray(propNames))) + .reduce(function (acc, key) { return (acc[key] = obj[key], acc); }, {}); +} +/** + * Maps an array, or object to a property (by name) + */ +function pluck(collection, propName) { + return map(collection, prop(propName)); +} +/** Filters an Array or an Object's properties based on a predicate */ +function filter(collection, callback) { + var arr = isArray(collection), result = arr ? [] : {}; + var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; }; + forEach(collection, function (item, i) { + if (callback(item, i)) + accept(item, i); + }); + return result; +} +/** Finds an object from an array, or a property of an object, that matches a predicate */ +function find(collection, callback) { + var result; + forEach(collection, function (item, i) { + if (result) + return; + if (callback(item, i)) + result = item; + }); + return result; +} +/** Given an object, returns a new object, where each property is transformed by the callback function */ +var mapObj = map; +/** Maps an array or object properties using a callback function */ +function map(collection, callback) { + var result = isArray(collection) ? [] : {}; + forEach(collection, function (item, i) { return result[i] = callback(item, i); }); + return result; +} +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +var values = function (obj) { + return Object.keys(obj).map(function (key) { return obj[key]; }); +}; +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +var allTrueR = function (memo, elem) { return memo && elem; }; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +var anyTrueR = function (memo, elem) { return memo || elem; }; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +var unnestR = function (memo, elem) { return memo.concat(elem); }; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +var flattenR = function (memo, elem) { + return isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem); +}; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +function pushR(arr, obj) { + arr.push(obj); + return arr; +} +/** Reduce function that filters out duplicates */ +var uniqR = function (acc, token) { + return inArray(acc, token) ? acc : pushR(acc, token); +}; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +var unnest = function (arr) { return arr.reduce(unnestR, []); }; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +var flatten = function (arr) { return arr.reduce(flattenR, []); }; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +var assertPredicate = assertFn; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +var assertMap = assertFn; +function assertFn(predicateOrMap, errMsg) { + if (errMsg === void 0) { errMsg = "assert failure"; } + return function (obj) { + var result = predicateOrMap(obj); + if (!result) { + throw new Error(isFunction(errMsg) ? errMsg(obj) : errMsg); + } + return result; + }; +} +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +var pairs = function (obj) { + return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); +}; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +function arrayTuples() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (args.length === 0) + return []; + var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER + var i, result = []; + for (i = 0; i < maxArrayLen; i++) { + // This is a hot function + // Unroll when there are 1-4 arguments + switch (args.length) { + case 1: + result.push([args[0][i]]); + break; + case 2: + result.push([args[0][i], args[1][i]]); + break; + case 3: + result.push([args[0][i], args[1][i], args[2][i]]); + break; + case 4: + result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); + break; + default: + result.push(args.map(function (array) { return array[i]; })); + break; + } + } + return result; +} +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +function applyPairs(memo, keyValTuple) { + var key, value; + if (isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; +} +/** Get the last element of an array */ +function tail(arr) { + return arr.length && arr[arr.length - 1] || undefined; +} +/** + * shallow copy from src to dest + */ +function copy(src, dest) { + if (dest) + Object.keys(dest).forEach(function (key) { return delete dest[key]; }); + if (!dest) + dest = {}; + return extend(dest, src); +} +/** Naive forEach implementation works with Objects or Arrays */ +function _forEach(obj, cb, _this) { + if (isArray(obj)) + return obj.forEach(cb, _this); + Object.keys(obj).forEach(function (key) { return cb(obj[key], key); }); +} +function _extend(toObj) { + for (var i = 1; i < arguments.length; i++) { + var obj = arguments[i]; + if (!obj) + continue; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + toObj[keys[j]] = obj[keys[j]]; + } + } + return toObj; +} +function _equals(o1, o2) { + if (o1 === o2) + return true; + if (o1 === null || o2 === null) + return false; + if (o1 !== o1 && o2 !== o2) + return true; // NaN === NaN + var t1 = typeof o1, t2 = typeof o2; + if (t1 !== t2 || t1 !== 'object') + return false; + var tup = [o1, o2]; + if (all(isArray)(tup)) + return _arraysEq(o1, o2); + if (all(isDate)(tup)) + return o1.getTime() === o2.getTime(); + if (all(isRegExp)(tup)) + return o1.toString() === o2.toString(); + if (all(isFunction)(tup)) + return true; // meh + var predicates = [isFunction, isArray, isDate, isRegExp]; + if (predicates.map(any).reduce(function (b, fn) { return b || !!fn(tup); }, false)) + return false; + var key, keys = {}; + for (key in o1) { + if (!_equals(o1[key], o2[key])) + return false; + keys[key] = true; + } + for (key in o2) { + if (!keys[key]) + return false; + } + return true; +} +function _arraysEq(a1, a2) { + if (a1.length !== a2.length) + return false; + return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true); +} +// issue #2676 +var silenceUncaughtInPromise = function (promise) { + return promise.catch(function (e) { return 0; }) && promise; +}; +var silentRejection = function (error) { + return silenceUncaughtInPromise(services.$q.reject(error)); +}; + +/** + * @module common + */ /** for typedoc */ +var Queue = /** @class */ (function () { + function Queue(_items, _limit) { + if (_items === void 0) { _items = []; } + if (_limit === void 0) { _limit = null; } + this._items = _items; + this._limit = _limit; + } + Queue.prototype.enqueue = function (item) { + var items = this._items; + items.push(item); + if (this._limit && items.length > this._limit) + items.shift(); + return item; + }; + Queue.prototype.dequeue = function () { + if (this.size()) + return this._items.splice(0, 1)[0]; + }; + Queue.prototype.clear = function () { + var current = this._items; + this._items = []; + return current; + }; + Queue.prototype.size = function () { + return this._items.length; + }; + Queue.prototype.remove = function (item) { + var idx = this._items.indexOf(item); + return idx > -1 && this._items.splice(idx, 1)[0]; + }; + Queue.prototype.peekTail = function () { + return this._items[this._items.length - 1]; + }; + Queue.prototype.peekHead = function () { + if (this.size()) + return this._items[0]; + }; + return Queue; +}()); + +/** + * @coreapi + * @module transition + */ /** for typedoc */ + +(function (RejectType) { + RejectType[RejectType["SUPERSEDED"] = 2] = "SUPERSEDED"; + RejectType[RejectType["ABORTED"] = 3] = "ABORTED"; + RejectType[RejectType["INVALID"] = 4] = "INVALID"; + RejectType[RejectType["IGNORED"] = 5] = "IGNORED"; + RejectType[RejectType["ERROR"] = 6] = "ERROR"; +})(exports.RejectType || (exports.RejectType = {})); +/** @hidden */ var id = 0; +var Rejection = /** @class */ (function () { + function Rejection(type, message, detail) { + this.$id = id++; + this.type = type; + this.message = message; + this.detail = detail; + } + Rejection.prototype.toString = function () { + var detailString = function (d) { + return d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d); + }; + var detail = detailString(this.detail); + var _a = this, $id = _a.$id, type = _a.type, message = _a.message; + return "Transition Rejection($id: " + $id + " type: " + type + ", message: " + message + ", detail: " + detail + ")"; + }; + Rejection.prototype.toPromise = function () { + return extend(silentRejection(this), { _transitionRejection: this }); + }; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + Rejection.isRejectionPromise = function (obj) { + return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection); + }; + /** Returns a Rejection due to transition superseded */ + Rejection.superseded = function (detail, options) { + var message = "The transition has been superseded by a different transition"; + var rejection = new Rejection(exports.RejectType.SUPERSEDED, message, detail); + if (options && options.redirected) { + rejection.redirected = true; + } + return rejection; + }; + /** Returns a Rejection due to redirected transition */ + Rejection.redirected = function (detail) { + return Rejection.superseded(detail, { redirected: true }); + }; + /** Returns a Rejection due to invalid transition */ + Rejection.invalid = function (detail) { + var message = "This transition is invalid"; + return new Rejection(exports.RejectType.INVALID, message, detail); + }; + /** Returns a Rejection due to ignored transition */ + Rejection.ignored = function (detail) { + var message = "The transition was ignored"; + return new Rejection(exports.RejectType.IGNORED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.aborted = function (detail) { + var message = "The transition has been aborted"; + return new Rejection(exports.RejectType.ABORTED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.errored = function (detail) { + var message = "The transition errored"; + return new Rejection(exports.RejectType.ERROR, message, detail); + }; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + Rejection.normalize = function (detail) { + return is(Rejection)(detail) ? detail : Rejection.errored(detail); + }; + return Rejection; +}()); + +/** + * # Transition tracing (debug) + * + * Enable transition tracing to print transition information to the console, + * in order to help debug your application. + * Tracing logs detailed information about each Transition to your console. + * + * To enable tracing, import the [[Trace]] singleton and enable one or more categories. + * + * ### ES6 + * ```js + * import {trace} from "ui-router-ng2"; // or "angular-ui-router" + * trace.enable(1, 5); // TRANSITION and VIEWCONFIG + * ``` + * + * ### CJS + * ```js + * let trace = require("angular-ui-router").trace; // or "ui-router-ng2" + * trace.enable("TRANSITION", "VIEWCONFIG"); + * ``` + * + * ### Globals + * ```js + * let trace = window["angular-ui-router"].trace; // or "ui-router-ng2" + * trace.enable(); // Trace everything (very verbose) + * ``` + * + * ### Angular 1: + * ```js + * app.run($trace => $trace.enable()); + * ``` + * + * @coreapi + * @module trace + */ /** for typedoc */ +/** @hidden */ +function uiViewString(uiview) { + if (!uiview) + return 'ui-view (defunct)'; + var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)'; + return "[ui-view#" + uiview.id + " " + uiview.$type + ":" + uiview.fqn + " (" + uiview.name + "@" + state + ")]"; +} +/** @hidden */ +var viewConfigString = function (viewConfig) { + var view = viewConfig.viewDecl; + var state = view.$context.name || '(root)'; + return "[View#" + viewConfig.$id + " from '" + state + "' state]: target ui-view: '" + view.$uiViewName + "@" + view.$uiViewContextAnchor + "'"; +}; +/** @hidden */ +function normalizedCat(input) { + return isNumber(input) ? exports.Category[input] : exports.Category[exports.Category[input]]; +} +/** @hidden */ +var consoleLog = Function.prototype.bind.call(console.log, console); +/** @hidden */ +var consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console); +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ + +(function (Category) { + Category[Category["RESOLVE"] = 0] = "RESOLVE"; + Category[Category["TRANSITION"] = 1] = "TRANSITION"; + Category[Category["HOOK"] = 2] = "HOOK"; + Category[Category["UIVIEW"] = 3] = "UIVIEW"; + Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG"; +})(exports.Category || (exports.Category = {})); +/** @hidden */ var _tid = parse("$id"); +/** @hidden */ var _rid = parse("router.$id"); +/** @hidden */ var transLbl = function (trans) { return "Transition #" + _tid(trans) + "-" + _rid(trans); }; +/** + * Prints UI-Router Transition trace information to the console. + */ +var Trace = /** @class */ (function () { + /** @hidden */ + function Trace() { + /** @hidden */ + this._enabled = {}; + this.approximateDigests = 0; + } + /** @hidden */ + Trace.prototype._set = function (enabled, categories) { + var _this = this; + if (!categories.length) { + categories = Object.keys(exports.Category) + .map(function (k) { return parseInt(k, 10); }) + .filter(function (k) { return !isNaN(k); }) + .map(function (key) { return exports.Category[key]; }); + } + categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; }); + }; + Trace.prototype.enable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(true, categories); + }; + Trace.prototype.disable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(false, categories); + }; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + Trace.prototype.enabled = function (category) { + return !!this._enabled[normalizedCat(category)]; + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionStart = function (trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Started -> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionIgnored = function (trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Ignored <> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookInvocation = function (step, trans, options) { + if (!this.enabled(exports.Category.HOOK)) + return; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = functionToString(step.registeredHook.callback); + console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + maxLength(200, name)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) { + if (!this.enabled(exports.Category.HOOK)) + return; + console.log(transLbl(trans) + ": <- Hook returned: " + maxLength(200, stringify(hookResult))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvePath = function (path, when, trans) { + if (!this.enabled(exports.Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvableResolved = function (resolvable, trans) { + if (!this.enabled(exports.Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + maxLength(200, stringify(resolvable.data))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceError = function (reason, trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Rejected " + stringify(trans) + ", reason: " + reason); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceSuccess = function (finalState, trans) { + if (!this.enabled(exports.Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Success " + stringify(trans) + ", final state: " + finalState.name); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewEvent = function (event, viewData, extra) { + if (extra === void 0) { extra = ""; } + if (!this.enabled(exports.Category.UIVIEW)) + return; + console.log("ui-view: " + padString(30, event) + " " + uiViewString(viewData) + extra); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) { + if (!this.enabled(exports.Category.UIVIEW)) + return; + this.traceUIViewEvent("Updating", viewData, " with ViewConfig from context='" + context + "'"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewFill = function (viewData, html) { + if (!this.enabled(exports.Category.UIVIEW)) + return; + this.traceUIViewEvent("Fill", viewData, " with: " + maxLength(200, html)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewSync = function (pairs) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + var mapping = pairs.map(function (_a) { + var uiViewData = _a[0], config = _a[1]; + var uiView = uiViewData.$type + ":" + uiViewData.fqn; + var view = config && config.viewDecl.$context.name + ": " + config.viewDecl.$name + " (" + config.viewDecl.$type + ")"; + return { 'ui-view fqn': uiView, 'state: view name': view }; + }).sort(function (a, b) { return a['ui-view fqn'].localeCompare(b['ui-view fqn']); }); + consoletable(mapping); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceEvent = function (event, viewConfig) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) { + if (!this.enabled(exports.Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData)); + }; + return Trace; +}()); +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +var trace = new Trace(); + +(function (TransitionHookPhase) { + TransitionHookPhase[TransitionHookPhase["CREATE"] = 0] = "CREATE"; + TransitionHookPhase[TransitionHookPhase["BEFORE"] = 1] = "BEFORE"; + TransitionHookPhase[TransitionHookPhase["RUN"] = 2] = "RUN"; + TransitionHookPhase[TransitionHookPhase["SUCCESS"] = 3] = "SUCCESS"; + TransitionHookPhase[TransitionHookPhase["ERROR"] = 4] = "ERROR"; +})(exports.TransitionHookPhase || (exports.TransitionHookPhase = {})); + +(function (TransitionHookScope) { + TransitionHookScope[TransitionHookScope["TRANSITION"] = 0] = "TRANSITION"; + TransitionHookScope[TransitionHookScope["STATE"] = 1] = "STATE"; +})(exports.TransitionHookScope || (exports.TransitionHookScope = {})); + +/** + * @coreapi + * @module state + */ /** for typedoc */ +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +var TargetState = /** @class */ (function () { + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + function TargetState(_stateRegistry, _identifier, _params, _options) { + this._stateRegistry = _stateRegistry; + this._identifier = _identifier; + this._identifier = _identifier; + this._params = extend({}, _params || {}); + this._options = extend({}, _options || {}); + this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative); + } + /** The name of the state this object targets */ + TargetState.prototype.name = function () { + return this._definition && this._definition.name || this._identifier; + }; + /** The identifier used when creating this TargetState */ + TargetState.prototype.identifier = function () { + return this._identifier; + }; + /** The target parameter values */ + TargetState.prototype.params = function () { + return this._params; + }; + /** The internal state object (if it was found) */ + TargetState.prototype.$state = function () { + return this._definition; + }; + /** The internal state declaration (if it was found) */ + TargetState.prototype.state = function () { + return this._definition && this._definition.self; + }; + /** The target options */ + TargetState.prototype.options = function () { + return this._options; + }; + /** True if the target state was found */ + TargetState.prototype.exists = function () { + return !!(this._definition && this._definition.self); + }; + /** True if the object is valid */ + TargetState.prototype.valid = function () { + return !this.error(); + }; + /** If the object is invalid, returns the reason why */ + TargetState.prototype.error = function () { + var base = this.options().relative; + if (!this._definition && !!base) { + var stateName = base.name ? base.name : base; + return "Could not resolve '" + this.name() + "' from state '" + stateName + "'"; + } + if (!this._definition) + return "No such state '" + this.name() + "'"; + if (!this._definition.self) + return "State '" + this.name() + "' has an invalid definition"; + }; + TargetState.prototype.toString = function () { + return "'" + this.name() + "'" + stringify(this.params()); + }; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + TargetState.prototype.withState = function (state) { + return new TargetState(this._stateRegistry, state, this._params, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + TargetState.prototype.withParams = function (params, replace) { + if (replace === void 0) { replace = false; } + var newParams = replace ? params : extend({}, this._params, params); + return new TargetState(this._stateRegistry, this._identifier, newParams, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + TargetState.prototype.withOptions = function (options, replace) { + if (replace === void 0) { replace = false; } + var newOpts = replace ? options : extend({}, this._options, options); + return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts); + }; + /** Returns true if the object has a state property that might be a state or state name */ + TargetState.isDef = function (obj) { + return obj && obj.state && (isString(obj.state) || isString(obj.state.name)); + }; + return TargetState; +}()); + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +var defaultOptions = { + current: noop, + transition: null, + traceData: {}, + bind: null, +}; +/** @hidden */ +var TransitionHook = /** @class */ (function () { + function TransitionHook(transition, stateContext, registeredHook, options) { + var _this = this; + this.transition = transition; + this.stateContext = stateContext; + this.registeredHook = registeredHook; + this.options = options; + this.isSuperseded = function () { + return _this.type.hookPhase === exports.TransitionHookPhase.RUN && !_this.options.transition.isActive(); + }; + this.options = defaults(options, defaultOptions); + this.type = registeredHook.eventType; + } + TransitionHook.prototype.logError = function (err) { + this.transition.router.stateService.defaultErrorHandler()(err); + }; + TransitionHook.prototype.invokeHook = function () { + var _this = this; + var hook = this.registeredHook; + if (hook._deregistered) + return; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + var options = this.options; + trace.traceHookInvocation(this, this.transition, options); + var invokeCallback = function () { + return hook.callback.call(options.bind, _this.transition, _this.stateContext); + }; + var normalizeErr = function (err) { + return Rejection.normalize(err).toPromise(); + }; + var handleError = function (err) { + return hook.eventType.getErrorHandler(_this)(err); + }; + var handleResult = function (result) { + return hook.eventType.getResultHandler(_this)(result); + }; + try { + var result = invokeCallback(); + if (!this.type.synchronous && isPromise(result)) { + return result.catch(normalizeErr) + .then(handleResult, handleError); + } + else { + return handleResult(result); + } + } + catch (err) { + // If callback throws (synchronously) + return handleError(Rejection.normalize(err)); + } + finally { + if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) { + hook.deregister(); + } + } + }; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + TransitionHook.prototype.handleHookResult = function (result) { + var _this = this; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + // Hook returned a promise + if (isPromise(result)) { + // Wait for the promise, then reprocess with the resulting value + return result.then(function (val$$1) { return _this.handleHookResult(val$$1); }); + } + trace.traceHookResult(result, this.transition, this.options); + // Hook returned false + if (result === false) { + // Abort this Transition + return Rejection.aborted("Hook aborted transition").toPromise(); + } + var isTargetState = is(TargetState); + // hook returned a TargetState + if (isTargetState(result)) { + // Halt the current Transition and redirect (a new Transition) to the TargetState. + return Rejection.redirected(result).toPromise(); + } + }; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + TransitionHook.prototype.getNotCurrentRejection = function () { + var router = this.transition.router; + // The router is stopped + if (router._disposed) { + return Rejection.aborted("UIRouter instance #" + router.$id + " has been stopped (disposed)").toPromise(); + } + if (this.transition._aborted) { + return Rejection.aborted().toPromise(); + } + // This transition is no longer current. + // Another transition started while this hook was still running. + if (this.isSuperseded()) { + // Abort this transition + return Rejection.superseded(this.options.current()).toPromise(); + } + }; + TransitionHook.prototype.toString = function () { + var _a = this, options = _a.options, registeredHook = _a.registeredHook; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = fnToString(registeredHook.callback); + return event + " context: " + context + ", " + maxLength(200, name); + }; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + TransitionHook.chain = function (hooks, waitFor) { + // Chain the next hook off the previous + var createHookChainR = function (prev, nextHook) { + return prev.then(function () { return nextHook.invokeHook(); }); + }; + return hooks.reduce(createHookChainR, waitFor || services.$q.when()); + }; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + TransitionHook.invokeHooks = function (hooks, doneCallback) { + for (var idx = 0; idx < hooks.length; idx++) { + var hookResult = hooks[idx].invokeHook(); + if (isPromise(hookResult)) { + var remainingHooks = hooks.slice(idx + 1); + return TransitionHook.chain(remainingHooks, hookResult) + .then(doneCallback); + } + } + return doneCallback(); + }; + /** + * Run all TransitionHooks, ignoring their return value. + */ + TransitionHook.runAllHooks = function (hooks) { + hooks.forEach(function (hook) { return hook.invokeHook(); }); + }; + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.HANDLE_RESULT = function (hook) { return function (result) { + return hook.handleHookResult(result); + }; }; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) { + isPromise(result) && result.catch(function (err) { + return hook.logError(Rejection.normalize(err)); + }); + return undefined; + }; }; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.LOG_ERROR = function (hook) { return function (error) { + return hook.logError(error); + }; }; + TransitionHook.REJECT_ERROR = function (hook) { return function (error) { + return silentRejection(error); + }; }; + TransitionHook.THROW_ERROR = function (hook) { return function (error) { + throw error; + }; }; + return TransitionHook; +}()); + +/** + * @coreapi + * @module transition + */ /** for typedoc */ +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +function matchState(state, criterion) { + var toMatch = isString(criterion) ? [criterion] : criterion; + function matchGlobs(_state) { + var globStrings = toMatch; + for (var i = 0; i < globStrings.length; i++) { + var glob = new Glob(globStrings[i]); + if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) { + return true; + } + } + return false; + } + var matchFn = (isFunction(toMatch) ? toMatch : matchGlobs); + return !!matchFn(state); +} +/** + * @internalapi + * The registration data for a registered transition hook + */ +var RegisteredHook = /** @class */ (function () { + function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) { + if (options === void 0) { options = {}; } + this.tranSvc = tranSvc; + this.eventType = eventType; + this.callback = callback; + this.matchCriteria = matchCriteria; + this.removeHookFromRegistry = removeHookFromRegistry; + this.invokeCount = 0; + this._deregistered = false; + this.priority = options.priority || 0; + this.bind = options.bind || null; + this.invokeLimit = options.invokeLimit; + } + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + RegisteredHook.prototype._matchingNodes = function (nodes, criterion) { + if (criterion === true) + return nodes; + var matching = nodes.filter(function (node) { return matchState(node.state, criterion); }); + return matching.length ? matching : null; + }; + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + RegisteredHook.prototype._getDefaultMatchCriteria = function () { + return map(this.tranSvc._pluginapi._getPathTypes(), function () { return true; }); + }; + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + RegisteredHook.prototype._getMatchingNodes = function (treeChanges) { + var _this = this; + var criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria); + var paths = values(this.tranSvc._pluginapi._getPathTypes()); + return paths.reduce(function (mn, pathtype) { + // STATE scope criteria matches against every node in the path. + // TRANSITION scope criteria matches against only the last node in the path + var isStateHook = pathtype.scope === exports.TransitionHookScope.STATE; + var path = treeChanges[pathtype.name] || []; + var nodes = isStateHook ? path : [tail(path)]; + mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name]); + return mn; + }, {}); + }; + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + RegisteredHook.prototype.matches = function (treeChanges) { + var matches = this._getMatchingNodes(treeChanges); + // Check if all the criteria matched the TreeChanges object + var allMatched = values(matches).every(identity); + return allMatched ? matches : null; + }; + RegisteredHook.prototype.deregister = function () { + this.removeHookFromRegistry(this); + this._deregistered = true; + }; + return RegisteredHook; +}()); +/** @hidden Return a registration function of the requested type. */ +function makeEvent(registry, transitionService, eventType) { + // Create the object which holds the registered transition hooks. + var _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {}); + var hooks = _registeredHooks[eventType.name] = []; + var removeHookFn = removeFrom(hooks); + // Create hook registration function on the IHookRegistry for the event + registry[eventType.name] = hookRegistrationFn; + function hookRegistrationFn(matchObject, callback, options) { + if (options === void 0) { options = {}; } + var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options); + hooks.push(registeredHook); + return registeredHook.deregister.bind(registeredHook); + } + return hookRegistrationFn; +} + +/** + * @coreapi + * @module transition + */ /** for typedoc */ +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +var HookBuilder = /** @class */ (function () { + function HookBuilder(transition) { + this.transition = transition; + } + HookBuilder.prototype.buildHooksForPhase = function (phase) { + var _this = this; + var $transitions = this.transition.router.transitionService; + return $transitions._pluginapi._getEvents(phase) + .map(function (type) { return _this.buildHooks(type); }) + .reduce(unnestR, []) + .filter(identity); + }; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + HookBuilder.prototype.buildHooks = function (hookType) { + var transition = this.transition; + var treeChanges = transition.treeChanges(); + // Find all the matching registered hooks for a given hook type + var matchingHooks = this.getMatchingHooks(hookType, treeChanges); + if (!matchingHooks) + return []; + var baseHookOptions = { + transition: transition, + current: transition.options().current + }; + var makeTransitionHooks = function (hook) { + // Fetch the Nodes that caused this hook to match. + var matches = hook.matches(treeChanges); + // Select the PathNode[] that will be used as TransitionHook context objects + var matchingNodes = matches[hookType.criteriaMatchPath.name]; + // Return an array of HookTuples + return matchingNodes.map(function (node) { + var _options = extend({ + bind: hook.bind, + traceData: { hookType: hookType.name, context: node } + }, baseHookOptions); + var state = hookType.criteriaMatchPath.scope === exports.TransitionHookScope.STATE ? node.state.self : null; + var transitionHook = new TransitionHook(transition, state, hook, _options); + return { hook: hook, node: node, transitionHook: transitionHook }; + }); + }; + return matchingHooks.map(makeTransitionHooks) + .reduce(unnestR, []) + .sort(tupleSort(hookType.reverseSort)) + .map(function (tuple) { return tuple.transitionHook; }); + }; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges) { + var isCreate = hookType.hookPhase === exports.TransitionHookPhase.CREATE; + // Instance and Global hook registries + var $transitions = this.transition.router.transitionService; + var registries = isCreate ? [$transitions] : [this.transition, $transitions]; + return registries.map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries + .filter(assertPredicate(isArray, "broken event named: " + hookType.name)) // Sanity check + .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array + .filter(function (hook) { return hook.matches(treeChanges); }); // Only those satisfying matchCriteria + }; + return HookBuilder; +}()); +/** + * A factory for a sort function for HookTuples. + * + * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares + * the EventHook priority. + * + * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth + * @returns a tuple sort function + */ +function tupleSort(reverseDepthSort) { + if (reverseDepthSort === void 0) { reverseDepthSort = false; } + return function nodeDepthThenPriority(l, r) { + var factor = reverseDepthSort ? -1 : 1; + var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor; + return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority; + }; +} + +/** + * @coreapi + * @module params + */ +/** */ +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +var ParamType = /** @class */ (function () { + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + function ParamType(def) { + /** @inheritdoc */ + this.pattern = /.*/; + /** @inheritdoc */ + this.inherit = true; + extend(this, def); + } + // consider these four methods to be "abstract methods" that should be overridden + /** @inheritdoc */ + ParamType.prototype.is = function (val, key) { return true; }; + /** @inheritdoc */ + ParamType.prototype.encode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.decode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.equals = function (a, b) { return a == b; }; + ParamType.prototype.$subPattern = function () { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); + }; + ParamType.prototype.toString = function () { + return "{ParamType:" + this.name + "}"; + }; + /** Given an encoded string, or a decoded object, returns a decoded object */ + ParamType.prototype.$normalize = function (val) { + return this.is(val) ? val : this.decode(val); + }; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + ParamType.prototype.$asArray = function (mode, isSearch) { + if (!mode) + return this; + if (mode === "auto" && !isSearch) + throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + }; + return ParamType; +}()); +/** + * Wraps up a `ParamType` object to handle array values. + * @internalapi + */ +function ArrayType(type, mode) { + var _this = this; + // Wrap non-array value as array + function arrayWrap(val) { + return isArray(val) ? val : (isDefined(val) ? [val] : []); + } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch (val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + if (isArray(val) && val.length === 0) + return val; + var arr = arrayWrap(val); + var result = map(arr, callback); + return (allTruthyMode === true) ? filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result); + }; + } + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) + return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) + return false; + } + return true; + }; + } + ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) { + var paramTypeFn = type[name].bind(type); + var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler; + _this[name] = wrapperFn(paramTypeFn); + }); + extend(this, { + dynamic: type.dynamic, + name: type.name, + pattern: type.pattern, + inherit: type.inherit, + is: arrayHandler(type.is.bind(type), true), + $arrayMode: mode + }); +} + +/** + * @coreapi + * @module params + */ /** for typedoc */ +/** @hidden */ var hasOwn = Object.prototype.hasOwnProperty; +/** @hidden */ var isShorthand = function (cfg) { + return ["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {})).length === 0; +}; +/** @internalapi */ + +(function (DefType) { + DefType[DefType["PATH"] = 0] = "PATH"; + DefType[DefType["SEARCH"] = 1] = "SEARCH"; + DefType[DefType["CONFIG"] = 2] = "CONFIG"; +})(exports.DefType || (exports.DefType = {})); +/** @hidden */ +function unwrapShorthand(cfg) { + cfg = isShorthand(cfg) && { value: cfg } || cfg; + getStaticDefaultValue['__cacheable'] = true; + function getStaticDefaultValue() { + return cfg.value; + } + return extend(cfg, { + $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue, + }); +} +/** @hidden */ +function getType(cfg, urlType, location, id, paramTypes) { + if (cfg.type && urlType && urlType.name !== 'string') + throw new Error("Param '" + id + "' has two type configurations."); + if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type)) + return paramTypes.type(cfg.type); + if (urlType) + return urlType; + if (!cfg.type) { + var type = location === exports.DefType.CONFIG ? "any" : + location === exports.DefType.PATH ? "path" : + location === exports.DefType.SEARCH ? "query" : "string"; + return paramTypes.type(type); + } + return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type); +} +/** + * @internalapi + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ +function getSquashPolicy(config, isOptional, defaultPolicy) { + var squash = config.squash; + if (!isOptional || squash === false) + return false; + if (!isDefined(squash) || squash == null) + return defaultPolicy; + if (squash === true || isString(squash)) + return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); +} +/** @internalapi */ +function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") }, + ]; + replace = isArray(config.replace) ? config.replace : []; + if (isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = map(replace, prop("from")); + return filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace); +} +/** @internalapi */ +var Param = /** @class */ (function () { + function Param(id, type, config, location, urlMatcherFactory) { + config = unwrapShorthand(config); + type = getType(config, type, location, id, urlMatcherFactory.paramTypes); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === exports.DefType.SEARCH) : type; + var isOptional = config.value !== undefined || location === exports.DefType.SEARCH; + var dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic; + var raw = isDefined(config.raw) ? !!config.raw : !!type.raw; + var squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy()); + var replace = getReplace(config, arrayMode, isOptional, squash); + var inherit$$1 = isDefined(config.inherit) ? !!config.inherit : !!type.inherit; + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === exports.DefType.SEARCH ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return extend(arrayDefaults, arrayParamNomenclature, config).array; + } + extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit$$1, array: arrayMode, config: config }); + } + Param.prototype.isDefaultValue = function (value) { + return this.isOptional && this.type.equals(this.value(), value); + }; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + Param.prototype.value = function (value) { + var _this = this; + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + var getDefaultValue = function () { + if (_this._defaultValueCache) + return _this._defaultValueCache.defaultValue; + if (!services.$injector) + throw new Error("Injectable functions cannot be called at configuration time"); + var defaultValue = services.$injector.invoke(_this.config.$$fn); + if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue)) + throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")"); + if (_this.config.$$fn['__cacheable']) { + _this._defaultValueCache = { defaultValue: defaultValue }; + } + return defaultValue; + }; + var replaceSpecialValues = function (val$$1) { + for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) { + var tuple = _a[_i]; + if (tuple.from === val$$1) + return tuple.to; + } + return val$$1; + }; + value = replaceSpecialValues(value); + return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value); + }; + Param.prototype.isSearch = function () { + return this.location === exports.DefType.SEARCH; + }; + Param.prototype.validates = function (value) { + // There was no parameter value, but the param is optional + if ((isUndefined(value) || value === null) && this.isOptional) + return true; + // The value was not of the correct ParamType, and could not be decoded to the correct ParamType + var normalized = this.type.$normalize(value); + if (!this.type.is(normalized)) + return false; + // The value was of the correct type, but when encoded, did not match the ParamType's regexp + var encoded = this.type.encode(normalized); + return !(isString(encoded) && !this.type.pattern.exec(encoded)); + }; + Param.prototype.toString = function () { + return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}"; + }; + Param.values = function (params, values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + var paramValues = {}; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + paramValues[param.id] = param.value(values$$1[param.id]); + } + return paramValues; + }; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + Param.changed = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); }); + }; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + Param.equals = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return Param.changed(params, values1, values2).length === 0; + }; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + Param.validates = function (params, values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + return params.map(function (param) { return param.validates(values$$1[param.id]); }).reduce(allTrueR, true); + }; + return Param; +}()); + +/** @module path */ /** for typedoc */ +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +var PathNode = /** @class */ (function () { + function PathNode(stateOrNode) { + if (stateOrNode instanceof PathNode) { + var node = stateOrNode; + this.state = node.state; + this.paramSchema = node.paramSchema.slice(); + this.paramValues = extend({}, node.paramValues); + this.resolvables = node.resolvables.slice(); + this.views = node.views && node.views.slice(); + } + else { + var state = stateOrNode; + this.state = state; + this.paramSchema = state.parameters({ inherit: false }); + this.paramValues = {}; + this.resolvables = state.resolvables.map(function (res) { return res.clone(); }); + } + } + /** Sets [[paramValues]] for the node, from the values of an object hash */ + PathNode.prototype.applyRawParams = function (params) { + var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; }; + this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return applyPairs(memo, getParamVal(pDef)); }, {}); + return this; + }; + /** Gets a specific [[Param]] metadata that belongs to the node */ + PathNode.prototype.parameter = function (name) { + return find(this.paramSchema, propEq("id", name)); + }; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + PathNode.prototype.equals = function (node, paramsFn) { + var diff = this.diff(node, paramsFn); + return diff && diff.length === 0; + }; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + PathNode.prototype.diff = function (node, paramsFn) { + if (this.state !== node.state) + return false; + var params = paramsFn ? paramsFn(this) : this.paramSchema; + return Param.changed(params, this.paramValues, node.paramValues); + }; + /** Returns a clone of the PathNode */ + PathNode.clone = function (node) { + return new PathNode(node); + }; + return PathNode; +}()); + +/** @module path */ /** for typedoc */ +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +var PathUtils = /** @class */ (function () { + function PathUtils() { + } + /** Given a PathNode[], create an TargetState */ + PathUtils.makeTargetState = function (registry, path) { + var state = tail(path).state; + return new TargetState(registry, state, path.map(prop("paramValues")).reduce(mergeR, {}), {}); + }; + PathUtils.buildPath = function (targetState) { + var toParams = targetState.params(); + return targetState.$state().path.map(function (state) { return new PathNode(state).applyRawParams(toParams); }); + }; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + PathUtils.buildToPath = function (fromPath, targetState) { + var toPath = PathUtils.buildPath(targetState); + if (targetState.options().inherit) { + return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params())); + } + return toPath; + }; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + PathUtils.applyViewConfigs = function ($view, path, states) { + // Only apply the viewConfigs to the nodes for the given states + path.filter(function (node) { return inArray(states, node.state); }).forEach(function (node) { + var viewDecls = values(node.state.views || {}); + var subPath = PathUtils.subPath(path, function (n) { return n === node; }); + var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); }); + node.views = viewConfigs.reduce(unnestR, []); + }); + }; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + PathUtils.inheritParams = function (fromPath, toPath, toKeys) { + if (toKeys === void 0) { toKeys = []; } + function nodeParamVals(path, state) { + var node = find(path, propEq('state', state)); + return extend({}, node && node.paramValues); + } + var noInherit = fromPath.map(function (node) { return node.paramSchema; }) + .reduce(unnestR, []) + .filter(function (param) { return !param.inherit; }) + .map(prop('id')); + /** + * Given an [[PathNode]] "toNode", return a new [[PathNode]] with param values inherited from the + * matching node in fromPath. Only inherit keys that aren't found in "toKeys" from the node in "fromPath"" + */ + function makeInheritedParamsNode(toNode) { + // All param values for the node (may include default key/vals, when key was not found in toParams) + var toParamVals = extend({}, toNode && toNode.paramValues); + // limited to only those keys found in toParams + var incomingParamVals = pick(toParamVals, toKeys); + toParamVals = omit(toParamVals, toKeys); + var fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit); + // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals + var ownParamVals = extend(toParamVals, fromParamVals, incomingParamVals); + return new PathNode(toNode.state).applyRawParams(ownParamVals); + } + // The param keys specified by the incoming toParams + return toPath.map(makeInheritedParamsNode); + }; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + PathUtils.treeChanges = function (fromPath, toPath, reloadState) { + var keep = 0, max = Math.min(fromPath.length, toPath.length); + var nodesMatch = function (node1, node2) { + return node1.equals(node2, PathUtils.nonDynamicParams); + }; + while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) { + keep++; + } + /** Given a retained node, return a new node which uses the to node's param values */ + function applyToParams(retainedNode, idx) { + var cloned = PathNode.clone(retainedNode); + cloned.paramValues = toPath[idx].paramValues; + return cloned; + } + var from, retained, exiting, entering, to; + from = fromPath; + retained = from.slice(0, keep); + exiting = from.slice(keep); + // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped + var retainedWithToParams = retained.map(applyToParams); + entering = toPath.slice(keep); + to = (retainedWithToParams).concat(entering); + return { from: from, to: to, retained: retained, exiting: exiting, entering: entering }; + }; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + PathUtils.matching = function (pathA, pathB, paramsFn) { + var done = false; + var tuples = arrayTuples(pathA, pathB); + return tuples.reduce(function (matching, _a) { + var nodeA = _a[0], nodeB = _a[1]; + done = done || !nodeA.equals(nodeB, paramsFn); + return done ? matching : matching.concat(nodeA); + }, []); + }; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + PathUtils.equals = function (pathA, pathB, paramsFn) { + return pathA.length === pathB.length && + PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length; + }; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + PathUtils.subPath = function (path, predicate) { + var node = find(path, predicate); + var elementIdx = path.indexOf(node); + return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1); + }; + PathUtils.nonDynamicParams = function (node) { + return node.state.parameters({ inherit: false }) + .filter(function (param) { return !param.dynamic; }); + }; + /** Gets the raw parameter values from a path */ + PathUtils.paramValues = function (path) { + return path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); + }; + return PathUtils; +}()); + +/** + * @coreapi + * @module resolve + */ /** for typedoc */ +// TODO: explicitly make this user configurable +var defaultResolvePolicy = { + when: "LAZY", + async: "WAIT" +}; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +var Resolvable = /** @class */ (function () { + function Resolvable(arg1, resolveFn, deps, policy, data) { + this.resolved = false; + this.promise = undefined; + if (arg1 instanceof Resolvable) { + extend(this, arg1); + } + else if (isFunction(resolveFn)) { + if (isNullOrUndefined(arg1)) + throw new Error("new Resolvable(): token argument is required"); + if (!isFunction(resolveFn)) + throw new Error("new Resolvable(): resolveFn argument must be a function"); + this.token = arg1; + this.policy = policy; + this.resolveFn = resolveFn; + this.deps = deps || []; + this.data = data; + this.resolved = data !== undefined; + this.promise = this.resolved ? services.$q.when(this.data) : undefined; + } + else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) { + var literal = arg1; + return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data); + } + } + Resolvable.prototype.getPolicy = function (state) { + var thisPolicy = this.policy || {}; + var statePolicy = state && state.resolvePolicy || {}; + return { + when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when, + async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async, + }; + }; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + Resolvable.prototype.resolve = function (resolveContext, trans) { + var _this = this; + var $q = services.$q; + // Gets all dependencies from ResolveContext and wait for them to be resolved + var getResolvableDependencies = function () { + return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { + return resolvable.get(resolveContext, trans); + })); + }; + // Invokes the resolve function passing the resolved dependencies as arguments + var invokeResolveFn = function (resolvedDeps) { + return _this.resolveFn.apply(null, resolvedDeps); + }; + /** + * For RXWAIT policy: + * + * Given an observable returned from a resolve function: + * - enables .cache() mode (this allows multicast subscribers) + * - then calls toPromise() (this triggers subscribe() and thus fetches) + * - Waits for the promise, then return the cached observable (not the first emitted value). + */ + var waitForRx = function (observable$) { + var cached = observable$.cache(1); + return cached.take(1).toPromise().then(function () { return cached; }); + }; + // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through. + var node = resolveContext.findNode(this); + var state = node && node.state; + var maybeWaitForRx = this.getPolicy(state).async === "RXWAIT" ? waitForRx : identity; + // After the final value has been resolved, update the state of the Resolvable + var applyResolvedValue = function (resolvedValue) { + _this.data = resolvedValue; + _this.resolved = true; + trace.traceResolvableResolved(_this, trans); + return _this.data; + }; + // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick. + return this.promise = $q.when() + .then(getResolvableDependencies) + .then(invokeResolveFn) + .then(maybeWaitForRx) + .then(applyResolvedValue); + }; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + Resolvable.prototype.get = function (resolveContext, trans) { + return this.promise || this.resolve(resolveContext, trans); + }; + Resolvable.prototype.toString = function () { + return "Resolvable(token: " + stringify(this.token) + ", requires: [" + this.deps.map(stringify) + "])"; + }; + Resolvable.prototype.clone = function () { + return new Resolvable(this); + }; + Resolvable.fromData = function (token, data) { + return new Resolvable(token, function () { return data; }, null, null, data); + }; + return Resolvable; +}()); + +/** @internalapi */ +var resolvePolicies = { + when: { + LAZY: "LAZY", + EAGER: "EAGER" + }, + async: { + WAIT: "WAIT", + NOWAIT: "NOWAIT", + RXWAIT: "RXWAIT" + } +}; + +/** @module resolve */ +/** for typedoc */ +var whens = resolvePolicies.when; +var ALL_WHENS = [whens.EAGER, whens.LAZY]; +var EAGER_WHENS = [whens.EAGER]; +var NATIVE_INJECTOR_TOKEN = "Native Injector"; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +var ResolveContext = /** @class */ (function () { + function ResolveContext(_path) { + this._path = _path; + } + /** Gets all the tokens found in the resolve context, de-duplicated */ + ResolveContext.prototype.getTokens = function () { + return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(uniqR, []); + }; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + ResolveContext.prototype.getResolvable = function (token) { + var matching = this._path.map(function (node) { return node.resolvables; }) + .reduce(unnestR, []) + .filter(function (r) { return r.token === token; }); + return tail(matching); + }; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + ResolveContext.prototype.getPolicy = function (resolvable) { + var node = this.findNode(resolvable); + return resolvable.getPolicy(node.state); + }; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + ResolveContext.prototype.subContext = function (state) { + return new ResolveContext(PathUtils.subPath(this._path, function (node) { return node.state === state; })); + }; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + ResolveContext.prototype.addResolvables = function (newResolvables, state) { + var node = find(this._path, propEq('state', state)); + var keys = newResolvables.map(function (r) { return r.token; }); + node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables); + }; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + ResolveContext.prototype.resolvePath = function (when, trans) { + var _this = this; + if (when === void 0) { when = "LAZY"; } + // This option determines which 'when' policy Resolvables we are about to fetch. + var whenOption = inArray(ALL_WHENS, when) ? when : "LAZY"; + // If the caller specified EAGER, only the EAGER Resolvables are fetched. + // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.` + var matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS; + // get the subpath to the state argument, if provided + trace.traceResolvePath(this._path, when, trans); + var matchesPolicy = function (acceptedVals, whenOrAsync) { + return function (resolvable) { + return inArray(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]); + }; + }; + // Trigger all the (matching) Resolvables in the path + // Reduce all the "WAIT" Resolvables into an array + var promises = this._path.reduce(function (acc, node) { + var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when')); + var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async')); + var wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async'))); + // For the matching Resolvables, start their async fetch process. + var subContext = _this.subContext(node.state); + var getResult = function (r) { return r.get(subContext, trans) + .then(function (value) { return ({ token: r.token, value: value }); }); }; + nowait.forEach(getResult); + return acc.concat(wait.map(getResult)); + }, []); + // Wait for all the "WAIT" resolvables + return services.$q.all(promises); + }; + ResolveContext.prototype.injector = function () { + return this._injector || (this._injector = new UIInjectorImpl(this)); + }; + ResolveContext.prototype.findNode = function (resolvable) { + return find(this._path, function (node) { return inArray(node.resolvables, resolvable); }); + }; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + ResolveContext.prototype.getDependencies = function (resolvable) { + var _this = this; + var node = this.findNode(resolvable); + // Find which other resolvables are "visible" to the `resolvable` argument + // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path) + var subPath = PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path; + var availableResolvables = subPath + .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) //all of subpath's resolvables + .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument + var getDependency = function (token) { + var matching = availableResolvables.filter(function (r) { return r.token === token; }); + if (matching.length) + return tail(matching); + var fromInjector = _this.injector().getNative(token); + if (isUndefined(fromInjector)) { + throw new Error("Could not find Dependency Injection token: " + stringify(token)); + } + return new Resolvable(token, function () { return fromInjector; }, [], fromInjector); + }; + return resolvable.deps.map(getDependency); + }; + return ResolveContext; +}()); +var UIInjectorImpl = /** @class */ (function () { + function UIInjectorImpl(context) { + this.context = context; + this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector; + } + UIInjectorImpl.prototype.get = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) { + if (this.context.getPolicy(resolvable).async === 'NOWAIT') { + return resolvable.get(this.context); + } + if (!resolvable.resolved) { + throw new Error("Resolvable async .get() not complete:" + stringify(resolvable.token)); + } + return resolvable.data; + } + return this.getNative(token); + }; + UIInjectorImpl.prototype.getAsync = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) + return resolvable.get(this.context); + return services.$q.when(this.native.get(token)); + }; + UIInjectorImpl.prototype.getNative = function (token) { + return this.native && this.native.get(token); + }; + return UIInjectorImpl; +}()); + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +/** @hidden */ +var stateSelf = prop("self"); +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +var Transition = /** @class */ (function () { + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + function Transition(fromPath, targetState, router) { + var _this = this; + /** @hidden */ + this._deferred = services.$q.defer(); + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + this.promise = this._deferred.promise; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + this._registeredHooks = {}; + /** @hidden */ + this._hookBuilder = new HookBuilder(this); + /** Checks if this transition is currently active/running. */ + this.isActive = function () { + return _this.router.globals.transition === _this; + }; + this.router = router; + this._targetState = targetState; + if (!targetState.valid()) { + throw new Error(targetState.error()); + } + // current() is assumed to come from targetState.options, but provide a naive implementation otherwise. + this._options = extend({ current: val(this) }, targetState.options()); + this.$id = router.transitionService._transitionCount++; + var toPath = PathUtils.buildToPath(fromPath, targetState); + this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState); + this.createTransitionHookRegFns(); + var onCreateHooks = this._hookBuilder.buildHooksForPhase(exports.TransitionHookPhase.CREATE); + TransitionHook.invokeHooks(onCreateHooks, function () { return null; }); + this.applyViewConfigs(router); + } + /** @hidden */ + Transition.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onError = function (criteria, callback, options) { return; }; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + Transition.prototype.createTransitionHookRegFns = function () { + var _this = this; + this.router.transitionService._pluginapi._getEvents() + .filter(function (type) { return type.hookPhase !== exports.TransitionHookPhase.CREATE; }) + .forEach(function (type) { return makeEvent(_this, _this.router.transitionService, type); }); + }; + /** @internalapi */ + Transition.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + Transition.prototype.applyViewConfigs = function (router) { + var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; }); + PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates); + }; + /** + * @internalapi + * + * @returns the internal from [State] object + */ + Transition.prototype.$from = function () { + return tail(this._treeChanges.from).state; + }; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + Transition.prototype.$to = function () { + return tail(this._treeChanges.to).state; + }; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + Transition.prototype.from = function () { + return this.$from().self; + }; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + Transition.prototype.to = function () { + return this.$to().self; + }; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + Transition.prototype.targetState = function () { + return this._targetState; + }; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + Transition.prototype.is = function (compare) { + if (compare instanceof Transition) { + // TODO: Also compare parameters + return this.is({ to: compare.$to().name, from: compare.$from().name }); + } + return !((compare.to && !matchState(this.$to(), compare.to)) || + (compare.from && !matchState(this.$from(), compare.from))); + }; + Transition.prototype.params = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return Object.freeze(this._treeChanges[pathname].map(prop("paramValues")).reduce(mergeR, {})); + }; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + Transition.prototype.injector = function (state, pathName) { + if (pathName === void 0) { pathName = "to"; } + var path = this._treeChanges[pathName]; + if (state) + path = PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; }); + return new ResolveContext(path).injector(); + }; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + Transition.prototype.getResolveTokens = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return new ResolveContext(this._treeChanges[pathname]).getTokens(); + }; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + Transition.prototype.addResolvable = function (resolvable, state) { + if (state === void 0) { state = ""; } + resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable); + var stateName = (typeof state === "string") ? state : state.name; + var topath = this._treeChanges.to; + var targetNode = find(topath, function (node) { return node.state.name === stateName; }); + var resolveContext = new ResolveContext(topath); + resolveContext.addResolvables([resolvable], targetNode.state); + }; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + Transition.prototype.redirectedFrom = function () { + return this._options.redirectedFrom || null; + }; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + Transition.prototype.originalTransition = function () { + var rf = this.redirectedFrom(); + return (rf && rf.originalTransition()) || this; + }; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + Transition.prototype.options = function () { + return this._options; + }; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + Transition.prototype.entering = function () { + return map(this._treeChanges.entering, prop('state')).map(stateSelf); + }; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + Transition.prototype.exiting = function () { + return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse(); + }; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + Transition.prototype.retained = function () { + return map(this._treeChanges.retained, prop('state')).map(stateSelf); + }; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + Transition.prototype.views = function (pathname, state) { + if (pathname === void 0) { pathname = "entering"; } + var path = this._treeChanges[pathname]; + path = !state ? path : path.filter(propEq('state', state)); + return path.map(prop("views")).filter(identity).reduce(unnestR, []); + }; + Transition.prototype.treeChanges = function (pathname) { + return pathname ? this._treeChanges[pathname] : this._treeChanges; + }; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + Transition.prototype.redirect = function (targetState) { + var redirects = 1, trans = this; + while ((trans = trans.redirectedFrom()) != null) { + if (++redirects > 20) + throw new Error("Too many consecutive Transition redirects (20+)"); + } + var redirectOpts = { redirectedFrom: this, source: "redirect" }; + // If the original transition was caused by URL sync, then use { location: 'replace' } + // on the new transition (unless the target state explicitly specifies location: false). + // This causes the original url to be replaced with the url for the redirect target + // so the original url disappears from the browser history. + if (this.options().source === 'url' && targetState.options().location !== false) { + redirectOpts.location = 'replace'; + } + var newOptions = extend({}, this.options(), targetState.options(), redirectOpts); + targetState = targetState.withOptions(newOptions, true); + var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState); + var originalEnteringNodes = this._treeChanges.entering; + var redirectEnteringNodes = newTransition._treeChanges.entering; + // --- Re-use resolve data from original transition --- + // When redirecting from a parent state to a child state where the parent parameter values haven't changed + // (because of the redirect), the resolves fetched by the original transition are still valid in the + // redirected transition. + // + // This allows you to define a redirect on a parent state which depends on an async resolve value. + // You can wait for the resolve, then redirect to a child state based on the result. + // The redirected transition does not have to re-fetch the resolve. + // --------------------------------------------------------- + var nodeIsReloading = function (reloadState) { return function (node) { + return reloadState && node.state.includes[reloadState.name]; + }; }; + // Find any "entering" nodes in the redirect path that match the original path and aren't being reloaded + var matchingEnteringNodes = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams) + .filter(not(nodeIsReloading(targetState.options().reloadState))); + // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes. + matchingEnteringNodes.forEach(function (node, idx) { + node.resolvables = originalEnteringNodes[idx].resolvables; + }); + return newTransition; + }; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + Transition.prototype._changedParams = function () { + var tc = this._treeChanges; + /** Return undefined if it's not a "dynamic" transition, for the following reasons */ + // If user explicitly wants a reload + if (this._options.reload) + return undefined; + // If any states are exiting or entering + if (tc.exiting.length || tc.entering.length) + return undefined; + // If to/from path lengths differ + if (tc.to.length !== tc.from.length) + return undefined; + // If the to/from paths are different + var pathsDiffer = arrayTuples(tc.to, tc.from) + .map(function (tuple) { return tuple[0].state !== tuple[1].state; }) + .reduce(anyTrueR, false); + if (pathsDiffer) + return undefined; + // Find any parameter values that differ + var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; }); + var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1]; + var tuples = arrayTuples(nodeSchemas, toValues, fromValues); + return tuples.map(function (_a) { + var schema = _a[0], toVals = _a[1], fromVals = _a[2]; + return Param.changed(schema, toVals, fromVals); + }).reduce(unnestR, []); + }; + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + Transition.prototype.dynamic = function () { + var changes = this._changedParams(); + return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(anyTrueR, false); + }; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + Transition.prototype.ignored = function () { + return !!this._ignoredReason(); + }; + /** @hidden */ + Transition.prototype._ignoredReason = function () { + var pending = this.router.globals.transition; + var reloadState = this._options.reloadState; + var same = function (pathA, pathB) { + if (pathA.length !== pathB.length) + return false; + var matching = PathUtils.matching(pathA, pathB); + return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length; + }; + var newTC = this.treeChanges(); + var pendTC = pending && pending.treeChanges(); + if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) + return "SameAsPending"; + if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) + return "SameAsCurrent"; + }; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + Transition.prototype.run = function () { + var _this = this; + var runAllHooks = TransitionHook.runAllHooks; + // Gets transition hooks array for the given phase + var getHooksFor = function (phase) { + return _this._hookBuilder.buildHooksForPhase(phase); + }; + // When the chain is complete, then resolve or reject the deferred + var transitionSuccess = function () { + trace.traceSuccess(_this.$to(), _this); + _this.success = true; + _this._deferred.resolve(_this.to()); + runAllHooks(getHooksFor(exports.TransitionHookPhase.SUCCESS)); + }; + var transitionError = function (reason) { + trace.traceError(reason, _this); + _this.success = false; + _this._deferred.reject(reason); + _this._error = reason; + runAllHooks(getHooksFor(exports.TransitionHookPhase.ERROR)); + }; + var runTransition = function () { + // Wait to build the RUN hook chain until the BEFORE hooks are done + // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object. + var allRunHooks = getHooksFor(exports.TransitionHookPhase.RUN); + var done = function () { return services.$q.when(undefined); }; + return TransitionHook.invokeHooks(allRunHooks, done); + }; + var startTransition = function () { + var globals = _this.router.globals; + globals.lastStartedTransitionId = _this.$id; + globals.transition = _this; + globals.transitionHistory.enqueue(_this); + trace.traceTransitionStart(_this); + return services.$q.when(undefined); + }; + var allBeforeHooks = getHooksFor(exports.TransitionHookPhase.BEFORE); + TransitionHook.invokeHooks(allBeforeHooks, startTransition) + .then(runTransition) + .then(transitionSuccess, transitionError); + return this.promise; + }; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + Transition.prototype.valid = function () { + return !this.error() || this.success !== undefined; + }; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + Transition.prototype.abort = function () { + // Do not set flag if the transition is already complete + if (isUndefined(this.success)) { + this._aborted = true; + } + }; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + Transition.prototype.error = function () { + var state = this.$to(); + if (state.self.abstract) + return "Cannot transition to abstract state '" + state.name + "'"; + var paramDefs = state.parameters(), values$$1 = this.params(); + var invalidParams = paramDefs.filter(function (param) { return !param.validates(values$$1[param.id]); }); + if (invalidParams.length) { + return "Param values not valid for state '" + state.name + "'. Invalid params: [ " + invalidParams.map(function (param) { return param.id; }).join(', ') + " ]"; + } + if (this.success === false) + return this._error; + }; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + Transition.prototype.toString = function () { + var fromStateOrName = this.from(); + var toStateOrName = this.to(); + var avoidEmptyHash = function (params) { + return (params["#"] !== null && params["#"] !== undefined) ? params : omit(params, ["#"]); + }; + // (X) means the to state is invalid. + var id = this.$id, from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))), toValid = this.valid() ? "" : "(X) ", to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = stringify(avoidEmptyHash(this.params())); + return "Transition#" + id + "( '" + from + "'" + fromParams + " -> " + toValid + "'" + to + "'" + toParams + " )"; + }; + /** @hidden */ + Transition.diToken = Transition; + return Transition; +}()); + +/** + * Functions that manipulate strings + * + * Although these functions are exported, they are subject to change without notice. + * + * @module common_strings + */ /** */ +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +function maxLength(max, str) { + if (str.length <= max) + return str; + return str.substr(0, max - 3) + "..."; +} +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +function padString(length, str) { + while (str.length < length) + str += " "; + return str; +} +function kebobString(camelCase) { + return camelCase + .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char + .replace(/([A-Z])/g, function ($1) { return "-" + $1.toLowerCase(); }); // replace rest +} +function functionToString(fn) { + var fnStr = fnToString(fn); + var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/); + var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr; + var fnName = fn['name'] || ""; + if (fnName && toStr.match(/function \(/)) { + return 'function ' + fnName + toStr.substr(9); + } + return toStr; +} +function fnToString(fn) { + var _fn = isArray(fn) ? fn.slice(-1)[0] : fn; + return _fn && _fn.toString() || "undefined"; +} +var stringifyPatternFn = null; +var stringifyPattern = function (value) { + var isRejection = Rejection.isRejectionPromise; + stringifyPatternFn = stringifyPatternFn || pattern([ + [not(isDefined), val("undefined")], + [isNull, val("null")], + [isPromise, val("[Promise]")], + [isRejection, function (x) { return x._transitionRejection.toString(); }], + [is(Rejection), invoke("toString")], + [is(Transition), invoke("toString")], + [is(Resolvable), invoke("toString")], + [isInjectable, functionToString], + [val(true), identity] + ]); + return stringifyPatternFn(value); +}; +function stringify(o) { + var seen = []; + function format(val$$1) { + if (isObject(val$$1)) { + if (seen.indexOf(val$$1) !== -1) + return '[circular ref]'; + seen.push(val$$1); + } + return stringifyPattern(val$$1); + } + return JSON.stringify(o, function (key, val$$1) { return format(val$$1); }).replace(/\\"/g, '"'); +} +/** Returns a function that splits a string on a character or substring */ +var beforeAfterSubstr = function (char) { return function (str) { + if (!str) + return ["", ""]; + var idx = str.indexOf(char); + if (idx === -1) + return [str, ""]; + return [str.substr(0, idx), str.substr(idx + 1)]; +}; }; +var hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/'); +var stripFile = function (str) { return str.replace(/\/[^/]*$/, ''); }; +var splitHash = beforeAfterSubstr("#"); +var splitQuery = beforeAfterSubstr("?"); +var splitEqual = beforeAfterSubstr("="); +var trimHashVal = function (str) { return str ? str.replace(/^#/, "") : ""; }; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +function splitOnDelim(delim) { + var re = new RegExp("(" + delim + ")", "g"); + return function (str) { + return str.split(re).filter(identity); + }; +} + +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +function joinNeighborsR(acc, x) { + if (isString(tail(acc)) && isString(x)) + return acc.slice(0, -1).concat(tail(acc) + x); + return pushR(acc, x); +} + +/** @module common */ /** for typedoc */ + +/** + * @coreapi + * @module params + */ +/** */ +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +var ParamTypes = /** @class */ (function () { + /** @internalapi */ + function ParamTypes() { + /** @hidden */ + this.enqueue = true; + /** @hidden */ + this.typeQueue = []; + /** @internalapi */ + this.defaultTypes = pick(ParamTypes.prototype, ["hash", "string", "query", "path", "int", "bool", "date", "json", "any"]); + // Register default types. Store them in the prototype of this.types. + var makeType = function (definition, name) { + return new ParamType(extend({ name: name }, definition)); + }; + this.types = inherit(map(this.defaultTypes, makeType), {}); + } + /** @internalapi */ + ParamTypes.prototype.dispose = function () { + this.types = {}; + }; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + ParamTypes.prototype.type = function (name, definition, definitionFn) { + if (!isDefined(definition)) + return this.types[name]; + if (this.types.hasOwnProperty(name)) + throw new Error("A type named '" + name + "' has already been defined."); + this.types[name] = new ParamType(extend({ name: name }, definition)); + if (definitionFn) { + this.typeQueue.push({ name: name, def: definitionFn }); + if (!this.enqueue) + this._flushTypeQueue(); + } + return this; + }; + /** @internalapi */ + ParamTypes.prototype._flushTypeQueue = function () { + while (this.typeQueue.length) { + var type = this.typeQueue.shift(); + if (type.pattern) + throw new Error("You cannot override a type's .pattern at runtime."); + extend(this.types[type.name], services.$injector.invoke(type.def)); + } + }; + return ParamTypes; +}()); +/** @hidden */ +function initDefaultTypes() { + var makeDefaultType = function (def) { + var valToString = function (val$$1) { + return val$$1 != null ? val$$1.toString() : val$$1; + }; + var defaultTypeBase = { + encode: valToString, + decode: valToString, + is: is(String), + pattern: /.*/, + equals: function (a, b) { return a == b; }, + }; + return extend({}, defaultTypeBase, def); + }; + // Default Parameter Type Definitions + extend(ParamTypes.prototype, { + string: makeDefaultType({}), + path: makeDefaultType({ + pattern: /[^/]*/, + }), + query: makeDefaultType({}), + hash: makeDefaultType({ + inherit: false, + }), + int: makeDefaultType({ + decode: function (val$$1) { return parseInt(val$$1, 10); }, + is: function (val$$1) { + return !isNullOrUndefined(val$$1) && this.decode(val$$1.toString()) === val$$1; + }, + pattern: /-?\d+/, + }), + bool: makeDefaultType({ + encode: function (val$$1) { return val$$1 && 1 || 0; }, + decode: function (val$$1) { return parseInt(val$$1, 10) !== 0; }, + is: is(Boolean), + pattern: /0|1/, + }), + date: makeDefaultType({ + encode: function (val$$1) { + return !this.is(val$$1) ? undefined : [ + val$$1.getFullYear(), + ('0' + (val$$1.getMonth() + 1)).slice(-2), + ('0' + val$$1.getDate()).slice(-2), + ].join("-"); + }, + decode: function (val$$1) { + if (this.is(val$$1)) + return val$$1; + var match = this.capture.exec(val$$1); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function (val$$1) { return val$$1 instanceof Date && !isNaN(val$$1.valueOf()); }, + equals: function (l, r) { + return ['getFullYear', 'getMonth', 'getDate'] + .reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true); + }, + 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: makeDefaultType({ + encode: toJson, + decode: fromJson, + is: is(Object), + equals: equals, + pattern: /[^/]*/, + }), + // does not encode/decode + any: makeDefaultType({ + encode: identity, + decode: identity, + is: function () { return true; }, + equals: equals, + }), + }); +} +initDefaultTypes(); + +/** + * @coreapi + * @module params + */ +/** */ +/** @internalapi */ +var StateParams = /** @class */ (function () { + function StateParams(params) { + if (params === void 0) { params = {}; } + extend(this, params); + } + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + StateParams.prototype.$inherit = function (newParams, $current, $to) { + var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + for (var i in parents) { + if (!parents[i] || !parents[i].params) + continue; + parentParams = Object.keys(parents[i].params); + if (!parentParams.length) + continue; + for (var j in parentParams) { + if (inheritList.indexOf(parentParams[j]) >= 0) + continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = this[parentParams[j]]; + } + } + return extend({}, inherited, newParams); + }; + + return StateParams; +}()); + +/** @module path */ /** for typedoc */ + +/** @module resolve */ /** for typedoc */ + +/** @module state */ /** for typedoc */ +var parseUrl = function (url) { + if (!isString(url)) + return false; + var root$$1 = url.charAt(0) === '^'; + return { val: root$$1 ? url.substring(1) : url, root: root$$1 }; +}; +function nameBuilder(state) { + return state.name; +} +function selfBuilder(state) { + state.self.$$state = function () { return state; }; + return state.self; +} +function dataBuilder(state) { + if (state.parent && state.parent.data) { + state.data = state.self.data = inherit(state.parent.data, state.data); + } + return state.data; +} +var getUrlBuilder = function ($urlMatcherFactoryProvider, root$$1) { + return function urlBuilder(state) { + var stateDec = state; + // For future states, i.e., states whose name ends with `.**`, + // match anything that starts with the url prefix + if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\.\*\*$/)) { + stateDec.url += "{remainder:any}"; // match any path (.*) + } + var parsed = parseUrl(stateDec.url), parent = state.parent; + var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { + params: state.params || {}, + paramMap: function (paramConfig, isSearch) { + if (stateDec.reloadOnSearch === false && isSearch) + paramConfig = extend(paramConfig || {}, { dynamic: true }); + return paramConfig; + } + }); + if (!url) + return null; + if (!$urlMatcherFactoryProvider.isMatcher(url)) + throw new Error("Invalid url '" + url + "' in state '" + state + "'"); + return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root$$1()).url.append(url); + }; +}; +var getNavigableBuilder = function (isRoot) { + return function navigableBuilder(state) { + return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null); + }; +}; +var getParamsBuilder = function (paramFactory) { + return function paramsBuilder(state) { + var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, config); }; + var urlParams = (state.url && state.url.parameters({ inherit: false })) || []; + var nonUrlParams = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam)); + return urlParams.concat(nonUrlParams).map(function (p) { return [p.id, p]; }).reduce(applyPairs, {}); + }; +}; +function pathBuilder(state) { + return state.parent ? state.parent.path.concat(state) : /*root*/ [state]; +} +function includesBuilder(state) { + var includes = state.parent ? extend({}, state.parent.includes) : {}; + includes[state.name] = true; + return includes; +} +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +function resolvablesBuilder(state) { + /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */ + var objects2Tuples = function (resolveObj, resolvePolicies) { + return Object.keys(resolveObj || {}).map(function (token) { return ({ token: token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token] }); }); + }; + /** fetch DI annotations from a function or ng1-style array */ + var annotate = function (fn) { + var $injector = services.$injector; + // ng1 doesn't have an $injector until runtime. + // If the $injector doesn't exist, use "deferred" literal as a + // marker indicating they should be annotated when runtime starts + return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || "deferred"; + }; + /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */ + var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); }; + /** true if the object looks like a provide literal, or a ng2 Provider */ + var isLikeNg2Provider = function (obj) { return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); }; + /** true if the object looks like a tuple from obj2Tuples */ + var isTupleFromObj = function (obj) { return !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val))); }; + /** extracts the token from a Provider or provide literal */ + var token = function (p) { return p.provide || p.token; }; + /** Given a literal resolve or provider object, returns a Resolvable */ + var literal2Resolvable = pattern([ + [prop('resolveFn'), function (p) { return new Resolvable(token(p), p.resolveFn, p.deps, p.policy); }], + [prop('useFactory'), function (p) { return new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy); }], + [prop('useClass'), function (p) { return new Resolvable(token(p), function () { return new p.useClass(); }, [], p.policy); }], + [prop('useValue'), function (p) { return new Resolvable(token(p), function () { return p.useValue; }, [], p.policy, p.useValue); }], + [prop('useExisting'), function (p) { return new Resolvable(token(p), identity, [p.useExisting], p.policy); }], + ]); + var tuple2Resolvable = pattern([ + [pipe(prop("val"), isString), function (tuple) { return new Resolvable(tuple.token, identity, [tuple.val], tuple.policy); }], + [pipe(prop("val"), isArray), function (tuple) { return new Resolvable(tuple.token, tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }], + [pipe(prop("val"), isFunction), function (tuple) { return new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }], + ]); + var item2Resolvable = pattern([ + [is(Resolvable), function (r) { return r; }], + [isResolveLiteral, literal2Resolvable], + [isLikeNg2Provider, literal2Resolvable], + [isTupleFromObj, tuple2Resolvable], + [val(true), function (obj) { throw new Error("Invalid resolve value: " + stringify(obj)); }] + ]); + // If resolveBlock is already an array, use it as-is. + // Otherwise, assume it's an object and convert to an Array of tuples + var decl = state.resolve; + var items = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {}); + return items.map(item2Resolvable); +} +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +var StateBuilder = /** @class */ (function () { + function StateBuilder(matcher, urlMatcherFactory) { + this.matcher = matcher; + var self = this; + var root$$1 = function () { return matcher.find(""); }; + var isRoot = function (state) { return state.name === ""; }; + function parentBuilder(state) { + if (isRoot(state)) + return null; + return matcher.find(self.parentName(state)) || root$$1(); + } + this.builders = { + name: [nameBuilder], + self: [selfBuilder], + parent: [parentBuilder], + data: [dataBuilder], + // Build a URLMatcher if necessary, either via a relative or absolute URL + url: [getUrlBuilder(urlMatcherFactory, root$$1)], + // Keep track of the closest ancestor state that has a URL (i.e. is navigable) + navigable: [getNavigableBuilder(isRoot)], + params: [getParamsBuilder(urlMatcherFactory.paramFactory)], + // Each framework-specific ui-router implementation should define its own `views` builder + // e.g., src/ng1/statebuilders/views.ts + views: [], + // Keep a full path from the root down to this state as this is needed for state activation. + path: [pathBuilder], + // Speed up $state.includes() as it's used a lot + includes: [includesBuilder], + resolvables: [resolvablesBuilder] + }; + } + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + StateBuilder.prototype.builder = function (name, fn) { + var builders = this.builders; + var array = builders[name] || []; + // Backwards compat: if only one builder exists, return it, else return whole arary. + if (isString(name) && !isDefined(fn)) + return array.length > 1 ? array : array[0]; + if (!isString(name) || !isFunction(fn)) + return; + builders[name] = array; + builders[name].push(fn); + return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; }; + }; + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + StateBuilder.prototype.build = function (state) { + var _a = this, matcher = _a.matcher, builders = _a.builders; + var parent = this.parentName(state); + if (parent && !matcher.find(parent, undefined, false)) { + return null; + } + for (var key in builders) { + if (!builders.hasOwnProperty(key)) + continue; + var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, noop); + state[key] = chain(state); + } + return state; + }; + StateBuilder.prototype.parentName = function (state) { + // name = 'foo.bar.baz.**' + var name = state.name || ""; + // segments = ['foo', 'bar', 'baz', '.**'] + var segments = name.split('.'); + // segments = ['foo', 'bar', 'baz'] + var lastSegment = segments.pop(); + // segments = ['foo', 'bar'] (ignore .** segment for future states) + if (lastSegment === '**') + segments.pop(); + if (segments.length) { + if (state.parent) { + throw new Error("States that specify the 'parent:' property should not have a '.' in their name (" + name + ")"); + } + // 'foo.bar' + return segments.join("."); + } + if (!state.parent) + return ""; + return isString(state.parent) ? state.parent : state.parent.name; + }; + StateBuilder.prototype.name = function (state) { + var name = state.name; + if (name.indexOf('.') !== -1 || !state.parent) + return name; + var parentName = isString(state.parent) ? state.parent : state.parent.name; + return parentName ? parentName + "." + name : name; + }; + return StateBuilder; +}()); + +/** @module state */ /** for typedoc */ +var StateMatcher = /** @class */ (function () { + function StateMatcher(_states) { + this._states = _states; + } + StateMatcher.prototype.isRelative = function (stateName) { + stateName = stateName || ""; + return stateName.indexOf(".") === 0 || stateName.indexOf("^") === 0; + }; + StateMatcher.prototype.find = function (stateOrName, base, matchGlob) { + if (matchGlob === void 0) { matchGlob = true; } + if (!stateOrName && stateOrName !== "") + return undefined; + var isStr = isString(stateOrName); + var name = isStr ? stateOrName : stateOrName.name; + if (this.isRelative(name)) + name = this.resolvePath(name, base); + var state = this._states[name]; + if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { + return state; + } + else if (isStr && matchGlob) { + var _states = values(this._states); + var matches = _states.filter(function (state) { + return state.__stateObjectCache.nameGlob && + state.__stateObjectCache.nameGlob.matches(name); + }); + if (matches.length > 1) { + console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; })); + } + return matches[0]; + } + return undefined; + }; + StateMatcher.prototype.resolvePath = function (name, base) { + if (!base) + throw new Error("No reference point given for path '" + name + "'"); + var baseState = this.find(base); + var splitName = name.split("."), i = 0, pathLength = splitName.length, current = baseState; + for (; i < pathLength; i++) { + if (splitName[i] === "" && i === 0) { + current = baseState; + continue; + } + if (splitName[i] === "^") { + if (!current.parent) + throw new Error("Path '" + name + "' not valid for state '" + baseState.name + "'"); + current = current.parent; + continue; + } + break; + } + var relName = splitName.slice(i).join("."); + return current.name + (current.name && relName ? "." : "") + relName; + }; + return StateMatcher; +}()); + +/** @module state */ /** for typedoc */ +/** @internalapi */ +var StateQueueManager = /** @class */ (function () { + function StateQueueManager($registry, $urlRouter, states, builder, listeners) { + this.$registry = $registry; + this.$urlRouter = $urlRouter; + this.states = states; + this.builder = builder; + this.listeners = listeners; + this.queue = []; + this.matcher = $registry.matcher; + } + /** @internalapi */ + StateQueueManager.prototype.dispose = function () { + this.queue = []; + }; + StateQueueManager.prototype.register = function (stateDecl) { + var queue = this.queue; + var state = StateObject.create(stateDecl); + var name = state.name; + if (!isString(name)) + throw new Error("State must have a valid name"); + if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name)) + throw new Error("State '" + name + "' is already defined"); + queue.push(state); + this.flush(); + return state; + }; + StateQueueManager.prototype.flush = function () { + var _this = this; + var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder; + var registered = [], // states that got registered + orphans = [], // states that don't yet have a parent registered + previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered + var getState = function (name) { + return _this.states.hasOwnProperty(name) && _this.states[name]; + }; + while (queue.length > 0) { + var state = queue.shift(); + var name_1 = state.name; + var result = builder.build(state); + var orphanIdx = orphans.indexOf(state); + if (result) { + var existingState = getState(name_1); + if (existingState && existingState.name === name_1) { + throw new Error("State '" + name_1 + "' is already defined"); + } + var existingFutureState = getState(name_1 + ".**"); + if (existingFutureState) { + // Remove future state of the same name + this.$registry.deregister(existingFutureState); + } + states[name_1] = state; + this.attachRoute(state); + if (orphanIdx >= 0) + orphans.splice(orphanIdx, 1); + registered.push(state); + continue; + } + var prev = previousQueueLength[name_1]; + previousQueueLength[name_1] = queue.length; + if (orphanIdx >= 0 && prev === queue.length) { + // Wait until two consecutive iterations where no additional states were dequeued successfully. + // throw new Error(`Cannot register orphaned state '${name}'`); + queue.push(state); + return states; + } + else if (orphanIdx < 0) { + orphans.push(state); + } + queue.push(state); + } + if (registered.length) { + this.listeners.forEach(function (listener) { return listener("registered", registered.map(function (s) { return s.self; })); }); + } + return states; + }; + StateQueueManager.prototype.attachRoute = function (state) { + if (state.abstract || !state.url) + return; + this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state)); + }; + return StateQueueManager; +}()); + +/** + * @coreapi + * @module state + */ /** for typedoc */ +var StateRegistry = /** @class */ (function () { + /** @internalapi */ + function StateRegistry(_router) { + this._router = _router; + this.states = {}; + this.listeners = []; + this.matcher = new StateMatcher(this.states); + this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory); + this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners); + this._registerRoot(); + } + /** @internalapi */ + StateRegistry.prototype._registerRoot = function () { + var rootStateDef = { + name: '', + url: '^', + views: null, + params: { + '#': { value: null, type: 'hash', dynamic: true } + }, + abstract: true + }; + var _root = this._root = this.stateQueue.register(rootStateDef); + _root.navigable = null; + }; + /** @internalapi */ + StateRegistry.prototype.dispose = function () { + var _this = this; + this.stateQueue.dispose(); + this.listeners = []; + this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); }); + }; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + StateRegistry.prototype.onStatesChanged = function (listener) { + this.listeners.push(listener); + return function deregisterListener() { + removeFrom(this.listeners)(listener); + }.bind(this); + }; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + StateRegistry.prototype.root = function () { + return this._root; + }; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + StateRegistry.prototype.register = function (stateDefinition) { + return this.stateQueue.register(stateDefinition); + }; + /** @hidden */ + StateRegistry.prototype._deregisterTree = function (state) { + var _this = this; + var all$$1 = this.get().map(function (s) { return s.$$state(); }); + var getChildren = function (states) { + var children = all$$1.filter(function (s) { return states.indexOf(s.parent) !== -1; }); + return children.length === 0 ? children : children.concat(getChildren(children)); + }; + var children = getChildren([state]); + var deregistered = [state].concat(children).reverse(); + deregistered.forEach(function (state) { + var $ur = _this._router.urlRouter; + // Remove URL rule + $ur.rules().filter(propEq("state", state)).forEach($ur.removeRule.bind($ur)); + // Remove state from registry + delete _this.states[state.name]; + }); + return deregistered; + }; + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + StateRegistry.prototype.deregister = function (stateOrName) { + var _state = this.get(stateOrName); + if (!_state) + throw new Error("Can't deregister state; not found: " + stateOrName); + var deregisteredStates = this._deregisterTree(_state.$$state()); + this.listeners.forEach(function (listener) { return listener("deregistered", deregisteredStates.map(function (s) { return s.self; })); }); + return deregisteredStates; + }; + StateRegistry.prototype.get = function (stateOrName, base) { + var _this = this; + if (arguments.length === 0) + return Object.keys(this.states).map(function (name) { return _this.states[name].self; }); + var found = this.matcher.find(stateOrName, base); + return found && found.self || null; + }; + StateRegistry.prototype.decorator = function (name, func) { + return this.builder.builder(name, func); + }; + return StateRegistry; +}()); + +/** + * @coreapi + * @module url + */ +/** for typedoc */ +/** @hidden */ +function quoteRegExp(string, param) { + var surroundPattern = ['', ''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!param) + return result; + switch (param.squash) { + case false: + surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; + break; + case true: + result = result.replace(/\/$/, ''); + surroundPattern = ['(?:\/(', ')|\/)?']; + break; + default: + surroundPattern = ["(" + param.squash + "|", ')?']; + break; + } + return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1]; +} +/** @hidden */ +var memoizeTo = function (obj, prop$$1, fn) { + return obj[prop$$1] = obj[prop$$1] || fn(); +}; +/** @hidden */ +var splitOnSlash = splitOnDelim('/'); +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +var UrlMatcher = /** @class */ (function () { + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + function UrlMatcher(pattern$$1, paramTypes, paramFactory, config) { + var _this = this; + this.config = config; + /** @hidden */ + this._cache = { path: [this] }; + /** @hidden */ + this._children = []; + /** @hidden */ + this._params = []; + /** @hidden */ + this._segments = []; + /** @hidden */ + this._compiled = []; + this.pattern = pattern$$1; + this.config = defaults(this.config, { + params: {}, + strict: true, + caseInsensitive: false, + paramMap: identity + }); + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, last = 0, m, patterns = []; + var checkParamErrors = function (id) { + if (!UrlMatcher.nameValidator.test(id)) + throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern$$1 + "'"); + if (find(_this._params, propEq('id', id))) + throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern$$1 + "'"); + }; + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + var matchDetails = function (m, isSearch) { + // IE[78] returns '' for unmatched groups instead of null + var id = m[2] || m[3]; + var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\s\\S]*' : null); + var makeRegexpType = function (regexp) { return inherit(paramTypes.type(isSearch ? "query" : "path"), { + pattern: new RegExp(regexp, _this.config.caseInsensitive ? 'i' : undefined) + }); }; + return { + id: id, + regexp: regexp, + cfg: _this.config.params[id], + segment: pattern$$1.substring(last, m.index), + type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp) + }; + }; + var p, segment; + while ((m = placeholder.exec(pattern$$1))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) + break; // we're into the search part + checkParamErrors(p.id); + this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false))); + this._segments.push(p.segment); + patterns.push([p.segment, tail(this._params)]); + last = placeholder.lastIndex; + } + segment = pattern$$1.substring(last); + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + if (i >= 0) { + var search = segment.substring(i); + segment = segment.substring(0, i); + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + checkParamErrors(p.id); + this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true))); + last = placeholder.lastIndex; + // check if ?& + } + } + } + this._segments.push(segment); + this._compiled = patterns.map(function (pattern$$1) { return quoteRegExp.apply(null, pattern$$1); }).concat(quoteRegExp(segment)); + } + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + UrlMatcher.prototype.append = function (url) { + this._children.push(url); + url._cache = { + path: this._cache.path.concat(url), + parent: this, + pattern: null, + }; + return url; + }; + /** @hidden */ + UrlMatcher.prototype.isRoot = function () { + return this._cache.path[0] === this; + }; + /** Returns the input pattern string */ + UrlMatcher.prototype.toString = function () { + return this.pattern; + }; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + UrlMatcher.prototype.exec = function (path, search, hash, options) { + var _this = this; + if (search === void 0) { search = {}; } + if (options === void 0) { options = {}; } + var match = memoizeTo(this._cache, 'pattern', function () { + return new RegExp([ + '^', + unnest(_this._cache.path.map(prop('_compiled'))).join(''), + _this.config.strict === false ? '\/?' : '', + '$' + ].join(''), _this.config.caseInsensitive ? 'i' : undefined); + }).exec(path); + if (!match) + return null; + //options = defaults(options, { isolate: false }); + var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values$$1 = {}; + if (nPathSegments !== match.length - 1) + throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); + function decodePathArray(string) { + var reverseString = function (str) { return str.split("").reverse().join(""); }; + var unquoteDashes = function (str) { return str.replace(/\\-/g, "-"); }; + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = map(split, reverseString); + return map(allReversed, unquoteDashes).reverse(); + } + for (var i = 0; i < nPathSegments; i++) { + var param = pathParams[i]; + var value = match[i + 1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (value && param.array === true) + value = decodePathArray(value); + if (isDefined(value)) + value = param.type.decode(value); + values$$1[param.id] = param.value(value); + } + searchParams.forEach(function (param) { + var value = search[param.id]; + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (isDefined(value)) + value = param.type.decode(value); + values$$1[param.id] = param.value(value); + }); + if (hash) + values$$1["#"] = hash; + return values$$1; + }; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + UrlMatcher.prototype.parameters = function (opts) { + if (opts === void 0) { opts = {}; } + if (opts.inherit === false) + return this._params; + return unnest(this._cache.path.map(function (matcher) { return matcher._params; })); + }; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + UrlMatcher.prototype.parameter = function (id, opts) { + var _this = this; + if (opts === void 0) { opts = {}; } + var findParam = function () { + for (var _i = 0, _a = _this._params; _i < _a.length; _i++) { + var param = _a[_i]; + if (param.id === id) + return param; + } + }; + var parent = this._cache.parent; + return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null; + }; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + UrlMatcher.prototype.validates = function (params) { + var validParamVal = function (param, val$$1) { + return !param || param.validates(val$$1); + }; + params = params || {}; + // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher + var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); }); + return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(allTrueR, true); + }; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + UrlMatcher.prototype.format = function (values$$1) { + if (values$$1 === void 0) { values$$1 = {}; } + // Build the full path of UrlMatchers (including all parent UrlMatchers) + var urlMatchers = this._cache.path; + // Extract all the static segments and Params (processed as ParamDetails) + // into an ordered array + var pathSegmentsAndParams = urlMatchers.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .map(function (x) { return isString(x) ? x : getDetails(x); }); + // Extract the query params into a separate array + var queryParams = urlMatchers.map(UrlMatcher.queryParams) + .reduce(unnestR, []) + .map(getDetails); + var isInvalid = function (param) { return param.isValid === false; }; + if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) { + return null; + } + /** + * Given a Param, applies the parameter value, then returns detailed information about it + */ + function getDetails(param) { + // Normalize to typed value + var value = param.value(values$$1[param.id]); + var isValid = param.validates(value); + var isDefaultValue = param.isDefaultValue(value); + // Check if we're in squash mode for the parameter + var squash = isDefaultValue ? param.squash : false; + // Allow the Parameter's Type to encode the value + var encoded = param.type.encode(value); + return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded }; + } + // Build up the path-portion from the list of static segments and parameters + var pathString = pathSegmentsAndParams.reduce(function (acc, x) { + // The element is a static segment (a raw string); just append it + if (isString(x)) + return acc + x; + // Otherwise, it's a ParamDetails. + var squash = x.squash, encoded = x.encoded, param = x.param; + // If squash is === true, try to remove a slash from the path + if (squash === true) + return (acc.match(/\/$/)) ? acc.slice(0, -1) : acc; + // If squash is a string, use the string for the param value + if (isString(squash)) + return acc + squash; + if (squash !== false) + return acc; // ? + if (encoded == null) + return acc; + // If this parameter value is an array, encode the value using encodeDashes + if (isArray(encoded)) + return acc + map(encoded, UrlMatcher.encodeDashes).join("-"); + // If the parameter type is "raw", then do not encodeURIComponent + if (param.raw) + return acc + encoded; + // Encode the value + return acc + encodeURIComponent(encoded); + }, ""); + // Build the query string by applying parameter values (array or regular) + // then mapping to key=value, then flattening and joining using "&" + var queryString = queryParams.map(function (paramDetails) { + var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue; + if (encoded == null || (isDefaultValue && squash !== false)) + return; + if (!isArray(encoded)) + encoded = [encoded]; + if (encoded.length === 0) + return; + if (!param.raw) + encoded = map(encoded, encodeURIComponent); + return encoded.map(function (val$$1) { return param.id + "=" + val$$1; }); + }).filter(identity).reduce(unnestR, []).join("&"); + // Concat the pathstring with the queryString (if exists) and the hashString (if exists) + return pathString + (queryString ? "?" + queryString : "") + (values$$1["#"] ? "#" + values$$1["#"] : ""); + }; + /** @hidden */ + UrlMatcher.encodeDashes = function (str) { + return encodeURIComponent(str).replace(/-/g, function (c) { return "%5C%" + c.charCodeAt(0).toString(16).toUpperCase(); }); + }; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + UrlMatcher.pathSegmentsAndParams = function (matcher) { + var staticSegments = matcher._segments; + var pathParams = matcher._params.filter(function (p) { return p.location === exports.DefType.PATH; }); + return arrayTuples(staticSegments, pathParams.concat(undefined)) + .reduce(unnestR, []) + .filter(function (x) { return x !== "" && isDefined(x); }); + }; + /** @hidden Given a matcher, return an array with the matcher's query params */ + UrlMatcher.queryParams = function (matcher) { + return matcher._params.filter(function (p) { return p.location === exports.DefType.SEARCH; }); + }; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + UrlMatcher.compare = function (a, b) { + /** + * Turn a UrlMatcher and all its parent matchers into an array + * of slash literals '/', string literals, and Param objects + * + * This example matcher matches strings like "/foo/:param/tail": + * var matcher = $umf.compile("/foo").append($umf.compile("/:param")).append($umf.compile("/")).append($umf.compile("tail")); + * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ] + * + * Caches the result as `matcher._cache.segments` + */ + var segments = function (matcher) { + return matcher._cache.segments = matcher._cache.segments || + matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .reduce(joinNeighborsR, []) + .map(function (x) { return isString(x) ? splitOnSlash(x) : x; }) + .reduce(unnestR, []); + }; + /** + * Gets the sort weight for each segment of a UrlMatcher + * + * Caches the result as `matcher._cache.weights` + */ + var weights = function (matcher) { + return matcher._cache.weights = matcher._cache.weights || + segments(matcher).map(function (segment) { + // Sort slashes first, then static strings, the Params + if (segment === '/') + return 1; + if (isString(segment)) + return 2; + if (segment instanceof Param) + return 3; + }); + }; + /** + * Pads shorter array in-place (mutates) + */ + var padArrays = function (l, r, padVal) { + var len = Math.max(l.length, r.length); + while (l.length < len) + l.push(padVal); + while (r.length < len) + r.push(padVal); + }; + var weightsA = weights(a), weightsB = weights(b); + padArrays(weightsA, weightsB, 0); + var cmp, i, pairs$$1 = arrayTuples(weightsA, weightsB); + for (i = 0; i < pairs$$1.length; i++) { + cmp = pairs$$1[i][0] - pairs$$1[i][1]; + if (cmp !== 0) + return cmp; + } + return 0; + }; + /** @hidden */ + UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/; + return UrlMatcher; +}()); + +/** + * @internalapi + * @module url + */ /** for typedoc */ +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +var UrlMatcherFactory = /** @class */ (function () { + function UrlMatcherFactory() { + var _this = this; + /** @hidden */ this.paramTypes = new ParamTypes(); + /** @hidden */ this._isCaseInsensitive = false; + /** @hidden */ this._isStrictMode = true; + /** @hidden */ this._defaultSquashPolicy = false; + /** @hidden */ + this._getConfig = function (config) { + return extend({ strict: _this._isStrictMode, caseInsensitive: _this._isCaseInsensitive }, config); + }; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + this.paramFactory = { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig: function (id, type, config) { + return new Param(id, type, config, exports.DefType.CONFIG, _this); + }, + /** Creates a new [[Param]] from a url PATH */ + fromPath: function (id, type, config) { + return new Param(id, type, config, exports.DefType.PATH, _this); + }, + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch: function (id, type, config) { + return new Param(id, type, config, exports.DefType.SEARCH, _this); + }, + }; + extend(this, { UrlMatcher: UrlMatcher, Param: Param }); + } + /** @inheritdoc */ + UrlMatcherFactory.prototype.caseInsensitive = function (value) { + return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.strictMode = function (value) { + return this._isStrictMode = isDefined(value) ? value : this._isStrictMode; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.defaultSquashPolicy = function (value) { + if (isDefined(value) && value !== true && value !== false && !isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy; + }; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + UrlMatcherFactory.prototype.compile = function (pattern, config) { + return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config)); + }; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + UrlMatcherFactory.prototype.isMatcher = function (object) { + // TODO: typeof? + if (!isObject(object)) + return false; + var result = true; + forEach(UrlMatcher.prototype, function (val, name) { + if (isFunction(val)) + result = result && (isDefined(object[name]) && isFunction(object[name])); + }); + return result; + }; + + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + UrlMatcherFactory.prototype.type = function (name, definition, definitionFn) { + var type = this.paramTypes.type(name, definition, definitionFn); + return !isDefined(definition) ? type : this; + }; + + /** @hidden */ + UrlMatcherFactory.prototype.$get = function () { + this.paramTypes.enqueue = false; + this.paramTypes._flushTypeQueue(); + return this; + }; + + /** @internalapi */ + UrlMatcherFactory.prototype.dispose = function () { + this.paramTypes.dispose(); + }; + return UrlMatcherFactory; +}()); + +/** + * @coreapi + * @module url + */ /** */ +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +var UrlRuleFactory = /** @class */ (function () { + function UrlRuleFactory(router) { + this.router = router; + } + UrlRuleFactory.prototype.compile = function (str) { + return this.router.urlMatcherFactory.compile(str); + }; + UrlRuleFactory.prototype.create = function (what, handler) { + var _this = this; + var makeRule = pattern([ + [isString, function (_what) { return makeRule(_this.compile(_what)); }], + [is(UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }], + [isState, function (_what) { return _this.fromState(_what, _this.router); }], + [is(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }], + [isFunction, function (_what) { return new BaseUrlRule(_what, handler); }], + ]); + var rule = makeRule(what); + if (!rule) + throw new Error("invalid 'what' in when()"); + return rule; + }; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) { + var _handler = handler; + if (isString(handler)) + handler = this.router.urlMatcherFactory.compile(handler); + if (is(UrlMatcher)(handler)) + _handler = function (match) { return handler.format(match); }; + function match(url) { + var match = urlMatcher.exec(url.path, url.search, url.hash); + return urlMatcher.validates(match) && match; + } + // Prioritize URLs, lowest to highest: + // - Some optional URL parameters, but none matched + // - No optional parameters in URL + // - Some optional parameters, some matched + // - Some optional parameters, all matched + function matchPriority(params) { + var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; }); + if (!optional.length) + return 0.000001; + var matched = optional.filter(function (param) { return params[param.id]; }); + return matched.length / optional.length; + } + var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: "URLMATCHER" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + UrlRuleFactory.prototype.fromState = function (state, router) { + /** + * Handles match by transitioning to matched state + * + * First checks if the router should start a new transition. + * A new transition is not required if the current state's URL + * and the new URL are already identical + */ + var handler = function (match) { + var $state = router.stateService; + var globals = router.globals; + if ($state.href(state, match) !== $state.href(globals.current, globals.params)) { + $state.transitionTo(state, match, { inherit: true, source: "url" }); + } + }; + var details = { state: state, type: "STATE" }; + return extend(this.fromUrlMatcher(state.url, handler), details); + }; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) { + if (regexp.global || regexp.sticky) + throw new Error("Rule RegExp must not be global or sticky"); + /** + * If handler is a string, the url will be replaced by the string. + * If the string has any String.replace() style variables in it (like `$2`), + * they will be replaced by the captures from [[match]] + */ + var redirectUrlTo = function (match) { + // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern + return handler.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + }; + var _handler = isString(handler) ? redirectUrlTo : handler; + var match = function (url) { + return regexp.exec(url.path); + }; + var details = { regexp: regexp, type: "REGEXP" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + UrlRuleFactory.isUrlRule = function (obj) { + return obj && ['type', 'match', 'handler'].every(function (key) { return isDefined(obj[key]); }); + }; + return UrlRuleFactory; +}()); +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +var BaseUrlRule = /** @class */ (function () { + function BaseUrlRule(match, handler) { + var _this = this; + this.match = match; + this.type = "RAW"; + this.matchPriority = function (match) { return 0 - _this.$id; }; + this.handler = handler || identity; + } + return BaseUrlRule; +}()); + +/** + * @internalapi + * @module url + */ +/** for typedoc */ +/** @hidden */ +function appendBasePath(url, isHtml5, absolute, baseHref) { + if (baseHref === '/') + return url; + if (isHtml5) + return stripFile(baseHref) + url; + if (absolute) + return baseHref.slice(1) + url; + return url; +} +/** @hidden */ +var prioritySort = function (a, b) { + return (b.priority || 0) - (a.priority || 0); +}; +/** @hidden */ +var typeSort = function (a, b) { + var weights = { "STATE": 4, "URLMATCHER": 4, "REGEXP": 3, "RAW": 2, "OTHER": 1 }; + return (weights[a.type] || 0) - (weights[b.type] || 0); +}; +/** @hidden */ +var urlMatcherSort = function (a, b) { + return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher); +}; +/** @hidden */ +var idSort = function (a, b) { + // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL + var useMatchPriority = { STATE: true, URLMATCHER: true }; + var equal = useMatchPriority[a.type] && useMatchPriority[b.type]; + return equal ? 0 : (a.$id || 0) - (b.$id || 0); +}; +/** + * Default rule priority sorting function. + * + * Sorts rules by: + * + * - Explicit priority (set rule priority using [[UrlRulesApi.when]]) + * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1) + * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule. + * - Rule registration order (for rule types other than STATE and URLMATCHER) + * - Equally sorted State and UrlMatcher rules will each match the URL. + * Then, the *best* match is chosen based on how many parameter values were matched. + * + * @coreapi + */ +var defaultRuleSortFn; +defaultRuleSortFn = function (a, b) { + var cmp = prioritySort(a, b); + if (cmp !== 0) + return cmp; + cmp = typeSort(a, b); + if (cmp !== 0) + return cmp; + cmp = urlMatcherSort(a, b); + if (cmp !== 0) + return cmp; + return idSort(a, b); +}; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +var UrlRouter = /** @class */ (function () { + /** @hidden */ + function UrlRouter(router) { + /** @hidden */ this._sortFn = defaultRuleSortFn; + /** @hidden */ this._rules = []; + /** @hidden */ this.interceptDeferred = false; + /** @hidden */ this._id = 0; + /** @hidden */ this._sorted = false; + this._router = router; + this.urlRuleFactory = new UrlRuleFactory(router); + createProxyFunctions(val(UrlRouter.prototype), this, val(this)); + } + /** @internalapi */ + UrlRouter.prototype.dispose = function () { + this.listen(false); + this._rules = []; + delete this._otherwiseFn; + }; + /** @inheritdoc */ + UrlRouter.prototype.sort = function (compareFn) { + this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn); + this._sorted = true; + }; + UrlRouter.prototype.ensureSorted = function () { + this._sorted || this.sort(); + }; + UrlRouter.prototype.stableSort = function (arr, compareFn) { + var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); }); + arrOfWrapper.sort(function (wrapperA, wrapperB) { + var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem); + return cmpDiff === 0 + ? wrapperA.idx - wrapperB.idx + : cmpDiff; + }); + return arrOfWrapper.map(function (wrapper) { return wrapper.elem; }); + }; + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + UrlRouter.prototype.match = function (url) { + var _this = this; + this.ensureSorted(); + url = extend({ path: '', search: {}, hash: '' }, url); + var rules = this.rules(); + if (this._otherwiseFn) + rules.push(this._otherwiseFn); + // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined + var checkRule = function (rule) { + var match = rule.match(url, _this._router); + return match && { match: match, rule: rule, weight: rule.matchPriority(match) }; + }; + // The rules are pre-sorted. + // - Find the first matching rule. + // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`. + // - Choose the rule with the highest match weight. + var best; + for (var i = 0; i < rules.length; i++) { + // Stop when there is a 'best' rule and the next rule sorts differently than it. + if (best && this._sortFn(rules[i], best.rule) !== 0) + break; + var current = checkRule(rules[i]); + // Pick the best MatchResult + best = (!best || current && current.weight > best.weight) ? current : best; + } + return best; + }; + /** @inheritdoc */ + UrlRouter.prototype.sync = function (evt) { + if (evt && evt.defaultPrevented) + return; + var router = this._router, $url = router.urlService, $state = router.stateService; + var url = { + path: $url.path(), search: $url.search(), hash: $url.hash(), + }; + var best = this.match(url); + var applyResult = pattern([ + [isString, function (newurl) { return $url.url(newurl, true); }], + [TargetState.isDef, function (def) { return $state.go(def.state, def.params, def.options); }], + [is(TargetState), function (target) { return $state.go(target.state(), target.params(), target.options()); }], + ]); + applyResult(best && best.rule.handler(best.match, url, router)); + }; + /** @inheritdoc */ + UrlRouter.prototype.listen = function (enabled) { + var _this = this; + if (enabled === false) { + this._stopFn && this._stopFn(); + delete this._stopFn; + } + else { + return this._stopFn = this._stopFn || this._router.urlService.onChange(function (evt) { return _this.sync(evt); }); + } + }; + /** + * Internal API. + * @internalapi + */ + UrlRouter.prototype.update = function (read) { + var $url = this._router.locationService; + if (read) { + this.location = $url.path(); + return; + } + if ($url.path() === this.location) + return; + $url.url(this.location, true); + }; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + UrlRouter.prototype.push = function (urlMatcher, params, options) { + var replace = options && !!options.replace; + this._router.urlService.url(urlMatcher.format(params || {}), replace); + }; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + UrlRouter.prototype.href = function (urlMatcher, params, options) { + var url = urlMatcher.format(params); + if (url == null) + return null; + options = options || { absolute: false }; + var cfg = this._router.urlService.config; + var isHtml5 = cfg.html5Mode(); + if (!isHtml5 && url !== null) { + url = "#" + cfg.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref()); + if (!options.absolute || !url) { + return url; + } + var slash = (!isHtml5 && url ? '/' : ''), port = cfg.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + return [cfg.protocol(), '://', cfg.host(), port, slash, url].join(''); + }; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + UrlRouter.prototype.rule = function (rule) { + var _this = this; + if (!UrlRuleFactory.isUrlRule(rule)) + throw new Error("invalid rule"); + rule.$id = this._id++; + rule.priority = rule.priority || 0; + this._rules.push(rule); + this._sorted = false; + return function () { return _this.removeRule(rule); }; + }; + /** @inheritdoc */ + UrlRouter.prototype.removeRule = function (rule) { + removeFrom(this._rules, rule); + }; + /** @inheritdoc */ + UrlRouter.prototype.rules = function () { + this.ensureSorted(); + return this._rules.slice(); + }; + /** @inheritdoc */ + UrlRouter.prototype.otherwise = function (handler) { + var handlerFn = getHandlerFn(handler); + this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn); + this._sorted = false; + }; + + /** @inheritdoc */ + UrlRouter.prototype.initial = function (handler) { + var handlerFn = getHandlerFn(handler); + var matchFn = function (urlParts, router) { + return router.globals.transitionHistory.size() === 0 && !!/^\/?$/.exec(urlParts.path); + }; + this.rule(this.urlRuleFactory.create(matchFn, handlerFn)); + }; + + /** @inheritdoc */ + UrlRouter.prototype.when = function (matcher, handler, options) { + var rule = this.urlRuleFactory.create(matcher, handler); + if (isDefined(options && options.priority)) + rule.priority = options.priority; + this.rule(rule); + return rule; + }; + + /** @inheritdoc */ + UrlRouter.prototype.deferIntercept = function (defer) { + if (defer === undefined) + defer = true; + this.interceptDeferred = defer; + }; + + return UrlRouter; +}()); +function getHandlerFn(handler) { + if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) { + throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property"); + } + return isFunction(handler) ? handler : val(handler); +} + +/** + * @coreapi + * @module view + */ /** for typedoc */ +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +var ViewService = /** @class */ (function () { + function ViewService() { + var _this = this; + this._uiViews = []; + this._viewConfigs = []; + this._viewConfigFactories = {}; + this._pluginapi = { + _rootViewContext: this._rootViewContext.bind(this), + _viewConfigFactory: this._viewConfigFactory.bind(this), + _registeredUIViews: function () { return _this._uiViews; }, + _activeViewConfigs: function () { return _this._viewConfigs; }, + }; + } + ViewService.prototype._rootViewContext = function (context) { + return this._rootContext = context || this._rootContext; + }; + + ViewService.prototype._viewConfigFactory = function (viewType, factory) { + this._viewConfigFactories[viewType] = factory; + }; + ViewService.prototype.createViewConfig = function (path, decl) { + var cfgFactory = this._viewConfigFactories[decl.$type]; + if (!cfgFactory) + throw new Error("ViewService: No view config factory registered for type " + decl.$type); + var cfgs = cfgFactory(path, decl); + return isArray(cfgs) ? cfgs : [cfgs]; + }; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + ViewService.prototype.deactivateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("<- Removing", viewConfig); + removeFrom(this._viewConfigs, viewConfig); + }; + ViewService.prototype.activateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("-> Registering", viewConfig); + this._viewConfigs.push(viewConfig); + }; + ViewService.prototype.sync = function () { + var _this = this; + var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {}); + // Return a weighted depth value for a uiView. + // The depth is the nesting depth of ui-views (based on FQN; times 10,000) + // plus the depth of the state that is populating the uiView + function uiViewDepth(uiView) { + var stateDepth = function (context) { + return context && context.parent ? stateDepth(context.parent) + 1 : 1; + }; + return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext); + } + // Return the ViewConfig's context's depth in the context tree. + function viewConfigDepth(config) { + var context = config.viewDecl.$context, count = 0; + while (++count && context.parent) + context = context.parent; + return count; + } + // Given a depth function, returns a compare function which can return either ascending or descending order + var depthCompare = curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); }); + var matchingConfigPair = function (uiView) { + var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView)); + if (matchingConfigs.length > 1) { + // This is OK. Child states can target a ui-view that the parent state also targets (the child wins) + // Sort by depth and return the match from the deepest child + // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs); + matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending + } + return [uiView, matchingConfigs[0]]; + }; + var configureUIView = function (_a) { + var uiView = _a[0], viewConfig = _a[1]; + // If a parent ui-view is reconfigured, it could destroy child ui-views. + // Before configuring a child ui-view, make sure it's still in the active uiViews array. + if (_this._uiViews.indexOf(uiView) !== -1) + uiView.configUpdated(viewConfig); + }; + // Sort views by FQN and state depth. Process uiviews nearest the root first. + var pairs$$1 = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair); + trace.traceViewSync(pairs$$1); + pairs$$1.forEach(configureUIView); + }; + + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + ViewService.prototype.registerUIView = function (uiView) { + trace.traceViewServiceUIViewEvent("-> Registering", uiView); + var uiViews = this._uiViews; + var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; }; + if (uiViews.filter(fqnAndTypeMatches).length) + trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:", uiView); + uiViews.push(uiView); + this.sync(); + return function () { + var idx = uiViews.indexOf(uiView); + if (idx === -1) { + trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView", uiView); + return; + } + trace.traceViewServiceUIViewEvent("<- Deregistering", uiView); + removeFrom(uiViews)(uiView); + }; + }; + + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.available = function () { + return this._uiViews.map(prop("fqn")); + }; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.active = function () { + return this._uiViews.filter(prop("$config")).map(prop("name")); + }; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + ViewService.normalizeUIViewTarget = function (context, rawViewName) { + if (rawViewName === void 0) { rawViewName = ""; } + // TODO: Validate incoming view name with a regexp to allow: + // ex: "view.name@foo.bar" , "^.^.view.name" , "view.name@^.^" , "" , + // "@" , "$default@^" , "!$default.$default" , "!foo.bar" + var viewAtContext = rawViewName.split("@"); + var uiViewName = viewAtContext[0] || "$default"; // default to unnamed view + var uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : "^"; // default to parent context + // Handle relative view-name sugar syntax. + // Matches rawViewName "^.^.^.foo.bar" into array: ["^.^.^.foo.bar", "^.^.^", "foo.bar"], + var relativeViewNameSugar = /^(\^(?:\.\^)*)\.(.*$)/.exec(uiViewName); + if (relativeViewNameSugar) { + // Clobbers existing contextAnchor (rawViewName validation will fix this) + uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to "^.^.^" + uiViewName = relativeViewNameSugar[2]; // set view-name to "foo.bar" + } + if (uiViewName.charAt(0) === '!') { + uiViewName = uiViewName.substr(1); + uiViewContextAnchor = ""; // target absolutely from root + } + // handle parent relative targeting "^.^.^" + var relativeMatch = /^(\^(?:\.\^)*)$/; + if (relativeMatch.exec(uiViewContextAnchor)) { + var anchor = uiViewContextAnchor.split(".").reduce((function (anchor, x) { return anchor.parent; }), context); + uiViewContextAnchor = anchor.name; + } + else if (uiViewContextAnchor === '.') { + uiViewContextAnchor = context.name; + } + return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor }; + }; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) { + // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc + if (uiView.$type !== viewConfig.viewDecl.$type) + return false; + // Split names apart from both viewConfig and uiView into segments + var vc = viewConfig.viewDecl; + var vcSegments = vc.$uiViewName.split("."); + var uivSegments = uiView.fqn.split("."); + // Check if the tails of the segment arrays match. ex, these arrays' tails match: + // vc: ["foo", "bar"], uiv fqn: ["$default", "foo", "bar"] + if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length))) + return false; + // Now check if the fqn ending at the first segment of the viewConfig matches the context: + // ["$default", "foo"].join(".") == "$default.foo", does the ui-view $default.foo context match? + var negOffset = (1 - vcSegments.length) || undefined; + var fqnToFirstSegment = uivSegments.slice(0, negOffset).join("."); + var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext; + return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name); + }; }; + return ViewService; +}()); + +/** + * @coreapi + * @module core + */ /** */ +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +var UIRouterGlobals = /** @class */ (function () { + function UIRouterGlobals() { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + this.params = new StateParams(); + /** @internalapi */ + this.lastStartedTransitionId = -1; + /** @internalapi */ + this.transitionHistory = new Queue([], 1); + /** @internalapi */ + this.successfulTransitions = new Queue([], 1); + } + UIRouterGlobals.prototype.dispose = function () { + this.transitionHistory.clear(); + this.successfulTransitions.clear(); + this.transition = null; + }; + return UIRouterGlobals; +}()); + +/** + * @coreapi + * @module url + */ /** */ +/** @hidden */ +var makeStub = function (keys) { + return keys.reduce(function (acc, key) { return (acc[key] = notImplemented(key), acc); }, { dispose: noop }); +}; +/** @hidden */ var locationServicesFns = ["url", "path", "search", "hash", "onChange"]; +/** @hidden */ var locationConfigFns = ["port", "protocol", "host", "baseHref", "html5Mode", "hashPrefix"]; +/** @hidden */ var umfFns = ["type", "caseInsensitive", "strictMode", "defaultSquashPolicy"]; +/** @hidden */ var rulesFns = ["sort", "when", "initial", "otherwise", "rules", "rule", "removeRule"]; +/** @hidden */ var syncFns = ["deferIntercept", "listen", "sync", "match"]; +/** + * API for URL management + */ +var UrlService = /** @class */ (function () { + /** @hidden */ + function UrlService(router, lateBind) { + if (lateBind === void 0) { lateBind = true; } + this.router = router; + this.rules = {}; + this.config = {}; + // proxy function calls from UrlService to the LocationService/LocationConfig + var locationServices = function () { return router.locationService; }; + createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind); + var locationConfig = function () { return router.locationConfig; }; + createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind); + var umf = function () { return router.urlMatcherFactory; }; + createProxyFunctions(umf, this.config, umf, umfFns); + var urlRouter = function () { return router.urlRouter; }; + createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns); + createProxyFunctions(urlRouter, this, urlRouter, syncFns); + } + UrlService.prototype.url = function (newurl, replace, state) { return; }; + + /** @inheritdoc */ + UrlService.prototype.path = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.search = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.hash = function () { return; }; + + /** @inheritdoc */ + UrlService.prototype.onChange = function (callback) { return; }; + + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + UrlService.prototype.parts = function () { + return { path: this.path(), search: this.search(), hash: this.hash() }; + }; + UrlService.prototype.dispose = function () { }; + /** @inheritdoc */ + UrlService.prototype.sync = function (evt) { return; }; + /** @inheritdoc */ + UrlService.prototype.listen = function (enabled) { return; }; + + /** @inheritdoc */ + UrlService.prototype.deferIntercept = function (defer) { return; }; + /** @inheritdoc */ + UrlService.prototype.match = function (urlParts) { return; }; + /** @hidden */ + UrlService.locationServiceStub = makeStub(locationServicesFns); + /** @hidden */ + UrlService.locationConfigStub = makeStub(locationConfigFns); + return UrlService; +}()); + +/** + * @coreapi + * @module core + */ /** */ +/** @hidden */ +var _routerInstance = 0; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +var UIRouter = /** @class */ (function () { + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + function UIRouter(locationService, locationConfig) { + if (locationService === void 0) { locationService = UrlService.locationServiceStub; } + if (locationConfig === void 0) { locationConfig = UrlService.locationConfigStub; } + this.locationService = locationService; + this.locationConfig = locationConfig; + /** @hidden */ this.$id = _routerInstance++; + /** @hidden */ this._disposed = false; + /** @hidden */ this._disposables = []; + /** Provides trace information to the console */ + this.trace = trace; + /** Provides services related to ui-view synchronization */ + this.viewService = new ViewService(); + /** Provides services related to Transitions */ + this.transitionService = new TransitionService(this); + /** Global router state */ + this.globals = new UIRouterGlobals(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlMatcherFactory = new UrlMatcherFactory(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlRouter = new UrlRouter(this); + /** Provides a registry for states, and related registration services */ + this.stateRegistry = new StateRegistry(this); + /** Provides services related to states */ + this.stateService = new StateService(this); + /** Provides services related to the URL */ + this.urlService = new UrlService(this); + /** @hidden */ + 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(locationService); + this.disposable(locationConfig); + } + /** Registers an object to be notified when the router is disposed */ + UIRouter.prototype.disposable = function (disposable) { + this._disposables.push(disposable); + }; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + UIRouter.prototype.dispose = function (disposable) { + var _this = this; + if (disposable && isFunction(disposable.dispose)) { + disposable.dispose(this); + return undefined; + } + this._disposed = true; + this._disposables.slice().forEach(function (d) { + try { + typeof d.dispose === 'function' && d.dispose(_this); + removeFrom(_this._disposables, d); + } + catch (ignored) { } + }); + }; + /** + * Adds a plugin to UI-Router + * + * This method adds a UI-Router Plugin. + * A plugin can enhance or change UI-Router behavior using any public API. + * + * #### Example: + * ```js + * import { MyCoolPlugin } from "ui-router-cool-plugin"; + * + * var plugin = router.addPlugin(MyCoolPlugin); + * ``` + * + * ### Plugin authoring + * + * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object. + * + * The plugin can implement its functionality using any of the public APIs of [[UIRouter]]. + * For example, it may configure router options or add a Transition Hook. + * + * The plugin can then be published as a separate module. + * + * #### Example: + * ```js + * export class MyAuthPlugin implements UIRouterPlugin { + * constructor(router: UIRouter, options: any) { + * this.name = "MyAuthPlugin"; + * let $transitions = router.transitionService; + * let $state = router.stateService; + * + * let authCriteria = { + * to: (state) => state.data && state.data.requiresAuth + * }; + * + * function authHook(transition: Transition) { + * let authService = transition.injector().get('AuthService'); + * if (!authService.isAuthenticated()) { + * return $state.target('login'); + * } + * } + * + * $transitions.onStart(authCriteria, authHook); + * } + * } + * ``` + * + * @param plugin one of: + * - a plugin class which implements [[UIRouterPlugin]] + * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance + * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance + * @param options options to pass to the plugin class/factory + * @returns the registered plugin instance + */ + UIRouter.prototype.plugin = function (plugin, options) { + if (options === void 0) { options = {}; } + var pluginInstance = new plugin(this, options); + if (!pluginInstance.name) + throw new Error("Required property `name` missing on plugin: " + pluginInstance); + this._disposables.push(pluginInstance); + return this._plugins[pluginInstance.name] = pluginInstance; + }; + UIRouter.prototype.getPlugin = function (pluginName) { + return pluginName ? this._plugins[pluginName] : values(this._plugins); + }; + return UIRouter; +}()); + +/** @module hooks */ /** */ +function addCoreResolvables(trans) { + trans.addResolvable({ token: UIRouter, deps: [], resolveFn: function () { return trans.router; }, data: trans.router }, ""); + trans.addResolvable({ token: Transition, deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$transition$', deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: function () { return trans.params(); }, data: trans.params() }, ""); + trans.entering().forEach(function (state) { + trans.addResolvable({ token: '$state$', deps: [], resolveFn: function () { return state; }, data: state }, state); + }); +} +var registerAddCoreResolvables = function (transitionService) { + return transitionService.onCreate({}, addCoreResolvables); +}; + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that redirects to a different state or params + * + * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);` + * + * See [[StateDeclaration.redirectTo]] + */ +var redirectToHook = function (trans) { + var redirect = trans.to().redirectTo; + if (!redirect) + return; + var $state = trans.router.stateService; + function handleResult(result) { + if (!result) + return; + if (result instanceof TargetState) + return result; + if (isString(result)) + return $state.target(result, trans.params(), trans.options()); + if (result['state'] || result['params']) + return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options()); + } + if (isFunction(redirect)) { + return services.$q.when(redirect(trans)).then(handleResult); + } + return handleResult(redirect); +}; +var registerRedirectToHook = function (transitionService) { + return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook); +}; + +/** + * A factory which creates an onEnter, onExit or onRetain transition hook function + * + * The returned function invokes the (for instance) state.onEnter hook when the + * state is being entered. + * + * @hidden + */ +function makeEnterExitRetainHook(hookName) { + return function (transition, state) { + var _state = state.$$state(); + var hookFn = _state[hookName]; + return hookFn(transition, state); + }; +} +/** + * The [[TransitionStateHookFn]] for onExit + * + * When the state is being exited, the state's .onExit function is invoked. + * + * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);` + * + * See: [[IHookRegistry.onExit]] + */ +var onExitHook = makeEnterExitRetainHook('onExit'); +var registerOnExitHook = function (transitionService) { + return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook); +}; +/** + * The [[TransitionStateHookFn]] for onRetain + * + * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked. + * + * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);` + * + * See: [[IHookRegistry.onRetain]] + */ +var onRetainHook = makeEnterExitRetainHook('onRetain'); +var registerOnRetainHook = function (transitionService) { + return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook); +}; +/** + * The [[TransitionStateHookFn]] for onEnter + * + * When the state is being entered, the state's .onEnter function is invoked. + * + * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);` + * + * See: [[IHookRegistry.onEnter]] + */ +var onEnterHook = makeEnterExitRetainHook('onEnter'); +var registerOnEnterHook = function (transitionService) { + return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook); +}; + +/** @module hooks */ +/** for typedoc */ +/** + * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path + * + * Registered using `transitionService.onStart({}, eagerResolvePath);` + * + * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var eagerResolvePath = function (trans) { + return new ResolveContext(trans.treeChanges().to) + .resolvePath("EAGER", trans) + .then(noop); +}; +var registerEagerResolvePath = function (transitionService) { + return transitionService.onStart({}, eagerResolvePath, { priority: 1000 }); +}; +/** + * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path + * + * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);` + * + * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var lazyResolveState = function (trans, state) { + return new ResolveContext(trans.treeChanges().to) + .subContext(state.$$state()) + .resolvePath("LAZY", trans) + .then(noop); +}; +var registerLazyResolveState = function (transitionService) { + return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: 1000 }); +}; + +/** @module hooks */ /** for typedoc */ +/** + * A [[TransitionHookFn]] which waits for the views to load + * + * Registered using `transitionService.onStart({}, loadEnteringViews);` + * + * Allows the views to do async work in [[ViewConfig.load]] before the transition continues. + * In angular 1, this includes loading the templates. + */ +var loadEnteringViews = function (transition) { + var $q = services.$q; + var enteringViews = transition.views("entering"); + if (!enteringViews.length) + return; + return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop); +}; +var registerLoadEnteringViews = function (transitionService) { + return transitionService.onFinish({}, loadEnteringViews); +}; +/** + * A [[TransitionHookFn]] which activates the new views when a transition is successful. + * + * Registered using `transitionService.onSuccess({}, activateViews);` + * + * After a transition is complete, this hook deactivates the old views from the previous state, + * and activates the new views from the destination state. + * + * See [[ViewService]] + */ +var activateViews = function (transition) { + var enteringViews = transition.views("entering"); + var exitingViews = transition.views("exiting"); + if (!enteringViews.length && !exitingViews.length) + return; + var $view = transition.router.viewService; + exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); }); + enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); }); + $view.sync(); +}; +var registerActivateViews = function (transitionService) { + return transitionService.onSuccess({}, activateViews); +}; + +/** + * A [[TransitionHookFn]] which updates global UI-Router state + * + * Registered using `transitionService.onBefore({}, updateGlobalState);` + * + * Before a [[Transition]] starts, updates the global value of "the current transition" ([[Globals.transition]]). + * After a successful [[Transition]], updates the global values of "the current state" + * ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]). + * + * See also the deprecated properties: + * [[StateService.transition]], [[StateService.current]], [[StateService.params]] + */ +var updateGlobalState = function (trans) { + var globals = trans.router.globals; + var transitionSuccessful = function () { + globals.successfulTransitions.enqueue(trans); + globals.$current = trans.$to(); + globals.current = globals.$current.self; + copy(trans.params(), globals.params); + }; + var clearCurrentTransition = function () { + // Do not clear globals.transition if a different transition has started in the meantime + if (globals.transition === trans) + globals.transition = null; + }; + trans.onSuccess({}, transitionSuccessful, { priority: 10000 }); + trans.promise.then(clearCurrentTransition, clearCurrentTransition); +}; +var registerUpdateGlobalState = function (transitionService) { + return transitionService.onCreate({}, updateGlobalState); +}; + +/** + * A [[TransitionHookFn]] which updates the URL after a successful transition + * + * Registered using `transitionService.onSuccess({}, updateUrl);` + */ +var updateUrl = function (transition) { + var options = transition.options(); + var $state = transition.router.stateService; + var $urlRouter = transition.router.urlRouter; + // Dont update the url in these situations: + // The transition was triggered by a URL sync (options.source === 'url') + // The user doesn't want the url to update (options.location === false) + // The destination state, and all parents have no navigable url + if (options.source !== 'url' && options.location && $state.$current.navigable) { + var urlOptions = { replace: options.location === 'replace' }; + $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions); + } + $urlRouter.update(true); +}; +var registerUpdateUrl = function (transitionService) { + return transitionService.onSuccess({}, updateUrl, { priority: 9999 }); +}; + +/** + * A [[TransitionHookFn]] that performs lazy loading + * + * When entering a state "abc" which has a `lazyLoad` function defined: + * - Invoke the `lazyLoad` function (unless it is already in process) + * - Flag the hook function as "in process" + * - The function should return a promise (that resolves when lazy loading is complete) + * - Wait for the promise to settle + * - If the promise resolves to a [[LazyLoadResult]], then register those states + * - Flag the hook function as "not in process" + * - If the hook was successful + * - Remove the `lazyLoad` function from the state declaration + * - If all the hooks were successful + * - Retry the transition (by returning a TargetState) + * + * ``` + * .state('abc', { + * component: 'fooComponent', + * lazyLoad: () => System.import('./fooComponent') + * }); + * ``` + * + * See [[StateDeclaration.lazyLoad]] + */ +var lazyLoadHook = function (transition) { + var router = transition.router; + function retryTransition() { + if (transition.originalTransition().options().source !== 'url') { + // The original transition was not triggered via url sync + // The lazy state should be loaded now, so re-try the original transition + var orig = transition.targetState(); + return router.stateService.target(orig.identifier(), orig.params(), orig.options()); + } + // The original transition was triggered via url sync + // Run the URL rules and find the best match + var $url = router.urlService; + var result = $url.match($url.parts()); + var rule = result && result.rule; + // If the best match is a state, redirect the transition (instead + // of calling sync() which supersedes the current transition) + if (rule && rule.type === "STATE") { + var state = rule.state; + var params = result.match; + return router.stateService.target(state, params, transition.options()); + } + // No matching state found, so let .sync() choose the best non-state match/otherwise + router.urlService.sync(); + } + var promises = transition.entering() + .filter(function (state) { return !!state.$$state().lazyLoad; }) + .map(function (state) { return lazyLoadState(transition, state); }); + return services.$q.all(promises).then(retryTransition); +}; +var registerLazyLoadHook = function (transitionService) { + return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook); +}; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +function lazyLoadState(transition, state) { + var lazyLoadFn = state.$$state().lazyLoad; + // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked + var promise = lazyLoadFn['_promise']; + if (!promise) { + var success = function (result) { + delete state.lazyLoad; + delete state.$$state().lazyLoad; + delete lazyLoadFn['_promise']; + return result; + }; + var error = function (err) { + delete lazyLoadFn['_promise']; + return services.$q.reject(err); + }; + promise = lazyLoadFn['_promise'] = + services.$q.when(lazyLoadFn(transition, state)) + .then(updateStateRegistry) + .then(success, error); + } + /** Register any lazy loaded state definitions */ + function updateStateRegistry(result) { + if (result && Array.isArray(result.states)) { + result.states.forEach(function (state) { return transition.router.stateRegistry.register(state); }); + } + return result; + } + return promise; +} + +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +var TransitionEventType = /** @class */ (function () { + function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + this.name = name; + this.hookPhase = hookPhase; + this.hookOrder = hookOrder; + this.criteriaMatchPath = criteriaMatchPath; + this.reverseSort = reverseSort; + this.getResultHandler = getResultHandler; + this.getErrorHandler = getErrorHandler; + this.synchronous = synchronous; + } + return TransitionEventType; +}()); + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that skips a transition if it should be ignored + * + * This hook is invoked at the end of the onBefore phase. + * + * If the transition should be ignored (because no parameter or states changed) + * then the transition is ignored and not processed. + */ +function ignoredHook(trans) { + var ignoredReason = trans._ignoredReason(); + if (!ignoredReason) + return; + trace.traceTransitionIgnored(trans); + var pending = trans.router.globals.transition; + // The user clicked a link going back to the *current state* ('A') + // However, there is also a pending transition in flight (to 'B') + // Abort the transition to 'B' because the user now wants to be back at 'A'. + if (ignoredReason === 'SameAsCurrent' && pending) { + pending.abort(); + } + return Rejection.ignored().toPromise(); +} +var registerIgnoredTransitionHook = function (transitionService) { + return transitionService.onBefore({}, ignoredHook, { priority: -9999 }); +}; + +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that rejects the Transition if it is invalid + * + * This hook is invoked at the end of the onBefore phase. + * If the transition is invalid (for example, param values do not validate) + * then the transition is rejected. + */ +function invalidTransitionHook(trans) { + if (!trans.valid()) { + throw new Error(trans.error()); + } +} +var registerInvalidTransitionHook = function (transitionService) { + return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 }); +}; + +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +var defaultTransOpts = { + location: true, + relative: null, + inherit: false, + notify: true, + reload: false, + custom: {}, + current: function () { return null; }, + source: "unknown" +}; +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +var TransitionService = /** @class */ (function () { + /** @hidden */ + function TransitionService(_router) { + /** @hidden */ + this._transitionCount = 0; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + this._eventTypes = []; + /** @hidden The registered transition hooks */ + this._registeredHooks = {}; + /** @hidden The paths on a criteria object */ + this._criteriaPaths = {}; + this._router = _router; + this.$view = _router.viewService; + this._deregisterHookFns = {}; + this._pluginapi = createProxyFunctions(val(this), {}, val(this), [ + '_definePathType', + '_defineEvent', + '_getPathTypes', + '_getEvents', + 'getHooks', + ]); + this._defineCorePaths(); + this._defineCoreEvents(); + this._registerCoreTransitionHooks(); + } + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + TransitionService.prototype.onCreate = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onError = function (criteria, callback, options) { return; }; + /** + * dispose + * @internalapi + */ + TransitionService.prototype.dispose = function (router) { + values(this._registeredHooks).forEach(function (hooksArray) { return hooksArray.forEach(function (hook) { + hook._deregistered = true; + removeFrom(hooksArray, hook); + }); }); + }; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + TransitionService.prototype.create = function (fromPath, targetState) { + return new Transition(fromPath, targetState, this._router); + }; + /** @hidden */ + TransitionService.prototype._defineCoreEvents = function () { + var Phase = exports.TransitionHookPhase; + var TH = TransitionHook; + var paths = this._criteriaPaths; + var NORMAL_SORT = false, REVERSE_SORT = true; + var ASYNCHRONOUS = false, SYNCHRONOUS = true; + this._defineEvent("onCreate", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS); + this._defineEvent("onBefore", Phase.BEFORE, 0, paths.to); + this._defineEvent("onStart", Phase.RUN, 0, paths.to); + this._defineEvent("onExit", Phase.RUN, 100, paths.exiting, REVERSE_SORT); + this._defineEvent("onRetain", Phase.RUN, 200, paths.retained); + this._defineEvent("onEnter", Phase.RUN, 300, paths.entering); + this._defineEvent("onFinish", Phase.RUN, 400, paths.to); + this._defineEvent("onSuccess", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + this._defineEvent("onError", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + }; + /** @hidden */ + TransitionService.prototype._defineCorePaths = function () { + var STATE = exports.TransitionHookScope.STATE, TRANSITION = exports.TransitionHookScope.TRANSITION; + this._definePathType("to", TRANSITION); + this._definePathType("from", TRANSITION); + this._definePathType("exiting", STATE); + this._definePathType("retained", STATE); + this._definePathType("entering", STATE); + }; + /** @hidden */ + TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous); + this._eventTypes.push(eventType); + makeEvent(this, this, eventType); + }; + + /** @hidden */ + TransitionService.prototype._getEvents = function (phase) { + var transitionHookTypes = isDefined(phase) ? + this._eventTypes.filter(function (type) { return type.hookPhase === phase; }) : + this._eventTypes.slice(); + return transitionHookTypes.sort(function (l, r) { + var cmpByPhase = l.hookPhase - r.hookPhase; + return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase; + }); + }; + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + TransitionService.prototype._definePathType = function (name, hookScope) { + this._criteriaPaths[name] = { name: name, scope: hookScope }; + }; + /** * @hidden */ + TransitionService.prototype._getPathTypes = function () { + return this._criteriaPaths; + }; + /** @hidden */ + TransitionService.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + /** @hidden */ + TransitionService.prototype._registerCoreTransitionHooks = function () { + var fns = this._deregisterHookFns; + fns.addCoreResolves = registerAddCoreResolvables(this); + fns.ignored = registerIgnoredTransitionHook(this); + fns.invalid = registerInvalidTransitionHook(this); + // Wire up redirectTo hook + fns.redirectTo = registerRedirectToHook(this); + // Wire up onExit/Retain/Enter state hooks + fns.onExit = registerOnExitHook(this); + fns.onRetain = registerOnRetainHook(this); + fns.onEnter = registerOnEnterHook(this); + // Wire up Resolve hooks + fns.eagerResolve = registerEagerResolvePath(this); + fns.lazyResolve = registerLazyResolveState(this); + // Wire up the View management hooks + fns.loadViews = registerLoadEnteringViews(this); + fns.activateViews = registerActivateViews(this); + // Updates global state after a transition + fns.updateGlobals = registerUpdateGlobalState(this); + // After globals.current is updated at priority: 10000 + fns.updateUrl = registerUpdateUrl(this); + // Lazy load state trees + fns.lazyLoad = registerLazyLoadHook(this); + }; + return TransitionService; +}()); + +/** + * @coreapi + * @module state + */ +/** */ +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +var StateService = /** @class */ (function () { + /** @internalapi */ + function StateService(router) { + this.router = router; + /** @internalapi */ + this.invalidCallbacks = []; + /** @hidden */ + this._defaultErrorHandler = function $defaultErrorHandler($error$) { + if ($error$ instanceof Error && $error$.stack) { + console.error($error$); + console.error($error$.stack); + } + else if ($error$ instanceof Rejection) { + console.error($error$.toString()); + if ($error$.detail && $error$.detail.stack) + console.error($error$.detail.stack); + } + else { + console.error($error$); + } + }; + var getters = ['current', '$current', 'params', 'transition']; + var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters))); + createProxyFunctions(val(StateService.prototype), this, val(this), boundFns); + } + Object.defineProperty(StateService.prototype, "transition", { + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + get: function () { return this.router.globals.transition; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "params", { + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + get: function () { return this.router.globals.params; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "current", { + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + get: function () { return this.router.globals.current; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "$current", { + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + get: function () { return this.router.globals.$current; }, + enumerable: true, + configurable: true + }); + /** @internalapi */ + StateService.prototype.dispose = function () { + this.defaultErrorHandler(noop); + this.invalidCallbacks = []; + }; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + StateService.prototype._handleInvalidTargetState = function (fromPath, toState) { + var _this = this; + var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath); + var globals = this.router.globals; + var latestThing = function () { return globals.transitionHistory.peekTail(); }; + var latest = latestThing(); + var callbackQueue = new Queue(this.invalidCallbacks.slice()); + var injector = new ResolveContext(fromPath).injector(); + var checkForRedirect = function (result) { + if (!(result instanceof TargetState)) { + return; + } + var target = result; + // Recreate the TargetState, in case the state is now defined. + target = _this.target(target.identifier(), target.params(), target.options()); + if (!target.valid()) { + return Rejection.invalid(target.error()).toPromise(); + } + if (latestThing() !== latest) { + return Rejection.superseded().toPromise(); + } + return _this.transitionTo(target.identifier(), target.params(), target.options()); + }; + function invokeNextCallback() { + var nextCallback = callbackQueue.dequeue(); + if (nextCallback === undefined) + return Rejection.invalid(toState.error()).toPromise(); + var callbackResult = services.$q.when(nextCallback(toState, fromState, injector)); + return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); }); + } + return invokeNextCallback(); + }; + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + StateService.prototype.onInvalid = function (callback) { + this.invalidCallbacks.push(callback); + return function deregisterListener() { + removeFrom(this.invalidCallbacks)(callback); + }.bind(this); + }; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + StateService.prototype.reload = function (reloadState) { + return this.transitionTo(this.current, this.params, { + reload: isDefined(reloadState) ? reloadState : true, + inherit: false, + notify: false, + }); + }; + + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + StateService.prototype.go = function (to, params, options) { + var defautGoOpts = { relative: this.$current, inherit: true }; + var transOpts = defaults(options, defautGoOpts, defaultTransOpts); + return this.transitionTo(to, params, transOpts); + }; + + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + StateService.prototype.target = function (identifier, params, options) { + if (options === void 0) { options = {}; } + // If we're reloading, find the state object to reload from + if (isObject(options.reload) && !options.reload.name) + throw new Error('Invalid reload state object'); + var reg = this.router.stateRegistry; + options.reloadState = options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative); + if (options.reload && !options.reloadState) + throw new Error("No such reload state '" + (isString(options.reload) ? options.reload : options.reload.name) + "'"); + return new TargetState(this.router.stateRegistry, identifier, params, options); + }; + + StateService.prototype.getCurrentPath = function () { + var _this = this; + var globals = this.router.globals; + var latestSuccess = globals.successfulTransitions.peekTail(); + var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; }; + return latestSuccess ? latestSuccess.treeChanges().to : rootPath(); + }; + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + StateService.prototype.transitionTo = function (to, toParams, options) { + var _this = this; + if (toParams === void 0) { toParams = {}; } + if (options === void 0) { options = {}; } + var router = this.router; + var globals = router.globals; + options = defaults(options, defaultTransOpts); + var getCurrent = function () { + return globals.transition; + }; + options = extend(options, { current: getCurrent }); + var ref = this.target(to, toParams, options); + var currentPath = this.getCurrentPath(); + if (!ref.exists()) + return this._handleInvalidTargetState(currentPath, ref); + if (!ref.valid()) + return silentRejection(ref.error()); + /** + * Special handling for Ignored, Aborted, and Redirected transitions + * + * The semantics for the transition.run() promise and the StateService.transitionTo() + * promise differ. For instance, the run() promise may be rejected because it was + * IGNORED, but the transitionTo() promise is resolved because from the user perspective + * no error occurred. Likewise, the transition.run() promise may be rejected because of + * a Redirect, but the transitionTo() promise is chained to the new Transition's promise. + */ + var rejectedTransitionHandler = function (transition) { return function (error) { + if (error instanceof Rejection) { + var isLatest = router.globals.lastStartedTransitionId === transition.$id; + if (error.type === exports.RejectType.IGNORED) { + isLatest && router.urlRouter.update(); + // Consider ignored `Transition.run()` as a successful `transitionTo` + return services.$q.when(globals.current); + } + var detail = error.detail; + if (error.type === exports.RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) { + // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully + // by returning the promise for the new (redirect) `Transition.run()`. + var redirect = transition.redirect(detail); + return redirect.run().catch(rejectedTransitionHandler(redirect)); + } + if (error.type === exports.RejectType.ABORTED) { + isLatest && router.urlRouter.update(); + return services.$q.reject(error); + } + } + var errorHandler = _this.defaultErrorHandler(); + errorHandler(error); + return services.$q.reject(error); + }; }; + var transition = this.router.transitionService.create(currentPath, ref); + var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition)); + silenceUncaughtInPromise(transitionToPromise); // issue #2676 + // Return a promise for the transition, which also has the transition object on it. + return extend(transitionToPromise, { transition: transition }); + }; + + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + StateService.prototype.is = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return undefined; + if (this.$current !== state) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + StateService.prototype.includes = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var glob = isString(stateOrName) && Glob.fromString(stateOrName); + if (glob) { + if (!glob.matches(this.$current.name)) + return false; + stateOrName = this.$current.name; + } + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes; + if (!isDefined(state)) + return undefined; + if (!isDefined(include[state.name])) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + StateService.prototype.href = function (stateOrName, params, options) { + var defaultHrefOpts = { + lossy: true, + inherit: true, + absolute: false, + relative: this.$current, + }; + options = defaults(options, defaultHrefOpts); + params = params || {}; + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return null; + if (options.inherit) + params = this.params.$inherit(params, this.$current, state); + var nav = (state && options.lossy) ? state.navigable : state; + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return this.router.urlRouter.href(nav.url, params, { + absolute: options.absolute, + }); + }; + + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + StateService.prototype.defaultErrorHandler = function (handler) { + return this._defaultErrorHandler = handler || this._defaultErrorHandler; + }; + StateService.prototype.get = function (stateOrName, base) { + var reg = this.router.stateRegistry; + if (arguments.length === 0) + return reg.get(); + return reg.get(stateOrName, base || this.$current); + }; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + StateService.prototype.lazyLoad = function (stateOrName, transition) { + var state = this.get(stateOrName); + if (!state || !state.lazyLoad) + throw new Error("Can not lazy load " + stateOrName); + var currentPath = this.getCurrentPath(); + var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath); + transition = transition || this.router.transitionService.create(currentPath, target); + return lazyLoadState(transition, state); + }; + return StateService; +}()); + +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ + +/** + * @internalapi + * @module vanilla + */ +/** */ +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +var $q = { + /** Normalizes a value as a promise */ + when: function (val$$1) { return new Promise(function (resolve, reject) { return resolve(val$$1); }); }, + /** Normalizes a value as a promise rejection */ + reject: function (val$$1) { return new Promise(function (resolve, reject) { reject(val$$1); }); }, + /** @returns a deferred object, which has `resolve` and `reject` functions */ + defer: function () { + var deferred = {}; + deferred.promise = new Promise(function (resolve, reject) { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }, + /** Like Promise.all(), but also supports object key/promise notation like $q */ + all: function (promises) { + if (isArray(promises)) { + return Promise.all(promises); + } + if (isObject(promises)) { + // Convert promises map to promises array. + // When each promise resolves, map it to a tuple { key: key, val: val } + var chain = Object.keys(promises) + .map(function (key) { return promises[key].then(function (val$$1) { return ({ key: key, val: val$$1 }); }); }); + // Then wait for all promises to resolve, and convert them back to an object + return $q.all(chain).then(function (values$$1) { + return values$$1.reduce(function (acc, tuple) { acc[tuple.key] = tuple.val; return acc; }, {}); + }); + } + } +}; + +/** + * @internalapi + * @module vanilla + */ +/** */ +// globally available injectables +var globals = {}; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var ARGUMENT_NAMES = /([^\s,]+)/g; +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +var $injector = { + /** Gets an object from DI based on a string token */ + get: function (name) { return globals[name]; }, + /** Returns true if an object named `name` exists in global DI */ + has: function (name) { return $injector.get(name) != null; }, + /** + * Injects a function + * + * @param fn the function to inject + * @param context the function's `this` binding + * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }` + */ + invoke: function (fn, context, locals) { + var all$$1 = extend({}, globals, locals || {}); + var params = $injector.annotate(fn); + var ensureExist = assertPredicate(function (key) { return all$$1.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; }); + var args = params.filter(ensureExist).map(function (x) { return all$$1[x]; }); + if (isFunction(fn)) + return fn.apply(context, args); + else + return fn.slice(-1)[0].apply(context, args); + }, + /** + * Returns a function's dependencies + * + * Analyzes a function (or array) and returns an array of DI tokens that the function requires. + * @return an array of `string`s + */ + annotate: function (fn) { + if (!isInjectable(fn)) + throw new Error("Not an injectable function: " + fn); + if (fn && fn.$inject) + return fn.$inject; + if (isArray(fn)) + return fn.slice(0, -1); + var fnStr = fn.toString().replace(STRIP_COMMENTS, ''); + var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); + return result || []; + } +}; + +/** + * @internalapi + * @module vanilla + */ +/** */ +var keyValsToObjectR = function (accum, _a) { + var key = _a[0], val$$1 = _a[1]; + if (!accum.hasOwnProperty(key)) { + accum[key] = val$$1; + } + else if (isArray(accum[key])) { + accum[key].push(val$$1); + } + else { + accum[key] = [accum[key], val$$1]; + } + return accum; +}; +var getParams = function (queryString) { + return queryString.split("&").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {}); +}; +function parseUrl$1(url) { + var orEmptyString = function (x) { return x || ""; }; + var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1]; + var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1]; + return { path: path, search: search, hash: hash, url: url }; +} +var buildUrl = function (loc) { + var path = loc.path(); + var searchObject = loc.search(); + var hash = loc.hash(); + var search = Object.keys(searchObject).map(function (key) { + var param = searchObject[key]; + var vals = isArray(param) ? param : [param]; + return vals.map(function (val$$1) { return key + "=" + val$$1; }); + }).reduce(unnestR, []).join("&"); + return path + (search ? "?" + search : "") + (hash ? "#" + hash : ""); +}; +function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) { + return function (router) { + var service = router.locationService = new serviceClass(router); + var configuration = router.locationConfig = new configurationClass(router, isHtml5); + function dispose(router) { + router.dispose(service); + router.dispose(configuration); + } + return { name: name, service: service, configuration: configuration, dispose: dispose }; + }; +} + +/** + * @internalapi + * @module vanilla + */ /** */ +/** A base `LocationServices` */ +var BaseLocationServices = /** @class */ (function () { + function BaseLocationServices(router, fireAfterUpdate) { + var _this = this; + this.fireAfterUpdate = fireAfterUpdate; + this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); }; + this._listeners = []; + this.hash = function () { return parseUrl$1(_this._get()).hash; }; + this.path = function () { return parseUrl$1(_this._get()).path; }; + this.search = function () { return getParams(parseUrl$1(_this._get()).search); }; + this._location = root.location; + this._history = root.history; + } + BaseLocationServices.prototype.url = function (url, replace) { + if (replace === void 0) { replace = true; } + if (isDefined(url) && url !== this._get()) { + this._set(null, null, url, replace); + if (this.fireAfterUpdate) { + this._listeners.forEach(function (cb) { return cb({ url: url }); }); + } + } + return buildUrl(this); + }; + BaseLocationServices.prototype.onChange = function (cb) { + var _this = this; + this._listeners.push(cb); + return function () { return removeFrom(_this._listeners, cb); }; + }; + BaseLocationServices.prototype.dispose = function (router) { + deregAll(this._listeners); + }; + return BaseLocationServices; +}()); + +var __extends = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +var HashLocationService = /** @class */ (function (_super) { + __extends(HashLocationService, _super); + function HashLocationService(router) { + var _this = _super.call(this, router, false) || this; + root.addEventListener('hashchange', _this._listener, false); + return _this; + } + HashLocationService.prototype._get = function () { + return trimHashVal(this._location.hash); + }; + HashLocationService.prototype._set = function (state, title, url, replace) { + this._location.hash = url; + }; + HashLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('hashchange', this._listener); + }; + return HashLocationService; +}(BaseLocationServices)); + +var __extends$1 = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +var MemoryLocationService = /** @class */ (function (_super) { + __extends$1(MemoryLocationService, _super); + function MemoryLocationService(router) { + return _super.call(this, router, true) || this; + } + MemoryLocationService.prototype._get = function () { + return this._url; + }; + MemoryLocationService.prototype._set = function (state, title, url, replace) { + this._url = url; + }; + return MemoryLocationService; +}(BaseLocationServices)); + +var __extends$2 = (undefined && undefined.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +var PushStateLocationService = /** @class */ (function (_super) { + __extends$2(PushStateLocationService, _super); + function PushStateLocationService(router) { + var _this = _super.call(this, router, true) || this; + _this._config = router.urlService.config; + root.addEventListener('popstate', _this._listener, false); + return _this; + } + + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + PushStateLocationService.prototype._getBasePrefix = function () { + return stripFile(this._config.baseHref()); + }; + PushStateLocationService.prototype._get = function () { + var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search; + search = splitQuery(search)[1]; // strip ? if found + hash = splitHash(hash)[1]; // strip # if found + var basePrefix = this._getBasePrefix(); + var exactMatch = pathname === this._config.baseHref(); + var startsWith = pathname.startsWith(basePrefix); + pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname; + return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : ''); + }; + PushStateLocationService.prototype._set = function (state, title, url, replace) { + var fullUrl = this._getBasePrefix() + url; + if (replace) { + this._history.replaceState(state, title, fullUrl); + } + else { + this._history.pushState(state, title, fullUrl); + } + }; + PushStateLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('popstate', this._listener); + }; + return PushStateLocationService; +}(BaseLocationServices)); + +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +var MemoryLocationConfig = /** @class */ (function () { + function MemoryLocationConfig() { + var _this = this; + this._baseHref = ''; + this._port = 80; + this._protocol = "http"; + this._host = "localhost"; + this._hashPrefix = ""; + this.port = function () { return _this._port; }; + this.protocol = function () { return _this._protocol; }; + this.host = function () { return _this._host; }; + this.baseHref = function () { return _this._baseHref; }; + this.html5Mode = function () { return false; }; + this.hashPrefix = function (newval) { return isDefined(newval) ? _this._hashPrefix = newval : _this._hashPrefix; }; + this.dispose = noop; + } + return MemoryLocationConfig; +}()); + +/** + * @internalapi + * @module vanilla + */ +/** */ +/** A `LocationConfig` that delegates to the browser's `location` object */ +var BrowserLocationConfig = /** @class */ (function () { + function BrowserLocationConfig(router, _isHtml5) { + if (_isHtml5 === void 0) { _isHtml5 = false; } + this._isHtml5 = _isHtml5; + this._baseHref = undefined; + this._hashPrefix = ""; + } + BrowserLocationConfig.prototype.port = function () { + if (location.port) { + return Number(location.port); + } + return this.protocol() === 'https' ? 443 : 80; + }; + BrowserLocationConfig.prototype.protocol = function () { + return location.protocol.replace(/:/g, ''); + }; + BrowserLocationConfig.prototype.host = function () { + return location.hostname; + }; + BrowserLocationConfig.prototype.html5Mode = function () { + return this._isHtml5; + }; + BrowserLocationConfig.prototype.hashPrefix = function (newprefix) { + return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix; + }; + + BrowserLocationConfig.prototype.baseHref = function (href) { + return isDefined(href) ? this._baseHref = href : + isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref(); + }; + BrowserLocationConfig.prototype.applyDocumentBaseHref = function () { + var baseTag = document.getElementsByTagName("base")[0]; + return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : ""; + }; + BrowserLocationConfig.prototype.dispose = function () { }; + return BrowserLocationConfig; +}()); + +/** + * @internalapi + * @module vanilla + */ +/** */ +function servicesPlugin(router) { + services.$injector = $injector; + services.$q = $q; + return { name: "vanilla.services", $q: $q, $injector: $injector, dispose: function () { return null; } }; +} +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +var pushStateLocationPlugin = locationPluginFactory("vanilla.pushStateLocation", true, PushStateLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +var memoryLocationPlugin = locationPluginFactory("vanilla.memoryLocation", false, MemoryLocationService, MemoryLocationConfig); + +/** + * @internalapi + * @module vanilla + */ +/** */ + +/** + * # Core classes and interfaces + * + * The classes and interfaces that are core to ui-router and do not belong + * to a more specific subsystem (such as resolve). + * + * @coreapi + * @preferred + * @module core + */ /** for typedoc */ +/** @internalapi */ +var UIRouterPluginBase = /** @class */ (function () { + function UIRouterPluginBase() { + } + UIRouterPluginBase.prototype.dispose = function (router) { }; + return UIRouterPluginBase; +}()); + +/** + * @coreapi + * @module common + */ /** */ + +exports.root = root; +exports.fromJson = fromJson; +exports.toJson = toJson; +exports.forEach = forEach; +exports.extend = extend; +exports.equals = equals; +exports.identity = identity; +exports.noop = noop; +exports.createProxyFunctions = createProxyFunctions; +exports.inherit = inherit; +exports.inArray = inArray; +exports._inArray = _inArray; +exports.removeFrom = removeFrom; +exports._removeFrom = _removeFrom; +exports.pushTo = pushTo; +exports._pushTo = _pushTo; +exports.deregAll = deregAll; +exports.defaults = defaults; +exports.mergeR = mergeR; +exports.ancestors = ancestors; +exports.pick = pick; +exports.omit = omit; +exports.pluck = pluck; +exports.filter = filter; +exports.find = find; +exports.mapObj = mapObj; +exports.map = map; +exports.values = values; +exports.allTrueR = allTrueR; +exports.anyTrueR = anyTrueR; +exports.unnestR = unnestR; +exports.flattenR = flattenR; +exports.pushR = pushR; +exports.uniqR = uniqR; +exports.unnest = unnest; +exports.flatten = flatten; +exports.assertPredicate = assertPredicate; +exports.assertMap = assertMap; +exports.assertFn = assertFn; +exports.pairs = pairs; +exports.arrayTuples = arrayTuples; +exports.applyPairs = applyPairs; +exports.tail = tail; +exports.copy = copy; +exports._extend = _extend; +exports.silenceUncaughtInPromise = silenceUncaughtInPromise; +exports.silentRejection = silentRejection; +exports.notImplemented = notImplemented; +exports.services = services; +exports.Glob = Glob; +exports.curry = curry; +exports.compose = compose; +exports.pipe = pipe; +exports.prop = prop; +exports.propEq = propEq; +exports.parse = parse; +exports.not = not; +exports.and = and; +exports.or = or; +exports.all = all; +exports.any = any; +exports.is = is; +exports.eq = eq; +exports.val = val; +exports.invoke = invoke; +exports.pattern = pattern; +exports.isUndefined = isUndefined; +exports.isDefined = isDefined; +exports.isNull = isNull; +exports.isNullOrUndefined = isNullOrUndefined; +exports.isFunction = isFunction; +exports.isNumber = isNumber; +exports.isString = isString; +exports.isObject = isObject; +exports.isArray = isArray; +exports.isDate = isDate; +exports.isRegExp = isRegExp; +exports.isState = isState; +exports.isInjectable = isInjectable; +exports.isPromise = isPromise; +exports.Queue = Queue; +exports.maxLength = maxLength; +exports.padString = padString; +exports.kebobString = kebobString; +exports.functionToString = functionToString; +exports.fnToString = fnToString; +exports.stringify = stringify; +exports.beforeAfterSubstr = beforeAfterSubstr; +exports.hostRegex = hostRegex; +exports.stripFile = stripFile; +exports.splitHash = splitHash; +exports.splitQuery = splitQuery; +exports.splitEqual = splitEqual; +exports.trimHashVal = trimHashVal; +exports.splitOnDelim = splitOnDelim; +exports.joinNeighborsR = joinNeighborsR; +exports.Trace = Trace; +exports.trace = trace; +exports.Param = Param; +exports.ParamTypes = ParamTypes; +exports.StateParams = StateParams; +exports.ParamType = ParamType; +exports.PathNode = PathNode; +exports.PathUtils = PathUtils; +exports.resolvePolicies = resolvePolicies; +exports.defaultResolvePolicy = defaultResolvePolicy; +exports.Resolvable = Resolvable; +exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN; +exports.ResolveContext = ResolveContext; +exports.resolvablesBuilder = resolvablesBuilder; +exports.StateBuilder = StateBuilder; +exports.StateObject = StateObject; +exports.StateMatcher = StateMatcher; +exports.StateQueueManager = StateQueueManager; +exports.StateRegistry = StateRegistry; +exports.StateService = StateService; +exports.TargetState = TargetState; +exports.HookBuilder = HookBuilder; +exports.matchState = matchState; +exports.RegisteredHook = RegisteredHook; +exports.makeEvent = makeEvent; +exports.Rejection = Rejection; +exports.Transition = Transition; +exports.TransitionHook = TransitionHook; +exports.TransitionEventType = TransitionEventType; +exports.defaultTransOpts = defaultTransOpts; +exports.TransitionService = TransitionService; +exports.UrlMatcher = UrlMatcher; +exports.UrlMatcherFactory = UrlMatcherFactory; +exports.UrlRouter = UrlRouter; +exports.UrlRuleFactory = UrlRuleFactory; +exports.BaseUrlRule = BaseUrlRule; +exports.UrlService = UrlService; +exports.ViewService = ViewService; +exports.UIRouterGlobals = UIRouterGlobals; +exports.UIRouter = UIRouter; +exports.$q = $q; +exports.$injector = $injector; +exports.BaseLocationServices = BaseLocationServices; +exports.HashLocationService = HashLocationService; +exports.MemoryLocationService = MemoryLocationService; +exports.PushStateLocationService = PushStateLocationService; +exports.MemoryLocationConfig = MemoryLocationConfig; +exports.BrowserLocationConfig = BrowserLocationConfig; +exports.keyValsToObjectR = keyValsToObjectR; +exports.getParams = getParams; +exports.parseUrl = parseUrl$1; +exports.buildUrl = buildUrl; +exports.locationPluginFactory = locationPluginFactory; +exports.servicesPlugin = servicesPlugin; +exports.hashLocationPlugin = hashLocationPlugin; +exports.pushStateLocationPlugin = pushStateLocationPlugin; +exports.memoryLocationPlugin = memoryLocationPlugin; +exports.UIRouterPluginBase = UIRouterPluginBase; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=ui-router-core.js.map diff --git a/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js.map b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js.map new file mode 100644 index 00000000..f4ccad6e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.js.map @@ -0,0 +1,161 @@ +{ + "version": 3, + "file": "ui-router-core.js", + "sources": [ + "@uirouter/core/common/hof.ts", + "@uirouter/core/common/glob.ts", + "@uirouter/core/state/stateObject.ts", + "@uirouter/core/common/predicates.ts", + "@uirouter/core/common/coreservices.ts", + "@uirouter/core/common/common.ts", + "@uirouter/core/common/queue.ts", + "@uirouter/core/transition/rejectFactory.ts", + "@uirouter/core/common/trace.ts", + "@uirouter/core/transition/interface.ts", + "@uirouter/core/state/targetState.ts", + "@uirouter/core/transition/transitionHook.ts", + "@uirouter/core/transition/hookRegistry.ts", + "@uirouter/core/transition/hookBuilder.ts", + "@uirouter/core/params/paramType.ts", + "@uirouter/core/params/param.ts", + "@uirouter/core/path/pathNode.ts", + "@uirouter/core/path/pathFactory.ts", + "@uirouter/core/resolve/resolvable.ts", + "@uirouter/core/resolve/interface.ts", + "@uirouter/core/resolve/resolveContext.ts", + "@uirouter/core/transition/transition.ts", + "@uirouter/core/common/strings.ts", + "@uirouter/core/common/index.ts", + "@uirouter/core/params/paramTypes.ts", + "@uirouter/core/params/stateParams.ts", + "@uirouter/core/path/index.ts", + "@uirouter/core/resolve/index.ts", + "@uirouter/core/state/stateBuilder.ts", + "@uirouter/core/state/stateMatcher.ts", + "@uirouter/core/state/stateQueueManager.ts", + "@uirouter/core/state/stateRegistry.ts", + "@uirouter/core/url/urlMatcher.ts", + "@uirouter/core/url/urlMatcherFactory.ts", + "@uirouter/core/url/urlRule.ts", + "@uirouter/core/url/urlRouter.ts", + "@uirouter/core/view/view.ts", + "@uirouter/core/globals.ts", + "@uirouter/core/url/urlService.ts", + "@uirouter/core/router.ts", + "@uirouter/core/hooks/coreResolvables.ts", + "@uirouter/core/hooks/redirectTo.ts", + "@uirouter/core/hooks/onEnterExitRetain.ts", + "@uirouter/core/hooks/resolve.ts", + "@uirouter/core/hooks/views.ts", + "@uirouter/core/hooks/updateGlobals.ts", + "@uirouter/core/hooks/url.ts", + "@uirouter/core/hooks/lazyLoad.ts", + "@uirouter/core/transition/transitionEventType.ts", + "@uirouter/core/hooks/ignoredTransition.ts", + "@uirouter/core/hooks/invalidTransition.ts", + "@uirouter/core/transition/transitionService.ts", + "@uirouter/core/state/stateService.ts", + "@uirouter/core/transition/index.ts", + "@uirouter/core/vanilla/q.ts", + "@uirouter/core/vanilla/injector.ts", + "@uirouter/core/vanilla/utils.ts", + "@uirouter/core/vanilla/baseLocationService.ts", + "@uirouter/core/vanilla/hashLocationService.ts", + "@uirouter/core/vanilla/memoryLocationService.ts", + "@uirouter/core/vanilla/pushStateLocationService.ts", + "@uirouter/core/vanilla/memoryLocationConfig.ts", + "@uirouter/core/vanilla/browserLocationConfig.ts", + "@uirouter/core/vanilla/plugins.ts", + "@uirouter/core/vanilla.ts", + "@uirouter/core/interface.ts", + "@uirouter/core/index.ts" + ], + "sourcesContent": [ + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n", + "/**\n * @coreapi\n * @module core\n */\n/** \n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n", + "/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n", + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n", + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n", + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n", + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n", + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}", + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];", + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n", + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n", + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n", + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n", + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n", + "/** @module common */ /** for typedoc */\nexport * from \"./common\";\nexport * from \"./coreservices\";\nexport * from \"./glob\";\nexport * from \"./hof\";\nexport * from \"./predicates\";\nexport * from \"./queue\";\nexport * from \"./strings\";\nexport * from \"./trace\";\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport { fromJson, toJson, identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n", + "/** @module path */ /** for typedoc */\nexport * from \"./pathNode\";\nexport * from \"./pathFactory\";", + "/** @module resolve */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./resolvable\";\nexport * from \"./resolveContext\";\n", + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n", + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}", + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n", + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n", + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n", + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n", + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n", + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n", + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n", + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n", + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n", + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n", + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n", + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n", + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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", + "/**\n * # Transition subsystem\n *\n * This module contains APIs related to a Transition.\n *\n * See:\n * - [[TransitionService]]\n * - [[Transition]]\n * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]]\n *\n * @coreapi\n * @preferred\n * @module transition\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./hookBuilder\";\nexport * from \"./hookRegistry\";\nexport * from \"./rejectFactory\";\nexport * from \"./transition\";\nexport * from \"./transitionHook\";\nexport * from \"./transitionEventType\";\nexport * from \"./transitionService\";\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./vanilla/index\";\n", + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}", + "/**\n * @coreapi\n * @module common\n */ /** */\n\nexport * from \"./common/index\";\nexport * from \"./params/index\";\nexport * from \"./path/index\";\nexport * from \"./resolve/index\";\nexport * from \"./state/index\";\nexport * from \"./transition/index\";\nexport * from \"./url/index\";\nexport * from \"./view/index\";\nexport * from \"./globals\";\n\nexport * from \"./router\";\nexport * from \"./vanilla\";\nexport * from \"./interface\";\n" + ], + "names": [ + "val", + "this", + "RejectType", + "Category", + "TransitionHookPhase", + "TransitionHookScope", + "DefType", + "inherit", + "values", + "root", + "all", + "prop", + "pattern", + "pairs", + "parseUrl", + "__extends" + ], + "mappings": ";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,eAAsB,EAAY;IAChC,IAAI,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;IAEjC,iBAAiB,IAAW;QAC1B,IAAI,IAAI,CAAC,MAAM,IAAI,gBAAgB;YACjC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO;YACL,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SACxD,CAAC;KACH;IACD,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B;;;;;;;AAUD;IACE,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5B,OAAO;QACL,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,GAAG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AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEA,AACA,AACA,AAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js new file mode 100644 index 00000000..f6ba09b9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js @@ -0,0 +1,10 @@ +/** + * UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps + * @version v5.0.11 + * @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):"function"==typeof define&&define.amd?define(["exports"],e):e(t["@uirouter/core"]=t["@uirouter/core"]||{})}(this,function(t){"use strict";function e(t){function e(n){return n.length>=r?t.apply(null,n):function(){return e(n.concat([].slice.apply(arguments)))}}var n=[].slice.apply(arguments,[1]),r=t.length;return e(n)}function n(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function r(){for(var t=[],e=0;e=0&&t.splice(n,1),t}function d(t,e){return t.push(e),e}function v(t){for(var e=[],n=1;nthis._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 ye=0,ge=function(){function e(t,e,n){this.$id=ye++,this.type=t,this.message=e,this.detail=n}return e.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():J(t)}(this.detail),e=this;return"Transition Rejection($id: "+e.$id+" type: "+e.type+", message: "+e.message+", detail: "+t+")"},e.prototype.toPromise=function(){return zt(de(this),{_transitionRejection:this})},e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&wt(e)(t._transitionRejection)},e.superseded=function(n,r){var i=new e(t.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",n);return r&&r.redirected&&(i.redirected=!0),i},e.redirected=function(t){return e.superseded(t,{redirected:!0})},e.invalid=function(n){return new e(t.RejectType.INVALID,"This transition is invalid",n)},e.ignored=function(n){return new e(t.RejectType.IGNORED,"The transition was ignored",n)},e.aborted=function(n){return new e(t.RejectType.ABORTED,"The transition has been aborted",n)},e.errored=function(n){return new e(t.RejectType.ERROR,"The transition errored",n)},e.normalize=function(t){return wt(e)(t)?t:e.errored(t)},e}(),me=function(t){var e=t.viewDecl,n=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+n+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"},_e=Function.prototype.bind.call(console.log,console),we=xt(console.table)?console.table.bind(console):_e.bind(console);!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 be=yt("$id"),Ee=yt("router.$id"),Re=function(t){return"Transition #"+be(t)+"-"+Ee(t)},Se=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(e,n){var r=this;n.length||(n=Object.keys(t.Category).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(e){return t.Category[e]})),n.map(j).forEach(function(t){return r._enabled[t]=e})},e.prototype.enable=function(){for(var t=[],e=0;e "+J(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Re(e)+": Ignored <> "+J(e))},e.prototype.traceHookInvocation=function(e,n,r){if(this.enabled(t.Category.HOOK)){var i=yt("traceData.hookType")(r)||"internal",o=yt("traceData.context.state.name")(r)||yt("traceData.context")(r)||"unknown",a=W(e.registeredHook.callback);console.log(Re(n)+": Hook -> "+i+" context: "+o+", "+M(200,a))}},e.prototype.traceHookResult=function(e,n,r){this.enabled(t.Category.HOOK)&&console.log(Re(n)+": <- Hook returned: "+M(200,J(e)))},e.prototype.traceResolvePath=function(e,n,r){this.enabled(t.Category.RESOLVE)&&console.log(Re(r)+": Resolving "+e+" ("+n+")")},e.prototype.traceResolvableResolved=function(e,n){this.enabled(t.Category.RESOLVE)&&console.log(Re(n)+": <- Resolved "+e+" to: "+M(200,J(e.data)))},e.prototype.traceError=function(e,n){this.enabled(t.Category.TRANSITION)&&console.log(Re(n)+": <- Rejected "+J(n)+", reason: "+e)},e.prototype.traceSuccess=function(e,n){this.enabled(t.Category.TRANSITION)&&console.log(Re(n)+": <- Success "+J(n)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,n,r){void 0===r&&(r=""),this.enabled(t.Category.UIVIEW)&&console.log("ui-view: "+G(30,e)+" "+I(n)+r)},e.prototype.traceUIViewConfigUpdated=function(e,n){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+n+"'")},e.prototype.traceUIViewFill=function(e,n){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+M(200,n))},e.prototype.traceViewSync=function(e){if(this.enabled(t.Category.VIEWCONFIG)){var n=e.map(function(t){var e=t[0],n=t[1];return{"ui-view fqn":e.$type+":"+e.fqn,"state: view name":n&&n.viewDecl.$context.name+": "+n.viewDecl.$name+" ("+n.viewDecl.$type+")"}}).sort(function(t,e){return t["ui-view fqn"].localeCompare(e["ui-view fqn"])});we(n)}},e.prototype.traceViewServiceEvent=function(e,n){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+me(n))},e.prototype.traceViewServiceUIViewEvent=function(e,n){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+I(n))},e}(),Te=new Se;!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 Ce=function(){function t(t,e,n,r){this._stateRegistry=t,this._identifier=e,this._identifier=e,this._params=zt({},n||{}),this._options=zt({},r||{}),this._definition=t.matcher.find(e,this._options.relative)}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()+"'"+J(this.params())},t.prototype.withState=function(e){return new t(this._stateRegistry,e,this._params,this._options)},t.prototype.withParams=function(e,n){void 0===n&&(n=!1);var r=n?e:zt({},this._params,e);return new t(this._stateRegistry,this._identifier,r,this._options)},t.prototype.withOptions=function(e,n){void 0===n&&(n=!1);var r=n?e:zt({},this._options,e);return new t(this._stateRegistry,this._identifier,this._params,r)},t.isDef=function(t){return t&&t.state&&(It(t.state)||It(t.state.name))},t}(),ke={current:f,transition:null,traceData:{},bind:null},Pe=function(){function e(e,n,r,i){var o=this;this.transition=e,this.stateContext=n,this.registeredHook=r,this.options=i,this.isSuperseded=function(){return o.type.hookPhase===t.TransitionHookPhase.RUN&&!o.options.transition.isActive()},this.options=v(i,ke),this.type=r.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 n=this.getNotCurrentRejection();if(n)return n;var r=this.options;Te.traceHookInvocation(this,this.transition,r);var i=function(t){return ge.normalize(t).toPromise()},o=function(n){return e.eventType.getErrorHandler(t)(n)},a=function(n){return e.eventType.getResultHandler(t)(n)};try{var s=function(){return e.callback.call(r.bind,t.transition,t.stateContext)}();return!this.type.synchronous&&Ft(s)?s.catch(i).then(a,o):a(s)}catch(t){return o(ge.normalize(t))}finally{e.invokeLimit&&++e.invokeCount>=e.invokeLimit&&e.deregister()}}},e.prototype.handleHookResult=function(t){var e=this,n=this.getNotCurrentRejection();return n||(Ft(t)?t.then(function(t){return e.handleHookResult(t)}):(Te.traceHookResult(t,this.transition,this.options),!1===t?ge.aborted("Hook aborted transition").toPromise():wt(Ce)(t)?ge.redirected(t).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?ge.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?ge.aborted().toPromise():this.isSuperseded()?ge.superseded(this.options.current()).toPromise():void 0},e.prototype.toString=function(){var t=this,e=t.options,n=t.registeredHook;return(yt("traceData.hookType")(e)||"internal")+" context: "+(yt("traceData.context.state.name")(e)||yt("traceData.context")(e)||"unknown")+", "+M(200,z(n.callback))},e.chain=function(t,e){var n=function(t,e){return t.then(function(){return e.invokeHook()})};return t.reduce(n,e||Ut.$q.when())},e.invokeHooks=function(t,n){for(var r=0;r20)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==t.options().location&&(r.location="replace");var i=zt({},this.options(),t.options(),r);t=t.withOptions(i,!0);var o=this.router.transitionService.create(this._treeChanges.from,t),a=this._treeChanges.entering,s=o._treeChanges.entering;return Ae.matching(s,a,Ae.nonDynamicParams).filter(gt(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(ie,!1)){var e=t.to.map(function(t){return t.paramSchema}),n=[t.to,t.from].map(function(t){return t.map(function(t){return t.paramValues})});return T(e,n[0],n[1]).map(function(t){var e=t[0],n=t[1],r=t[2];return je.changed(e,n,r)}).reduce(oe,[])}}},e.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(ie,!1)},e.prototype.ignored=function(){return!!this._ignoredReason()},e.prototype._ignoredReason=function(){var t=this.router.globals.transition,e=this._options.reloadState,n=function(t,n){if(t.length!==n.length)return!1;var r=Ae.matching(t,n);return t.length===r.filter(function(t){return!e||!t.state.includes[e.name]}).length},r=this.treeChanges(),i=t&&t.treeChanges();return i&&n(i.to,r.to)&&n(i.exiting,r.exiting)?"SameAsPending":0===r.exiting.length&&0===r.entering.length&&n(r.from,r.to)?"SameAsCurrent":void 0},e.prototype.run=function(){var e=this,n=Pe.runAllHooks,r=function(t){return e._hookBuilder.buildHooksForPhase(t)},i=function(){Te.traceSuccess(e.$to(),e),e.success=!0,e._deferred.resolve(e.to()),n(r(t.TransitionHookPhase.SUCCESS))},o=function(i){Te.traceError(i,e),e.success=!1,e._deferred.reject(i),e._error=i,n(r(t.TransitionHookPhase.ERROR))},a=function(){var e=r(t.TransitionHookPhase.RUN),n=function(){return Ut.$q.when(void 0)};return Pe.invokeHooks(e,n)},s=function(){var t=e.router.globals;return t.lastStartedTransitionId=e.$id,t.transition=e,t.transitionHistory.enqueue(e),Te.traceTransitionStart(e),Ut.$q.when(void 0)},u=r(t.TransitionHookPhase.BEFORE);return Pe.invokeHooks(u,s).then(a).then(i,o),this.promise},e.prototype.valid=function(){return!this.error()||void 0!==this.success},e.prototype.abort=function(){kt(this.success)&&(this._aborted=!0)},e.prototype.error=function(){var t=this.$to();if(t.self.abstract)return"Cannot transition to abstract state '"+t.name+"'";var e=t.parameters(),n=this.params(),r=e.filter(function(t){return!t.validates(n[t.id])});return r.length?"Param values not valid for state '"+t.name+"'. Invalid params: [ "+r.map(function(t){return t.id}).join(", ")+" ]":!1===this.success?this._error:void 0},e.prototype.toString=function(){var t=this.from(),e=this.to(),n=function(t){return null!==t["#"]&&void 0!==t["#"]?t:m(t,["#"])};return"Transition#"+this.$id+"( '"+(jt(t)?t.name:t)+"'"+J(n(this._treeChanges.from.map(dt("paramValues")).reduce(te,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(jt(e)?e.name:e)+"'"+J(n(this.params()))+" )"},e.diToken=e,e}(),Je=null,Qe=function(t){var e=ge.isRejectionPromise;return(Je=Je||s([[gt(Pt),Et("undefined")],[Ot,Et("null")],[Ft,Et("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[wt(ge),a("toString")],[wt(ze),a("toString")],[wt(Ne),a("toString")],[u,W],[Et(!0),c]]))(t)},Ke=function(t){return function(e){if(!e)return["",""];var n=e.indexOf(t);return-1===n?[e,""]:[e.substr(0,n),e.substr(n+1)]}},Ye=new RegExp("^(?:[a-z]+:)?//[^/]+/"),Ze=function(t){return t.replace(/\/[^\/]*$/,"")},Xe=Ke("#"),tn=Ke("?"),en=Ke("="),nn=function(t){return t?t.replace(/^#/,""):""},rn=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 xe(zt({name:e},t))};this.types=Qt(E(this.defaultTypes,e),{})}return t.prototype.dispose=function(){this.types={}},t.prototype.type=function(t,e,n){if(!Pt(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 xe(zt({name:t},e)),n&&(this.typeQueue.push({name:t,def:n}),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.");zt(this.types[t.name],Ut.$injector.invoke(t.def))}},t}();!function(){var t=function(t){var e=function(t){return null!=t?t.toString():t},n={encode:e,decode:e,is:wt(String),pattern:/.*/,equals:function(t,e){return t==e}};return zt({},n,t)};zt(rn.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!$t(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:wt(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(n,r){return n&&t[r]()===e[r]()},!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:Bt,decode:Gt,is:wt(Object),equals:Jt,pattern:/[^\/]*/}),any:t({encode:c,decode:c,is:function(){return!0},equals:Jt})})}();var on,an=function(){function t(t){void 0===t&&(t={}),zt(this,t)}return t.prototype.$inherit=function(t,e,n){var r,i=y(e,n),o={},a=[];for(var s in i)if(i[s]&&i[s].params&&(r=Object.keys(i[s].params),r.length))for(var u in r)a.indexOf(r[u])>=0||(a.push(r[u]),o[r[u]]=this[r[u]]);return zt({},o,t)},t}(),sn=function(t){if(!It(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},un=function(t,e){return function(n){var r=n;r&&r.url&&r.name&&r.name.match(/\.\*\*$/)&&(r.url+="{remainder:any}");var i=sn(r.url),o=n.parent,a=i?t.compile(i.val,{params:n.params||{},paramMap:function(t,e){return!1===r.reloadOnSearch&&e&&(t=zt(t||{},{dynamic:!0})),t}}):r.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+n+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},cn=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},fn=function(t){return function(e){var n=function(e,n){return t.fromConfig(n,null,e)},r=e.url&&e.url.parameters({inherit:!1})||[],i=ne(ee(m(e.params||{},r.map(dt("id"))),n));return r.concat(i).map(function(t){return[t.id,t]}).reduce(C,{})}},hn=function(){function t(t,e){function n(e){return o(e)?null:t.find(r.parentName(e))||i()}this.matcher=t;var r=this,i=function(){return t.find("")},o=function(t){return""===t.name};this.builders={name:[Y],self:[Z],parent:[n],data:[X],url:[un(e,i)],navigable:[cn(o)],params:[fn(e.paramFactory)],views:[],path:[tt],includes:[et],resolvables:[nt]}}return t.prototype.builder=function(t,e){var n=this.builders,r=n[t]||[];return It(t)&&!Pt(e)?r.length>1?r:r[0]:It(t)&&xt(e)?(n[t]=r,n[t].push(e),function(){return n[t].splice(n[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,n=e.matcher,r=e.builders,i=this.parentName(t);if(i&&!n.find(i,void 0,!1))return null;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o].reduce(function(t,e){return function(n){return e(n,t)}},f);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",n=e.split(".");if("**"===n.pop()&&n.pop(),n.length){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return n.join(".")}return t.parent?It(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 n=It(t.parent)?t.parent:t.parent.name;return n?n+"."+e:e},t}(),pn=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,n){if(void 0===n&&(n=!0),t||""===t){var r=It(t),i=r?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];if(o&&(r||!(r||o!==t&&o.self!==t)))return o;if(r&&n){var a=ne(this._states),s=a.filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return s.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",s.map(function(t){return t.name})),s[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var n=this.find(e),r=t.split("."),i=0,o=r.length,a=n;i0;){var c=n.shift(),f=c.name,h=i.build(c),p=a.indexOf(c);if(h){var l=u(f);if(l&&l.name===f)throw new Error("State '"+f+"' is already defined");var d=u(f+".**");d&&this.$registry.deregister(d),r[f]=c,this.attachRoute(c),p>=0&&a.splice(p,1),o.push(c)}else{var v=s[f];if(s[f]=n.length,p>=0&&v===n.length)return n.push(c),r;p<0&&a.push(c),n.push(c)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),r},t.prototype.attachRoute=function(t){!t.abstract&&t.url&&this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(t))},t}(),dn=function(){function t(t){this._router=t,this.states={},this.listeners=[],this.matcher=new pn(this.states),this.builder=new hn(this.matcher,t.urlMatcherFactory),this.stateQueue=new ln(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(){Yt(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,n=this.get().map(function(t){return t.$$state()}),r=function(t){var e=n.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(r(e))},i=r([t]),o=[t].concat(i).reverse();return o.forEach(function(t){var n=e._router.urlRouter;n.rules().filter(vt("state",t)).forEach(n.removeRule.bind(n)),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 n=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",n.map(function(t){return t.self}))}),n},t.prototype.get=function(t,e){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return n.states[t].self});var r=this.matcher.find(t,e);return r&&r.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}(),vn=function(t,e,n){return t[e]=t[e]||n()},yn=Q("/"),gn=function(){function e(t,n,r,i){var o=this;this.config=i,this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=t,this.config=v(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:c});for(var a,s,u,f=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p=0,l=[],d=function(n){if(!e.nameValidator.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+t+"'");if(b(o._params,vt("id",n)))throw new Error("Duplicate parameter name '"+n+"' in pattern '"+t+"'")},y=function(e,r){var i=e[2]||e[3],a=r?e[4]:e[4]||("*"===e[1]?"[\\s\\S]*":null);return{id:i,regexp:a,cfg:o.config.params[i],segment:t.substring(p,e.index),type:a?n.type(a)||function(t){return Qt(n.type(r?"query":"path"),{pattern:new RegExp(t,o.config.caseInsensitive?"i":void 0)})}(a):null}};(a=f.exec(t))&&(s=y(a,!1),!(s.segment.indexOf("?")>=0));)d(s.id),this._params.push(r.fromPath(s.id,s.type,this.config.paramMap(s.cfg,!1))),this._segments.push(s.segment),l.push([s.segment,k(this._params)]),p=f.lastIndex;u=t.substring(p);var g=u.indexOf("?");if(g>=0){var m=u.substring(g);if(u=u.substring(0,g),m.length>0)for(p=0;a=h.exec(m);)s=y(a,!0),d(s.id),this._params.push(r.fromSearch(s.id,s.type,this.config.paramMap(s.cfg,!0))),p=f.lastIndex}this._segments.push(u),this._compiled=l.map(function(t){return rt.apply(null,t)}).concat(rt(u))}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,n,r){var i=this;void 0===e&&(e={}),void 0===r&&(r={});var o=vn(this._cache,"pattern",function(){return new RegExp(["^",ue(i._cache.path.map(dt("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)}).exec(t);if(!o)return null;var a=this.parameters(),s=a.filter(function(t){return!t.isSearch()}),u=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 h=0;hr.weight?o:r}return r},t.prototype.sync=function(t){if(!t||!t.defaultPrevented){var e=this._router,n=e.urlService,r=e.stateService,i={path:n.path(),search:n.search(),hash:n.hash()},o=this.match(i);s([[It,function(t){return n.url(t,!0)}],[Ce.isDef,function(t){return r.go(t.state,t.params,t.options)}],[wt(Ce),function(t){return r.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,n){var r=n&&!!n.replace;this._router.urlService.url(t.format(e||{}),r)},t.prototype.href=function(t,e,n){var r=t.format(e);if(null==r)return null;n=n||{absolute:!1};var i=this._router.urlService.config,o=i.html5Mode();if(o||null===r||(r="#"+i.hashPrefix()+r),r=it(r,o,n.absolute,i.baseHref()),!n.absolute||!r)return r;var a=!o&&r?"/":"",s=i.port();return s=80===s||443===s?"":":"+s,[i.protocol(),"://",i.host(),s,a,r].join("")},t.prototype.rule=function(t){var e=this;if(!_n.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){Yt(this._rules,t)},t.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},t.prototype.otherwise=function(t){var e=ot(t);this._otherwiseFn=this.urlRuleFactory.create(Et(!0),e),this._sorted=!1},t.prototype.initial=function(t){var e=ot(t),n=function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)};this.rule(this.urlRuleFactory.create(n,e))},t.prototype.when=function(t,e,n){var r=this.urlRuleFactory.create(t,e);return Pt(n&&n.priority)&&(r.priority=n.priority),this.rule(r),r},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}(),Cn=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 n=this._viewConfigFactories[e.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+e.$type);var r=n(t,e);return Vt(r)?r:[r]},t.prototype.deactivateViewConfig=function(t){Te.traceViewServiceEvent("<- Removing",t),Yt(this._viewConfigs,t)},t.prototype.activateViewConfig=function(t){Te.traceViewServiceEvent("-> Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){function n(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)}function r(t){for(var e=t.viewDecl.$context,n=0;++n&&e.parent;)e=e.parent;return n}var i=this,o=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(C,{}),a=e(function(t,e,n,r){return e*(t(n)-t(r))}),s=function(e){var n=i._viewConfigs.filter(t.matches(o,e));return n.length>1&&n.sort(a(r,-1)),[e,n[0]]},u=function(t){var e=t[0],n=t[1];-1!==i._uiViews.indexOf(e)&&e.configUpdated(n)},c=this._uiViews.sort(a(n,1)).map(s);Te.traceViewSync(c),c.forEach(u)},t.prototype.registerUIView=function(t){Te.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews,n=function(e){return e.fqn===t.fqn&&e.$type===t.$type};return e.filter(n).length&&Te.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){if(-1===e.indexOf(t))return void Te.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t);Te.traceViewServiceUIViewEvent("<- Deregistering",t),Yt(e)(t)}},t.prototype.available=function(){return this._uiViews.map(dt("fqn"))},t.prototype.active=function(){return this._uiViews.filter(dt("$config")).map(dt("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var n=e.split("@"),r=n[0]||"$default",i=It(n[1])?n[1]:"^",o=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);(o&&(i=o[1],r=o[2]),"!"===r.charAt(0)&&(r=r.substr(1),i=""),/^(\^(?:\.\^)*)$/.exec(i))?i=i.split(".").reduce(function(t,e){return t.parent},t).name:"."===i&&(i=t.name);return{uiViewName:r,uiViewContextAnchor:i}},t.matches=function(t,e){return function(n){if(e.$type!==n.viewDecl.$type)return!1;var r=n.viewDecl,i=r.$uiViewName.split("."),o=e.fqn.split(".");if(!Jt(i,o.slice(0-i.length)))return!1;var a=1-i.length||void 0,s=o.slice(0,a).join("."),u=t[s].creationContext;return r.$uiViewContextAnchor===(u&&u.name)}},t}(),kn=function(){function t(){this.params=new an,this.lastStartedTransitionId=-1,this.transitionHistory=new ve([],1),this.successfulTransitions=new ve([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}(),Pn=function(t){return t.reduce(function(t,e){return t[e]=Dt(e),t},{dispose:f})},On=["url","path","search","hash","onChange"],$n=["port","protocol","host","baseHref","html5Mode","hashPrefix"],xn=["type","caseInsensitive","strictMode","defaultSquashPolicy"],Hn=["sort","when","initial","otherwise","rules","rule","removeRule"],In=["deferIntercept","listen","sync","match"],jn=function(){function t(t,e){void 0===e&&(e=!0),this.router=t,this.rules={},this.config={};var n=function(){return t.locationService};h(n,this,n,On,e);var r=function(){return t.locationConfig};h(r,this.config,r,$n,e);var i=function(){return t.urlMatcherFactory};h(i,this.config,i,xn);var o=function(){return t.urlRouter};h(o,this.rules,o,Hn),h(o,this,o,In)}return t.prototype.url=function(t,e,n){},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.locationServiceStub=Pn(On),t.locationConfigStub=Pn($n),t}(),Vn=0,An=function(){function t(t,e){void 0===t&&(t=jn.locationServiceStub),void 0===e&&(e=jn.locationConfigStub),this.locationService=t,this.locationConfig=e,this.$id=Vn++,this._disposed=!1,this._disposables=[],this.trace=Te,this.viewService=new Cn,this.transitionService=new fr(this),this.globals=new kn,this.urlMatcherFactory=new mn,this.urlRouter=new Tn(this),this.stateRegistry=new dn(this),this.stateService=new hr(this),this.urlService=new jn(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&&xt(t.dispose))return void t.dispose(this);this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),Yt(e._disposables,t)}catch(t){}})},t.prototype.plugin=function(t,e){void 0===e&&(e={});var n=new t(this,e);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},t.prototype.getPlugin=function(t){return t?this._plugins[t]:ne(this._plugins)},t}(),qn=function(t){return t.onCreate({},at)},Nn=function(t){function e(e){if(e)return e instanceof Ce?e:It(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var n=t.to().redirectTo;if(n){var r=t.router.stateService;return xt(n)?Ut.$q.when(n(t)).then(e):e(n)}},Fn=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},Nn)},Dn=st("onExit"),Un=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},Dn)},Ln=st("onRetain"),Mn=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},Ln)},Gn=st("onEnter"),Bn=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},Gn)},Wn=function(t){return new Ge(t.treeChanges().to).resolvePath("EAGER",t).then(f)},zn=function(t){return t.onStart({},Wn,{priority:1e3})},Jn=function(t,e){return new Ge(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(f)},Qn=function(t){return t.onEnter({entering:Et(!0)},Jn,{priority:1e3})},Kn=function(t){var e=Ut.$q,n=t.views("entering");if(n.length)return e.all(n.map(function(t){return e.when(t.load())})).then(f)},Yn=function(t){return t.onFinish({},Kn)},Zn=function(t){var e=t.views("entering"),n=t.views("exiting");if(e.length||n.length){var r=t.router.viewService;n.forEach(function(t){return r.deactivateViewConfig(t)}),e.forEach(function(t){return r.activateViewConfig(t)}),r.sync()}},Xn=function(t){return t.onSuccess({},Zn)},tr=function(t){var e=t.router.globals,n=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,P(t.params(),e.params)},r=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},n,{priority:1e4}),t.promise.then(r,r)},er=function(t){return t.onCreate({},tr)},nr=function(t){var e=t.options(),n=t.router.stateService,r=t.router.urlRouter;if("url"!==e.source&&e.location&&n.$current.navigable){var i={replace:"replace"===e.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},rr=function(t){return t.onSuccess({},nr,{priority:9999})},ir=function(t){function e(){if("url"!==t.originalTransition().options().source){var e=t.targetState();return n.stateService.target(e.identifier(),e.params(),e.options())}var r=n.urlService,i=r.match(r.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,s=i.match;return n.stateService.target(a,s,t.options())}n.urlService.sync()}var n=t.router,r=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return ut(t,e)});return Ut.$q.all(r).then(e)},or=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},ir)},ar=function(){function t(t,e,n,r,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Pe.HANDLE_RESULT),void 0===a&&(a=Pe.REJECT_ERROR),void 0===s&&(s=!1),this.name=t,this.hookPhase=e,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=s}return t}(),sr=function(t){return t.onBefore({},ct,{priority:-9999})},ur=function(t){return t.onBefore({},ft,{priority:-1e4})},cr={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},fr=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(Et(this),{},Et(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks()}return e.prototype.onCreate=function(t,e,n){},e.prototype.onBefore=function(t,e,n){},e.prototype.onStart=function(t,e,n){},e.prototype.onExit=function(t,e,n){},e.prototype.onRetain=function(t,e,n){},e.prototype.onEnter=function(t,e,n){},e.prototype.onFinish=function(t,e,n){},e.prototype.onSuccess=function(t,e,n){},e.prototype.onError=function(t,e,n){},e.prototype.dispose=function(t){ne(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Yt(t,e)})})},e.prototype.create=function(t,e){return new ze(t,e,this._router)},e.prototype._defineCoreEvents=function(){var e=t.TransitionHookPhase,n=Pe,r=this._criteriaPaths;this._defineEvent("onCreate",e.CREATE,0,r.to,!1,n.LOG_REJECTED_RESULT,n.THROW_ERROR,!0),this._defineEvent("onBefore",e.BEFORE,0,r.to),this._defineEvent("onStart",e.RUN,0,r.to),this._defineEvent("onExit",e.RUN,100,r.exiting,!0),this._defineEvent("onRetain",e.RUN,200,r.retained),this._defineEvent("onEnter",e.RUN,300,r.entering),this._defineEvent("onFinish",e.RUN,400,r.to),this._defineEvent("onSuccess",e.SUCCESS,0,r.to,!1,n.LOG_REJECTED_RESULT,n.LOG_ERROR,!0),this._defineEvent("onError",e.ERROR,0,r.to,!1,n.LOG_REJECTED_RESULT,n.LOG_ERROR,!0)},e.prototype._defineCorePaths=function(){var e=t.TransitionHookScope.STATE,n=t.TransitionHookScope.TRANSITION;this._definePathType("to",n),this._definePathType("from",n),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(t,e,n,r,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Pe.HANDLE_RESULT),void 0===a&&(a=Pe.REJECT_ERROR),void 0===s&&(s=!1);var u=new ar(t,e,n,r,i,o,a,s);this._eventTypes.push(u),A(this,this,u)},e.prototype._getEvents=function(t){return(Pt(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(t,e){var n=t.hookPhase-e.hookPhase;return 0===n?t.hookOrder-e.hookOrder:n})},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=qn(this),t.ignored=sr(this),t.invalid=ur(this),t.redirectTo=Fn(this),t.onExit=Un(this),t.onRetain=Mn(this),t.onEnter=Bn(this),t.eagerResolve=zn(this),t.lazyResolve=Qn(this),t.loadViews=Yn(this),t.activateViews=Xn(this),t.updateGlobals=er(this),t.updateUrl=rr(this),t.lazyLoad=or(this)},e}(),hr=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 ge?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var n=["current","$current","params","transition"],r=Object.keys(e.prototype).filter(gt(Kt(n)));h(Et(e.prototype),this,Et(this),r)}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(f),this.invalidCallbacks=[]},e.prototype._handleInvalidTargetState=function(t,e){function n(){var t=u.dequeue();return void 0===t?ge.invalid(e.error()).toPromise():Ut.$q.when(t(e,i,c)).then(f).then(function(t){return t||n()})}var r=this,i=Ae.makeTargetState(this.router.stateRegistry,t),o=this.router.globals,a=function(){return o.transitionHistory.peekTail()},s=a(),u=new ve(this.invalidCallbacks.slice()),c=new Ge(t).injector(),f=function(t){if(t instanceof Ce){var e=t;return e=r.target(e.identifier(),e.params(),e.options()),e.valid()?a()!==s?ge.superseded().toPromise():r.transitionTo(e.identifier(),e.params(),e.options()):ge.invalid(e.error()).toPromise()}};return n()},e.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){Yt(this.invalidCallbacks)(t)}.bind(this)},e.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!Pt(t)||t,inherit:!1,notify:!1})},e.prototype.go=function(t,e,n){var r={relative:this.$current,inherit:!0},i=v(n,r,cr);return this.transitionTo(t,e,i)},e.prototype.target=function(t,e,n){if(void 0===n&&(n={}),jt(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(It(n.reload)?n.reload:n.reload.name)+"'");return new Ce(this.router.stateRegistry,t,e,n)},e.prototype.getCurrentPath=function(){var t=this,e=this.router.globals,n=e.successfulTransitions.peekTail();return n?n.treeChanges().to:function(){return[new Ve(t.router.stateRegistry.root())]}()},e.prototype.transitionTo=function(e,n,r){var i=this;void 0===n&&(n={}),void 0===r&&(r={});var o=this.router,a=o.globals;r=v(r,cr),r=zt(r,{current:function(){return a.transition}});var s=this.target(e,n,r),u=this.getCurrentPath();if(!s.exists())return this._handleInvalidTargetState(u,s);if(!s.valid())return de(s.error());var c=function(e){return function(n){if(n instanceof ge){var r=o.globals.lastStartedTransitionId===e.$id;if(n.type===t.RejectType.IGNORED)return r&&o.urlRouter.update(),Ut.$q.when(a.current);var s=n.detail;if(n.type===t.RejectType.SUPERSEDED&&n.redirected&&s instanceof Ce){var u=e.redirect(s);return u.run().catch(c(u))}if(n.type===t.RejectType.ABORTED)return r&&o.urlRouter.update(),Ut.$q.reject(n)}return i.defaultErrorHandler()(n),Ut.$q.reject(n)}},f=this.router.transitionService.create(u,s),h=f.run().catch(c(f));return le(h),zt(h,{transition:f})},e.prototype.is=function(t,e,n){n=v(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(t,n.relative);if(Pt(r)){if(this.$current!==r)return!1;if(!e)return!0;var i=r.parameters({inherit:!0,matchingKeys:e});return je.equals(i,je.values(i,e),this.params)}},e.prototype.includes=function(t,e,n){n=v(n,{relative:this.$current});var r=It(t)&&Rt.fromString(t);if(r){if(!r.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,n.relative),o=this.$current.includes;if(Pt(i)){if(!Pt(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return je.equals(a,je.values(a,e),this.params)}},e.prototype.href=function(t,e,n){n=v(n,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),e=e||{};var r=this.router.stateRegistry.matcher.find(t,n.relative);if(!Pt(r))return null;n.inherit&&(e=this.params.$inherit(e,this.$current,r));var i=r&&n.lossy?r.navigable:r;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,e,{absolute:n.absolute}):null},e.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},e.prototype.get=function(t,e){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(t,e||this.$current)},e.prototype.lazyLoad=function(t,e){var n=this.get(t);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+t);var r=this.getCurrentPath(),i=Ae.makeTargetState(this.router.stateRegistry,r);return e=e||this.router.transitionService.create(r,i),ut(e,n)},e}(),pr={when:function(t){return new Promise(function(e,n){return e(t)})},reject:function(t){return new Promise(function(e,n){n(t)})},defer:function(){var t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},all:function(t){if(Vt(t))return Promise.all(t);if(jt(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return pr.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},lr={},dr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,vr=/([^\s,]+)/g,yr={get:function(t){return lr[t]},has:function(t){return null!=yr.get(t)},invoke:function(t,e,n){var r=zt({},lr,n||{}),i=yr.annotate(t),o=fe(function(t){return r.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return r[t]});return xt(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!u(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(Vt(t))return t.slice(0,-1);var e=t.toString().replace(dr,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(vr)||[]}},gr=function(t,e){var n=e[0],r=e[1];return t.hasOwnProperty(n)?Vt(t[n])?t[n].push(r):t[n]=[t[n],r]:t[n]=r,t},mr=function(t){return t.split("&").filter(c).map(en).reduce(gr,{})},_r=function(t){var e=t.path(),n=t.search(),r=t.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(Vt(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(oe,[]).join("&");return e+(i?"?"+i:"")+(r?"#"+r:"")},wr=function(){function t(t,e){var n=this;this.fireAfterUpdate=e,this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this._listeners=[],this.hash=function(){return ht(n._get()).hash},this.path=function(){return ht(n._get()).path},this.search=function(){return mr(ht(n._get()).search)},this._location=Lt.location,this._history=Lt.history}return t.prototype.url=function(t,e){return void 0===e&&(e=!0),Pt(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),_r(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return Yt(e._listeners,t)}},t.prototype.dispose=function(t){Xt(this._listeners)},t}(),br=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Er=function(t){function e(e){var n=t.call(this,e,!1)||this;return Lt.addEventListener("hashchange",n._listener,!1),n}return br(e,t),e.prototype._get=function(){return nn(this._location.hash)},e.prototype._set=function(t,e,n,r){this._location.hash=n},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),Lt.removeEventListener("hashchange",this._listener)},e}(wr),Rr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sr=function(t){function e(e){return t.call(this,e,!0)||this}return Rr(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,n,r){this._url=n},e}(wr),Tr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cr=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._config=e.urlService.config,Lt.addEventListener("popstate",n._listener,!1),n}return Tr(e,t),e.prototype._getBasePrefix=function(){return Ze(this._config.baseHref())},e.prototype._get=function(){var t=this._location,e=t.pathname,n=t.hash,r=t.search;r=tn(r)[1],n=Xe(n)[1];var i=this._getBasePrefix(),o=e===this._config.baseHref(),a=e.startsWith(i);return(e=o?"/":a?e.substring(i.length):e)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(t,e,n,r){var i=this._getBasePrefix()+n;r?this._history.replaceState(t,e,i):this._history.pushState(t,e,i)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),Lt.removeEventListener("popstate",this._listener)},e}(wr),kr=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 Pt(e)?t._hashPrefix=e:t._hashPrefix},this.dispose=f}return t}(),Pr=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.hostname},t.prototype.html5Mode=function(){return this._isHtml5},t.prototype.hashPrefix=function(t){return Pt(t)?this._hashPrefix=t:this._hashPrefix},t.prototype.baseHref=function(t){return Pt(t)?this._baseHref=t:Pt(this._baseHref)?this._baseHref:this.applyDocumentBaseHref()},t.prototype.applyDocumentBaseHref=function(){var t=document.getElementsByTagName("base")[0];return this._baseHref=t?t.href.substr(location.origin.length):""},t.prototype.dispose=function(){},t}(),Or=pt("vanilla.hashBangLocation",!1,Er,Pr),$r=pt("vanilla.pushStateLocation",!0,Cr,Pr),xr=pt("vanilla.memoryLocation",!1,Sr,kr),Hr=function(){function t(){}return t.prototype.dispose=function(t){},t}();t.root=Lt,t.fromJson=Gt,t.toJson=Bt,t.forEach=Wt,t.extend=zt,t.equals=Jt,t.identity=c,t.noop=f,t.createProxyFunctions=h,t.inherit=Qt,t.inArray=Kt,t._inArray=p,t.removeFrom=Yt,t._removeFrom=l,t.pushTo=Zt,t._pushTo=d,t.deregAll=Xt,t.defaults=v,t.mergeR=te,t.ancestors=y,t.pick=g,t.omit=m,t.pluck=_,t.filter=w,t.find=b,t.mapObj=ee,t.map=E,t.values=ne,t.allTrueR=re,t.anyTrueR=ie,t.unnestR=oe,t.flattenR=ae,t.pushR=R,t.uniqR=se,t.unnest=ue,t.flatten=ce,t.assertPredicate=fe,t.assertMap=he,t.assertFn=S,t.pairs=pe,t.arrayTuples=T,t.applyPairs=C,t.tail=k,t.copy=P,t._extend=$,t.silenceUncaughtInPromise=le,t.silentRejection=de,t.notImplemented=Dt,t.services=Ut,t.Glob=Rt,t.curry=e,t.compose=n,t.pipe=r,t.prop=dt,t.propEq=vt,t.parse=yt,t.not=gt,t.and=i,t.or=o,t.all=mt,t.any=_t,t.is=wt,t.eq=bt,t.val=Et,t.invoke=a,t.pattern=s,t.isUndefined=kt,t.isDefined=Pt,t.isNull=Ot,t.isNullOrUndefined=$t,t.isFunction=xt,t.isNumber=Ht,t.isString=It,t.isObject=jt,t.isArray=Vt,t.isDate=At,t.isRegExp=qt,t.isState=Nt,t.isInjectable=u,t.isPromise=Ft,t.Queue=ve,t.maxLength=M,t.padString=G,t.kebobString=B,t.functionToString=W,t.fnToString=z,t.stringify=J,t.beforeAfterSubstr=Ke,t.hostRegex=Ye,t.stripFile=Ze,t.splitHash=Xe,t.splitQuery=tn,t.splitEqual=en,t.trimHashVal=nn,t.splitOnDelim=Q,t.joinNeighborsR=K,t.Trace=Se,t.trace=Te,t.Param=je,t.ParamTypes=rn,t.StateParams=an,t.ParamType=xe,t.PathNode=Ve,t.PathUtils=Ae,t.resolvePolicies=Fe,t.defaultResolvePolicy=qe,t.Resolvable=Ne,t.NATIVE_INJECTOR_TOKEN=Me,t.ResolveContext=Ge,t.resolvablesBuilder=nt,t.StateBuilder=hn,t.StateObject=St,t.StateMatcher=pn,t.StateQueueManager=ln,t.StateRegistry=dn,t.StateService=hr,t.TargetState=Ce,t.HookBuilder=$e,t.matchState=V,t.RegisteredHook=Oe,t.makeEvent=A,t.Rejection=ge,t.Transition=ze,t.TransitionHook=Pe,t.TransitionEventType=ar,t.defaultTransOpts=cr,t.TransitionService=fr,t.UrlMatcher=gn,t.UrlMatcherFactory=mn,t.UrlRouter=Tn,t.UrlRuleFactory=_n,t.BaseUrlRule=wn,t.UrlService=jn,t.ViewService=Cn,t.UIRouterGlobals=kn,t.UIRouter=An,t.$q=pr,t.$injector=yr,t.BaseLocationServices=wr,t.HashLocationService=Er,t.MemoryLocationService=Sr,t.PushStateLocationService=Cr,t.MemoryLocationConfig=kr,t.BrowserLocationConfig=Pr,t.keyValsToObjectR=gr,t.getParams=mr,t.parseUrl=ht,t.buildUrl=_r,t.locationPluginFactory=pt,t.servicesPlugin=lt,t.hashLocationPlugin=Or,t.pushStateLocationPlugin=$r,t.memoryLocationPlugin=xr,t.UIRouterPluginBase=Hr,Object.defineProperty(t,"__esModule",{value:!0})}); +//# sourceMappingURL=ui-router-core.min.js.map diff --git a/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js.map b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js.map new file mode 100644 index 00000000..ce5c726a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/_bundles/ui-router-core.min.js.map @@ -0,0 +1,1390 @@ +{ + "version": 3, + "file": "ui-router-core.min.js", + "sources": [ + "@uirouter/core/common/hof.ts", + "@uirouter/core/common/predicates.ts", + "@uirouter/core/common/common.ts", + "@uirouter/core/common/trace.ts", + "@uirouter/core/transition/hookRegistry.ts", + "@uirouter/core/transition/hookBuilder.ts", + "@uirouter/core/params/paramType.ts", + "@uirouter/core/params/param.ts", + "@uirouter/core/common/strings.ts", + "@uirouter/core/state/stateBuilder.ts", + "@uirouter/core/url/urlMatcher.ts", + "@uirouter/core/url/urlRouter.ts", + "@uirouter/core/hooks/coreResolvables.ts", + "@uirouter/core/hooks/onEnterExitRetain.ts", + "@uirouter/core/hooks/lazyLoad.ts", + "@uirouter/core/hooks/ignoredTransition.ts", + "@uirouter/core/hooks/invalidTransition.ts", + "@uirouter/core/vanilla/utils.ts", + "@uirouter/core/vanilla/plugins.ts", + "@uirouter/core/common/glob.ts", + "@uirouter/core/state/stateObject.ts", + "@uirouter/core/common/coreservices.ts", + "@uirouter/core/common/queue.ts", + "@uirouter/core/transition/rejectFactory.ts", + "@uirouter/core/transition/interface.ts", + "@uirouter/core/state/targetState.ts", + "@uirouter/core/transition/transitionHook.ts", + "@uirouter/core/path/pathNode.ts", + "@uirouter/core/path/pathFactory.ts", + "@uirouter/core/resolve/resolvable.ts", + "@uirouter/core/resolve/interface.ts", + "@uirouter/core/resolve/resolveContext.ts", + "@uirouter/core/transition/transition.ts", + "@uirouter/core/params/paramTypes.ts", + "@uirouter/core/params/stateParams.ts", + "@uirouter/core/state/stateMatcher.ts", + "@uirouter/core/state/stateQueueManager.ts", + "@uirouter/core/state/stateRegistry.ts", + "@uirouter/core/url/urlMatcherFactory.ts", + "@uirouter/core/url/urlRule.ts", + "@uirouter/core/view/view.ts", + "@uirouter/core/globals.ts", + "@uirouter/core/url/urlService.ts", + "@uirouter/core/router.ts", + "@uirouter/core/hooks/redirectTo.ts", + "@uirouter/core/hooks/resolve.ts", + "@uirouter/core/hooks/views.ts", + "@uirouter/core/hooks/updateGlobals.ts", + "@uirouter/core/hooks/url.ts", + "@uirouter/core/transition/transitionEventType.ts", + "@uirouter/core/transition/transitionService.ts", + "@uirouter/core/state/stateService.ts", + "@uirouter/core/vanilla/q.ts", + "@uirouter/core/vanilla/injector.ts", + "@uirouter/core/vanilla/baseLocationService.ts", + "@uirouter/core/vanilla/hashLocationService.ts", + "@uirouter/core/vanilla/memoryLocationService.ts", + "@uirouter/core/vanilla/pushStateLocationService.ts", + "@uirouter/core/vanilla/memoryLocationConfig.ts", + "@uirouter/core/vanilla/browserLocationConfig.ts", + "@uirouter/core/interface.ts" + ], + "sourcesContent": [ + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n", + "/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n", + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n", + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n", + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}", + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n", + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n", + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n", + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n", + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n", + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n", + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n", + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n", + "/**\n * @coreapi\n * @module core\n */\n/** \n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n", + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n", + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n", + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];", + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n", + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n", + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n", + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport { fromJson, toJson, identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n", + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n", + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n", + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n", + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}", + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n", + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n", + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n", + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n", + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n", + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n", + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n", + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n", + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n", + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n", + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;", + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}", + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n", + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}" + ], + "names": [ + "fn", + "args", + "length", + "func_args_length", + "apply", + "curried", + "concat", + "slice", + "arguments", + "initial_args", + "start", + "i", + "result", + "this", + "call", + "_i", + "funcs", + "compose", + "reverse", + "fn1", + "fn2", + "fnName", + "obj", + "struct", + "x", + "val", + "isArray", + "head", + "tail", + "filter", + "not", + "isString", + "isFunction", + "source", + "target", + "bind", + "fnNames", + "latebind", + "bindFunction", + "makeLateRebindFn", + "Object", + "keys", + "reduce", + "acc", + "name", + "array", + "indexOf", + "idx", + "splice", + "arr", + "push", + "opts", + "defaultsList", + "_defaultsList", + "defaultVals", + "extend", + "pick", + "first", + "second", + "path", + "n", + "propNames", + "objCopy", + "prop_1", + "inArray", + "key", + "collection", + "propName", + "map", + "prop", + "callback", + "accept", + "forEach", + "item", + "predicateOrMap", + "errMsg", + "Error", + "maxArrayLen", + "min", + "Math", + "memo", + "keyValTuple", + "value", + "undefined", + "src", + "dest", + "cb", + "_this", + "toObj", + "j", + "o1", + "o2", + "t1", + "tup", + "all", + "_arraysEq", + "isDate", + "getTime", + "isRegExp", + "toString", + "any", + "b", + "_equals", + "a1", + "a2", + "arrayTuples", + "t", + "uiview", + "state", + "creationContext", + "id", + "$type", + "fqn", + "input", + "isNumber", + "Category", + "criterion", + "_state", + "globStrings", + "toMatch", + "glob", + "Glob", + "matches", + "matchGlobs", + "registry", + "transitionService", + "eventType", + "matchObject", + "options", + "registeredHook", + "RegisteredHook", + "removeHookFn", + "hooks", + "deregister", + "_registeredHooks", + "removeFrom", + "hookRegistrationFn", + "reverseDepthSort", + "l", + "r", + "factor", + "depthDelta", + "node", + "hook", + "priority", + "type", + "mode", + "isDefined", + "allTruthyMode", + "arrayWrap", + "arrayUnwrap", + "val1", + "val2", + "left", + "right", + "paramTypeFn", + "wrapperFn", + "arrayEqualsHandler", + "arrayHandler", + "dynamic", + "pattern", + "inherit", + "is", + "$arrayMode", + "cfg", + "isShorthand", + "getStaticDefaultValue", + "$$fn", + "isInjectable", + "urlType", + "location", + "paramTypes", + "DefType", + "CONFIG", + "PATH", + "SEARCH", + "ParamType", + "config", + "isOptional", + "defaultPolicy", + "squash", + "arrayMode", + "replace", + "configuredKeys", + "from", + "to", + "max", + "str", + "substr", + "camelCase", + "$1", + "toLowerCase", + "fnStr", + "fnToString", + "namedFunctionMatch", + "match", + "toStr", + "_fn", + "o", + "isObject", + "seen", + "stringifyPattern", + "JSON", + "stringify", + "format", + "delim", + "re", + "RegExp", + "split", + "identity", + "pushR", + "self", + "$$state", + "parent", + "data", + "includes", + "annotate", + "$injector", + "services", + "strictDi", + "isResolveLiteral", + "token", + "resolveFn", + "isLikeNg2Provider", + "provide", + "useValue", + "useFactory", + "useExisting", + "useClass", + "isTupleFromObj", + "p", + "literal2Resolvable", + "Resolvable", + "deps", + "policy", + "dependencies", + "tuple2Resolvable", + "pipe", + "tuple", + "item2Resolvable", + "decl", + "resolve", + "resolveObj", + "resolvePolicies", + "resolvePolicy", + "string", + "param", + "surroundPattern", + "url", + "isHtml5", + "absolute", + "baseHref", + "stripFile", + "handler", + "TargetState", + "isDef", + "trans", + "addResolvable", + "UIRouter", + "router", + "Transition", + "params", + "entering", + "hookName", + "transition", + "hookFn", + "Array", + "states", + "stateRegistry", + "register", + "lazyLoadFn", + "lazyLoad", + "promise", + "success", + "error", + "err", + "$q", + "reject", + "when", + "then", + "updateStateRegistry", + "ignoredReason", + "_ignoredReason", + "trace", + "traceTransitionIgnored", + "pending", + "globals", + "abort", + "Rejection", + "ignored", + "toPromise", + "valid", + "orEmptyString", + "_a", + "beforehash", + "hash", + "_b", + "search", + "serviceClass", + "configurationClass", + "dispose", + "service", + "configuration", + "locationService", + "locationConfig", + "propEq", + "curry", + "parse", + "ctor", + "constructor", + "eq", + "other", + "v", + "text", + "regexpString", + "seg", + "join", + "regexp", + "test", + "exec", + "StateObject", + "create", + "stateDecl", + "isStateClass", + "prototype", + "__stateObjectCache", + "nameGlob", + "fromString", + "ref", + "root", + "defaults", + "matchingKeys", + "parameters", + "values", + "hasOwnProperty", + "parameter", + "find", + "tis", + "isUndefined", + "isNull", + "isNullOrUndefined", + "or", + "isState", + "isPromise", + "and", + "notImplemented", + "fnname", + "global", + "angular", + "fromJson", + "toJson", + "_forEach", + "assign", + "_extend", + "equals", + "extra", + "_inArray", + "_removeFrom", + "pushTo", + "_pushTo", + "deregAll", + "functions", + "mergeR", + "mapObj", + "allTrueR", + "elem", + "anyTrueR", + "unnestR", + "flattenR", + "uniqR", + "unnest", + "flatten", + "assertPredicate", + "assertFn", + "assertMap", + "pairs", + "silenceUncaughtInPromise", + "catch", + "e", + "silentRejection", + "_items", + "_limit", + "Queue", + "items", + "shift", + "size", + "current", + "RejectType", + "message", + "detail", + "d", + "_transitionRejection", + "rejection", + "SUPERSEDED", + "redirected", + "superseded", + "INVALID", + "IGNORED", + "ABORTED", + "ERROR", + "errored", + "viewConfigString", + "viewConfig", + "view", + "viewDecl", + "$context", + "$id", + "$uiViewName", + "$uiViewContextAnchor", + "consoleLog", + "Function", + "console", + "log", + "consoletable", + "table", + "_tid", + "_rid", + "transLbl", + "approximateDigests", + "Trace", + "enabled", + "categories", + "k", + "parseInt", + "isNaN", + "normalizedCat", + "category", + "_enabled", + "_set", + "TRANSITION", + "step", + "HOOK", + "event", + "context", + "functionToString", + "maxLength", + "hookResult", + "transitionOptions", + "RESOLVE", + "resolvable", + "reason", + "finalState", + "viewData", + "UIVIEW", + "padString", + "uiViewString", + "traceUIViewEvent", + "html", + "VIEWCONFIG", + "mapping", + "uiViewData", + "ui-view fqn", + "state: view name", + "$name", + "sort", + "a", + "localeCompare", + "TransitionHookPhase", + "TransitionHookScope", + "_stateRegistry", + "_identifier", + "_params", + "_options", + "_definition", + "matcher", + "relative", + "base", + "stateName", + "newParams", + "newOpts", + "defaultOptions", + "noop", + "traceData", + "stateContext", + "hookPhase", + "RUN", + "isActive", + "TransitionHook", + "stateService", + "defaultErrorHandler", + "_deregistered", + "notCurrent", + "getNotCurrentRejection", + "traceHookInvocation", + "normalizeErr", + "normalize", + "handleError", + "getErrorHandler", + "handleResult", + "getResultHandler", + "synchronous", + "invokeLimit", + "invokeCount", + "handleHookResult", + "traceHookResult", + "aborted", + "_disposed", + "_aborted", + "isSuperseded", + "waitFor", + "createHookChainR", + "prev", + "nextHook", + "invokeHook", + "doneCallback", + "remainingHooks", + "chain", + "logError", + "tranSvc", + "matchCriteria", + "removeHookFromRegistry", + "nodes", + "matching", + "matchState", + "_pluginapi", + "_getPathTypes", + "treeChanges", + "criteria", + "_getDefaultMatchCriteria", + "mn", + "pathtype", + "isStateHook", + "scope", + "STATE", + "_matchingNodes", + "_getMatchingNodes", + "every", + "HookBuilder", + "phase", + "_getEvents", + "buildHooks", + "hookType", + "matchingHooks", + "getMatchingHooks", + "baseHookOptions", + "makeTransitionHooks", + "criteriaMatchPath", + "transitionHook", + "tupleSort", + "reverseSort", + "isCreate", + "CREATE", + "$transitions", + "reg", + "getHooks", + "def", + "sub", + "decode", + "isSearch", + "ArrayType", + "hasOwn", + "urlMatcherFactory", + "unwrapShorthand", + "getType", + "arrayDefaults", + "arrayParamNomenclature", + "$asArray", + "raw", + "getSquashPolicy", + "defaultSquashPolicy", + "getReplace", + "Param", + "_defaultValueCache", + "defaultValue", + "invoke", + "$normalize", + "normalized", + "encoded", + "encode", + "paramValues", + "params_1", + "values1", + "values2", + "changed", + "validates", + "stateOrNode", + "PathNode", + "paramSchema", + "resolvables", + "views", + "res", + "clone", + "getParamVal", + "paramDef", + "pDef", + "applyPairs", + "paramsFn", + "diff", + "PathUtils", + "targetState", + "toParams", + "$state", + "applyRawParams", + "fromPath", + "toPath", + "buildPath", + "inheritParams", + "$view", + "viewDecls", + "subPath", + "viewConfigs", + "createViewConfig", + "toKeys", + "toNode", + "toParamVals", + "incomingParamVals", + "omit", + "fromParamVals", + "nodeParamVals", + "noInherit", + "ownParamVals", + "makeInheritedParamsNode", + "reloadState", + "retainedNode", + "cloned", + "keep", + "node1", + "node2", + "nonDynamicParams", + "retained", + "exiting", + "retainedWithToParams", + "applyToParams", + "pathA", + "pathB", + "done", + "nodeA", + "nodeB", + "predicate", + "elementIdx", + "defaultResolvePolicy", + "async", + "arg1", + "resolved", + "literal", + "thisPolicy", + "statePolicy", + "resolveContext", + "getResolvableDependencies", + "getDependencies", + "get", + "invokeResolveFn", + "resolvedDeps", + "waitForRx", + "observable$", + "cached", + "cache", + "take", + "findNode", + "maybeWaitForRx", + "getPolicy", + "applyResolvedValue", + "resolvedValue", + "traceResolvableResolved", + "LAZY", + "EAGER", + "WAIT", + "NOWAIT", + "RXWAIT", + "whens", + "ALL_WHENS", + "EAGER_WHENS", + "NATIVE_INJECTOR_TOKEN", + "_path", + "ResolveContext", + "newResolvables", + "whenOption", + "matchedWhens", + "traceResolvePath", + "matchesPolicy", + "acceptedVals", + "whenOrAsync", + "promises", + "nodeResolvables", + "nowait", + "wait", + "subContext", + "getResult", + "_injector", + "UIInjectorImpl", + "availableResolvables", + "_node", + "getDependency", + "fromInjector", + "injector", + "getNative", + "native", + "getResolvable", + "stateSelf", + "defer", + "_deferred", + "_targetState", + "_transitionCount", + "buildToPath", + "_treeChanges", + "createTransitionHookRegFns", + "onCreateHooks", + "_hookBuilder", + "buildHooksForPhase", + "invokeHooks", + "applyViewConfigs", + "makeEvent", + "enteringStates", + "$from", + "$to", + "compare", + "pathname", + "freeze", + "pathName", + "getTokens", + "topath", + "targetNode", + "addResolvables", + "redirectedFrom", + "rf", + "originalTransition", + "redirects", + "redirectOpts", + "newOptions", + "withOptions", + "newTransition", + "originalEnteringNodes", + "redirectEnteringNodes", + "tc", + "reload", + "nodeSchemas", + "schema", + "toVals", + "fromVals", + "changes", + "_changedParams", + "same", + "newTC", + "pendTC", + "runAllHooks", + "getHooksFor", + "transitionSuccess", + "traceSuccess", + "SUCCESS", + "transitionError", + "traceError", + "_error", + "runTransition", + "allRunHooks", + "startTransition", + "lastStartedTransitionId", + "transitionHistory", + "enqueue", + "traceTransitionStart", + "allBeforeHooks", + "BEFORE", + "abstract", + "paramDefs", + "invalidParams", + "fromStateOrName", + "toStateOrName", + "avoidEmptyHash", + "stringifyPatternFn", + "isRejection", + "isRejectionPromise", + "beforeAfterSubstr", + "char", + "hostRegex", + "splitHash", + "splitQuery", + "splitEqual", + "trimHashVal", + "ParamTypes", + "makeType", + "definition", + "types", + "defaultTypes", + "definitionFn", + "typeQueue", + "_flushTypeQueue", + "makeDefaultType", + "valToString", + "defaultTypeBase", + "String", + "query", + "int", + "bool", + "Boolean", + "date", + "getFullYear", + "getMonth", + "getDate", + "capture", + "Date", + "valueOf", + "json", + "defaultRuleSortFn", + "StateParams", + "$current", + "parentParams", + "parents", + "ancestors", + "inherited", + "inheritList", + "parseUrl", + "charAt", + "substring", + "getUrlBuilder", + "$urlMatcherFactoryProvider", + "stateDec", + "parsed", + "compile", + "paramMap", + "paramConfig", + "reloadOnSearch", + "isMatcher", + "navigable", + "append", + "getNavigableBuilder", + "isRoot", + "getParamsBuilder", + "paramFactory", + "makeConfigParam", + "fromConfig", + "urlParams", + "nonUrlParams", + "parentName", + "builders", + "nameBuilder", + "selfBuilder", + "parentBuilder", + "dataBuilder", + "pathBuilder", + "includesBuilder", + "resolvablesBuilder", + "StateBuilder", + "parentFn", + "segments", + "pop", + "_states", + "StateMatcher", + "stateOrName", + "matchGlob", + "isStr", + "isRelative", + "resolvePath", + "baseState", + "splitName", + "pathLength", + "relName", + "$registry", + "$urlRouter", + "builder", + "listeners", + "queue", + "StateQueueManager", + "flush", + "registered", + "orphans", + "previousQueueLength", + "getState", + "name_1", + "build", + "orphanIdx", + "existingState", + "existingFutureState", + "attachRoute", + "listener", + "s", + "rule", + "urlRuleFactory", + "_router", + "stateQueue", + "urlRouter", + "_registerRoot", + "StateRegistry", + "rootStateDef", + "#", + "_root", + "stateDefinition", + "getChildren", + "children", + "deregistered", + "$ur", + "rules", + "removeRule", + "deregisteredStates", + "_deregisterTree", + "found", + "func", + "memoizeTo", + "splitOnSlash", + "splitOnDelim", + "strict", + "caseInsensitive", + "m", + "segment", + "placeholder", + "searchPlaceholder", + "last", + "patterns", + "checkParamErrors", + "UrlMatcher", + "nameValidator", + "matchDetails", + "index", + "_segments", + "lastIndex", + "fromSearch", + "_compiled", + "quoteRegExp", + "_children", + "_cache", + "allParams", + "pathParams", + "searchParams", + "nPathSegments", + "urlm", + "reverseString", + "unquoteDashes", + "validParamVal", + "isValid", + "isDefaultValue", + "urlMatchers", + "pathSegmentsAndParams", + "getDetails", + "queryParams", + "isInvalid", + "pathString", + "encodeDashes", + "encodeURIComponent", + "queryString", + "paramDetails", + "c", + "charCodeAt", + "toUpperCase", + "joinNeighborsR", + "weights", + "weightsA", + "weightsB", + "padVal", + "len", + "cmp", + "_isStrictMode", + "_isCaseInsensitive", + "UrlMatcherFactory", + "_defaultSquashPolicy", + "_getConfig", + "object", + "UrlRuleFactory", + "what", + "makeRule", + "_what", + "fromUrlMatcher", + "fromState", + "fromRegExp", + "BaseUrlRule", + "urlMatcher", + "optional", + "_handler", + "details", + "matchPriority", + "href", + "transitionTo", + "sticky", + "redirectUrlTo", + "Number", + "prioritySort", + "typeSort", + "URLMATCHER", + "REGEXP", + "RAW", + "OTHER", + "urlMatcherSort", + "idSort", + "useMatchPriority", + "createProxyFunctions", + "UrlRouter", + "listen", + "_rules", + "_otherwiseFn", + "compareFn", + "stableSort", + "_sortFn", + "_sorted", + "arrOfWrapper", + "wrapperA", + "wrapperB", + "cmpDiff", + "wrapper", + "ensureSorted", + "best", + "weight", + "evt", + "defaultPrevented", + "$url", + "urlService", + "newurl", + "go", + "_stopFn", + "onChange", + "sync", + "read", + "html5Mode", + "hashPrefix", + "appendBasePath", + "slash", + "port", + "protocol", + "host", + "isUrlRule", + "_id", + "handlerFn", + "getHandlerFn", + "matchFn", + "urlParts", + "interceptDeferred", + "_rootViewContext", + "_viewConfigFactory", + "_registeredUIViews", + "_uiViews", + "_activeViewConfigs", + "_viewConfigs", + "ViewService", + "_rootContext", + "viewType", + "factory", + "_viewConfigFactories", + "cfgFactory", + "cfgs", + "traceViewServiceEvent", + "uiView", + "stateDepth", + "count", + "uiViewsByFqn", + "uiv", + "depthCompare", + "depthFn", + "posNeg", + "matchingConfigPair", + "matchingConfigs", + "viewConfigDepth", + "configureUIView", + "configUpdated", + "uiViewDepth", + "traceViewSync", + "traceViewServiceUIViewEvent", + "uiViews", + "fqnAndTypeMatches", + "rawViewName", + "viewAtContext", + "uiViewName", + "uiViewContextAnchor", + "relativeViewNameSugar", + "anchor", + "vc", + "vcSegments", + "uivSegments", + "negOffset", + "fqnToFirstSegment", + "uiViewContext", + "UIRouterGlobals", + "clear", + "successfulTransitions", + "makeStub", + "locationServicesFns", + "locationConfigFns", + "umfFns", + "rulesFns", + "syncFns", + "lateBind", + "locationServices", + "umf", + "UrlService", + "_routerInstance", + "locationServiceStub", + "locationConfigStub", + "TransitionService", + "StateService", + "viewService", + "disposable", + "_disposables", + "plugin", + "pluginInstance", + "_plugins", + "pluginName", + "registerAddCoreResolvables", + "onCreate", + "addCoreResolvables", + "redirectToHook", + "redirect", + "redirectTo", + "registerRedirectToHook", + "onStart", + "onExitHook", + "makeEnterExitRetainHook", + "registerOnExitHook", + "onExit", + "onRetainHook", + "registerOnRetainHook", + "onRetain", + "onEnterHook", + "registerOnEnterHook", + "onEnter", + "eagerResolvePath", + "registerEagerResolvePath", + "lazyResolveState", + "registerLazyResolveState", + "loadEnteringViews", + "enteringViews", + "load", + "registerLoadEnteringViews", + "onFinish", + "activateViews", + "exitingViews", + "deactivateViewConfig", + "activateViewConfig", + "registerActivateViews", + "onSuccess", + "updateGlobalState", + "transitionSuccessful", + "copy", + "clearCurrentTransition", + "registerUpdateGlobalState", + "updateUrl", + "urlOptions", + "update", + "registerUpdateUrl", + "lazyLoadHook", + "orig", + "identifier", + "parts", + "lazyLoadState", + "retryTransition", + "registerLazyLoadHook", + "onBefore", + "hookOrder", + "HANDLE_RESULT", + "REJECT_ERROR", + "registerIgnoredTransitionHook", + "ignoredHook", + "registerInvalidTransitionHook", + "invalidTransitionHook", + "defaultTransOpts", + "notify", + "custom", + "_deregisterHookFns", + "_defineCorePaths", + "_defineCoreEvents", + "_registerCoreTransitionHooks", + "hooksArray", + "Phase", + "TH", + "paths", + "_criteriaPaths", + "_defineEvent", + "LOG_REJECTED_RESULT", + "THROW_ERROR", + "LOG_ERROR", + "_definePathType", + "TransitionEventType", + "_eventTypes", + "cmpByPhase", + "hookScope", + "fns", + "addCoreResolves", + "invalid", + "eagerResolve", + "lazyResolve", + "loadViews", + "updateGlobals", + "$error$", + "stack", + "getters", + "boundFns", + "invalidCallbacks", + "toState", + "nextCallback", + "callbackQueue", + "dequeue", + "checkForRedirect", + "invokeNextCallback", + "makeTargetState", + "latestThing", + "peekTail", + "latest", + "defautGoOpts", + "transOpts", + "latestSuccess", + "currentPath", + "getCurrentPath", + "exists", + "_handleInvalidTargetState", + "rejectedTransitionHandler", + "isLatest", + "run", + "transitionToPromise", + "include", + "lossy", + "$inherit", + "nav", + "_defaultErrorHandler", + "Promise", + "deferred", + "STRIP_COMMENTS", + "ARGUMENT_NAMES", + "has", + "locals", + "ensureExist", + "$inject", + "keyValsToObjectR", + "accum", + "getParams", + "buildUrl", + "loc", + "searchObject", + "fireAfterUpdate", + "_listeners", + "_get", + "_location", + "_history", + "history", + "BaseLocationServices", + "_super", + "addEventListener", + "_listener", + "__extends", + "HashLocationService", + "title", + "removeEventListener", + "MemoryLocationService", + "_url", + "_config", + "PushStateLocationService", + "basePrefix", + "_getBasePrefix", + "exactMatch", + "startsWith", + "fullUrl", + "replaceState", + "pushState", + "_port", + "_protocol", + "_host", + "_baseHref", + "newval", + "_hashPrefix", + "_isHtml5", + "BrowserLocationConfig", + "hostname", + "newprefix", + "applyDocumentBaseHref", + "baseTag", + "document", + "getElementsByTagName", + "origin", + "hashLocationPlugin", + "locationPluginFactory", + "pushStateLocationPlugin", + "memoryLocationPlugin", + "MemoryLocationConfig", + "UIRouterPluginBase" + ], + "mappings": ";;;;;;wNAoDA,YAAsBA,GAIpB,WAAiBC,GACf,MAAIA,GAAKC,QAAUC,EACVH,EAAGI,MAAM,KAAMH,GACjB,WACL,MAAOI,GAAQJ,EAAKK,UAAUC,MAAMH,MAAMI,cAP9C,GAAIC,MAAkBF,MAAMH,MAAMI,WAAY,IAC1CL,EAAmBH,EAAGE,MAS1B,OAAOG,GAAQI,GAWjB,aACE,GAAIR,GAAOO,UACPE,EAAQT,EAAKC,OAAS,CAC1B,OAAO,YAEL,IADA,GAAIS,GAAID,EAAOE,EAASX,EAAKS,GAAON,MAAMS,KAAML,WACzCG,KAAKC,EAASX,EAAKU,GAAGG,KAAKD,KAAMD,EACxC,OAAOA,IAUX,iBAAqB,aAAAG,mBAAAA,IAAAC,iBACnB,OAAOC,GAAQb,MAAM,QAASG,MAAMO,KAAKN,WAAWU,WA2CtD,WAAoBC,EAAqBC,GACvC,MAAO,gBAAC,aAAAL,mBAAAA,IAAAd,iBAAmB,OAAAkB,GAAIf,MAAM,KAAMH,IAASmB,EAAIhB,MAAM,KAAMH,IAOtE,WAAmBkB,EAAqBC,GACtC,MAAO,gBAAC,aAAAL,mBAAAA,IAAAd,iBAAmB,OAAAkB,GAAIf,MAAM,KAAMH,IAASmB,EAAIhB,MAAM,KAAMH,IA8BtE,WAAuBoB,EAAgBpB,GACrC,MAAO,UAACqB,GACJ,MAAAA,GAAID,GAAQjB,MAAMkB,EAAKrB,IA2C7B,WAAwBsB,GACtB,MAAO,UAASC,GACd,IAAK,GAAIb,GAAI,EAAGA,EAAIY,EAAOrB,OAAQS,IACjC,GAAIY,EAAOZ,GAAG,GAAGa,GAAI,MAAOD,GAAOZ,GAAG,GAA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oC,WACtB1sC,eAAY,WAAM,OAAA,GAClBA,gBAAa,SAAC2sC,GAAY,MAAArkC,IAAUqkC,GAAUjoC,EAAKkoC,YAAcD,EAASjoC,EAAKkoC,aAC/E5sC,aAAU0c,EACZ,0BCXE,WAAYpN,EAAiBu9B,gBAAAA,MAAA7sC,cAAA6sC,EAHrB7sC,mBAAYsE,GACZtE,iBAAc,GAwCxB,MApCE8sC,kBAAA,WACE,MAAIjjC,UAASg0B,KACJzC,OAAOvxB,SAASg0B,MAGE,UAApB79B,KAAK89B,WAAyB,IAAM,IAG7CgP,qBAAA,WACE,MAAOjjC,UAASi0B,SAASrzB,QAAQ,KAAM,KAGzCqiC,iBAAA,WACE,MAAOjjC,UAASkjC,UAGlBD,sBAAA,WACE,MAAO9sC,MAAK6sC,UAIdC,uBAAA,SAAWE,GACT,MAAO1kC,IAAU0kC,GAAahtC,KAAK4sC,YAAcI,EAAYhtC,KAAK4sC,aAGpEE,qBAAA,SAAS9R,GACP,MAAO1yB,IAAU0yB,GAAQh7B,KAAK0sC,UAAY1R,EACxC1yB,GAAUtI,KAAK0sC,WAAa1sC,KAAK0sC,UAAY1sC,KAAKitC,yBAGtDH,kCAAA,WACE,GAAII,GAA2BC,SAASC,qBAAqB,QAAQ,EACrE,OAAOptC,MAAK0sC,UAAYQ,EAAUA,EAAQlS,KAAKjwB,OAAOlB,SAASwjC,OAAOhuC,QAAU,IAGlFytC,oBAAA,kBzCzBWQ,GACTC,GAAsB,4BAA4B,EAAO9B,GAAqBqB,IAGrEU,GACTD,GAAsB,6BAA6B,EAAMxB,GAA0Be,IAG1EW,GACTF,GAAsB,0BAA0B,EAAO3B,GAAuB8B,kB0CgFlF,cAGA,MADEC,qBAAA,SAAQr+B" +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/artifacts.json b/public/app/vendor/node_modules/@uirouter/core/artifacts.json new file mode 100644 index 00000000..363bb1a5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/artifacts.json @@ -0,0 +1,8 @@ +{ + "ARTIFACTS": [ + "lib", + "lib-esm", + "_bundles", + "package.json" + ] +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.d.ts new file mode 100644 index 00000000..fa499c01 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.d.ts @@ -0,0 +1,376 @@ +import { StateObject } from "../state/stateObject"; +export declare const root: any; +export declare const fromJson: any; +export declare const toJson: any; +export declare const forEach: any; +export declare const extend: { + (target: T, source: U): T & U; + (target: T, source1: U, source2: V): T & U & V; + (target: T, source1: U, source2: V, source3: W): T & U & V & W; + (target: object, ...sources: any[]): any; +}; +export declare const equals: any; +export declare function identity(x: any): any; +export declare function noop(): any; +export declare type Mapper = (x: X, key?: (string | number)) => T; +export interface TypedMap { + [key: string]: T; +} +export declare type Predicate = (x?: X) => boolean; +/** + * An ng1-style injectable + * + * This could be a (non-minified) function such as: + * ```js + * function injectableFunction(SomeDependency) { + * + * } + * ``` + * + * or an explicitly annotated function (minify safe) + * ```js + * injectableFunction.$inject = [ 'SomeDependency' ]; + * function injectableFunction(SomeDependency) { + * + * } + * ``` + * + * or an array style annotated function (minify safe) + * ```js + * ['SomeDependency', function injectableFunction(SomeDependency) { + * + * }]; + * ``` + * + * @publicapi + */ +export declare type IInjectable = (Function | any[]); +export interface Obj extends Object { + [key: string]: any; +} +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +export declare function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind?: boolean): Obj; +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +export declare const inherit: (parent: Obj, extra?: Obj) => any; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +export declare const inArray: typeof _inArray; +export declare function _inArray(array: any[], obj: any): boolean; +export declare function _inArray(array: any[]): (obj: any) => boolean; +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +export declare const removeFrom: typeof _removeFrom; +export declare function _removeFrom(array: T[], obj: T): T[]; +export declare function _removeFrom(array: T[]): (obj: T) => T[]; +/** pushes a values to an array and returns the value */ +export declare const pushTo: typeof _pushTo; +export declare function _pushTo(arr: T[], val: T): T; +export declare function _pushTo(arr: T[]): (val: T) => T; +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +export declare const deregAll: (functions: Function[]) => void; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +export declare function defaults(opts: any, ...defaultsList: Obj[]): any; +/** Reduce function that merges each element of the list into a single object, using extend */ +export declare const mergeR: (memo: Obj, item: Obj) => Obj; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +export declare function ancestors(first: StateObject, second: StateObject): StateObject[]; +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +export declare function pick(obj: Obj, propNames: string[]): Obj; +/** + * Return a copy of the object omitting the blacklisted properties. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +export declare function omit(obj: Obj, propNames: string[]): Obj; +/** Given an array of objects, maps each element to a named property of the element. */ +export declare function pluck(collection: Obj[], propName: string): T[]; +/** Given an object, maps each property of the object to a named property of the property. */ +export declare function pluck(collection: { + [key: string]: any; +}, propName: string): { + [key: string]: any; +}; +/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */ +export declare function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[]; +/** Given an object, returns a new object with only those properties that passed the callback predicate */ +export declare function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap; +/** Given an object, return the first property of that object which passed the callback predicate */ +export declare function find(collection: TypedMap, callback: Predicate): T; +/** Given an array of objects, returns the first object which passed the callback predicate */ +export declare function find(collection: T[], callback: Predicate): T; +/** Given an object, returns a new object, where each property is transformed by the callback function */ +export declare let mapObj: (collection: { + [key: string]: T; +}, callback: Mapper) => { + [key: string]: U; +}; +/** Given an array, returns a new array, where each element is transformed by the callback function */ +export declare function map(collection: T[], callback: Mapper): U[]; +export declare function map(collection: { + [key: string]: T; +}, callback: Mapper): { + [key: string]: U; +}; +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +export declare const values: ((obj: TypedMap) => T[]); +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +export declare const allTrueR: (memo: boolean, elem: any) => any; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +export declare const anyTrueR: (memo: boolean, elem: any) => any; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export declare const unnestR: (memo: any[], elem: any[]) => any[]; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export declare const flattenR: (memo: any[], elem: any) => any; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +export declare function pushR(arr: any[], obj: any): any[]; +/** Reduce function that filters out duplicates */ +export declare const uniqR: (acc: T[], token: T) => T[]; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export declare const unnest: (arr: any[]) => any; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export declare const flatten: (arr: any[]) => any; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +export declare const assertPredicate: (predicate: Predicate, errMsg: (string | Function)) => Predicate; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +export declare const assertMap: (mapFn: (t: T) => U, errMsg: (string | Function)) => (t: T) => U; +export declare function assertFn(predicateOrMap: Function, errMsg?: (string | Function)): any; +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +export declare const pairs: (obj: Obj) => any[][]; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +export declare function arrayTuples(...args: any[]): any[]; +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +export declare function applyPairs(memo: TypedMap, keyValTuple: any[]): TypedMap; +/** Get the last element of an array */ +export declare function tail(arr: T[]): T; +/** + * shallow copy from src to dest + */ +export declare function copy(src: Obj, dest?: Obj): Obj; +/** Like Object.assign() */ +export declare function _extend(toObj: Obj, ...fromObjs: Obj[]): any; +export declare const silenceUncaughtInPromise: (promise: Promise) => Promise; +export declare const silentRejection: (error: any) => Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js new file mode 100644 index 00000000..7cf4571d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js @@ -0,0 +1,537 @@ +/** + * Random utility functions used in the UI-Router code + * + * These functions are exported, but are subject to change without notice. + * + * @preferred + * @module common + */ +/** for typedoc */ +import { isFunction, isString, isArray, isRegExp, isDate } from "./predicates"; +import { all, any, prop, curry, not } from "./hof"; +import { services } from "./coreservices"; +export var root = (typeof self === 'object' && self.self === self && self) || + (typeof global === 'object' && global.global === global && global) || this; +var angular = root.angular || {}; +export var fromJson = angular.fromJson || JSON.parse.bind(JSON); +export var toJson = angular.toJson || JSON.stringify.bind(JSON); +export var forEach = angular.forEach || _forEach; +export var extend = Object.assign || _extend; +export var equals = angular.equals || _equals; +export function identity(x) { return x; } +export function noop() { } +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +export function createProxyFunctions(source, target, bind, fnNames, latebind) { + if (latebind === void 0) { latebind = false; } + var bindFunction = function (fnName) { + return source()[fnName].bind(bind()); + }; + var makeLateRebindFn = function (fnName) { return function lateRebindFunction() { + target[fnName] = bindFunction(fnName); + return target[fnName].apply(null, arguments); + }; }; + fnNames = fnNames || Object.keys(source()); + return fnNames.reduce(function (acc, name) { + acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name); + return acc; + }, target); +} +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +export var inherit = function (parent, extra) { + return extend(Object.create(parent), extra); +}; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +export var inArray = curry(_inArray); +export function _inArray(array, obj) { + return array.indexOf(obj) !== -1; +} +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +export var removeFrom = curry(_removeFrom); +export function _removeFrom(array, obj) { + var idx = array.indexOf(obj); + if (idx >= 0) + array.splice(idx, 1); + return array; +} +/** pushes a values to an array and returns the value */ +export var pushTo = curry(_pushTo); +export function _pushTo(arr, val) { + return (arr.push(val), val); +} +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +export var deregAll = function (functions) { + return functions.slice().forEach(function (fn) { + typeof fn === 'function' && fn(); + removeFrom(functions, fn); + }); +}; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +export function defaults(opts) { + var defaultsList = []; + for (var _i = 1; _i < arguments.length; _i++) { + defaultsList[_i - 1] = arguments[_i]; + } + var _defaultsList = defaultsList.concat({}).reverse(); + var defaultVals = extend.apply(null, _defaultsList); + return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals))); +} +/** Reduce function that merges each element of the list into a single object, using extend */ +export var mergeR = function (memo, item) { return extend(memo, item); }; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +export function ancestors(first, second) { + var path = []; + for (var n in first.path) { + if (first.path[n] !== second.path[n]) + break; + path.push(first.path[n]); + } + return path; +} +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +export function pick(obj, propNames) { + 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. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +export function omit(obj, propNames) { + return Object.keys(obj) + .filter(not(inArray(propNames))) + .reduce(function (acc, key) { return (acc[key] = obj[key], acc); }, {}); +} +/** + * Maps an array, or object to a property (by name) + */ +export function pluck(collection, propName) { + return map(collection, prop(propName)); +} +/** Filters an Array or an Object's properties based on a predicate */ +export function filter(collection, callback) { + var arr = isArray(collection), result = arr ? [] : {}; + var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; }; + forEach(collection, function (item, i) { + if (callback(item, i)) + accept(item, i); + }); + return result; +} +/** Finds an object from an array, or a property of an object, that matches a predicate */ +export function find(collection, callback) { + var result; + forEach(collection, function (item, i) { + if (result) + return; + if (callback(item, i)) + result = item; + }); + return result; +} +/** Given an object, returns a new object, where each property is transformed by the callback function */ +export var mapObj = map; +/** Maps an array or object properties using a callback function */ +export function map(collection, callback) { + var result = isArray(collection) ? [] : {}; + forEach(collection, function (item, i) { return result[i] = callback(item, i); }); + return result; +} +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +export var values = function (obj) { + return Object.keys(obj).map(function (key) { return obj[key]; }); +}; +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +export var allTrueR = function (memo, elem) { return memo && elem; }; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +export var anyTrueR = function (memo, elem) { return memo || elem; }; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export var unnestR = function (memo, elem) { return memo.concat(elem); }; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export var flattenR = function (memo, elem) { + return isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem); +}; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +export function pushR(arr, obj) { + arr.push(obj); + return arr; +} +/** Reduce function that filters out duplicates */ +export var uniqR = function (acc, token) { + return inArray(acc, token) ? acc : pushR(acc, token); +}; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export var unnest = function (arr) { return arr.reduce(unnestR, []); }; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export var flatten = function (arr) { return arr.reduce(flattenR, []); }; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +export var assertPredicate = assertFn; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +export var assertMap = assertFn; +export function assertFn(predicateOrMap, errMsg) { + if (errMsg === void 0) { errMsg = "assert failure"; } + return function (obj) { + var result = predicateOrMap(obj); + if (!result) { + throw new Error(isFunction(errMsg) ? errMsg(obj) : errMsg); + } + return result; + }; +} +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +export var pairs = function (obj) { + return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); +}; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +export function arrayTuples() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (args.length === 0) + return []; + var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER + var i, result = []; + for (i = 0; i < maxArrayLen; i++) { + // This is a hot function + // Unroll when there are 1-4 arguments + switch (args.length) { + case 1: + result.push([args[0][i]]); + break; + case 2: + result.push([args[0][i], args[1][i]]); + break; + case 3: + result.push([args[0][i], args[1][i], args[2][i]]); + break; + case 4: + result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); + break; + default: + result.push(args.map(function (array) { return array[i]; })); + break; + } + } + return result; +} +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +export function applyPairs(memo, keyValTuple) { + var key, value; + if (isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; +} +/** Get the last element of an array */ +export function tail(arr) { + return arr.length && arr[arr.length - 1] || undefined; +} +/** + * shallow copy from src to dest + */ +export function copy(src, dest) { + if (dest) + Object.keys(dest).forEach(function (key) { return delete dest[key]; }); + if (!dest) + dest = {}; + return extend(dest, src); +} +/** Naive forEach implementation works with Objects or Arrays */ +function _forEach(obj, cb, _this) { + if (isArray(obj)) + return obj.forEach(cb, _this); + Object.keys(obj).forEach(function (key) { return cb(obj[key], key); }); +} +export function _extend(toObj) { + for (var i = 1; i < arguments.length; i++) { + var obj = arguments[i]; + if (!obj) + continue; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + toObj[keys[j]] = obj[keys[j]]; + } + } + return toObj; +} +function _equals(o1, o2) { + if (o1 === o2) + return true; + if (o1 === null || o2 === null) + return false; + if (o1 !== o1 && o2 !== o2) + return true; // NaN === NaN + var t1 = typeof o1, t2 = typeof o2; + if (t1 !== t2 || t1 !== 'object') + return false; + var tup = [o1, o2]; + if (all(isArray)(tup)) + return _arraysEq(o1, o2); + if (all(isDate)(tup)) + return o1.getTime() === o2.getTime(); + if (all(isRegExp)(tup)) + return o1.toString() === o2.toString(); + if (all(isFunction)(tup)) + return true; // meh + var predicates = [isFunction, isArray, isDate, isRegExp]; + if (predicates.map(any).reduce(function (b, fn) { return b || !!fn(tup); }, false)) + return false; + var key, keys = {}; + for (key in o1) { + if (!_equals(o1[key], o2[key])) + return false; + keys[key] = true; + } + for (key in o2) { + if (!keys[key]) + return false; + } + return true; +} +function _arraysEq(a1, a2) { + if (a1.length !== a2.length) + return false; + return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true); +} +// issue #2676 +export var silenceUncaughtInPromise = function (promise) { + return promise.catch(function (e) { return 0; }) && promise; +}; +export var silentRejection = function (error) { + return silenceUncaughtInPromise(services.$q.reject(error)); +}; +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js.map new file mode 100644 index 00000000..44855e52 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/common.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "common.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/common.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;GAOG;AACH,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C,MAAM,CAAC,IAAM,IAAI,GAAQ,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC;IAC/E,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC;AAC7E,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI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C,CAAC;QACf,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;QAC7C,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;QACf,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AAED,mBAAmB,EAAS,EAAE,EAAS;IACrC,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC,KAAK,CAAC;IAC1C,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAxB,CAAwB,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,cAAc;AACd,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAC,OAAqB;IAC1D,OAAA,OAAO,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC,CAAC,IAAI,OAAO;AAAhC,CAAgC,CAAC;AACrC,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,KAAU;IACtC,OAAA,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAAnD,CAAmD,CAAC", + "sourcesContent": [ + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.d.ts new file mode 100644 index 00000000..8d394a6b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.d.ts @@ -0,0 +1,183 @@ +/** + * This module is a stub for core services such as Dependency Injection or Browser Location. + * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript. + * + * @module common + */ +/** for typedoc */ +import { IInjectable, Obj } from "./common"; +import { Disposable } from "../interface"; +export declare let notImplemented: (fnname: string) => () => never; +declare let services: CoreServices; +export interface $QLikeDeferred { + resolve: (val?: any) => void; + reject: (reason?: any) => void; + promise: Promise; +} +export interface $QLike { + when(value?: T | PromiseLike): Promise; + reject(reason: any): Promise; + defer(): $QLikeDeferred; + all(promises: { + [key: string]: Promise; + }): Promise; + all(promises: Promise[]): Promise; +} +export interface $InjectorLike { + get(token: any): any; + get(token: any): T; + has(token: any): boolean; + invoke(fn: IInjectable, context?: any, locals?: Obj): any; + annotate(fn: IInjectable, strictDi?: boolean): any[]; + strictDi?: boolean; +} +export interface CoreServices { + $q: $QLike; + $injector: $InjectorLike; +} +export interface LocationServices extends Disposable { + /** + * Gets the current url string + * + * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values. + * + * For example, the URL may be stored in the hash ([[HashLocationServices]]) or + * have a base HREF prepended ([[PushStateLocationServices]]). + * + * The raw URL in the browser might be: + * + * ``` + * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor + * ``` + * + * or + * + * ``` + * http://mysite.com/basepath/internal/path/123?param1=foo#anchor + * ``` + * + * then this method returns: + * + * ``` + * /internal/path/123?param1=foo#anchor + * ``` + * + * + * #### Example: + * ```js + * locationServices.url(); // "/some/path?query=value#anchor" + * ``` + * + * @returns the current value of the url, as a string. + */ + url(): string; + /** + * Updates the url, or gets the current url + * + * Updates the url, changing it to the value in `newurl` + * + * #### Example: + * ```js + * locationServices.url("/some/path?query=value#anchor", true); + * ``` + * + * @param newurl The new value for the URL. + * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values. + * It should not include the protocol, site, port, or base path of an absolute HREF. + * @param replace When true, replaces the current history entry (instead of appending it) with this new url + * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it) + * @return the url (after potentially being processed) + */ + url(newurl: string, replace?: boolean, state?: any): string; + /** + * Gets the path part of the current url + * + * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path` + * + * @return the path portion of the url + */ + path(): string; + /** + * Gets the search part of the current url as an object + * + * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }` + * + * @return the search (querystring) portion of the url, as an object + */ + search(): { + [key: string]: any; + }; + /** + * Gets the hash part of the current url + * + * If the current URL is `/some/path?query=value#anchor`, this returns `anchor` + * + * @return the hash (anchor) portion of the url + */ + hash(): string; + /** + * Registers a url change handler + * + * #### Example: + * ```js + * let deregisterFn = locationServices.onChange((evt) => console.log("url change", evt)); + * ``` + * + * @param callback a function that will be called when the url is changing + * @return a function that de-registers the callback + */ + onChange(callback: Function): Function; +} +/** + * This service returns the location configuration + * + * This service returns information about the location configuration. + * This service is primarily used when building URLs (e.g., for `hrefs`) + */ +export interface LocationConfig extends Disposable { + /** + * Gets the port, e.g., `80` + * + * @return the port number + */ + port(): number; + /** + * Gets the protocol, e.g., `http` + * + * @return the protocol + */ + protocol(): string; + /** + * Gets the host, e.g., `localhost` + * + * @return the protocol + */ + host(): string; + /** + * Gets the base Href, e.g., `http://localhost/approot/` + * + * @return the application's base href + */ + baseHref(): string; + /** + * Returns true when running in pushstate mode + * + * @return true when running in pushstate mode + */ + html5Mode(): boolean; + /** + * Gets the hashPrefix (when not running in pushstate mode) + * + * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the "hashbang" portion. + * + * @return the hash prefix + */ + hashPrefix(): string; + /** + * Sets the hashPrefix (when not running in pushstate mode) + * + * @return the new hash prefix + */ + hashPrefix(newprefix: string): string; +} +export { services }; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js new file mode 100644 index 00000000..0f33cab3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js @@ -0,0 +1,9 @@ +export var notImplemented = function (fnname) { return function () { + throw new Error(fnname + "(): No coreservices implementation for UI-Router is loaded."); +}; }; +var services = { + $q: undefined, + $injector: undefined, +}; +export { services }; +//# sourceMappingURL=coreservices.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js.map new file mode 100644 index 00000000..5ed06b5c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/coreservices.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "coreservices.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/coreservices.ts" + ], + "names": [], + "mappings": "AAWA,MAAM,CAAC,IAAI,cAAc,GAAG,UAAC,MAAc,IAAK,OAAA;IAC9C,MAAM,IAAI,KAAK,CAAI,MAAM,gEAA6D,CAAC,CAAC;AAC1F,CAAC,EAF+C,CAE/C,CAAC;AAEF,IAAI,QAAQ,GAAiB;IAC3B,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;CACrB,CAAC;AAoLF,OAAO,EAAC,QAAQ,EAAC,CAAC", + "sourcesContent": [ + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.d.ts new file mode 100644 index 00000000..6dffcd04 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.d.ts @@ -0,0 +1,63 @@ +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +export declare class Glob { + text: string; + glob: Array; + regexp: RegExp; + constructor(text: string); + matches(name: string): boolean; + /** Returns true if the string has glob-like characters in it */ + static is(text: string): boolean; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + static fromString(text: string): Glob; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js new file mode 100644 index 00000000..ba3e125b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js @@ -0,0 +1,81 @@ +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +var Glob = /** @class */ (function () { + function Glob(text) { + this.text = text; + this.glob = text.split('.'); + var regexpString = this.text.split('.') + .map(function (seg) { + if (seg === '**') + return '(?:|(?:\\.[^.]*)*)'; + if (seg === '*') + return '\\.[^.]*'; + return '\\.' + seg; + }).join(''); + this.regexp = new RegExp("^" + regexpString + "$"); + } + Glob.prototype.matches = function (name) { + return this.regexp.test('.' + name); + }; + /** Returns true if the string has glob-like characters in it */ + Glob.is = function (text) { + return !!/[!,*]+/.exec(text); + }; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + Glob.fromString = function (text) { + return Glob.is(text) ? new Glob(text) : null; + }; + return Glob; +}()); +export { Glob }; +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js.map new file mode 100644 index 00000000..0fd0b01e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/glob.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "glob.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/glob.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH;IAKE,cAAY,IAAY;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE5B,IAAI,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;aAClC,GAAG,CAAC,UAAA,GAAG;YACN,EAAE,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;gBAAC,MAAM,CAAC,oBAAoB,CAAC;YAC9C,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;gBAAE,MAAM,CAAC,UAAU,CAAC;YACpC,MAAM,CAAmB,KAAK,GAAG,GAAG,CAAC;QACvC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEhB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,YAAY,GAAG,GAAG,CAAC,CAAC;IACrD,CAAC;IAED,sBAAO,GAAP,UAAQ,IAAY;QAClB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,gEAAgE;IACzD,OAAE,GAAT,UAAU,IAAY;QACpB,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,4EAA4E;IACrE,eAAU,GAAjB,UAAkB,IAAY;QAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,CAAC;IACH,WAAC;AAAD,CAAC,AAhCD,IAgCC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module core\n */\n/** \n * Matches state names using glob-like pattern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.d.ts new file mode 100644 index 00000000..c8fd2eb2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.d.ts @@ -0,0 +1,162 @@ +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +import { Predicate } from "./common"; +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +export declare function curry(fn: Function): Function; +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +export declare function compose(): () => any; +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +export declare function pipe(...funcs: Function[]): (obj: any) => any; +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +export declare const prop: (name: string) => (obj: any) => any; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +export declare const propEq: Function; +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +export declare const parse: (name: string) => any; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +export declare const not: (fn: Predicate) => Predicate; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +export declare function and(fn1: Predicate, fn2: Predicate): Predicate; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +export declare function or(fn1: Predicate, fn2: Predicate): Predicate; +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +export declare const all: (fn1: Predicate) => (arr: any[]) => boolean; +export declare const any: (fn1: Predicate) => (arr: any[]) => boolean; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +export declare const is: (ctor: new (...args: any[]) => T) => (obj: any) => obj is T; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +export declare const eq: (comp: any) => Predicate; +/** Given a value, returns a function which returns the value */ +export declare const val: (v: T) => () => T; +export declare function invoke(fnName: string): Function; +export declare function invoke(fnName: string, args: any[]): Function; +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +export declare function pattern(struct: Function[][]): Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js new file mode 100644 index 00000000..586ae5f7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js @@ -0,0 +1,236 @@ +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +export function curry(fn) { + var initial_args = [].slice.apply(arguments, [1]); + var func_args_length = fn.length; + function curried(args) { + if (args.length >= func_args_length) + return fn.apply(null, args); + return function () { + return curried(args.concat([].slice.apply(arguments))); + }; + } + return curried(initial_args); +} +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +export function compose() { + var args = arguments; + var start = args.length - 1; + return function () { + var i = start, result = args[start].apply(this, arguments); + while (i--) + result = args[i].call(this, result); + return result; + }; +} +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +export function pipe() { + var funcs = []; + for (var _i = 0; _i < arguments.length; _i++) { + funcs[_i] = arguments[_i]; + } + return compose.apply(null, [].slice.call(arguments).reverse()); +} +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +export var prop = function (name) { + return function (obj) { return obj && obj[name]; }; +}; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +export var propEq = curry(function (name, val, obj) { return obj && obj[name] === val; }); +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +export var parse = function (name) { + return pipe.apply(null, name.split(".").map(prop)); +}; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +export var not = function (fn) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return !fn.apply(null, args); + }; +}; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +export function and(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) && fn2.apply(null, args); + }; +} +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +export function or(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) || fn2.apply(null, args); + }; +} +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +export var all = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; +}; +export var any = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; +}; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +export var is = function (ctor) { + return function (obj) { + return (obj != null && obj.constructor === ctor || obj instanceof ctor); + }; +}; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +export var eq = function (val) { return function (other) { + return val === other; +}; }; +/** Given a value, returns a function which returns the value */ +export var val = function (v) { return function () { return v; }; }; +export function invoke(fnName, args) { + return function (obj) { + return obj[fnName].apply(obj, args); + }; +} +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +export function pattern(struct) { + return function (x) { + for (var i = 0; i < struct.length; i++) { + if (struct[i][0](x)) + return struct[i][1](x); + } + }; +} +//# sourceMappingURL=hof.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js.map new file mode 100644 index 00000000..8aba60f9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/hof.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hof.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/hof.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;GAMG,CAAC,MAAM;AAGV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,gBAAgB,EAAY;IAChC,IAAI,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;IAEjC,iBAAiB,IAAW;QAC1B,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,gBAAgB,CAAC;YAClC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,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AC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC", + "sourcesContent": [ + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.d.ts new file mode 100644 index 00000000..0dd053e2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.d.ts @@ -0,0 +1,9 @@ +/** @module common */ /** for typedoc */ +export * from "./common"; +export * from "./coreservices"; +export * from "./glob"; +export * from "./hof"; +export * from "./predicates"; +export * from "./queue"; +export * from "./strings"; +export * from "./trace"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js new file mode 100644 index 00000000..31103a31 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js @@ -0,0 +1,10 @@ +/** @module common */ /** for typedoc */ +export * from "./common"; +export * from "./coreservices"; +export * from "./glob"; +export * from "./hof"; +export * from "./predicates"; +export * from "./queue"; +export * from "./strings"; +export * from "./trace"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js.map new file mode 100644 index 00000000..1b0b6900 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/index.ts" + ], + "names": [], + "mappings": "AAAA,qBAAqB,CAAC,kBAAkB;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC", + "sourcesContent": [ + "/** @module common */ /** for typedoc */\nexport * from \"./common\";\nexport * from \"./coreservices\";\nexport * from \"./glob\";\nexport * from \"./hof\";\nexport * from \"./predicates\";\nexport * from \"./queue\";\nexport * from \"./strings\";\nexport * from \"./trace\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.d.ts new file mode 100644 index 00000000..d37fa7f5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.d.ts @@ -0,0 +1,27 @@ +import { Predicate } from "./common"; +import { StateObject } from "../state/stateObject"; +export declare const isUndefined: (x: any) => boolean; +export declare const isDefined: Predicate; +export declare const isNull: (o: any) => boolean; +export declare const isNullOrUndefined: Predicate; +export declare const isFunction: (x: any) => x is Function; +export declare const isNumber: (x: any) => x is number; +export declare const isString: (x: any) => x is string; +export declare const isObject: (x: any) => boolean; +export declare const isArray: (arg: any) => arg is any[]; +export declare const isDate: (x: any) => x is Date; +export declare const isRegExp: (x: any) => x is RegExp; +export declare const isState: (x: any) => x is StateObject; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +export declare function isInjectable(val: any): boolean; +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +export declare const isPromise: (x: any) => x is Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js new file mode 100644 index 00000000..0c876bed --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js @@ -0,0 +1,44 @@ +/** Predicates + * + * These predicates return true/false based on the input. + * Although these functions are exported, they are subject to change without notice. + * + * @module common_predicates + */ +/** */ +import { and, not, pipe, prop, or } from "./hof"; +import { StateObject } from "../state/stateObject"; +var toStr = Object.prototype.toString; +var tis = function (t) { return function (x) { return typeof (x) === t; }; }; +export var isUndefined = tis('undefined'); +export var isDefined = not(isUndefined); +export var isNull = function (o) { return o === null; }; +export var isNullOrUndefined = or(isNull, isUndefined); +export var isFunction = tis('function'); +export var isNumber = tis('number'); +export var isString = tis('string'); +export var isObject = function (x) { return x !== null && typeof x === 'object'; }; +export var isArray = Array.isArray; +export var isDate = (function (x) { return toStr.call(x) === '[object Date]'; }); +export var isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; }); +export var isState = StateObject.isState; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +export function isInjectable(val) { + if (isArray(val) && val.length) { + var head = val.slice(0, -1), tail = val.slice(-1); + return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length); + } + return isFunction(val); +} +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +export var isPromise = and(isObject, pipe(prop('then'), isFunction)); +//# sourceMappingURL=predicates.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js.map new file mode 100644 index 00000000..d6c0b8df --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/predicates.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "predicates.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/predicates.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;GAMG;AACH,MAAM;AACN,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AACxC,IAAM,GAAG,GAAG,UAAC,CAAS,IAAK,OAAA,UAAC,CAAM,IAAK,OAAA,OAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAf,CAAe,EAA3B,CAA2B,CAAC;AACvD,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAC5C,MAAM,CAAC,IAAM,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAC1C,MAAM,CAAC,IAAM,MAAM,GAAG,UAAC,CAAM,IAAK,OAAA,CAAC,KAAK,IAAI,EAAV,CAAU,CAAC;AAC7C,MAAM,CAAC,IAAM,iBAAiB,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACzD,MAAM,CAAC,IAAM,UAAU,GAAoC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC3E,MAAM,CAAC,IAAM,QAAQ,GAAkC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrE,MAAM,CAAC,IAAM,QAAQ,GAA6B,GAAG,CAAC,QAAQ,CAAC,CAA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"/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.d.ts new file mode 100644 index 00000000..fef21fae --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.d.ts @@ -0,0 +1,15 @@ +/** + * @module common + */ /** for typedoc */ +export declare class Queue { + private _items; + private _limit; + constructor(_items?: T[], _limit?: number); + enqueue(item: T): T; + dequeue(): T; + clear(): Array; + size(): number; + remove(item: T): T; + peekTail(): T; + peekHead(): T; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js new file mode 100644 index 00000000..e8ff9aca --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js @@ -0,0 +1,44 @@ +/** + * @module common + */ /** for typedoc */ +var Queue = /** @class */ (function () { + function Queue(_items, _limit) { + if (_items === void 0) { _items = []; } + if (_limit === void 0) { _limit = null; } + this._items = _items; + this._limit = _limit; + } + Queue.prototype.enqueue = function (item) { + var items = this._items; + items.push(item); + if (this._limit && items.length > this._limit) + items.shift(); + return item; + }; + Queue.prototype.dequeue = function () { + if (this.size()) + return this._items.splice(0, 1)[0]; + }; + Queue.prototype.clear = function () { + var current = this._items; + this._items = []; + return current; + }; + Queue.prototype.size = function () { + return this._items.length; + }; + Queue.prototype.remove = function (item) { + var idx = this._items.indexOf(item); + return idx > -1 && this._items.splice(idx, 1)[0]; + }; + Queue.prototype.peekTail = function () { + return this._items[this._items.length - 1]; + }; + Queue.prototype.peekHead = function () { + if (this.size()) + return this._items[0]; + }; + return Queue; +}()); +export { Queue }; +//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js.map new file mode 100644 index 00000000..66d03dd9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/queue.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "queue.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/queue.ts" + ], + "names": [], + "mappings": "AAAA;;GAEG,CAAC,kBAAkB;AAEtB;IACE,eAAoB,MAAgB,EAAU,MAAqB;QAA/C,uBAAA,EAAA,WAAgB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,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IACH,YAAC;AAAD,CAAC,AAtCD,IAsCC", + "sourcesContent": [ + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.d.ts new file mode 100644 index 00000000..4486c92e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.d.ts @@ -0,0 +1,57 @@ +import { IInjectable } from "./common"; +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +export declare function maxLength(max: number, str: string): string; +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +export declare function padString(length: number, str: string): string; +export declare function kebobString(camelCase: string): string; +export declare function functionToString(fn: Function): any; +export declare function fnToString(fn: IInjectable): any; +export declare function stringify(o: any): string; +/** Returns a function that splits a string on a character or substring */ +export declare const beforeAfterSubstr: (char: string) => (str: string) => string[]; +export declare const hostRegex: RegExp; +export declare const stripFile: (str: string) => string; +export declare const splitHash: (str: string) => string[]; +export declare const splitQuery: (str: string) => string[]; +export declare const splitEqual: (str: string) => string[]; +export declare const trimHashVal: (str: string) => string; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +export declare function splitOnDelim(delim: string): (str: string) => string[]; +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +export declare function joinNeighborsR(acc: any[], x: any): any[]; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js new file mode 100644 index 00000000..0533215b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js @@ -0,0 +1,148 @@ +/** + * Functions that manipulate strings + * + * Although these functions are exported, they are subject to change without notice. + * + * @module common_strings + */ /** */ +import { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from "./predicates"; +import { Rejection } from "../transition/rejectFactory"; +import { identity, tail, pushR } from "./common"; +import { pattern, is, not, val, invoke } from "./hof"; +import { Transition } from "../transition/transition"; +import { Resolvable } from "../resolve/resolvable"; +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +export function maxLength(max, str) { + if (str.length <= max) + return str; + return str.substr(0, max - 3) + "..."; +} +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +export function padString(length, str) { + while (str.length < length) + str += " "; + return str; +} +export function kebobString(camelCase) { + return camelCase + .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char + .replace(/([A-Z])/g, function ($1) { return "-" + $1.toLowerCase(); }); // replace rest +} +function _toJson(obj) { + return JSON.stringify(obj); +} +function _fromJson(json) { + return isString(json) ? JSON.parse(json) : json; +} +function promiseToString(p) { + return "Promise(" + JSON.stringify(p) + ")"; +} +export function functionToString(fn) { + var fnStr = fnToString(fn); + var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/); + var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr; + var fnName = fn['name'] || ""; + if (fnName && toStr.match(/function \(/)) { + return 'function ' + fnName + toStr.substr(9); + } + return toStr; +} +export function fnToString(fn) { + var _fn = isArray(fn) ? fn.slice(-1)[0] : fn; + return _fn && _fn.toString() || "undefined"; +} +var stringifyPatternFn = null; +var stringifyPattern = function (value) { + var isRejection = Rejection.isRejectionPromise; + stringifyPatternFn = stringifyPatternFn || pattern([ + [not(isDefined), val("undefined")], + [isNull, val("null")], + [isPromise, val("[Promise]")], + [isRejection, function (x) { return x._transitionRejection.toString(); }], + [is(Rejection), invoke("toString")], + [is(Transition), invoke("toString")], + [is(Resolvable), invoke("toString")], + [isInjectable, functionToString], + [val(true), identity] + ]); + return stringifyPatternFn(value); +}; +export function stringify(o) { + var seen = []; + function format(val) { + if (isObject(val)) { + if (seen.indexOf(val) !== -1) + return '[circular ref]'; + seen.push(val); + } + return stringifyPattern(val); + } + return JSON.stringify(o, function (key, val) { return format(val); }).replace(/\\"/g, '"'); +} +/** Returns a function that splits a string on a character or substring */ +export var beforeAfterSubstr = function (char) { return function (str) { + if (!str) + return ["", ""]; + var idx = str.indexOf(char); + if (idx === -1) + return [str, ""]; + return [str.substr(0, idx), str.substr(idx + 1)]; +}; }; +export var hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/'); +export var stripFile = function (str) { return str.replace(/\/[^/]*$/, ''); }; +export var splitHash = beforeAfterSubstr("#"); +export var splitQuery = beforeAfterSubstr("?"); +export var splitEqual = beforeAfterSubstr("="); +export var trimHashVal = function (str) { return str ? str.replace(/^#/, "") : ""; }; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +export function splitOnDelim(delim) { + var re = new RegExp("(" + delim + ")", "g"); + return function (str) { + return str.split(re).filter(identity); + }; +} +; +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +export function joinNeighborsR(acc, x) { + if (isString(tail(acc)) && isString(x)) + return acc.slice(0, -1).concat(tail(acc) + x); + return pushR(acc, x); +} +; +//# sourceMappingURL=strings.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js.map new file mode 100644 index 00000000..d9a0f31a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/strings.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "strings.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/strings.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;GAMG,CAAC,MAAM;AAEV,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAe,QAAQ,EA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AAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAA9B,CAA8B,CAAC;AACrC,CAAC;AAAA,CAAC;AAGF;;;;;;;;;;;GAWG;AACH,MAAM,yBAAyB,GAAU,EAAE,CAAM;IAC/C,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAE,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACvB,CAAC;AAAA,CAAC", + "sourcesContent": [ + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.d.ts new file mode 100644 index 00000000..dd2d0580 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.d.ts @@ -0,0 +1,112 @@ +import { Transition } from "../transition/transition"; +import { ActiveUIView, ViewConfig, ViewContext } from "../view/interface"; +import { Resolvable } from "../resolve/resolvable"; +import { PathNode } from "../path/pathNode"; +import { PolicyWhen } from "../resolve/interface"; +import { TransitionHook } from "../transition/transitionHook"; +import { HookResult } from "../transition/interface"; +import { StateObject } from "../state/stateObject"; +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ +export declare enum Category { + RESOLVE = 0, + TRANSITION = 1, + HOOK = 2, + UIVIEW = 3, + VIEWCONFIG = 4, +} +/** + * Prints UI-Router Transition trace information to the console. + */ +export declare class Trace { + /** @hidden */ + approximateDigests: number; + /** @hidden */ + constructor(); + /** @hidden */ + private _enabled; + /** @hidden */ + private _set(enabled, categories); + /** + * Enables a trace [[Category]] + * + * ```js + * trace.enable("TRANSITION"); + * ``` + * + * @param categories categories to enable. If `categories` is omitted, all categories are enabled. + * Also takes strings (category name) or ordinal (category position) + */ + enable(...categories: (Category | string | number)[]): any; + /** + * Disables a trace [[Category]] + * + * ```js + * trace.disable("VIEWCONFIG"); + * ``` + * + * @param categories categories to disable. If `categories` is omitted, all categories are disabled. + * Also takes strings (category name) or ordinal (category position) + */ + disable(...categories: (Category | string | number)[]): any; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + enabled(category: (Category | string | number)): boolean; + /** @internalapi called by ui-router code */ + traceTransitionStart(trans: Transition): void; + /** @internalapi called by ui-router code */ + traceTransitionIgnored(trans: Transition): void; + /** @internalapi called by ui-router code */ + traceHookInvocation(step: TransitionHook, trans: Transition, options: any): void; + /** @internalapi called by ui-router code */ + traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any): void; + /** @internalapi called by ui-router code */ + traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition): void; + /** @internalapi called by ui-router code */ + traceResolvableResolved(resolvable: Resolvable, trans?: Transition): void; + /** @internalapi called by ui-router code */ + traceError(reason: any, trans: Transition): void; + /** @internalapi called by ui-router code */ + traceSuccess(finalState: StateObject, trans: Transition): void; + /** @internalapi called by ui-router code */ + traceUIViewEvent(event: string, viewData: ActiveUIView, extra?: string): void; + /** @internalapi called by ui-router code */ + traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext): void; + /** @internalapi called by ui-router code */ + traceUIViewFill(viewData: ActiveUIView, html: string): void; + /** @internalapi called by ui-router code */ + traceViewSync(pairs: any[]): void; + /** @internalapi called by ui-router code */ + traceViewServiceEvent(event: string, viewConfig: ViewConfig): void; + /** @internalapi called by ui-router code */ + traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView): void; +} +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +declare let trace: Trace; +export { trace }; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js new file mode 100644 index 00000000..114cb74c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js @@ -0,0 +1,237 @@ +/** + * # Transition tracing (debug) + * + * Enable transition tracing to print transition information to the console, + * in order to help debug your application. + * Tracing logs detailed information about each Transition to your console. + * + * To enable tracing, import the [[Trace]] singleton and enable one or more categories. + * + * ### ES6 + * ```js + * import {trace} from "ui-router-ng2"; // or "angular-ui-router" + * trace.enable(1, 5); // TRANSITION and VIEWCONFIG + * ``` + * + * ### CJS + * ```js + * let trace = require("angular-ui-router").trace; // or "ui-router-ng2" + * trace.enable("TRANSITION", "VIEWCONFIG"); + * ``` + * + * ### Globals + * ```js + * let trace = window["angular-ui-router"].trace; // or "ui-router-ng2" + * trace.enable(); // Trace everything (very verbose) + * ``` + * + * ### Angular 1: + * ```js + * app.run($trace => $trace.enable()); + * ``` + * + * @coreapi + * @module trace + */ /** for typedoc */ +import { parse } from "../common/hof"; +import { isFunction, isNumber } from "../common/predicates"; +import { stringify, functionToString, maxLength, padString } from "./strings"; +/** @hidden */ +function uiViewString(uiview) { + if (!uiview) + return 'ui-view (defunct)'; + var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)'; + return "[ui-view#" + uiview.id + " " + uiview.$type + ":" + uiview.fqn + " (" + uiview.name + "@" + state + ")]"; +} +/** @hidden */ +var viewConfigString = function (viewConfig) { + var view = viewConfig.viewDecl; + var state = view.$context.name || '(root)'; + return "[View#" + viewConfig.$id + " from '" + state + "' state]: target ui-view: '" + view.$uiViewName + "@" + view.$uiViewContextAnchor + "'"; +}; +/** @hidden */ +function normalizedCat(input) { + return isNumber(input) ? Category[input] : Category[Category[input]]; +} +/** @hidden */ +var consoleLog = Function.prototype.bind.call(console.log, console); +/** @hidden */ +var consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console); +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ +export var Category; +(function (Category) { + Category[Category["RESOLVE"] = 0] = "RESOLVE"; + Category[Category["TRANSITION"] = 1] = "TRANSITION"; + Category[Category["HOOK"] = 2] = "HOOK"; + Category[Category["UIVIEW"] = 3] = "UIVIEW"; + Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG"; +})(Category || (Category = {})); +/** @hidden */ var _tid = parse("$id"); +/** @hidden */ var _rid = parse("router.$id"); +/** @hidden */ var transLbl = function (trans) { return "Transition #" + _tid(trans) + "-" + _rid(trans); }; +/** + * Prints UI-Router Transition trace information to the console. + */ +var Trace = /** @class */ (function () { + /** @hidden */ + function Trace() { + /** @hidden */ + this._enabled = {}; + this.approximateDigests = 0; + } + /** @hidden */ + Trace.prototype._set = function (enabled, categories) { + var _this = this; + if (!categories.length) { + categories = Object.keys(Category) + .map(function (k) { return parseInt(k, 10); }) + .filter(function (k) { return !isNaN(k); }) + .map(function (key) { return Category[key]; }); + } + categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; }); + }; + Trace.prototype.enable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(true, categories); + }; + Trace.prototype.disable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(false, categories); + }; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + Trace.prototype.enabled = function (category) { + return !!this._enabled[normalizedCat(category)]; + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionStart = function (trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Started -> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionIgnored = function (trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Ignored <> " + stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookInvocation = function (step, trans, options) { + if (!this.enabled(Category.HOOK)) + return; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = functionToString(step.registeredHook.callback); + console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + maxLength(200, name)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) { + if (!this.enabled(Category.HOOK)) + return; + console.log(transLbl(trans) + ": <- Hook returned: " + maxLength(200, stringify(hookResult))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvePath = function (path, when, trans) { + if (!this.enabled(Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvableResolved = function (resolvable, trans) { + if (!this.enabled(Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + maxLength(200, stringify(resolvable.data))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceError = function (reason, trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Rejected " + stringify(trans) + ", reason: " + reason); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceSuccess = function (finalState, trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Success " + stringify(trans) + ", final state: " + finalState.name); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewEvent = function (event, viewData, extra) { + if (extra === void 0) { extra = ""; } + if (!this.enabled(Category.UIVIEW)) + return; + console.log("ui-view: " + padString(30, event) + " " + uiViewString(viewData) + extra); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) { + if (!this.enabled(Category.UIVIEW)) + return; + this.traceUIViewEvent("Updating", viewData, " with ViewConfig from context='" + context + "'"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewFill = function (viewData, html) { + if (!this.enabled(Category.UIVIEW)) + return; + this.traceUIViewEvent("Fill", viewData, " with: " + maxLength(200, html)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewSync = function (pairs) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + var mapping = pairs.map(function (_a) { + var uiViewData = _a[0], config = _a[1]; + var uiView = uiViewData.$type + ":" + uiViewData.fqn; + var view = config && config.viewDecl.$context.name + ": " + config.viewDecl.$name + " (" + config.viewDecl.$type + ")"; + return { 'ui-view fqn': uiView, 'state: view name': view }; + }).sort(function (a, b) { return a['ui-view fqn'].localeCompare(b['ui-view fqn']); }); + consoletable(mapping); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceEvent = function (event, viewConfig) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData)); + }; + return Trace; +}()); +export { Trace }; +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +var trace = new Trace(); +export { trace }; +//# sourceMappingURL=trace.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js.map new file mode 100644 index 00000000..5b327068 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/common/trace.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "trace.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/trace.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG,CAAC,kBAAkB;AACtB,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AACpC,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,WAAW,CAAC;AAQ5E,cAAc;AACd,sBAAuB,MAAoB;IACvC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC,mBAAmB,CAAC;IACxC,IAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1F,MAAM,CAAC,cAAY,MAAM,CAAC,EAAE,SAAI,MAAM,CAAC,KAAK,SAAI,MAAM,CAAC,GAAG,UAAK,MAAM,CAAC,IAAI,SAAI,KAAK,OAAI,CAAC;AAC5F,CAAC;AAED,cAAc;AACd,IAAM,gBAAgB,GAAG,UAAC,UAAsB;IAC9C,IAAI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CAAC,iBAAe,KAAK,SAAI,YAAY,CAAC,QAAQ,CAAG,CAAC,CAAC;IAChE,CAAC;IACH,YAAC;AAAD,CAAC,AA1JD,IA0JC;;AAED;;;;;;;;GAQG;AACH,IAAI,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AACxB,OAAO,EAAC,KAAK,EAAC,CAAC", + "sourcesContent": [ + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.d.ts new file mode 100644 index 00000000..1a72095b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.d.ts @@ -0,0 +1,49 @@ +/** + * @coreapi + * @module core + */ /** */ +import { StateParams } from "./params/stateParams"; +import { StateDeclaration } from "./state/interface"; +import { StateObject } from "./state/stateObject"; +import { Transition } from "./transition/transition"; +import { Queue } from "./common/queue"; +import { Disposable } from './interface'; +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +export declare class UIRouterGlobals implements Disposable { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + params: StateParams; + /** + * Current state + * + * The to-state from the latest successful transition + */ + current: StateDeclaration; + /** + * Current state (internal object) + * + * The to-state from the latest successful transition + * @internalapi + */ + $current: StateObject; + /** + * The current started/running transition. + * This transition has reached at least the onStart phase, but is not yet complete + */ + transition: Transition; + /** @internalapi */ + lastStartedTransitionId: number; + /** @internalapi */ + transitionHistory: Queue; + /** @internalapi */ + successfulTransitions: Queue; + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js new file mode 100644 index 00000000..fd33113e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js @@ -0,0 +1,36 @@ +/** + * @coreapi + * @module core + */ /** */ +import { StateParams } from "./params/stateParams"; +import { Queue } from "./common/queue"; +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +var UIRouterGlobals = /** @class */ (function () { + function UIRouterGlobals() { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + this.params = new StateParams(); + /** @internalapi */ + this.lastStartedTransitionId = -1; + /** @internalapi */ + this.transitionHistory = new Queue([], 1); + /** @internalapi */ + this.successfulTransitions = new Queue([], 1); + } + UIRouterGlobals.prototype.dispose = function () { + this.transitionHistory.clear(); + this.successfulTransitions.clear(); + this.transition = null; + }; + return UIRouterGlobals; +}()); +export { UIRouterGlobals }; +//# sourceMappingURL=globals.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js.map new file mode 100644 index 00000000..352ea2b0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/globals.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "globals.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/globals.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AACV,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAGrC;;;;;GAKG;AACH;IAAA;QACE;;;;WAIG;QACH,WAAM,GAAgB,IAAI,WAAW,EAAE,CAAC;QAuBxC,mBAAmB;QACnB,4BAAuB,GAAW,CAAC,CAAC,CAAC;QAErC,mBAAmB;QACnB,sBAAiB,GAAG,IAAI,KAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;QAEjD,mBAAmB;QACnB,0BAAqB,GAAG,IAAI,KAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IAOvD,CAAC;IALC,iCAAO,GAAP;QACE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AA3CD,IA2CC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.d.ts new file mode 100644 index 00000000..a2bc8e4b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerAddCoreResolvables: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js new file mode 100644 index 00000000..4c5cab3a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js @@ -0,0 +1,16 @@ +/** @module hooks */ /** */ +import { Transition } from "../transition/transition"; +import { UIRouter } from "../router"; +function addCoreResolvables(trans) { + trans.addResolvable({ token: UIRouter, deps: [], resolveFn: function () { return trans.router; }, data: trans.router }, ""); + trans.addResolvable({ token: Transition, deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$transition$', deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: function () { return trans.params(); }, data: trans.params() }, ""); + trans.entering().forEach(function (state) { + trans.addResolvable({ token: '$state$', deps: [], resolveFn: function () { return state; }, data: state }, state); + }); +} +export var registerAddCoreResolvables = function (transitionService) { + return transitionService.onCreate({}, addCoreResolvables); +}; +//# sourceMappingURL=coreResolvables.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js.map new file mode 100644 index 00000000..1a53ed1d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "coreResolvables.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/coreResolvables.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,MAAM;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,4BAA4B,KAAiB;IAC3C,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAQ,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,CAAC,MAAM,EAAZ,CAAY,EAAI,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,EAAI,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,UAAU,EAAM,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAW,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAW,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,CAAC,MAAM,EAAE,EAAd,CAAc,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpH,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAA,KAAK;QAC5B,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAK,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAQ,KAAK,CAAC,CAAC;IACpH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAC,iBAAoC;IAC3E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,kBAAkB,CAAC;AAAlD,CAAkD,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.d.ts new file mode 100644 index 00000000..d2725655 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerIgnoredTransitionHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js new file mode 100644 index 00000000..8b6a7972 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js @@ -0,0 +1,29 @@ +/** @module hooks */ /** */ +import { trace } from '../common/trace'; +import { Rejection } from '../transition/rejectFactory'; +/** + * A [[TransitionHookFn]] that skips a transition if it should be ignored + * + * This hook is invoked at the end of the onBefore phase. + * + * If the transition should be ignored (because no parameter or states changed) + * then the transition is ignored and not processed. + */ +function ignoredHook(trans) { + var ignoredReason = trans._ignoredReason(); + if (!ignoredReason) + return; + trace.traceTransitionIgnored(trans); + var pending = trans.router.globals.transition; + // The user clicked a link going back to the *current state* ('A') + // However, there is also a pending transition in flight (to 'B') + // Abort the transition to 'B' because the user now wants to be back at 'A'. + if (ignoredReason === 'SameAsCurrent' && pending) { + pending.abort(); + } + return Rejection.ignored().toPromise(); +} +export var registerIgnoredTransitionHook = function (transitionService) { + return transitionService.onBefore({}, ignoredHook, { priority: -9999 }); +}; +//# sourceMappingURL=ignoredTransition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js.map new file mode 100644 index 00000000..bd14d5f2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "ignoredTransition.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/ignoredTransition.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,MAAM;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD;;;;;;;GAOG;AACH,qBAAqB,KAAiB;IACpC,IAAM,aAAa,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IAC7C,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;QAAC,MAAM,CAAC;IAE3B,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAEpC,IAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IAEhD,kEAAkE;IAClE,iEAAiE;IACjE,4EAA4E;IAC5E,EAAE,CAAC,CAAC,aAAa,KAAK,eAAe,IAAI,OAAO,CAAC,CAAC,CAAC;QACjD,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,IAAM,6BAA6B,GAAG,UAAC,iBAAoC;IAC9E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAAhE,CAAgE,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.d.ts new file mode 100644 index 00000000..b595083a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.d.ts @@ -0,0 +1,3 @@ +/** @module hooks */ /** */ +import { TransitionService } from '../transition/transitionService'; +export declare const registerInvalidTransitionHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js new file mode 100644 index 00000000..a1d683e1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js @@ -0,0 +1,17 @@ +/** @module hooks */ /** */ +/** + * A [[TransitionHookFn]] that rejects the Transition if it is invalid + * + * This hook is invoked at the end of the onBefore phase. + * If the transition is invalid (for example, param values do not validate) + * then the transition is rejected. + */ +function invalidTransitionHook(trans) { + if (!trans.valid()) { + throw new Error(trans.error()); + } +} +export var registerInvalidTransitionHook = function (transitionService) { + return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 }); +}; +//# sourceMappingURL=invalidTransition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js.map new file mode 100644 index 00000000..69aaf7e9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "invalidTransition.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/invalidTransition.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,MAAM;AAK3B;;;;;;GAMG;AACH,+BAA+B,KAAiB;IAC9C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,IAAM,6BAA6B,GAAG,UAAC,iBAAoC;IAC9E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,qBAAqB,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC;AAA3E,CAA2E,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.d.ts new file mode 100644 index 00000000..6a022022 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.d.ts @@ -0,0 +1,13 @@ +/** @module hooks */ /** */ +import { Transition } from "../transition/transition"; +import { TransitionService } from "../transition/transitionService"; +import { StateDeclaration, LazyLoadResult } from "../state/interface"; +export declare const registerLazyLoadHook: (transitionService: TransitionService) => Function; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +export declare function lazyLoadState(transition: Transition, state: StateDeclaration): Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js new file mode 100644 index 00000000..a586509d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js @@ -0,0 +1,94 @@ +import { services } from "../common/coreservices"; +/** + * A [[TransitionHookFn]] that performs lazy loading + * + * When entering a state "abc" which has a `lazyLoad` function defined: + * - Invoke the `lazyLoad` function (unless it is already in process) + * - Flag the hook function as "in process" + * - The function should return a promise (that resolves when lazy loading is complete) + * - Wait for the promise to settle + * - If the promise resolves to a [[LazyLoadResult]], then register those states + * - Flag the hook function as "not in process" + * - If the hook was successful + * - Remove the `lazyLoad` function from the state declaration + * - If all the hooks were successful + * - Retry the transition (by returning a TargetState) + * + * ``` + * .state('abc', { + * component: 'fooComponent', + * lazyLoad: () => System.import('./fooComponent') + * }); + * ``` + * + * See [[StateDeclaration.lazyLoad]] + */ +var lazyLoadHook = function (transition) { + var router = transition.router; + function retryTransition() { + if (transition.originalTransition().options().source !== 'url') { + // The original transition was not triggered via url sync + // The lazy state should be loaded now, so re-try the original transition + var orig = transition.targetState(); + return router.stateService.target(orig.identifier(), orig.params(), orig.options()); + } + // The original transition was triggered via url sync + // Run the URL rules and find the best match + var $url = router.urlService; + var result = $url.match($url.parts()); + var rule = result && result.rule; + // If the best match is a state, redirect the transition (instead + // of calling sync() which supersedes the current transition) + if (rule && rule.type === "STATE") { + var state = rule.state; + var params = result.match; + return router.stateService.target(state, params, transition.options()); + } + // No matching state found, so let .sync() choose the best non-state match/otherwise + router.urlService.sync(); + } + var promises = transition.entering() + .filter(function (state) { return !!state.$$state().lazyLoad; }) + .map(function (state) { return lazyLoadState(transition, state); }); + return services.$q.all(promises).then(retryTransition); +}; +export var registerLazyLoadHook = function (transitionService) { + return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook); +}; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +export function lazyLoadState(transition, state) { + var lazyLoadFn = state.$$state().lazyLoad; + // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked + var promise = lazyLoadFn['_promise']; + if (!promise) { + var success = function (result) { + delete state.lazyLoad; + delete state.$$state().lazyLoad; + delete lazyLoadFn['_promise']; + return result; + }; + var error = function (err) { + delete lazyLoadFn['_promise']; + return services.$q.reject(err); + }; + promise = lazyLoadFn['_promise'] = + services.$q.when(lazyLoadFn(transition, state)) + .then(updateStateRegistry) + .then(success, error); + } + /** Register any lazy loaded state definitions */ + function updateStateRegistry(result) { + if (result && Array.isArray(result.states)) { + result.states.forEach(function (state) { return transition.router.stateRegistry.register(state); }); + } + return result; + } + return promise; +} +//# sourceMappingURL=lazyLoad.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js.map new file mode 100644 index 00000000..e34ee8de --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "lazyLoad.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/lazyLoad.ts" + ], + "names": [], + "mappings": "AAKA,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAGhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,IAAM,YAAY,GAAqB,UAAC,UAAsB;IAC5D,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAE/B;QACE,EAAE,CAAC,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC;YAC/D,yDAAyD;YACzD,yEAAyE;YACzE,IAAI,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACtF,CAAC;QAED,qDAAqD;QACrD,4CAA4C;QAC5C,IAAI,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QAC7B,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACtC,IAAI,IAAI,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC;QAEjC,iEAAiE;QACjE,6DAA6D;QAC7D,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC;YAClC,IAAI,KAAK,GAAI,IAAkB,CAAC,KAAK,CAAC;YACtC,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;YAC1B,MAAM,C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B,MAAM,CAAC,MAAM,CAAC;QAChB,CAAC,CAAC;QAEF,IAAM,KAAK,GAAG,UAAC,GAAG;YAChB,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;YAC9B,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC,CAAC;QAEF,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC;YAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;iBAC1C,IAAI,CAAC,mBAAmB,CAAC;iBACzB,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,iDAAiD;IACjD,6BAA6B,MAAsB;QACjD,EAAE,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAA/C,CAA+C,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC;AACjB,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.d.ts new file mode 100644 index 00000000..421d2513 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.d.ts @@ -0,0 +1,4 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerOnExitHook: (transitionService: TransitionService) => Function; +export declare const registerOnRetainHook: (transitionService: TransitionService) => Function; +export declare const registerOnEnterHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js new file mode 100644 index 00000000..db1c2ab5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js @@ -0,0 +1,55 @@ +/** + * A factory which creates an onEnter, onExit or onRetain transition hook function + * + * The returned function invokes the (for instance) state.onEnter hook when the + * state is being entered. + * + * @hidden + */ +function makeEnterExitRetainHook(hookName) { + return function (transition, state) { + var _state = state.$$state(); + var hookFn = _state[hookName]; + return hookFn(transition, state); + }; +} +/** + * The [[TransitionStateHookFn]] for onExit + * + * When the state is being exited, the state's .onExit function is invoked. + * + * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);` + * + * See: [[IHookRegistry.onExit]] + */ +var onExitHook = makeEnterExitRetainHook('onExit'); +export var registerOnExitHook = function (transitionService) { + return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook); +}; +/** + * The [[TransitionStateHookFn]] for onRetain + * + * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked. + * + * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);` + * + * See: [[IHookRegistry.onRetain]] + */ +var onRetainHook = makeEnterExitRetainHook('onRetain'); +export var registerOnRetainHook = function (transitionService) { + return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook); +}; +/** + * The [[TransitionStateHookFn]] for onEnter + * + * When the state is being entered, the state's .onEnter function is invoked. + * + * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);` + * + * See: [[IHookRegistry.onEnter]] + */ +var onEnterHook = makeEnterExitRetainHook('onEnter'); +export var registerOnEnterHook = function (transitionService) { + return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook); +}; +//# sourceMappingURL=onEnterExitRetain.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js.map new file mode 100644 index 00000000..ac019a6c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "onEnterExitRetain.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/onEnterExitRetain.ts" + ], + "names": [], + "mappings": "AAQA;;;;;;;GAOG;AACH,iCAAiC,QAAgB;IAC/C,MAAM,CAAC,UAAC,UAAsB,EAAE,KAAuB;QACrD,IAAI,MAAM,GAAgB,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1C,IAAI,MAAM,GAA0B,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,IAAM,UAAU,GAA0B,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC5E,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,iBAAoC;IACnE,OAAA,iBAAiB,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,MAAM,EAAd,CAAc,EAAC,EAAE,UAAU,CAAC;AAAxE,CAAwE,CAAC;AAE7E;;;;;;;;GAQG;AACH,IAAM,YAAY,GAA0B,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAChF,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,iBAAoC;IACrE,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAhB,CAAgB,EAAC,EAAE,YAAY,CAAC;AAA/E,CAA+E,CAAC;AAEpF;;;;;;;;GAQG;AACH,IAAM,WAAW,GAA0B,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC9E,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,iBAAoC;IACpE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAC,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,OAAO,EAAf,CAAe,EAAC,EAAE,WAAW,CAAC;AAA5E,CAA4E,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.d.ts new file mode 100644 index 00000000..f2be60f3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerRedirectToHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js new file mode 100644 index 00000000..ea035e86 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js @@ -0,0 +1,35 @@ +/** @module hooks */ /** */ +import { isString, isFunction } from "../common/predicates"; +import { services } from "../common/coreservices"; +import { TargetState } from "../state/targetState"; +/** + * A [[TransitionHookFn]] that redirects to a different state or params + * + * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);` + * + * See [[StateDeclaration.redirectTo]] + */ +var redirectToHook = function (trans) { + var redirect = trans.to().redirectTo; + if (!redirect) + return; + var $state = trans.router.stateService; + function handleResult(result) { + if (!result) + return; + if (result instanceof TargetState) + return result; + if (isString(result)) + return $state.target(result, trans.params(), trans.options()); + if (result['state'] || result['params']) + return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options()); + } + if (isFunction(redirect)) { + return services.$q.when(redirect(trans)).then(handleResult); + } + return handleResult(redirect); +}; +export var registerRedirectToHook = function (transitionService) { + return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook); +}; +//# sourceMappingURL=redirectTo.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js.map new file mode 100644 index 00000000..d62888ab --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "redirectTo.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/redirectTo.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,MAAM;AAC3B,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;A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,GAAG,UAAC,iBAAoC;IACvE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAC,EAAE,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,CAAC,KAAK,CAAC,UAAU,EAAlB,CAAkB,EAAC,EAAE,cAAc,CAAC;AAA9E,CAA8E,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.d.ts new file mode 100644 index 00000000..c0236034 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.d.ts @@ -0,0 +1,3 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerEagerResolvePath: (transitionService: TransitionService) => Function; +export declare const registerLazyResolveState: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js new file mode 100644 index 00000000..07aa14c3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js @@ -0,0 +1,41 @@ +/** @module hooks */ +/** for typedoc */ +import { noop } from '../common/common'; +import { ResolveContext } from '../resolve/resolveContext'; +import { val } from '../common/hof'; +/** + * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path + * + * Registered using `transitionService.onStart({}, eagerResolvePath);` + * + * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var eagerResolvePath = function (trans) { + return new ResolveContext(trans.treeChanges().to) + .resolvePath("EAGER", trans) + .then(noop); +}; +export var registerEagerResolvePath = function (transitionService) { + return transitionService.onStart({}, eagerResolvePath, { priority: 1000 }); +}; +/** + * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path + * + * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);` + * + * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var lazyResolveState = function (trans, state) { + return new ResolveContext(trans.treeChanges().to) + .subContext(state.$$state()) + .resolvePath("LAZY", trans) + .then(noop); +}; +export var registerLazyResolveState = function (transitionService) { + return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: 1000 }); +}; +//# sourceMappingURL=resolve.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js.map new file mode 100644 index 00000000..a73a672e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/resolve.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolve.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/resolve.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB;AACpB,kBAAkB;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGpC;;;;;;;;GAQG;AACH,IAAM,gBAAgB,GAAqB,UAAC,KAAiB;IACzD,OAAA,IAAI,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;SACrC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC;SAC3B,IAAI,CAAC,IAAI,CAAC;AAFf,CAEe,CAAC;AAEpB,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAC,iBAAoC;IACzE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,gBAAgB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAAjE,CAAiE,CAAC;AAEtE;;;;;;;;GAQG;AACH,IAAM,gBAAgB,GAA0B,UAAC,KAAiB,EAAE,KAAuB;IACvF,OAAA,IAAI,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;SACrC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SAC3B,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC;SAC1B,IAAI,CAAC,IAAI,CAAC;AAHf,CAGe,CAAC;AAEpB,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAC,iBAAoC;IACzE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,gBAAgB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAAtF,CAAsF,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.d.ts new file mode 100644 index 00000000..128b9a20 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerUpdateGlobalState: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js new file mode 100644 index 00000000..b21b722f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js @@ -0,0 +1,33 @@ +import { copy } from '../common/common'; +/** + * A [[TransitionHookFn]] which updates global UI-Router state + * + * Registered using `transitionService.onBefore({}, updateGlobalState);` + * + * Before a [[Transition]] starts, updates the global value of "the current transition" ([[Globals.transition]]). + * After a successful [[Transition]], updates the global values of "the current state" + * ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]). + * + * See also the deprecated properties: + * [[StateService.transition]], [[StateService.current]], [[StateService.params]] + */ +var updateGlobalState = function (trans) { + var globals = trans.router.globals; + var transitionSuccessful = function () { + globals.successfulTransitions.enqueue(trans); + globals.$current = trans.$to(); + globals.current = globals.$current.self; + copy(trans.params(), globals.params); + }; + var clearCurrentTransition = function () { + // Do not clear globals.transition if a different transition has started in the meantime + if (globals.transition === trans) + globals.transition = null; + }; + trans.onSuccess({}, transitionSuccessful, { priority: 10000 }); + trans.promise.then(clearCurrentTransition, clearCurrentTransition); +}; +export var registerUpdateGlobalState = function (transitionService) { + return transitionService.onCreate({}, updateGlobalState); +}; +//# sourceMappingURL=updateGlobals.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js.map new file mode 100644 index 00000000..178b2251 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "updateGlobals.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/updateGlobals.ts" + ], + "names": [], + "mappings": "AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC;;;;;;;;;;;GAWG;AACH,IAAM,iBAAiB,GAAG,UAAC,KAAiB;IAC1C,IAAI,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnC,IAAM,oBAAoB,GAAG;QAC3B,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QAC/B,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;QAExC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,IAAM,sBAAsB,GAAG;QAC7B,wFAAwF;QACxF,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,KAAK,CAAC;YAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAC9D,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,oBAAoB,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/D,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAC,iBAAoC;IAC1E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;AAAjD,CAAiD,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.d.ts new file mode 100644 index 00000000..2c332cd8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerUpdateUrl: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js new file mode 100644 index 00000000..7b3c0515 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js @@ -0,0 +1,23 @@ +/** + * A [[TransitionHookFn]] which updates the URL after a successful transition + * + * Registered using `transitionService.onSuccess({}, updateUrl);` + */ +var updateUrl = function (transition) { + var options = transition.options(); + var $state = transition.router.stateService; + var $urlRouter = transition.router.urlRouter; + // Dont update the url in these situations: + // The transition was triggered by a URL sync (options.source === 'url') + // The user doesn't want the url to update (options.location === false) + // The destination state, and all parents have no navigable url + if (options.source !== 'url' && options.location && $state.$current.navigable) { + var urlOptions = { replace: options.location === 'replace' }; + $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions); + } + $urlRouter.update(true); +}; +export var registerUpdateUrl = function (transitionService) { + return transitionService.onSuccess({}, updateUrl, { priority: 9999 }); +}; +//# sourceMappingURL=url.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js.map new file mode 100644 index 00000000..f3ee5bc7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/url.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "url.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/url.ts" + ], + "names": [], + "mappings": "AAOA;;;;GAIG;AACH,IAAM,SAAS,GAAqB,UAAC,UAAsB;IACzD,IAAI,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;IACnC,IAAI,MAAM,GAAiB,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1D,IAAI,UAAU,GAAc,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;IAExD,2CAA2C;IAC3C,wEAAwE;IACxE,uEAAuE;IACvE,+DAA+D;IAC/D,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9E,IAAI,UAAU,GAAG,EAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAC,CAAC;QAC3D,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC5E,CAAC;IAED,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,iBAAoC;IAClE,OAAA,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAA5D,CAA4D,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.d.ts new file mode 100644 index 00000000..84e25a19 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.d.ts @@ -0,0 +1,3 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerLoadEnteringViews: (transitionService: TransitionService) => Function; +export declare const registerActivateViews: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js new file mode 100644 index 00000000..2f885136 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js @@ -0,0 +1,45 @@ +/** @module hooks */ /** for typedoc */ +import { noop } from "../common/common"; +import { services } from "../common/coreservices"; +/** + * A [[TransitionHookFn]] which waits for the views to load + * + * Registered using `transitionService.onStart({}, loadEnteringViews);` + * + * Allows the views to do async work in [[ViewConfig.load]] before the transition continues. + * In angular 1, this includes loading the templates. + */ +var loadEnteringViews = function (transition) { + var $q = services.$q; + var enteringViews = transition.views("entering"); + if (!enteringViews.length) + return; + return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop); +}; +export var registerLoadEnteringViews = function (transitionService) { + return transitionService.onFinish({}, loadEnteringViews); +}; +/** + * A [[TransitionHookFn]] which activates the new views when a transition is successful. + * + * Registered using `transitionService.onSuccess({}, activateViews);` + * + * After a transition is complete, this hook deactivates the old views from the previous state, + * and activates the new views from the destination state. + * + * See [[ViewService]] + */ +var activateViews = function (transition) { + var enteringViews = transition.views("entering"); + var exitingViews = transition.views("exiting"); + if (!enteringViews.length && !exitingViews.length) + return; + var $view = transition.router.viewService; + exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); }); + enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); }); + $view.sync(); +}; +export var registerActivateViews = function (transitionService) { + return transitionService.onSuccess({}, activateViews); +}; +//# sourceMappingURL=views.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js.map new file mode 100644 index 00000000..19beceec --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/hooks/views.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "views.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/views.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,kBAAkB;AACvC,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAQhD;;;;;;;GAOG;AACH,IAAM,iBAAiB,GAAqB,UAAC,UAAsB;IACjE,IAAI,EAAE,GAAG,QAAQ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,OAAA,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,aAAa,CAAC;AAA9C,CAA8C,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.d.ts new file mode 100644 index 00000000..a272ac2c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.d.ts @@ -0,0 +1,16 @@ +/** + * @coreapi + * @module common + */ /** */ +export * from "./common/index"; +export * from "./params/index"; +export * from "./path/index"; +export * from "./resolve/index"; +export * from "./state/index"; +export * from "./transition/index"; +export * from "./url/index"; +export * from "./view/index"; +export * from "./globals"; +export * from "./router"; +export * from "./vanilla"; +export * from "./interface"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js new file mode 100644 index 00000000..3251849e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js @@ -0,0 +1,17 @@ +/** + * @coreapi + * @module common + */ /** */ +export * from "./common/index"; +export * from "./params/index"; +export * from "./path/index"; +export * from "./resolve/index"; +export * from "./state/index"; +export * from "./transition/index"; +export * from "./url/index"; +export * from "./view/index"; +export * from "./globals"; +export * from "./router"; +export * from "./vanilla"; +export * from "./interface"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js.map new file mode 100644 index 00000000..426cc720 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/index.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AAEV,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAE1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module common\n */ /** */\n\nexport * from \"./common/index\";\nexport * from \"./params/index\";\nexport * from \"./path/index\";\nexport * from \"./resolve/index\";\nexport * from \"./state/index\";\nexport * from \"./transition/index\";\nexport * from \"./url/index\";\nexport * from \"./view/index\";\nexport * from \"./globals\";\n\nexport * from \"./router\";\nexport * from \"./vanilla\";\nexport * from \"./interface\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.d.ts new file mode 100644 index 00000000..d974a096 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.d.ts @@ -0,0 +1,105 @@ +import { UIRouter } from "./router"; +/** + * An interface for getting values from dependency injection. + * + * This is primarily used to get resolve values for a given token. + * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]]. + * + * --- + * + * If no resolve is found for a token, then it will delegate to the native injector. + * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill. + * + * In Angular 2, the native injector might be the root Injector, + * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree. + */ +export interface UIInjector { + /** + * Gets a value from the injector. + * + * For a given token, returns the value from the injector that matches the token. + * If the token is for a resolve that has not yet been fetched, this throws an error. + * + * #### Example: + * ```js + * var myResolve = injector.get('myResolve'); + * ``` + * + * #### ng1 Example: + * ```js + * // Fetch StateService + * injector.get('$state').go('home'); + * ``` + * + * #### ng2 Example: + * ```js + * import {StateService} from "ui-router-ng2"; + * // Fetch StateService + * injector.get(StateService).go('home'); + * ``` + * + * #### Typescript Example: + * ```js + * var stringArray = injector.get('myStringArray'); + * ``` + * + * ### `NOWAIT` policy + * + * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result. + * The promise is not automatically unwrapped. + * + * @param token the key for the value to get. May be a string, a class, or any arbitrary object. + * @return the Dependency Injection value that matches the token + */ + get(token: any): any; + /** Gets a value as type `T` (generics parameter) */ + get(token: any): T; + /** + * Asynchronously gets a value from the injector + * + * For a given token, returns a promise for the value from the injector that matches the token. + * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load. + * + * #### Example: + * ```js + * return injector.getAsync('myResolve').then(value => { + * if (value === 'declined') return false; + * }); + * ``` + * + * @param token the key for the value to get. May be a string or arbitrary object. + * @return a Promise for the Dependency Injection value that matches the token + */ + getAsync(token: any): Promise; + /** Asynchronously gets a value as type `T` (generics parameter) */ + getAsync(token: any): Promise; + /** + * Gets a value from the native injector + * + * Returns a value from the native injector, bypassing anything in the [[ResolveContext]]. + * + * Example: + * ```js + * let someThing = injector.getNative(SomeToken); + * ``` + * + * @param token the key for the value to get. May be a string or arbitrary object. + * @return the Dependency Injection value that matches the token + */ + getNative(token: any): any; + getNative(token: any): T; +} +/** @internalapi */ +export interface UIRouterPlugin extends Disposable { + name: string; +} +/** @internalapi */ +export declare abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable { + name: string; + dispose(router: UIRouter): void; +} +/** @internalapi */ +export interface Disposable { + /** Instructs the Disposable to clean up any resources */ + dispose(router?: UIRouter): any; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js new file mode 100644 index 00000000..f2a99442 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js @@ -0,0 +1,19 @@ +/** + * # Core classes and interfaces + * + * The classes and interfaces that are core to ui-router and do not belong + * to a more specific subsystem (such as resolve). + * + * @coreapi + * @preferred + * @module core + */ /** for typedoc */ +/** @internalapi */ +var UIRouterPluginBase = /** @class */ (function () { + function UIRouterPluginBase() { + } + UIRouterPluginBase.prototype.dispose = function (router) { }; + return UIRouterPluginBase; +}()); +export { UIRouterPluginBase }; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js.map new file mode 100644 index 00000000..5b15104b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/interface.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;GASG,CAAC,kBAAkB;AAwGtB,mBAAmB;AACnB;IAAA;IAGA,CAAC;IADC,oCAAO,GAAP,UAAQ,MAAgB,IAAI,CAAC;IAC/B,yBAAC;AAAD,CAAC,AAHD,IAGC", + "sourcesContent": [ + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.d.ts new file mode 100644 index 00000000..9045a902 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.d.ts @@ -0,0 +1,14 @@ +/** + * This module contains code for State Parameters. + * + * See [[ParamDeclaration]] + * + * @coreapi + * @preferred + * @module params + */ /** for typedoc */ +export * from "./interface"; +export * from "./param"; +export * from "./paramTypes"; +export * from "./stateParams"; +export * from "./paramType"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js new file mode 100644 index 00000000..20c016b6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js @@ -0,0 +1,5 @@ +export * from "./param"; +export * from "./paramTypes"; +export * from "./stateParams"; +export * from "./paramType"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js.map new file mode 100644 index 00000000..fa987a1e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/index.ts" + ], + "names": [], + "mappings": "AAUA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC", + "sourcesContent": [ + "/**\n * This module contains code for State Parameters.\n *\n * See [[ParamDeclaration]]\n *\n * @coreapi\n * @preferred\n * @module params\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./param\";\nexport * from \"./paramTypes\";\nexport * from \"./stateParams\";\nexport * from \"./paramType\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.d.ts new file mode 100644 index 00000000..904b392f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.d.ts @@ -0,0 +1,596 @@ +/** + * @coreapi + * @module params + */ /** for typedoc */ +import { ParamType } from "./paramType"; +/** + * Parameter values + * + * An object containing state parameter key/value pairs + * + * #### Example: + * ```js + * { + * userId: 353474, + * folderId: 'inbox' + * } + * ``` + * + * @coreapi + */ +export interface RawParams { + [key: string]: any; +} +/** + * Configuration for a single Parameter + * + * In a [[StateDeclaration.params]], each `ParamDeclaration` + * defines how a single State Parameter should work. + * + * #### Example: + * ```js + * var mystate = { + * template: '
    ', + * controller: function() {} + * url: '/mystate/:start?{count:int}', + * params: { + * start: { // <-- ParamDeclaration for `start` + * type: 'date', + * value: new Date(), // <-- Default value + * squash: true, + * }, + * + * nonUrlParam: { // <-- ParamDeclaration for 'nonUrlParam' + * type: "int", + * array: true, + * value: [] + * }, + * + * count: 0, // <-- Default value for 'param1' + * // (shorthand ParamDeclaration.value) + * } + * } + * ``` + * @coreapi + */ +export interface ParamDeclaration { + /** + * The default value for this parameter. + * + * Specifies the default value for this parameter. + * This implicitly sets this parameter as optional. + * + * When UI-Router routes to a state and no value is specified for this parameter in the URL or transition, + * the default value will be used instead. + * If value is a function, it will be injected and invoked, and the return value used. + * + * Note: `value: undefined` is treated as though **no default value was specified**, while `value: null` is treated + * as **"the default value is null"**. + * + * ``` + * // define default values for param1 and param2 + * params: { + * param1: { + * value: "defaultValue" + * }, + * param2: { + * value: "param2Default; + * } + * } + * ``` + * + * ### Shorthand Declaration + * + * If you only want to set the default value of the parameter, you may use a shorthand syntax. + * In the params map, instead mapping the param name to a full parameter configuration object, simply set map it + * to the default parameter value, e.g.: + * ``` + * // Normal (non-shorthand) default value syntax + * params: { + * param1: { + * value: "defaultValue" + * }, + * param2: { + * value: "param2Default" + * } + * } + * + * // Shorthand default value syntax + * params: { + * param1: "defaultValue", + * param2: "param2Default" + * } + * ``` + * + * This defines a default value for the parameter. + * If a parameter value is `undefined`, this default value will be used instead + * + * --- + * + * Default: `undefined` + */ + value?: any; + /** + * The parameter's type + * + * Specifies the [[ParamType]] of the parameter. + * Parameter types can be used to customize the encoding/decoding of parameter values. + * + * Set this property to the name of parameter's type. + * The type may be either one of the built in types, or a custom type that has been registered with the [[UrlMatcherFactory]]. + * + * See [[ParamTypes]] for the list of built in types. + * + * --- + * + * Default: + * - Path parameters (`/:fooParam`): `path` + * - Query parameters (`?queryParam`): `query` + * - Non-url parameters (`param: { foo: null }`): `any` + * + */ + type: (string | ParamType); + /** + * The parameter's `array` mode + * + * Explicitly specifies the array mode of a URL parameter + * + * - If `false`, the parameter value will be treated (encoded/decoded) as a single value + * - If `true`, the parameter value will be treated (encoded/decoded) as an array of values. + * - If `auto` (for query parameters only), if multiple values for a single parameter are present + * in the URL (e.g.: /foo?bar=1&bar=2&bar=3) then the values are mapped to an array (e.g.: + * `{ foo: [ '1', '2', '3' ] }`). However, if only one value is present (e.g.: /foo?bar=1) + * then the value is treated as single value (e.g.: { foo: '1' }). + * + * If you specified a [[type]] for the parameter, the value will be treated as an array + * of the specified [[ParamType]]. + * + * #### Example: + * ```js + * { + * name: 'foo', + * url: '/foo/{arrayParam:int}`, + * params: { + * arrayParam: { array: true } + * } + * } + * + * // After the transition, URL should be '/foo/1-2-3' + * $state.go("foo", { arrayParam: [ 1, 2, 3 ] }); + * ``` + * + * @default `false` for path parameters, such as `url: '/foo/:pathParam'` + * @default `auto` for query parameters, such as `url: '/foo?queryParam'` + * @default `true` if the parameter name ends in `[]`, such as `url: '/foo/{implicitArrayParam:int[]}'` + */ + array: boolean; + /** + * Squash mode: omit default parameter values in URL + * + * Configures how a default parameter value is represented in the URL when the current parameter value + * is the same as the default value. + * + * There are three squash settings: + * + * - `false`: The parameter's default value is not squashed. It is encoded and included in the URL + * - `true`: The parameter's default value is omitted from the URL. + * If the parameter is preceeded and followed by slashes in the state's url declaration, then one of those slashes are omitted. + * This can allow for cleaner looking URLs. + * - `"<arbitrary string>"`: The parameter's default value is replaced with an arbitrary + * placeholder of your choice. + * + * #### Example: + * ```js + * { + * name: 'mystate', + * url: '/mystate/:myparam', + * params: { + * myparam: 'defaultParamValue' + * squash: true + * } + * } + * + * // URL will be `/mystate/` + * $state.go('mystate', { myparam: 'defaultParamValue' }); + * + * // URL will be `/mystate/someOtherValue` + * $state.go('mystate', { myparam: 'someOtherValue' }); + * ``` + * + * #### Example: + * ```js + * { + * name: 'mystate2', + * url: '/mystate2/:myparam2', + * params: { + * myparam2: 'defaultParamValue' + * squash: "~" + * } + * } + * + * // URL will be `/mystate/~` + * $state.go('mystate', { myparam2: 'defaultParamValue' }); + * + * // URL will be `/mystate/someOtherValue` + * $state.go('mystate', { myparam2: 'someOtherValue' }); + * ``` + * + * Default: If squash is not set, it uses the configured default squash policy. (See [[defaultSquashPolicy]]()) + */ + squash: (boolean | string); + /** + * @internalapi + * + * An array of [[Replace]] objects. + * + * When creating a Transition, defines how to handle certain special values, such as `undefined`, `null`, + * or empty string `""`. If the transition is started, and the parameter value is equal to one of the "to" + * values, then the parameter value is replaced with the "from" value. + * + * #### Example: + * ```js + * replace: [ + * { from: undefined, to: null }, + * { from: "", to: null } + * ] + * ``` + */ + replace: Replace[]; + /** + * @hidden + * @internalapi + * + * This is not part of the declaration; it is a calculated value depending on if a default value was specified or not. + */ + isOptional: boolean; + /** + * Dynamic flag + * + * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited. + * The resolves will not be re-fetched, nor will views be reloaded. + * + * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited). + * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter. + * + * This can be useful to build UI where the component updates itself when the param values change. + * A common scenario where this is useful is searching/paging/sorting. + * + * --- + * + * Note: this value overrides the `dynamic` value on a custom parameter type ([[ParamTypeDefinition.dynamic]]). + * + * --- + * + * Default: `false` + */ + dynamic: boolean; + /** + * Disables url-encoding of parameter values + * + * When `true`, parameter values are not url-encoded. + * This is commonly used to allow "slug" urls, with a parameter value including non-semantic slashes. + * + * #### Example: + * ```js + * url: '/product/:slug', + * params: { + * slug: { type: 'string', raw: true } + * } + * ``` + * + * This allows a URL parameter of `{ slug: 'camping/tents/awesome_tent' }` + * to serialize to `/product/camping/tents/awesome_tent` + * instead of `/product/camping%2Ftents%2Fawesome_tent`. + * + * --- + * + * Note: this value overrides the `raw` value on a custom parameter type ([[ParamTypeDefinition.raw]]). + * + * ### Decoding warning + * + * The decoding behavior of raw parameters is not defined. + * For example, given a url template such as `/:raw1/:raw2` + * the url `/foo/bar/baz/qux/`, there is no way to determine which slashes belong to which params. + * + * It's generally safe to use a raw parameter at the end of a path, like '/product/:slug'. + * However, beware of the characters you allow in your raw parameter values. + * Avoid unencoded characters that could disrupt normal URL parsing, such as `?` and `#`. + * + * --- + * + * Default: `false` + */ + raw: boolean; + /** + * Enables/disables inheriting of this parameter's value + * + * When a transition is run with [[TransitionOptions.inherit]] set to + * `true`, the current param values are inherited in the new transition. + * However, parameters values which have `inherit: false` set will *not be inherited*. + * + * #### Example state : + * ```js + * var fooState = { + * name: 'foo', + * url: '/:fooId?mode&refresh', + * params: { + * refresh: { inherit: false } + * } + * } + * + * // Set fooId to 123 + * $state.go('fooState', { fooId: 1234, mode: 'list', refresh: true }); + * ``` + * + * In the component: + * `mode: 'list' is inherited, but refresh: true is not inherited. + * // The param values are thus: `{ fooId: 4567, mode: 'list' }` + * ``` + * 4567 + * ``` + * + * --- + * + * See also [[TransitionOptions.inherit]] and [[ParamTypeDefinition.inherit]] + * + * --- + * + * Default: `true` + */ + inherit: boolean; +} +/** @internalapi */ +export interface Replace { + from: string; + to: string; +} +/** + * Describes a custom [[ParamType]] + * + * See: [[UrlMatcherFactory.type]] + * + * A developer can create a custom parameter type definition to customize the encoding and decoding of parameter values. + * The definition should implement all the methods of this interface. + * + * Parameter values are parsed from the URL as strings. + * However, it is often useful to parse the string into some other form, such as: + * + * - integer + * - date + * - array of + * - custom object + * - some internal string representation + * + * Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL). + * UI-Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])). + * + * For example, if a state has a url of `/foo/{fooId:int}` (the `fooId` parameter is of the `int` ParamType) + * and if the browser is at `/foo/123`, then the 123 is parsed as an integer: + * + * ```js + * var fooId = transition.params().fooId; + * fooId === "123" // false + * fooId === 123 // true + * ``` + * + * + * #### Examples + * + * This example encodes an array of integers as a dash-delimited string to be used in the URL. + * + * If we call `$state.go('foo', { fooIds: [20, 30, 40] });`, the URL changes to `/foo/20-30-40`. + * If we navigate to `/foo/1-2-3`, the `foo` state's onEnter logs `[1, 2, 3]`. + * + * @example + * ``` + * + * $urlMatcherFactoryProvider.type('intarray', { + * // Take an array of ints [1,2,3] and return a string "1-2-3" + * encode: (array) => array.join("-"), + * + * // Take an string "1-2-3" and return an array of ints [1,2,3] + * decode: (str) => str.split("-").map(x => parseInt(x, 10)), + * + * // Match the encoded string in the URL + * pattern: new RegExp("[0-9]+(?:-[0-9]+)*") + * + * // Ensure that the (decoded) object is an array, and that all its elements are numbers + * is: (obj) => Array.isArray(obj) && + * obj.reduce((acc, item) => acc && typeof item === 'number', true), + * + * // Compare two arrays of integers + * equals: (array1, array2) => array1.length === array2.length && + * array1.reduce((acc, item, idx) => acc && item === array2[idx], true); + * }); + * + * $stateProvider.state('foo', { + * url: "/foo/{fooIds:intarray}", + * onEnter: function($transition$) { + * console.log($transition$.fooIds); // Logs "[1, 2, 3]" + * } + * }); + * ``` + * + * + * This example decodes an integer from the URL. + * It uses the integer as an index to look up an item from a static list. + * That item from the list is the decoded parameter value. + * + * @example + * ``` + * + * var list = ['John', 'Paul', 'George', 'Ringo']; + * + * $urlMatcherFactoryProvider.type('listItem', { + * encode: function(item) { + * // Represent the list item in the URL using its corresponding index + * return list.indexOf(item); + * }, + * decode: function(item) { + * // Look up the list item by index + * return list[parseInt(item, 10)]; + * }, + * is: function(item) { + * // Ensure the item is valid by checking to see that it appears + * // in the list + * return list.indexOf(item) > -1; + * } + * }); + * + * $stateProvider.state('list', { + * url: "/list/{item:listItem}", + * controller: function($scope, $stateParams) { + * console.log($stateParams.item); + * } + * }); + * + * // ... + * + * // Changes URL to '/list/3', logs "Ringo" to the console + * $state.go('list', { item: "Ringo" }); + * ``` + * + * See: [[UrlConfigApi.type]] + * @coreapi + */ +export interface ParamTypeDefinition { + /** + * Tests if some object type is compatible with this parameter type + * + * Detects whether some value is of this particular type. + * Accepts a decoded value and determines whether it matches this `ParamType` object. + * + * If your custom type encodes the parameter to a specific type, check for that type here. + * For example, if your custom type decodes the URL parameter value as an array of ints, return true if the + * input is an array of ints: + * + * ``` + * is: (val) => Array.isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true) + * ``` + * + * If your type decodes the URL parameter value to a custom string, check that the string matches + * the pattern (don't use an arrow fn if you need `this`): `function (val) { return !!this.pattern.exec(val) }` + * + * Note: This method is _not used to check if the URL matches_. + * It's used to check if a _decoded value *is* this type_. + * Use [[pattern]] to check the encoded value in the URL. + * + * @param val The value to check. + * @param key If the type check is happening in the context of a specific [[UrlMatcher]] object, + * this is the name of the parameter in which `val` is stored. Can be used for + * meta-programming of `ParamType` objects. + * @returns `true` if the value matches the type, otherwise `false`. + */ + is(val: any, key?: string): boolean; + /** + * Encodes a custom/native type value to a string that can be embedded in a URL. + * + * Note that the return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`). + * It only needs to be a representation of `val` that has been encoded as a string. + * + * For example, if your custom type decodes to an array of ints, then encode the array of ints to a string here: + * + * ```js + * encode: (intarray) => intarray.join("-") + * ``` + * + * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str` + * + * @param val The value to encode. + * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects. + * @returns a string representation of `val` that can be encoded in a URL. + */ + encode(val: any, key?: string): (string | string[]); + /** + * Decodes a parameter value string (from URL string or transition param) to a custom/native value. + * + * For example, if your type decodes to an array of ints, then decode the string as an array of ints here: + * ```js + * decode: (str) => str.split("-").map(str => parseInt(str, 10)) + * ``` + * + * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str` + * + * @param val The URL parameter value to decode. + * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects. + * @returns a custom representation of the URL parameter value. + */ + decode(val: string, key?: string): any; + /** + * Determines whether two decoded values are equivalent. + * + * For example, if your type decodes to an array of ints, then check if the arrays are equal: + * ```js + * equals: (a, b) => a.length === b.length && a.reduce((acc, x, idx) => acc && x === b[idx], true) + * ``` + * + * @param a A value to compare against. + * @param b A value to compare against. + * @returns `true` if the values are equivalent/equal, otherwise `false`. + */ + equals(a: any, b: any): boolean; + /** + * A regular expression that matches the encoded parameter type + * + * This regular expression is used to match an encoded parameter value **in the URL**. + * + * For example, if your type encodes as a dash-separated numbers, match that here: + * `new RegExp("[0-9]+(?:-[0-9]+)*")`. + * + * There are some limitations to these regexps: + * + * - No capturing groups are allowed (use non-capturing groups: `(?: )`) + * - No pattern modifiers like case insensitive + * - No start-of-string or end-of-string: `/^foo$/` + */ + pattern?: RegExp; + /** + * Disables url-encoding of parameter values + * + * If a parameter type is declared `raw`, it will not be url-encoded. + * Custom encoding can still be applied in the [[encode]] function. + * + * ### Decoding warning + * + * The decoding behavior of raw parameters is not defined. + * See: [[ParamDeclaration.raw]] for details + */ + raw?: boolean; + /** + * Enables/disables inheriting of parameter values (of this type) + * + * When a transition is run with [[TransitionOptions.inherit]] set to + * `true`, the current param values are inherited in the new transition. + * However, parameters whose type has `inherit: false` set will *not be inherited*. + * + * The internal parameter type of `hash` has `inherit: false`. + * This is used to disable inheriting of the hash value (`#`) on subsequent transitions. + * + * #### Example: + * ```js + * $state.go('home', { '#': 'inboxAnchor' }); + * ... + * // "#" is not inherited. + * // The value of the "#" parameter will be `null` + * // The url's hash will be cleared. + * $state.go('home.nest'); + * ``` + * + * --- + * + * See also [[TransitionOptions.inherit]] and [[ParamDeclaration.inherit]] + * + */ + inherit?: boolean; + /** + * Dynamic flag + * + * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited. + * + * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited). + * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter. + * + * Default: `false` + */ + dynamic?: boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js new file mode 100644 index 00000000..6eb8eed6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js @@ -0,0 +1,5 @@ +/** + * @coreapi + * @module params + */ /** for typedoc */ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js.map new file mode 100644 index 00000000..77804978 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/interface.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\n\nimport {ParamType} from \"./paramType\";\n\n/**\n * Parameter values\n *\n * An object containing state parameter key/value pairs\n *\n * #### Example:\n * ```js\n * {\n * userId: 353474,\n * folderId: 'inbox'\n * }\n * ```\n *\n * @coreapi\n */\nexport interface RawParams {\n [key: string]: any;\n}\n\n/**\n * Configuration for a single Parameter\n *\n * In a [[StateDeclaration.params]], each `ParamDeclaration`\n * defines how a single State Parameter should work.\n *\n * #### Example:\n * ```js\n * var mystate = {\n * template: '
    ',\n * controller: function() {}\n * url: '/mystate/:start?{count:int}',\n * params: {\n * start: { // <-- ParamDeclaration for `start`\n * type: 'date',\n * value: new Date(), // <-- Default value\n * squash: true,\n * },\n *\n * nonUrlParam: { // <-- ParamDeclaration for 'nonUrlParam'\n * type: \"int\",\n * array: true,\n * value: []\n * },\n *\n * count: 0, // <-- Default value for 'param1'\n * // (shorthand ParamDeclaration.value)\n * }\n * }\n * ```\n * @coreapi\n */\nexport interface ParamDeclaration {\n /**\n * The default value for this parameter.\n *\n * Specifies the default value for this parameter.\n * This implicitly sets this parameter as optional.\n *\n * When UI-Router routes to a state and no value is specified for this parameter in the URL or transition,\n * the default value will be used instead.\n * If value is a function, it will be injected and invoked, and the return value used.\n *\n * Note: `value: undefined` is treated as though **no default value was specified**, while `value: null` is treated\n * as **\"the default value is null\"**.\n *\n * ```\n * // define default values for param1 and param2\n * params: {\n * param1: {\n * value: \"defaultValue\"\n * },\n * param2: {\n * value: \"param2Default;\n * }\n * }\n * ```\n *\n * ### Shorthand Declaration\n *\n * If you only want to set the default value of the parameter, you may use a shorthand syntax.\n * In the params map, instead mapping the param name to a full parameter configuration object, simply set map it\n * to the default parameter value, e.g.:\n * ```\n * // Normal (non-shorthand) default value syntax\n * params: {\n * param1: {\n * value: \"defaultValue\"\n * },\n * param2: {\n * value: \"param2Default\"\n * }\n * }\n *\n * // Shorthand default value syntax\n * params: {\n * param1: \"defaultValue\",\n * param2: \"param2Default\"\n * }\n * ```\n *\n * This defines a default value for the parameter.\n * If a parameter value is `undefined`, this default value will be used instead\n *\n * ---\n *\n * Default: `undefined`\n */\n value?: any;\n\n /**\n * The parameter's type\n *\n * Specifies the [[ParamType]] of the parameter.\n * Parameter types can be used to customize the encoding/decoding of parameter values.\n *\n * Set this property to the name of parameter's type.\n * The type may be either one of the built in types, or a custom type that has been registered with the [[UrlMatcherFactory]].\n *\n * See [[ParamTypes]] for the list of built in types.\n *\n * ---\n *\n * Default:\n * - Path parameters (`/:fooParam`): `path`\n * - Query parameters (`?queryParam`): `query`\n * - Non-url parameters (`param: { foo: null }`): `any`\n *\n */\n type: (string|ParamType);\n\n /**\n * The parameter's `array` mode\n *\n * Explicitly specifies the array mode of a URL parameter\n *\n * - If `false`, the parameter value will be treated (encoded/decoded) as a single value\n * - If `true`, the parameter value will be treated (encoded/decoded) as an array of values.\n * - If `auto` (for query parameters only), if multiple values for a single parameter are present\n * in the URL (e.g.: /foo?bar=1&bar=2&bar=3) then the values are mapped to an array (e.g.:\n * `{ foo: [ '1', '2', '3' ] }`). However, if only one value is present (e.g.: /foo?bar=1)\n * then the value is treated as single value (e.g.: { foo: '1' }).\n *\n * If you specified a [[type]] for the parameter, the value will be treated as an array\n * of the specified [[ParamType]].\n *\n * #### Example:\n * ```js\n * {\n * name: 'foo',\n * url: '/foo/{arrayParam:int}`,\n * params: {\n * arrayParam: { array: true }\n * }\n * }\n *\n * // After the transition, URL should be '/foo/1-2-3'\n * $state.go(\"foo\", { arrayParam: [ 1, 2, 3 ] });\n * ```\n *\n * @default `false` for path parameters, such as `url: '/foo/:pathParam'`\n * @default `auto` for query parameters, such as `url: '/foo?queryParam'`\n * @default `true` if the parameter name ends in `[]`, such as `url: '/foo/{implicitArrayParam:int[]}'`\n */\n array: boolean;\n\n /**\n * Squash mode: omit default parameter values in URL\n *\n * Configures how a default parameter value is represented in the URL when the current parameter value\n * is the same as the default value.\n *\n * There are three squash settings:\n *\n * - `false`: The parameter's default value is not squashed. It is encoded and included in the URL\n * - `true`: The parameter's default value is omitted from the URL.\n * If the parameter is preceeded and followed by slashes in the state's url declaration, then one of those slashes are omitted.\n * This can allow for cleaner looking URLs.\n * - `\"<arbitrary string>\"`: The parameter's default value is replaced with an arbitrary\n * placeholder of your choice.\n *\n * #### Example:\n * ```js\n * {\n * name: 'mystate',\n * url: '/mystate/:myparam',\n * params: {\n * myparam: 'defaultParamValue'\n * squash: true\n * }\n * }\n *\n * // URL will be `/mystate/`\n * $state.go('mystate', { myparam: 'defaultParamValue' });\n *\n * // URL will be `/mystate/someOtherValue`\n * $state.go('mystate', { myparam: 'someOtherValue' });\n * ```\n *\n * #### Example:\n * ```js\n * {\n * name: 'mystate2',\n * url: '/mystate2/:myparam2',\n * params: {\n * myparam2: 'defaultParamValue'\n * squash: \"~\"\n * }\n * }\n *\n * // URL will be `/mystate/~`\n * $state.go('mystate', { myparam2: 'defaultParamValue' });\n *\n * // URL will be `/mystate/someOtherValue`\n * $state.go('mystate', { myparam2: 'someOtherValue' });\n * ```\n *\n * Default: If squash is not set, it uses the configured default squash policy. (See [[defaultSquashPolicy]]())\n */\n squash: (boolean|string);\n\n /**\n * @internalapi\n *\n * An array of [[Replace]] objects.\n *\n * When creating a Transition, defines how to handle certain special values, such as `undefined`, `null`,\n * or empty string `\"\"`. If the transition is started, and the parameter value is equal to one of the \"to\"\n * values, then the parameter value is replaced with the \"from\" value.\n *\n * #### Example:\n * ```js\n * replace: [\n * { from: undefined, to: null },\n * { from: \"\", to: null }\n * ]\n * ```\n */\n replace: Replace[];\n\n /**\n * @hidden\n * @internalapi\n *\n * This is not part of the declaration; it is a calculated value depending on if a default value was specified or not.\n */\n isOptional: boolean;\n\n /**\n * Dynamic flag\n *\n * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.\n * The resolves will not be re-fetched, nor will views be reloaded.\n *\n * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).\n * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.\n *\n * This can be useful to build UI where the component updates itself when the param values change.\n * A common scenario where this is useful is searching/paging/sorting.\n *\n * ---\n *\n * Note: this value overrides the `dynamic` value on a custom parameter type ([[ParamTypeDefinition.dynamic]]).\n *\n * ---\n *\n * Default: `false`\n */\n dynamic: boolean;\n\n /**\n * Disables url-encoding of parameter values\n *\n * When `true`, parameter values are not url-encoded.\n * This is commonly used to allow \"slug\" urls, with a parameter value including non-semantic slashes.\n *\n * #### Example:\n * ```js\n * url: '/product/:slug',\n * params: {\n * slug: { type: 'string', raw: true }\n * }\n * ```\n *\n * This allows a URL parameter of `{ slug: 'camping/tents/awesome_tent' }`\n * to serialize to `/product/camping/tents/awesome_tent`\n * instead of `/product/camping%2Ftents%2Fawesome_tent`.\n *\n * ---\n *\n * Note: this value overrides the `raw` value on a custom parameter type ([[ParamTypeDefinition.raw]]).\n *\n * ### Decoding warning\n *\n * The decoding behavior of raw parameters is not defined.\n * For example, given a url template such as `/:raw1/:raw2`\n * the url `/foo/bar/baz/qux/`, there is no way to determine which slashes belong to which params.\n *\n * It's generally safe to use a raw parameter at the end of a path, like '/product/:slug'.\n * However, beware of the characters you allow in your raw parameter values.\n * Avoid unencoded characters that could disrupt normal URL parsing, such as `?` and `#`.\n *\n * ---\n *\n * Default: `false`\n */\n raw: boolean;\n\n /**\n * Enables/disables inheriting of this parameter's value\n *\n * When a transition is run with [[TransitionOptions.inherit]] set to\n * `true`, the current param values are inherited in the new transition.\n * However, parameters values which have `inherit: false` set will *not be inherited*.\n *\n * #### Example state :\n * ```js\n * var fooState = {\n * name: 'foo',\n * url: '/:fooId?mode&refresh',\n * params: {\n * refresh: { inherit: false }\n * }\n * }\n *\n * // Set fooId to 123\n * $state.go('fooState', { fooId: 1234, mode: 'list', refresh: true });\n * ```\n *\n * In the component:\n * `mode: 'list' is inherited, but refresh: true is not inherited.\n * // The param values are thus: `{ fooId: 4567, mode: 'list' }`\n * ```\n * 4567\n * ```\n *\n * ---\n *\n * See also [[TransitionOptions.inherit]] and [[ParamTypeDefinition.inherit]]\n *\n * ---\n *\n * Default: `true`\n */\n inherit: boolean;\n}\n\n/** @internalapi */\nexport interface Replace {\n from: string;\n to: string;\n}\n\n/**\n * Describes a custom [[ParamType]]\n *\n * See: [[UrlMatcherFactory.type]]\n *\n * A developer can create a custom parameter type definition to customize the encoding and decoding of parameter values.\n * The definition should implement all the methods of this interface.\n *\n * Parameter values are parsed from the URL as strings.\n * However, it is often useful to parse the string into some other form, such as:\n *\n * - integer\n * - date\n * - array of \n * - custom object\n * - some internal string representation\n *\n * Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL).\n * UI-Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])).\n *\n * For example, if a state has a url of `/foo/{fooId:int}` (the `fooId` parameter is of the `int` ParamType)\n * and if the browser is at `/foo/123`, then the 123 is parsed as an integer:\n *\n * ```js\n * var fooId = transition.params().fooId;\n * fooId === \"123\" // false\n * fooId === 123 // true\n * ```\n *\n *\n * #### Examples\n *\n * This example encodes an array of integers as a dash-delimited string to be used in the URL.\n *\n * If we call `$state.go('foo', { fooIds: [20, 30, 40] });`, the URL changes to `/foo/20-30-40`.\n * If we navigate to `/foo/1-2-3`, the `foo` state's onEnter logs `[1, 2, 3]`.\n *\n * @example\n * ```\n *\n * $urlMatcherFactoryProvider.type('intarray', {\n * // Take an array of ints [1,2,3] and return a string \"1-2-3\"\n * encode: (array) => array.join(\"-\"),\n *\n * // Take an string \"1-2-3\" and return an array of ints [1,2,3]\n * decode: (str) => str.split(\"-\").map(x => parseInt(x, 10)),\n *\n * // Match the encoded string in the URL\n * pattern: new RegExp(\"[0-9]+(?:-[0-9]+)*\")\n *\n * // Ensure that the (decoded) object is an array, and that all its elements are numbers\n * is: (obj) => Array.isArray(obj) &&\n * obj.reduce((acc, item) => acc && typeof item === 'number', true),\n *\n * // Compare two arrays of integers\n * equals: (array1, array2) => array1.length === array2.length &&\n * array1.reduce((acc, item, idx) => acc && item === array2[idx], true);\n * });\n *\n * $stateProvider.state('foo', {\n * url: \"/foo/{fooIds:intarray}\",\n * onEnter: function($transition$) {\n * console.log($transition$.fooIds); // Logs \"[1, 2, 3]\"\n * }\n * });\n * ```\n *\n *\n * This example decodes an integer from the URL.\n * It uses the integer as an index to look up an item from a static list.\n * That item from the list is the decoded parameter value.\n *\n * @example\n * ```\n *\n * var list = ['John', 'Paul', 'George', 'Ringo'];\n *\n * $urlMatcherFactoryProvider.type('listItem', {\n * encode: function(item) {\n * // Represent the list item in the URL using its corresponding index\n * return list.indexOf(item);\n * },\n * decode: function(item) {\n * // Look up the list item by index\n * return list[parseInt(item, 10)];\n * },\n * is: function(item) {\n * // Ensure the item is valid by checking to see that it appears\n * // in the list\n * return list.indexOf(item) > -1;\n * }\n * });\n *\n * $stateProvider.state('list', {\n * url: \"/list/{item:listItem}\",\n * controller: function($scope, $stateParams) {\n * console.log($stateParams.item);\n * }\n * });\n *\n * // ...\n *\n * // Changes URL to '/list/3', logs \"Ringo\" to the console\n * $state.go('list', { item: \"Ringo\" });\n * ```\n *\n * See: [[UrlConfigApi.type]]\n * @coreapi\n */\nexport interface ParamTypeDefinition {\n /**\n * Tests if some object type is compatible with this parameter type\n *\n * Detects whether some value is of this particular type.\n * Accepts a decoded value and determines whether it matches this `ParamType` object.\n *\n * If your custom type encodes the parameter to a specific type, check for that type here.\n * For example, if your custom type decodes the URL parameter value as an array of ints, return true if the\n * input is an array of ints:\n *\n * ```\n * is: (val) => Array.isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true)\n * ```\n *\n * If your type decodes the URL parameter value to a custom string, check that the string matches\n * the pattern (don't use an arrow fn if you need `this`): `function (val) { return !!this.pattern.exec(val) }`\n *\n * Note: This method is _not used to check if the URL matches_.\n * It's used to check if a _decoded value *is* this type_.\n * Use [[pattern]] to check the encoded value in the URL.\n *\n * @param val The value to check.\n * @param key If the type check is happening in the context of a specific [[UrlMatcher]] object,\n * this is the name of the parameter in which `val` is stored. Can be used for\n * meta-programming of `ParamType` objects.\n * @returns `true` if the value matches the type, otherwise `false`.\n */\n is(val: any, key?: string): boolean;\n\n /**\n * Encodes a custom/native type value to a string that can be embedded in a URL.\n *\n * Note that the return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`).\n * It only needs to be a representation of `val` that has been encoded as a string.\n *\n * For example, if your custom type decodes to an array of ints, then encode the array of ints to a string here:\n *\n * ```js\n * encode: (intarray) => intarray.join(\"-\")\n * ```\n *\n * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str`\n *\n * @param val The value to encode.\n * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects.\n * @returns a string representation of `val` that can be encoded in a URL.\n */\n encode(val: any, key?: string): (string|string[]);\n\n /**\n * Decodes a parameter value string (from URL string or transition param) to a custom/native value.\n *\n * For example, if your type decodes to an array of ints, then decode the string as an array of ints here:\n * ```js\n * decode: (str) => str.split(\"-\").map(str => parseInt(str, 10))\n * ```\n *\n * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str`\n *\n * @param val The URL parameter value to decode.\n * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects.\n * @returns a custom representation of the URL parameter value.\n */\n decode(val: string, key?: string): any;\n\n /**\n * Determines whether two decoded values are equivalent.\n *\n * For example, if your type decodes to an array of ints, then check if the arrays are equal:\n * ```js\n * equals: (a, b) => a.length === b.length && a.reduce((acc, x, idx) => acc && x === b[idx], true)\n * ```\n *\n * @param a A value to compare against.\n * @param b A value to compare against.\n * @returns `true` if the values are equivalent/equal, otherwise `false`.\n */\n equals(a: any, b: any): boolean;\n\n /**\n * A regular expression that matches the encoded parameter type\n *\n * This regular expression is used to match an encoded parameter value **in the URL**.\n *\n * For example, if your type encodes as a dash-separated numbers, match that here:\n * `new RegExp(\"[0-9]+(?:-[0-9]+)*\")`.\n *\n * There are some limitations to these regexps:\n *\n * - No capturing groups are allowed (use non-capturing groups: `(?: )`)\n * - No pattern modifiers like case insensitive\n * - No start-of-string or end-of-string: `/^foo$/`\n */\n pattern?: RegExp;\n\n\n /**\n * Disables url-encoding of parameter values\n *\n * If a parameter type is declared `raw`, it will not be url-encoded.\n * Custom encoding can still be applied in the [[encode]] function.\n *\n * ### Decoding warning\n *\n * The decoding behavior of raw parameters is not defined.\n * See: [[ParamDeclaration.raw]] for details\n */\n raw?: boolean;\n\n /**\n * Enables/disables inheriting of parameter values (of this type)\n *\n * When a transition is run with [[TransitionOptions.inherit]] set to\n * `true`, the current param values are inherited in the new transition.\n * However, parameters whose type has `inherit: false` set will *not be inherited*.\n *\n * The internal parameter type of `hash` has `inherit: false`.\n * This is used to disable inheriting of the hash value (`#`) on subsequent transitions.\n *\n * #### Example:\n * ```js\n * $state.go('home', { '#': 'inboxAnchor' });\n * ...\n * // \"#\" is not inherited.\n * // The value of the \"#\" parameter will be `null`\n * // The url's hash will be cleared.\n * $state.go('home.nest');\n * ```\n *\n * ---\n *\n * See also [[TransitionOptions.inherit]] and [[ParamDeclaration.inherit]]\n *\n */\n inherit?: boolean;\n\n /**\n * Dynamic flag\n *\n * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.\n *\n * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).\n * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.\n *\n * Default: `false`\n */\n dynamic?: boolean;\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.d.ts new file mode 100644 index 00000000..3a3a7430 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.d.ts @@ -0,0 +1,65 @@ +import { RawParams, ParamDeclaration } from "../params/interface"; +import { ParamType } from "./paramType"; +import { UrlMatcherFactory } from "../url/urlMatcherFactory"; +/** @internalapi */ +export declare enum DefType { + PATH = 0, + SEARCH = 1, + CONFIG = 2, +} +/** @internalapi */ +export declare class Param { + id: string; + type: ParamType; + location: DefType; + isOptional: boolean; + dynamic: boolean; + raw: boolean; + squash: (boolean | string); + replace: [{ + to: any; + from: any; + }]; + inherit: boolean; + array: boolean; + config: any; + /** Cache the default value if it is a static value */ + _defaultValueCache: { + defaultValue: any; + }; + constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory); + isDefaultValue(value: any): boolean; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + value(value?: any): any; + isSearch(): boolean; + validates(value: any): boolean; + toString(): string; + static values(params: Param[], values?: RawParams): RawParams; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + static changed(params: Param[], values1?: RawParams, values2?: RawParams): Param[]; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + static equals(params: Param[], values1?: {}, values2?: {}): boolean; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + static validates(params: Param[], values?: RawParams): boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js new file mode 100644 index 00000000..6242188a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js @@ -0,0 +1,196 @@ +/** + * @coreapi + * @module params + */ /** for typedoc */ +import { extend, filter, map, allTrueR } from "../common/common"; +import { prop } from "../common/hof"; +import { isInjectable, isDefined, isString, isArray, isUndefined } from "../common/predicates"; +import { services } from "../common/coreservices"; +import { ParamType } from "./paramType"; +/** @hidden */ var hasOwn = Object.prototype.hasOwnProperty; +/** @hidden */ var isShorthand = function (cfg) { + return ["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {})).length === 0; +}; +/** @internalapi */ +export var DefType; +(function (DefType) { + DefType[DefType["PATH"] = 0] = "PATH"; + DefType[DefType["SEARCH"] = 1] = "SEARCH"; + DefType[DefType["CONFIG"] = 2] = "CONFIG"; +})(DefType || (DefType = {})); +/** @hidden */ +function unwrapShorthand(cfg) { + cfg = isShorthand(cfg) && { value: cfg } || cfg; + getStaticDefaultValue['__cacheable'] = true; + function getStaticDefaultValue() { + return cfg.value; + } + return extend(cfg, { + $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue, + }); +} +/** @hidden */ +function getType(cfg, urlType, location, id, paramTypes) { + if (cfg.type && urlType && urlType.name !== 'string') + throw new Error("Param '" + id + "' has two type configurations."); + if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type)) + return paramTypes.type(cfg.type); + if (urlType) + return urlType; + if (!cfg.type) { + var type = location === DefType.CONFIG ? "any" : + location === DefType.PATH ? "path" : + location === DefType.SEARCH ? "query" : "string"; + return paramTypes.type(type); + } + return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type); +} +/** + * @internalapi + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ +function getSquashPolicy(config, isOptional, defaultPolicy) { + var squash = config.squash; + if (!isOptional || squash === false) + return false; + if (!isDefined(squash) || squash == null) + return defaultPolicy; + if (squash === true || isString(squash)) + return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); +} +/** @internalapi */ +function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") }, + ]; + replace = isArray(config.replace) ? config.replace : []; + if (isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = map(replace, prop("from")); + return filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace); +} +/** @internalapi */ +var Param = /** @class */ (function () { + function Param(id, type, config, location, urlMatcherFactory) { + config = unwrapShorthand(config); + type = getType(config, type, location, id, urlMatcherFactory.paramTypes); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type; + var isOptional = config.value !== undefined || location === DefType.SEARCH; + var dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic; + var raw = isDefined(config.raw) ? !!config.raw : !!type.raw; + var squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy()); + var replace = getReplace(config, arrayMode, isOptional, squash); + var inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit; + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === DefType.SEARCH ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return extend(arrayDefaults, arrayParamNomenclature, config).array; + } + extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config }); + } + Param.prototype.isDefaultValue = function (value) { + return this.isOptional && this.type.equals(this.value(), value); + }; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + Param.prototype.value = function (value) { + var _this = this; + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + var getDefaultValue = function () { + if (_this._defaultValueCache) + return _this._defaultValueCache.defaultValue; + if (!services.$injector) + throw new Error("Injectable functions cannot be called at configuration time"); + var defaultValue = services.$injector.invoke(_this.config.$$fn); + if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue)) + throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")"); + if (_this.config.$$fn['__cacheable']) { + _this._defaultValueCache = { defaultValue: defaultValue }; + } + return defaultValue; + }; + var replaceSpecialValues = function (val) { + for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) { + var tuple = _a[_i]; + if (tuple.from === val) + return tuple.to; + } + return val; + }; + value = replaceSpecialValues(value); + return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value); + }; + Param.prototype.isSearch = function () { + return this.location === DefType.SEARCH; + }; + Param.prototype.validates = function (value) { + // There was no parameter value, but the param is optional + if ((isUndefined(value) || value === null) && this.isOptional) + return true; + // The value was not of the correct ParamType, and could not be decoded to the correct ParamType + var normalized = this.type.$normalize(value); + if (!this.type.is(normalized)) + return false; + // The value was of the correct type, but when encoded, did not match the ParamType's regexp + var encoded = this.type.encode(normalized); + return !(isString(encoded) && !this.type.pattern.exec(encoded)); + }; + Param.prototype.toString = function () { + return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}"; + }; + Param.values = function (params, values) { + if (values === void 0) { values = {}; } + var paramValues = {}; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + paramValues[param.id] = param.value(values[param.id]); + } + return paramValues; + }; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + Param.changed = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); }); + }; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + Param.equals = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return Param.changed(params, values1, values2).length === 0; + }; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + Param.validates = function (params, values) { + if (values === void 0) { values = {}; } + return params.map(function (param) { return param.validates(values[param.id]); }).reduce(allTrueR, true); + }; + return Param; +}()); +export { Param }; +//# sourceMappingURL=param.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js.map new file mode 100644 index 00000000..291d5f71 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/param.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "param.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/param.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAAE,QAAQ,EAAE,MAA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CAAwD,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;OAQG;IACI,YAAM,GAAb,UAAc,MAAe,EAAE,OAAY,EAAE,OAAY;QAA1B,wBAAA,EAAA,YAAY;QAAE,wBAAA,EAAA,YAAY;QACvD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IAC9D,CAAC;IAED,2FAA2F;IACpF,eAAS,GAAhB,UAAiB,MAAe,EAAE,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;QACtD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAjC,CAAiC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvF,CAAC;IACH,YAAC;AAAD,CAAC,AA7ID,IA6IC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.d.ts new file mode 100644 index 00000000..7554929c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.d.ts @@ -0,0 +1,66 @@ +import { ParamTypeDefinition } from "./interface"; +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +export declare class ParamType implements ParamTypeDefinition { + /** @inheritdoc */ + pattern: RegExp; + /** The name/id of the parameter type */ + name: string; + /** @inheritdoc */ + raw: boolean; + /** @inheritdoc */ + dynamic: boolean; + /** @inheritdoc */ + inherit: boolean; + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + constructor(def: ParamTypeDefinition); + /** @inheritdoc */ + is(val: any, key?: string): boolean; + /** @inheritdoc */ + encode(val: any, key?: string): (string | string[]); + /** @inheritdoc */ + decode(val: string, key?: string): any; + /** @inheritdoc */ + equals(a: any, b: any): boolean; + $subPattern(): string; + toString(): string; + /** Given an encoded string, or a decoded object, returns a decoded object */ + $normalize(val: any): any; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + $asArray(mode: (boolean | "auto"), isSearch: boolean): any; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js new file mode 100644 index 00000000..1f7cbd3e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js @@ -0,0 +1,140 @@ +/** + * @coreapi + * @module params + */ +/** */ +import { extend, filter, map } from "../common/common"; +import { isArray, isDefined } from "../common/predicates"; +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +var ParamType = /** @class */ (function () { + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + function ParamType(def) { + /** @inheritdoc */ + this.pattern = /.*/; + /** @inheritdoc */ + this.inherit = true; + extend(this, def); + } + // consider these four methods to be "abstract methods" that should be overridden + /** @inheritdoc */ + ParamType.prototype.is = function (val, key) { return true; }; + /** @inheritdoc */ + ParamType.prototype.encode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.decode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.equals = function (a, b) { return a == b; }; + ParamType.prototype.$subPattern = function () { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); + }; + ParamType.prototype.toString = function () { + return "{ParamType:" + this.name + "}"; + }; + /** Given an encoded string, or a decoded object, returns a decoded object */ + ParamType.prototype.$normalize = function (val) { + return this.is(val) ? val : this.decode(val); + }; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + ParamType.prototype.$asArray = function (mode, isSearch) { + if (!mode) + return this; + if (mode === "auto" && !isSearch) + throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + }; + return ParamType; +}()); +export { ParamType }; +/** + * Wraps up a `ParamType` object to handle array values. + * @internalapi + */ +function ArrayType(type, mode) { + var _this = this; + // Wrap non-array value as array + function arrayWrap(val) { + return isArray(val) ? val : (isDefined(val) ? [val] : []); + } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch (val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + if (isArray(val) && val.length === 0) + return val; + var arr = arrayWrap(val); + var result = map(arr, callback); + return (allTruthyMode === true) ? filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result); + }; + } + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) + return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) + return false; + } + return true; + }; + } + ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) { + var paramTypeFn = type[name].bind(type); + var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler; + _this[name] = wrapperFn(paramTypeFn); + }); + extend(this, { + dynamic: type.dynamic, + name: type.name, + pattern: type.pattern, + inherit: type.inherit, + is: arrayHandler(type.is.bind(type), true), + $arrayMode: mode + }); +} +//# sourceMappingURL=paramType.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js.map new file mode 100644 index 00000000..f72e0567 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramType.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "paramType.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/paramType.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAC,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAYE;;;;OAIG;IACH,mBAAY,GAAwB;QAhBpC,kBAAkB;QAClB,YAAO,GAAW,IAAI,CAAC;QAOvB,kBAAkB;QAClB,YAAO,GAAG,IAAI,CAAC;QAQb,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC;IAGD,iFAAiF;IACjF,kBAAkB;IAClB,sBAAE,GAAF,UAAG,GAAQ,EAAE,GAAY,IAAa,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,kBAAkB;IAClB,0BAAM,GAAN,UAAO,GAAQ,EAAE,GAAY,IAAuB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,kBAAkB;IAClB,0BAAM,GAAN,UAAO,GAAW,EAAE,GAAY,IAAS,MAA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AAC,KAAK,CAAC;YAC/C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACrC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAAC,MAAM,CAAC,KAAK,CAAC;YACjD,CAAC;YACD,MAAM,CAAC,IAAI,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IAED,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACvD,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,SAAS,GAAa,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,CAAC;QAChF,KAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,EAAE;QACX,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;QAC1C,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;AACL,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.d.ts new file mode 100644 index 00000000..88324d2a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.d.ts @@ -0,0 +1,192 @@ +import { ParamTypeDefinition } from "./interface"; +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +export declare class ParamTypes { + /** @hidden */ + types: any; + /** @hidden */ + enqueue: boolean; + /** @hidden */ + typeQueue: any[]; + /** + * Built-in parameter type: `string` + * + * This parameter type coerces values to strings. + * It matches anything (`new RegExp(".*")`) in the URL + */ + static string: ParamTypeDefinition; + /** + * Built-in parameter type: `path` + * + * This parameter type is the default type for path parameters. + * A path parameter is any parameter declared in the path portion of a url + * + * - `/foo/:param1/:param2`: two path parameters + * + * This parameter type behaves exactly like the [[string]] type with one exception. + * When matching parameter values in the URL, the `path` type does not match forward slashes `/`. + * + * #### Angular 1 note: + * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`. + * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598 + */ + static path: ParamTypeDefinition; + /** + * Built-in parameter type: `query` + * + * This parameter type is the default type for query/search parameters. + * It behaves the same as the [[string]] parameter type. + * + * A query parameter is any parameter declared in the query/search portion of a url + * + * - `/bar?param2`: a query parameter + */ + static query: ParamTypeDefinition; + /** + * Built-in parameter type: `hash` + * + * This parameter type is used for the `#` parameter (the hash) + * It behaves the same as the [[string]] parameter type. + * @coreapi + */ + static hash: ParamTypeDefinition; + /** + * Built-in parameter type: `int` + * + * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL. + * + * #### Example: + * ```js + * .state({ + * name: 'user', + * url: '/user/{id:int}' + * }); + * ``` + * ```js + * $state.go('user', { id: 1298547 }); + * ``` + * + * The URL will serialize to: `/user/1298547`. + * + * When the parameter value is read, it will be the `number` `1298547`, not the string `"1298547"`. + */ + static int: ParamTypeDefinition; + /** + * Built-in parameter type: `bool` + * + * This parameter type serializes `true`/`false` as `1`/`0` + * + * #### Example: + * ```js + * .state({ + * name: 'inbox', + * url: '/inbox?{unread:bool}' + * }); + * ``` + * ```js + * $state.go('inbox', { unread: true }); + * ``` + * + * The URL will serialize to: `/inbox?unread=1`. + * + * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`. + */ + static bool: ParamTypeDefinition; + /** + * Built-in parameter type: `date` + * + * This parameter type can be used to serialize Javascript dates as parameter values. + * + * #### Example: + * ```js + * .state({ + * name: 'search', + * url: '/search?{start:date}' + * }); + * ``` + * ```js + * $state.go('search', { start: new Date(2000, 0, 1) }); + * ``` + * + * The URL will serialize to: `/search?start=2000-01-01`. + * + * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where: + * + * - `date.getFullYear() === 2016` + * - `date.getMonth() === 11` (month is 0-based) + * - `date.getDate() === 25` + */ + static date: ParamTypeDefinition; + /** + * Built-in parameter type: `json` + * + * This parameter type can be used to serialize javascript objects into the URL using JSON serialization. + * + * #### Example: + * This example serializes an plain javascript object to the URL + * ```js + * .state({ + * name: 'map', + * url: '/map/{coords:json}' + * }); + * ``` + * ```js + * $state.go('map', { coords: { x: 10399.2, y: 49071 }); + * ``` + * + * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D` + */ + static json: ParamTypeDefinition; + /** + * Built-in parameter type: `any` + * + * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL). + * This type does not encode or decode. + * It is compared using a deep `equals` comparison. + * + * #### Example: + * This example defines a non-url parameter on a [[StateDeclaration]]. + * ```js + * .state({ + * name: 'new', + * url: '/new', + * params: { + * inrepyto: null + * } + * }); + * ``` + * ```js + * $state.go('new', { inreplyto: currentMessage }); + * ``` + */ + static any: ParamTypeDefinition; + /** @internalapi */ + private defaultTypes; + /** @internalapi */ + constructor(); + /** @internalapi */ + dispose(): void; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition): any; + /** @internalapi */ + _flushTypeQueue(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js new file mode 100644 index 00000000..ae54bf37 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js @@ -0,0 +1,154 @@ +/** + * @coreapi + * @module params + */ +/** */ +import { fromJson, toJson, identity, equals, inherit, map, extend, pick } from "../common/common"; +import { isDefined, isNullOrUndefined } from "../common/predicates"; +import { is } from "../common/hof"; +import { services } from "../common/coreservices"; +import { ParamType } from "./paramType"; +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +var ParamTypes = /** @class */ (function () { + /** @internalapi */ + function ParamTypes() { + /** @hidden */ + this.enqueue = true; + /** @hidden */ + this.typeQueue = []; + /** @internalapi */ + this.defaultTypes = pick(ParamTypes.prototype, ["hash", "string", "query", "path", "int", "bool", "date", "json", "any"]); + // Register default types. Store them in the prototype of this.types. + var makeType = function (definition, name) { + return new ParamType(extend({ name: name }, definition)); + }; + this.types = inherit(map(this.defaultTypes, makeType), {}); + } + /** @internalapi */ + ParamTypes.prototype.dispose = function () { + this.types = {}; + }; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + ParamTypes.prototype.type = function (name, definition, definitionFn) { + if (!isDefined(definition)) + return this.types[name]; + if (this.types.hasOwnProperty(name)) + throw new Error("A type named '" + name + "' has already been defined."); + this.types[name] = new ParamType(extend({ name: name }, definition)); + if (definitionFn) { + this.typeQueue.push({ name: name, def: definitionFn }); + if (!this.enqueue) + this._flushTypeQueue(); + } + return this; + }; + /** @internalapi */ + ParamTypes.prototype._flushTypeQueue = function () { + while (this.typeQueue.length) { + var type = this.typeQueue.shift(); + if (type.pattern) + throw new Error("You cannot override a type's .pattern at runtime."); + extend(this.types[type.name], services.$injector.invoke(type.def)); + } + }; + return ParamTypes; +}()); +export { ParamTypes }; +/** @hidden */ +function initDefaultTypes() { + var makeDefaultType = function (def) { + var valToString = function (val) { + return val != null ? val.toString() : val; + }; + var defaultTypeBase = { + encode: valToString, + decode: valToString, + is: is(String), + pattern: /.*/, + equals: function (a, b) { return a == b; }, + }; + return extend({}, defaultTypeBase, def); + }; + // Default Parameter Type Definitions + extend(ParamTypes.prototype, { + string: makeDefaultType({}), + path: makeDefaultType({ + pattern: /[^/]*/, + }), + query: makeDefaultType({}), + hash: makeDefaultType({ + inherit: false, + }), + int: makeDefaultType({ + decode: function (val) { return parseInt(val, 10); }, + is: function (val) { + return !isNullOrUndefined(val) && this.decode(val.toString()) === val; + }, + pattern: /-?\d+/, + }), + bool: makeDefaultType({ + encode: function (val) { return val && 1 || 0; }, + decode: function (val) { return parseInt(val, 10) !== 0; }, + is: is(Boolean), + pattern: /0|1/, + }), + date: makeDefaultType({ + encode: function (val) { + return !this.is(val) ? undefined : [ + val.getFullYear(), + ('0' + (val.getMonth() + 1)).slice(-2), + ('0' + val.getDate()).slice(-2), + ].join("-"); + }, + decode: function (val) { + if (this.is(val)) + return val; + var match = this.capture.exec(val); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); }, + equals: function (l, r) { + return ['getFullYear', 'getMonth', 'getDate'] + .reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true); + }, + 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: makeDefaultType({ + encode: toJson, + decode: fromJson, + is: is(Object), + equals: equals, + pattern: /[^/]*/, + }), + // does not encode/decode + any: makeDefaultType({ + encode: identity, + decode: identity, + is: function () { return true; }, + equals: equals, + }), + }); +} +initDefaultTypes(); +//# sourceMappingURL=paramTypes.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js.map new file mode 100644 index 00000000..6bb6da62 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/paramTypes.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "paramTypes.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/paramTypes.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;;;;;;;;;;;GAgBG;AACH;IA6KE,mBAAmB;IACnB;QA3KA,cAAc;QACd,YAAO,GAAY,IAAI,CAAC;QACxB,cAAc;QACd,cAAS,GAAU,EAAE,CAAC;QAoKtB,mBAAmB;QACX,iBAAY,GAAQ,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAA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identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.d.ts new file mode 100644 index 00000000..ef9c4bde --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.d.ts @@ -0,0 +1,21 @@ +/** + * @coreapi + * @module params + */ +/** */ +import { Obj } from "../common/common"; +import { StateObject } from "../state/stateObject"; +/** @internalapi */ +export declare class StateParams { + [key: string]: any; + constructor(params?: Obj); + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + $inherit(newParams: Obj, $current: StateObject, $to: StateObject): Obj; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js new file mode 100644 index 00000000..8121cd99 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js @@ -0,0 +1,42 @@ +/** + * @coreapi + * @module params + */ +/** */ +import { extend, ancestors } from "../common/common"; +/** @internalapi */ +var StateParams = /** @class */ (function () { + function StateParams(params) { + if (params === void 0) { params = {}; } + extend(this, params); + } + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + StateParams.prototype.$inherit = function (newParams, $current, $to) { + var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + for (var i in parents) { + if (!parents[i] || !parents[i].params) + continue; + parentParams = Object.keys(parents[i].params); + if (!parentParams.length) + continue; + for (var j in parentParams) { + if (inheritList.indexOf(parentParams[j]) >= 0) + continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = this[parentParams[j]]; + } + } + return extend({}, inherited, newParams); + }; + ; + return StateParams; +}()); +export { StateParams }; +//# sourceMappingURL=stateParams.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js.map new file mode 100644 index 00000000..8a746c29 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/params/stateParams.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateParams.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/stateParams.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAC,MAAM,EAAE,SAAS,EAAM,MAAM,kBAAkB,CAAC;AAGxD,mBAAmB;AACnB;IAGE,qBAAY,MAAgB;QAAhB,uBAAA,EAAA,WAAgB;QAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,8BAAQ,GAAR,UAAS,SAAc,EAAE,QAAqB,EAAE,GAAgB;QAC9D,IAAI,OAAO,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,EAClC,YAAsB,EACtB,SAAS,GAAQ,EAAE,EACnB,WAAW,GAAa,EAAE,CAAC;QAE/B,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gBAAC,QAAQ,CAAC;YAChD,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;gBAAC,QAAQ,CAAC;YAEnC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC;gBAC3B,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;oBAAC,QAAQ,CAAC;gBACxD,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC;IAAA,CAAC;IACJ,kBAAC;AAAD,CAAC,AAlCD,IAkCC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.d.ts new file mode 100644 index 00000000..9f182f10 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.d.ts @@ -0,0 +1,3 @@ +/** @module path */ /** for typedoc */ +export * from "./pathNode"; +export * from "./pathFactory"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js new file mode 100644 index 00000000..d800234e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js @@ -0,0 +1,4 @@ +/** @module path */ /** for typedoc */ +export * from "./pathNode"; +export * from "./pathFactory"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js.map new file mode 100644 index 00000000..339e0263 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/index.ts" + ], + "names": [], + "mappings": "AAAA,mBAAmB,CAAC,kBAAkB;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\nexport * from \"./pathNode\";\nexport * from \"./pathFactory\";" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.d.ts new file mode 100644 index 00000000..5b6c77fe --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.d.ts @@ -0,0 +1,81 @@ +/** @module path */ /** for typedoc */ +import { Predicate } from "../common/common"; +import { TreeChanges } from "../transition/interface"; +import { StateObject } from "../state/stateObject"; +import { TargetState } from "../state/targetState"; +import { GetParamsFn, PathNode } from "./pathNode"; +import { ViewService } from "../view/view"; +import { Param } from '../params/param'; +import { StateRegistry } from '../state'; +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +export declare class PathUtils { + constructor(); + /** Given a PathNode[], create an TargetState */ + static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState; + static buildPath(targetState: TargetState): PathNode[]; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[]; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]): void; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys?: string[]): PathNode[]; + static nonDynamicParams: (node: PathNode) => Param[]; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[]; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + static subPath(path: PathNode[], predicate: Predicate): PathNode[]; + /** Gets the raw parameter values from a path */ + static paramValues: (path: PathNode[]) => {}; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js new file mode 100644 index 00000000..117a2014 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js @@ -0,0 +1,171 @@ +/** @module path */ /** for typedoc */ +import { extend, find, pick, omit, tail, mergeR, values, unnestR, inArray, arrayTuples, } from "../common/common"; +import { prop, propEq } from "../common/hof"; +import { TargetState } from "../state/targetState"; +import { PathNode } from "./pathNode"; +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +var PathUtils = /** @class */ (function () { + function PathUtils() { + } + /** Given a PathNode[], create an TargetState */ + PathUtils.makeTargetState = function (registry, path) { + var state = tail(path).state; + return new TargetState(registry, state, path.map(prop("paramValues")).reduce(mergeR, {}), {}); + }; + PathUtils.buildPath = function (targetState) { + var toParams = targetState.params(); + return targetState.$state().path.map(function (state) { return new PathNode(state).applyRawParams(toParams); }); + }; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + PathUtils.buildToPath = function (fromPath, targetState) { + var toPath = PathUtils.buildPath(targetState); + if (targetState.options().inherit) { + return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params())); + } + return toPath; + }; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + PathUtils.applyViewConfigs = function ($view, path, states) { + // Only apply the viewConfigs to the nodes for the given states + path.filter(function (node) { return inArray(states, node.state); }).forEach(function (node) { + var viewDecls = values(node.state.views || {}); + var subPath = PathUtils.subPath(path, function (n) { return n === node; }); + var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); }); + node.views = viewConfigs.reduce(unnestR, []); + }); + }; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + PathUtils.inheritParams = function (fromPath, toPath, toKeys) { + if (toKeys === void 0) { toKeys = []; } + function nodeParamVals(path, state) { + var node = find(path, propEq('state', state)); + return extend({}, node && node.paramValues); + } + var noInherit = fromPath.map(function (node) { return node.paramSchema; }) + .reduce(unnestR, []) + .filter(function (param) { return !param.inherit; }) + .map(prop('id')); + /** + * Given an [[PathNode]] "toNode", return a new [[PathNode]] with param values inherited from the + * matching node in fromPath. Only inherit keys that aren't found in "toKeys" from the node in "fromPath"" + */ + function makeInheritedParamsNode(toNode) { + // All param values for the node (may include default key/vals, when key was not found in toParams) + var toParamVals = extend({}, toNode && toNode.paramValues); + // limited to only those keys found in toParams + var incomingParamVals = pick(toParamVals, toKeys); + toParamVals = omit(toParamVals, toKeys); + var fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit); + // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals + var ownParamVals = extend(toParamVals, fromParamVals, incomingParamVals); + return new PathNode(toNode.state).applyRawParams(ownParamVals); + } + // The param keys specified by the incoming toParams + return toPath.map(makeInheritedParamsNode); + }; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + PathUtils.treeChanges = function (fromPath, toPath, reloadState) { + var keep = 0, max = Math.min(fromPath.length, toPath.length); + var nodesMatch = function (node1, node2) { + return node1.equals(node2, PathUtils.nonDynamicParams); + }; + while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) { + keep++; + } + /** Given a retained node, return a new node which uses the to node's param values */ + function applyToParams(retainedNode, idx) { + var cloned = PathNode.clone(retainedNode); + cloned.paramValues = toPath[idx].paramValues; + return cloned; + } + var from, retained, exiting, entering, to; + from = fromPath; + retained = from.slice(0, keep); + exiting = from.slice(keep); + // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped + var retainedWithToParams = retained.map(applyToParams); + entering = toPath.slice(keep); + to = (retainedWithToParams).concat(entering); + return { from: from, to: to, retained: retained, exiting: exiting, entering: entering }; + }; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + PathUtils.matching = function (pathA, pathB, paramsFn) { + var done = false; + var tuples = arrayTuples(pathA, pathB); + return tuples.reduce(function (matching, _a) { + var nodeA = _a[0], nodeB = _a[1]; + done = done || !nodeA.equals(nodeB, paramsFn); + return done ? matching : matching.concat(nodeA); + }, []); + }; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + PathUtils.equals = function (pathA, pathB, paramsFn) { + return pathA.length === pathB.length && + PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length; + }; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + PathUtils.subPath = function (path, predicate) { + var node = find(path, predicate); + var elementIdx = path.indexOf(node); + return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1); + }; + PathUtils.nonDynamicParams = function (node) { + return node.state.parameters({ inherit: false }) + .filter(function (param) { return !param.dynamic; }); + }; + /** Gets the raw parameter values from a path */ + PathUtils.paramValues = function (path) { + return path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {}); + }; + return PathUtils; +}()); +export { PathUtils }; +//# sourceMappingURL=pathFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js.map new file mode 100644 index 00000000..81d4d23f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pathFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/pathFactory.ts" + ], + "names": [], + "mappings": "AAAA,mBAAmB,CAAC,kBAAkB;AAEtC,OAAO,EACL,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAa,OAAO,EAAE,WAAW,GACzF,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAE,MAAM,EAAM,MAAM,eAAe,CAAC;AAQhD,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAc,QAAQ,EAAC,MAAM,YAAY,CAAC;AAKjD;;GAEG;AACH;IAEE;IAAgB,CAAC;IAEjB,gDAAgD;IACzC,yBAAe,GAAtB,UAAuB,QAAuB,EAAE,IAAgB;QAC9D,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChG,CAAC;IAEM,mBAAS,GAAhB,UAAiB,WAAwB;QACvC,IAAI,QAAQ,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,IAA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;QACjC,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IACvE,CAAC;IAzFM,0BAAgB,GAAG,UAAC,IAAc;QACrC,OAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;aACpC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,KAAK,CAAC,OAAO,EAAd,CAAc,CAAC;IADpC,CACoC,CAAC;IAyFzC,gDAAgD;IACzC,qBAAW,GAAG,UAAC,IAAgB;QAClC,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,EAA7B,CAA6B,EAAE,EAAE,CAAC;IAA7D,CAA6D,CAAC;IACpE,gBAAC;CAAA,AA/KD,IA+KC;SA/KY,SAAS", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.d.ts new file mode 100644 index 00000000..910d0a3c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.d.ts @@ -0,0 +1,58 @@ +import { StateObject } from "../state/stateObject"; +import { RawParams } from "../params/interface"; +import { Param } from "../params/param"; +import { Resolvable } from "../resolve/resolvable"; +import { ViewConfig } from "../view/interface"; +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +export declare class PathNode { + /** The state being entered, exited, or retained */ + state: StateObject; + /** The parameters declared on the state */ + paramSchema: Param[]; + /** The parameter values that belong to the state */ + paramValues: { + [key: string]: any; + }; + /** The individual (stateful) resolvable objects that belong to the state */ + resolvables: Resolvable[]; + /** The state's declared view configuration objects */ + views: ViewConfig[]; + /** Creates a copy of a PathNode */ + constructor(node: PathNode); + /** Creates a new (empty) PathNode for a State */ + constructor(state: StateObject); + /** Sets [[paramValues]] for the node, from the values of an object hash */ + applyRawParams(params: RawParams): PathNode; + /** Gets a specific [[Param]] metadata that belongs to the node */ + parameter(name: string): Param; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + equals(node: PathNode, paramsFn?: GetParamsFn): boolean; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false; + /** Returns a clone of the PathNode */ + static clone(node: PathNode): PathNode; +} +/** @hidden */ +export declare type GetParamsFn = (pathNode: PathNode) => Param[]; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js new file mode 100644 index 00000000..f0e5a938 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js @@ -0,0 +1,75 @@ +/** @module path */ /** for typedoc */ +import { extend, applyPairs, find } from "../common/common"; +import { propEq } from "../common/hof"; +import { Param } from "../params/param"; +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +var PathNode = /** @class */ (function () { + function PathNode(stateOrNode) { + if (stateOrNode instanceof PathNode) { + var node = stateOrNode; + this.state = node.state; + this.paramSchema = node.paramSchema.slice(); + this.paramValues = extend({}, node.paramValues); + this.resolvables = node.resolvables.slice(); + this.views = node.views && node.views.slice(); + } + else { + var state = stateOrNode; + this.state = state; + this.paramSchema = state.parameters({ inherit: false }); + this.paramValues = {}; + this.resolvables = state.resolvables.map(function (res) { return res.clone(); }); + } + } + /** Sets [[paramValues]] for the node, from the values of an object hash */ + PathNode.prototype.applyRawParams = function (params) { + var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; }; + this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return applyPairs(memo, getParamVal(pDef)); }, {}); + return this; + }; + /** Gets a specific [[Param]] metadata that belongs to the node */ + PathNode.prototype.parameter = function (name) { + return find(this.paramSchema, propEq("id", name)); + }; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + PathNode.prototype.equals = function (node, paramsFn) { + var diff = this.diff(node, paramsFn); + return diff && diff.length === 0; + }; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + PathNode.prototype.diff = function (node, paramsFn) { + if (this.state !== node.state) + return false; + var params = paramsFn ? paramsFn(this) : this.paramSchema; + return Param.changed(params, this.paramValues, node.paramValues); + }; + /** Returns a clone of the PathNode */ + PathNode.clone = function (node) { + return new PathNode(node); + }; + return PathNode; +}()); +export { PathNode }; +//# sourceMappingURL=pathNode.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js.map new file mode 100644 index 00000000..4ac99112 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/path/pathNode.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pathNode.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/pathNode.ts" + ], + "names": [], + "mappings": "AAAA,mBAAmB,CAAC,kBAAkB;AACtC,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAA+B,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAItC;;;;;;;;GAQG;AACH;IAgBE,kBAAY,WAAgB;QAC1B,EAAE,CAAC,CAAC,WAAW,YAAY,QAAQ,CAAC,CAAC,CAAC;YACpC,IAAI,IAAI,GAAa,WAAW,CAAC;YACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAChD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN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ACH,uBAAI,GAAJ,UAAK,IAAc,EAAE,QAAsB;QACzC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;QAE5C,IAAM,MAAM,GAAY,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;QACrE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACnE,CAAC;IAED,sCAAsC;IAC/B,cAAK,GAAZ,UAAa,IAAc;QACzB,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,eAAC;AAAD,CAAC,AA7ED,IA6EC", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.d.ts new file mode 100644 index 00000000..803e70db --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.d.ts @@ -0,0 +1,4 @@ +/** @module resolve */ /** for typedoc */ +export * from "./interface"; +export * from "./resolvable"; +export * from "./resolveContext"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js new file mode 100644 index 00000000..43014b36 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js @@ -0,0 +1,5 @@ +/** @module resolve */ /** for typedoc */ +export * from "./interface"; +export * from "./resolvable"; +export * from "./resolveContext"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js.map new file mode 100644 index 00000000..40507b0c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/index.ts" + ], + "names": [], + "mappings": "AAAA,sBAAsB,CAAC,kBAAkB;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC", + "sourcesContent": [ + "/** @module resolve */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./resolvable\";\nexport * from \"./resolveContext\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.d.ts new file mode 100644 index 00000000..7eb0a0fd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.d.ts @@ -0,0 +1,196 @@ +/** + * An interface which is similar to an Angular 2 `Provider` + */ +export interface ProviderLike { + provide: any; + useClass?: any; + useFactory?: Function; + useValue?: any; + useExisting?: any; + deps?: any[]; +} +/** + * A plain object used to describe a [[Resolvable]] + * + * These objects may be used in the [[StateDeclaration.resolve]] array to declare + * async data that the state or substates require. + * + * #### Example: + * ```js + * + * var state = { + * name: 'main', + * resolve: [ + * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() }, + * ], + * } + * ``` + */ +export interface ResolvableLiteral { + /** + * A Dependency Injection token + * + * This Resolvable's DI token. + * The Resolvable will be injectable elsewhere using the token. + */ + token: any; + /** + * A function which fetches the Resolvable's data + * + * A function which returns one of: + * + * - The resolved value (synchronously) + * - A promise for the resolved value + * - An Observable of the resolved value(s) + * + * This function will be provided the dependencies listed in [[deps]] as its arguments. + * The resolve system will asynchronously fetch the dependencies before invoking this function. + */ + resolveFn: Function; + /** + * Defines the Resolve Policy + * + * A policy that defines when to invoke the resolve, + * and whether to wait for async and unwrap the data + */ + policy?: ResolvePolicy; + /** + * The Dependency Injection tokens + * + * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]]. + * + * The DI tokens are references to other `Resolvables`, or to other + * services from the native DI system. + */ + deps?: any[]; + /** Pre-resolved data. */ + data?: any; +} +/** + * Defines how a resolve is processed during a transition + * + * This object is the [[StateDeclaration.resolvePolicy]] property. + * + * #### Example: + * ```js + * // Fetched when the resolve's state is being entered. + * // Wait for the promise to resolve. + * var policy1 = { when: "LAZY", async: "WAIT" } + * + * // Fetched when the Transition is starting. + * // Do not wait for the returned promise to resolve. + * // Inject the raw promise/value + * var policy2 = { when: "EAGER", async: "NOWAIT" } + * ``` + * + * The policy for a given Resolvable is merged from three sources (highest priority first): + * + * - 1) Individual resolve definition + * - 2) State definition + * - 3) Global default + * + * #### Example: + * ```js + * // Wait for an Observable to emit one item. + * // Since `wait` is not specified, it uses the `wait` + * // policy defined on the state, or the global default + * // if no `wait` policy is defined on the state + * var myResolvablePolicy = { async: "RXWAIT" } + * ``` + */ +export interface ResolvePolicy { + /** + * Defines when a Resolvable is resolved (fetched) during a transition + * + * - `LAZY` (default) + * - Resolved as the resolve's state is being entered + * - `EAGER` + * - Resolved as the transition is starting + * + * #### Example: + * Resolves for `main` and `main.home` are fetched when each state is entered. + * All of `main` resolves are processed before fetching `main.home` resolves. + * ```js + * var state = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { when: 'LAZY' }, // default + * } + * + * var state = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { when: 'LAZY' }, // default + * } + * ``` + * + * #### Example: + * Resolves for `main` and `main.home` are fetched at the same time when the transition starts. + * This happens earlier in the lifecycle than when states are entered. + * All of the `main` and `main.home` resolves are fetched as soon as possible. + * ```js + * var mainState = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { when: 'EAGER' }, + * } + * + * var homeState = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { when: 'EAGER' }, + * } + * ``` + */ + when?: PolicyWhen; + /** + * Determines the unwrapping behavior of asynchronous resolve values. + * + * - `WAIT` (default) + * - If a promise is returned from the resolveFn, wait for the promise before proceeding + * - The unwrapped value from the promise + * - `NOWAIT` + * - If a promise is returned from the resolve, do not wait for the promise. + * - Any other value returned is wrapped in a promise. + * - The promise will not be unwrapped. + * - The promise itself will be provided when the resolve is injected or bound elsewhere. + * - `RXWAIT` + * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item. + * - The Observable item will not be unwrapped. + * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere. + * + * #### Example: + * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing. + * Resolves for `main` will be provided to components wrapped in a `Promise`. + * + * The `Transition` will wait for the `main.home` resolve promises. + * Resolved values will be unwrapped before being provided to components. + * ```js + * var mainState = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { async: 'NOWAIT' }, + * } + * var homeState = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { async: 'WAIT' }, // default + * } + * ``` + */ + async?: PolicyAsync; +} +export declare type PolicyWhen = "LAZY" | "EAGER"; +export declare type PolicyAsync = "WAIT" | "NOWAIT" | "RXWAIT"; +/** @internalapi */ +export declare let resolvePolicies: { + when: { + LAZY: string; + EAGER: string; + }; + async: { + WAIT: string; + NOWAIT: string; + RXWAIT: string; + }; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js new file mode 100644 index 00000000..b26f770a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js @@ -0,0 +1,13 @@ +/** @internalapi */ +export var resolvePolicies = { + when: { + LAZY: "LAZY", + EAGER: "EAGER" + }, + async: { + WAIT: "WAIT", + NOWAIT: "NOWAIT", + RXWAIT: "RXWAIT" + } +}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js.map new file mode 100644 index 00000000..e4fcd14c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/interface.ts" + ], + "names": [], + "mappings": "AA6MA,mBAAmB;AACnB,MAAM,CAAC,IAAI,eAAe,GAAG;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC", + "sourcesContent": [ + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.d.ts new file mode 100644 index 00000000..4d86f117 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.d.ts @@ -0,0 +1,69 @@ +import { ResolvePolicy, ResolvableLiteral } from "./interface"; +import { ResolveContext } from "./resolveContext"; +import { Transition } from "../transition/transition"; +import { StateObject } from "../state/stateObject"; +export declare let defaultResolvePolicy: ResolvePolicy; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +export declare class Resolvable implements ResolvableLiteral { + token: any; + policy: ResolvePolicy; + resolveFn: Function; + deps: any[]; + data: any; + resolved: boolean; + promise: Promise; + /** This constructor creates a Resolvable copy */ + constructor(resolvable: Resolvable); + /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */ + constructor(resolvable: ResolvableLiteral); + /** + * This constructor creates a new `Resolvable` + * + * #### Example: + * ```js + * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]); + * + * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]); + * + * var resolvable1Clone = new Resolvable(resolvable1); + * ``` + * + * @param token The new resolvable's injection token, such as `"userList"` (a string) or `UserService` (a class). + * When this token is used during injection, the resolved value will be injected. + * @param resolveFn The function that returns the resolved value, or a promise for the resolved value + * @param deps An array of dependencies, which will be injected into the `resolveFn` + * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed + * @param data Pre-resolved data. If the resolve value is already known, it may be provided here. + */ + constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any); + getPolicy(state: StateObject): ResolvePolicy; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + resolve(resolveContext: ResolveContext, trans?: Transition): Promise; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + get(resolveContext: ResolveContext, trans?: Transition): Promise; + toString(): string; + clone(): Resolvable; + static fromData: (token: any, data: any) => Resolvable; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js new file mode 100644 index 00000000..9079f452 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js @@ -0,0 +1,132 @@ +/** + * @coreapi + * @module resolve + */ /** for typedoc */ +import { extend, identity } from "../common/common"; +import { services } from "../common/coreservices"; +import { trace } from "../common/trace"; +import { stringify } from "../common/strings"; +import { isFunction, isObject } from "../common/predicates"; +import { isNullOrUndefined } from '../common'; +// TODO: explicitly make this user configurable +export var defaultResolvePolicy = { + when: "LAZY", + async: "WAIT" +}; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +var Resolvable = /** @class */ (function () { + function Resolvable(arg1, resolveFn, deps, policy, data) { + this.resolved = false; + this.promise = undefined; + if (arg1 instanceof Resolvable) { + extend(this, arg1); + } + else if (isFunction(resolveFn)) { + if (isNullOrUndefined(arg1)) + throw new Error("new Resolvable(): token argument is required"); + if (!isFunction(resolveFn)) + throw new Error("new Resolvable(): resolveFn argument must be a function"); + this.token = arg1; + this.policy = policy; + this.resolveFn = resolveFn; + this.deps = deps || []; + this.data = data; + this.resolved = data !== undefined; + this.promise = this.resolved ? services.$q.when(this.data) : undefined; + } + else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) { + var literal = arg1; + return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data); + } + } + Resolvable.prototype.getPolicy = function (state) { + var thisPolicy = this.policy || {}; + var statePolicy = state && state.resolvePolicy || {}; + return { + when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when, + async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async, + }; + }; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + Resolvable.prototype.resolve = function (resolveContext, trans) { + var _this = this; + var $q = services.$q; + // Gets all dependencies from ResolveContext and wait for them to be resolved + var getResolvableDependencies = function () { + return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { + return resolvable.get(resolveContext, trans); + })); + }; + // Invokes the resolve function passing the resolved dependencies as arguments + var invokeResolveFn = function (resolvedDeps) { + return _this.resolveFn.apply(null, resolvedDeps); + }; + /** + * For RXWAIT policy: + * + * Given an observable returned from a resolve function: + * - enables .cache() mode (this allows multicast subscribers) + * - then calls toPromise() (this triggers subscribe() and thus fetches) + * - Waits for the promise, then return the cached observable (not the first emitted value). + */ + var waitForRx = function (observable$) { + var cached = observable$.cache(1); + return cached.take(1).toPromise().then(function () { return cached; }); + }; + // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through. + var node = resolveContext.findNode(this); + var state = node && node.state; + var maybeWaitForRx = this.getPolicy(state).async === "RXWAIT" ? waitForRx : identity; + // After the final value has been resolved, update the state of the Resolvable + var applyResolvedValue = function (resolvedValue) { + _this.data = resolvedValue; + _this.resolved = true; + trace.traceResolvableResolved(_this, trans); + return _this.data; + }; + // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick. + return this.promise = $q.when() + .then(getResolvableDependencies) + .then(invokeResolveFn) + .then(maybeWaitForRx) + .then(applyResolvedValue); + }; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + Resolvable.prototype.get = function (resolveContext, trans) { + return this.promise || this.resolve(resolveContext, trans); + }; + Resolvable.prototype.toString = function () { + return "Resolvable(token: " + stringify(this.token) + ", requires: [" + this.deps.map(stringify) + "])"; + }; + Resolvable.prototype.clone = function () { + return new Resolvable(this); + }; + Resolvable.fromData = function (token, data) { + return new Resolvable(token, function () { return data; }, null, null, data); + }; + return Resolvable; +}()); +export { Resolvable }; +//# sourceMappingURL=resolvable.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js.map new file mode 100644 index 00000000..5c599917 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolvable.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolvable.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/resolvable.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAC,MAAM,EAAmB,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAItC,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAI1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,+CAA+C;AAC/C,MAAM,CAAC,IAAI,oBAAoB,GAAkB;IAC/C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;;;;;;;;;;;GAWG;AACH;IAoCE,oBAAY,IAAS,EAAE,SAAoB,EAAE,IAAY,EAAE,MAAsB,EAAE,IAAU;QA7B7F,aAAQ,GAAY,KAAK,CAAC;QAC1B,YAAO,GAAiB,SAAS,CAAC;QA6BhC,EAAE,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAC7F,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC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QAAQ,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,uBAAuB,CAAC,KAAI,EAAE,KAAK,CAAC,CAAC;YAC3C,MAAM,CAAC,KAAI,CAAC,IAAI,CAAC;QACnB,CAAC,CAAC;QAEF,+HAA+H;QAC/H,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE;aAC1B,IAAI,CAAC,yBAAyB,CAAC;aAC/B,IAAI,CAAC,eAAe,CAAC;aACrB,IAAI,CAAC,cAAc,CAAC;aACpB,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,wBAAG,GAAH,UAAI,cAA8B,EAAE,KAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED,6BAAQ,GAAR;QACE,MAAM,CAAC,uBAAqB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAgB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAI,CAAC;IAChG,CAAC;IAED,0BAAK,GAAL;QACE,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,mBAAQ,GAAG,UAAC,KAAU,EAAE,IAAS;QACpC,OAAA,IAAI,UAAU,CAAC,KAAK,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAAnD,CAAmD,CAAC;IAC1D,iBAAC;CAAA,AA3ID,IA2IC;SA3IY,UAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.d.ts new file mode 100644 index 00000000..300b404f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.d.ts @@ -0,0 +1,92 @@ +import { PolicyWhen, ResolvePolicy } from "./interface"; +import { PathNode } from "../path/pathNode"; +import { Resolvable } from "./resolvable"; +import { StateObject } from "../state/stateObject"; +import { Transition } from "../transition/transition"; +import { UIInjector } from "../interface"; +export declare const NATIVE_INJECTOR_TOKEN: string; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +export declare class ResolveContext { + private _path; + _injector: UIInjector; + constructor(_path: PathNode[]); + /** Gets all the tokens found in the resolve context, de-duplicated */ + getTokens(): any[]; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + getResolvable(token: any): Resolvable; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + getPolicy(resolvable: Resolvable): ResolvePolicy; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + subContext(state: StateObject): ResolveContext; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + addResolvables(newResolvables: Resolvable[], state: StateObject): void; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + resolvePath(when?: PolicyWhen, trans?: Transition): Promise<{ + token: any; + value: any; + }[]>; + injector(): UIInjector; + findNode(resolvable: Resolvable): PathNode; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + getDependencies(resolvable: Resolvable): Resolvable[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js new file mode 100644 index 00000000..a5e0eb49 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js @@ -0,0 +1,199 @@ +/** @module resolve */ +/** for typedoc */ +import { find, tail, uniqR, unnestR, inArray } from "../common/common"; +import { propEq, not } from "../common/hof"; +import { trace } from "../common/trace"; +import { services } from "../common/coreservices"; +import { resolvePolicies } from "./interface"; +import { Resolvable } from "./resolvable"; +import { PathUtils } from "../path/pathFactory"; +import { stringify } from "../common/strings"; +import { isUndefined } from '../common'; +var whens = resolvePolicies.when; +var ALL_WHENS = [whens.EAGER, whens.LAZY]; +var EAGER_WHENS = [whens.EAGER]; +export var NATIVE_INJECTOR_TOKEN = "Native Injector"; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +var ResolveContext = /** @class */ (function () { + function ResolveContext(_path) { + this._path = _path; + } + /** Gets all the tokens found in the resolve context, de-duplicated */ + ResolveContext.prototype.getTokens = function () { + return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(uniqR, []); + }; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + ResolveContext.prototype.getResolvable = function (token) { + var matching = this._path.map(function (node) { return node.resolvables; }) + .reduce(unnestR, []) + .filter(function (r) { return r.token === token; }); + return tail(matching); + }; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + ResolveContext.prototype.getPolicy = function (resolvable) { + var node = this.findNode(resolvable); + return resolvable.getPolicy(node.state); + }; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + ResolveContext.prototype.subContext = function (state) { + return new ResolveContext(PathUtils.subPath(this._path, function (node) { return node.state === state; })); + }; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + ResolveContext.prototype.addResolvables = function (newResolvables, state) { + var node = find(this._path, propEq('state', state)); + var keys = newResolvables.map(function (r) { return r.token; }); + node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables); + }; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + ResolveContext.prototype.resolvePath = function (when, trans) { + var _this = this; + if (when === void 0) { when = "LAZY"; } + // This option determines which 'when' policy Resolvables we are about to fetch. + var whenOption = inArray(ALL_WHENS, when) ? when : "LAZY"; + // If the caller specified EAGER, only the EAGER Resolvables are fetched. + // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.` + var matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS; + // get the subpath to the state argument, if provided + trace.traceResolvePath(this._path, when, trans); + var matchesPolicy = function (acceptedVals, whenOrAsync) { + return function (resolvable) { + return inArray(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]); + }; + }; + // Trigger all the (matching) Resolvables in the path + // Reduce all the "WAIT" Resolvables into an array + var promises = this._path.reduce(function (acc, node) { + var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when')); + var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async')); + var wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async'))); + // For the matching Resolvables, start their async fetch process. + var subContext = _this.subContext(node.state); + var getResult = function (r) { return r.get(subContext, trans) + .then(function (value) { return ({ token: r.token, value: value }); }); }; + nowait.forEach(getResult); + return acc.concat(wait.map(getResult)); + }, []); + // Wait for all the "WAIT" resolvables + return services.$q.all(promises); + }; + ResolveContext.prototype.injector = function () { + return this._injector || (this._injector = new UIInjectorImpl(this)); + }; + ResolveContext.prototype.findNode = function (resolvable) { + return find(this._path, function (node) { return inArray(node.resolvables, resolvable); }); + }; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + ResolveContext.prototype.getDependencies = function (resolvable) { + var _this = this; + var node = this.findNode(resolvable); + // Find which other resolvables are "visible" to the `resolvable` argument + // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path) + var subPath = PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path; + var availableResolvables = subPath + .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) //all of subpath's resolvables + .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument + var getDependency = function (token) { + var matching = availableResolvables.filter(function (r) { return r.token === token; }); + if (matching.length) + return tail(matching); + var fromInjector = _this.injector().getNative(token); + if (isUndefined(fromInjector)) { + throw new Error("Could not find Dependency Injection token: " + stringify(token)); + } + return new Resolvable(token, function () { return fromInjector; }, [], fromInjector); + }; + return resolvable.deps.map(getDependency); + }; + return ResolveContext; +}()); +export { ResolveContext }; +var UIInjectorImpl = /** @class */ (function () { + function UIInjectorImpl(context) { + this.context = context; + this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector; + } + UIInjectorImpl.prototype.get = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) { + if (this.context.getPolicy(resolvable).async === 'NOWAIT') { + return resolvable.get(this.context); + } + if (!resolvable.resolved) { + throw new Error("Resolvable async .get() not complete:" + stringify(resolvable.token)); + } + return resolvable.data; + } + return this.getNative(token); + }; + UIInjectorImpl.prototype.getAsync = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) + return resolvable.get(this.context); + return services.$q.when(this.native.get(token)); + }; + UIInjectorImpl.prototype.getNative = function (token) { + return this.native && this.native.get(token); + }; + return UIInjectorImpl; +}()); +//# sourceMappingURL=resolveContext.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js.map new file mode 100644 index 00000000..15e8a204 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolveContext.js", + "sour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,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACH,qBAAC;AAAD,CAAC,AAhCD,IAgCC", + "sourcesContent": [ + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.d.ts new file mode 100644 index 00000000..a35810c8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.d.ts @@ -0,0 +1,107 @@ +/** + * @coreapi + * @module core + */ /** */ +import { UrlMatcherFactory } from "./url/urlMatcherFactory"; +import { UrlRouter } from "./url/urlRouter"; +import { TransitionService } from "./transition/transitionService"; +import { ViewService } from "./view/view"; +import { StateRegistry } from "./state/stateRegistry"; +import { StateService } from "./state/stateService"; +import { UIRouterGlobals } from "./globals"; +import { UIRouterPlugin, Disposable } from "./interface"; +import { UrlService } from "./url/urlService"; +import { LocationServices, LocationConfig } from "./common/coreservices"; +import { Trace } from "./common/trace"; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +export declare class UIRouter { + locationService: LocationServices; + locationConfig: LocationConfig; + /** @hidden */ $id: number; + /** @hidden */ _disposed: boolean; + /** @hidden */ private _disposables; + /** Provides trace information to the console */ + trace: Trace; + /** Provides services related to ui-view synchronization */ + viewService: ViewService; + /** Provides services related to Transitions */ + transitionService: TransitionService; + /** Global router state */ + globals: UIRouterGlobals; + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + urlMatcherFactory: UrlMatcherFactory; + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + urlRouter: UrlRouter; + /** Provides a registry for states, and related registration services */ + stateRegistry: StateRegistry; + /** Provides services related to states */ + stateService: StateService; + /** Provides services related to the URL */ + urlService: UrlService; + /** Registers an object to be notified when the router is disposed */ + disposable(disposable: Disposable): void; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + dispose(disposable?: any): void; + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + constructor(locationService?: LocationServices, locationConfig?: LocationConfig); + /** @hidden */ + private _plugins; + /** Add plugin (as ES6 class) */ + plugin(plugin: { + new (router: UIRouter, options?: any): T; + }, options?: any): T; + /** Add plugin (as javascript constructor function) */ + plugin(plugin: { + (router: UIRouter, options?: any): void; + }, options?: any): T; + /** Add plugin (as javascript factory function) */ + plugin(plugin: PluginFactory, options?: any): T; + /** + * Returns registered plugins + * + * Returns the registered plugin of the given `pluginName`. + * If no `pluginName` is given, returns all registered plugins + * + * @param pluginName (optional) the name of the plugin to get + * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted) + */ + getPlugin(pluginName: string): UIRouterPlugin; + getPlugin(): UIRouterPlugin[]; +} +/** @internalapi */ +export declare type PluginFactory = (router: UIRouter, options?: any) => T; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js new file mode 100644 index 00000000..2c70e984 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js @@ -0,0 +1,182 @@ +/** + * @coreapi + * @module core + */ /** */ +import { UrlMatcherFactory } from "./url/urlMatcherFactory"; +import { UrlRouter } from "./url/urlRouter"; +import { TransitionService } from "./transition/transitionService"; +import { ViewService } from "./view/view"; +import { StateRegistry } from "./state/stateRegistry"; +import { StateService } from "./state/stateService"; +import { UIRouterGlobals } from "./globals"; +import { values, removeFrom } from "./common/common"; +import { isFunction } from "./common/predicates"; +import { UrlService } from "./url/urlService"; +import { trace } from "./common/trace"; +/** @hidden */ +var _routerInstance = 0; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +var UIRouter = /** @class */ (function () { + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + function UIRouter(locationService, locationConfig) { + if (locationService === void 0) { locationService = UrlService.locationServiceStub; } + if (locationConfig === void 0) { locationConfig = UrlService.locationConfigStub; } + this.locationService = locationService; + this.locationConfig = locationConfig; + /** @hidden */ this.$id = _routerInstance++; + /** @hidden */ this._disposed = false; + /** @hidden */ this._disposables = []; + /** Provides trace information to the console */ + this.trace = trace; + /** Provides services related to ui-view synchronization */ + this.viewService = new ViewService(); + /** Provides services related to Transitions */ + this.transitionService = new TransitionService(this); + /** Global router state */ + this.globals = new UIRouterGlobals(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlMatcherFactory = new UrlMatcherFactory(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlRouter = new UrlRouter(this); + /** Provides a registry for states, and related registration services */ + this.stateRegistry = new StateRegistry(this); + /** Provides services related to states */ + this.stateService = new StateService(this); + /** Provides services related to the URL */ + this.urlService = new UrlService(this); + /** @hidden */ + 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(locationService); + this.disposable(locationConfig); + } + /** Registers an object to be notified when the router is disposed */ + UIRouter.prototype.disposable = function (disposable) { + this._disposables.push(disposable); + }; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + UIRouter.prototype.dispose = function (disposable) { + var _this = this; + if (disposable && isFunction(disposable.dispose)) { + disposable.dispose(this); + return undefined; + } + this._disposed = true; + this._disposables.slice().forEach(function (d) { + try { + typeof d.dispose === 'function' && d.dispose(_this); + removeFrom(_this._disposables, d); + } + catch (ignored) { } + }); + }; + /** + * Adds a plugin to UI-Router + * + * This method adds a UI-Router Plugin. + * A plugin can enhance or change UI-Router behavior using any public API. + * + * #### Example: + * ```js + * import { MyCoolPlugin } from "ui-router-cool-plugin"; + * + * var plugin = router.addPlugin(MyCoolPlugin); + * ``` + * + * ### Plugin authoring + * + * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object. + * + * The plugin can implement its functionality using any of the public APIs of [[UIRouter]]. + * For example, it may configure router options or add a Transition Hook. + * + * The plugin can then be published as a separate module. + * + * #### Example: + * ```js + * export class MyAuthPlugin implements UIRouterPlugin { + * constructor(router: UIRouter, options: any) { + * this.name = "MyAuthPlugin"; + * let $transitions = router.transitionService; + * let $state = router.stateService; + * + * let authCriteria = { + * to: (state) => state.data && state.data.requiresAuth + * }; + * + * function authHook(transition: Transition) { + * let authService = transition.injector().get('AuthService'); + * if (!authService.isAuthenticated()) { + * return $state.target('login'); + * } + * } + * + * $transitions.onStart(authCriteria, authHook); + * } + * } + * ``` + * + * @param plugin one of: + * - a plugin class which implements [[UIRouterPlugin]] + * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance + * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance + * @param options options to pass to the plugin class/factory + * @returns the registered plugin instance + */ + UIRouter.prototype.plugin = function (plugin, options) { + if (options === void 0) { options = {}; } + var pluginInstance = new plugin(this, options); + if (!pluginInstance.name) + throw new Error("Required property `name` missing on plugin: " + pluginInstance); + this._disposables.push(pluginInstance); + return this._plugins[pluginInstance.name] = pluginInstance; + }; + UIRouter.prototype.getPlugin = function (pluginName) { + return pluginName ? this._plugins[pluginName] : values(this._plugins); + }; + return UIRouter; +}()); +export { UIRouter }; +//# sourceMappingURL=router.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js.map new file mode 100644 index 00000000..2ee8d015 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/router.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "router.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/router.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AACV,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAS,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE9C,cAAc;AACd,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACH;IAqEE;;;;;;OAMG;IACH,kBACW,eAAkE,EAClE,cAA8D;QAD9D,gCAAA,EAAA,kBAAoC,UAAU,CAAC,mBAAmB;QAClE,+BAAA,EAAA,iBAAiC,UAAU,CAAC,kBAAkB;QAD9D,oBAAe,GAAf,eAAe,CAAmD;QAClE,mBAAc,GAAd,cAAc,CAAgD;QA7EzE,cAAc,CAAC,QAAG,GAAG,eAAe,EAAE,CAAC;QACvC,cAAc,CAAC,cAAS,GAAG,KAAK,CAAC;QACjC,cAAc,CAAS,i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CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC;IAC7D,CAAC;IAaD,4BAAS,GAAT,UAAU,UAAmB;QAC3B,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxE,CAAC;IACH,eAAC;AAAD,CAAC,AAjLD,IAiLC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.d.ts new file mode 100644 index 00000000..5fb2019b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.d.ts @@ -0,0 +1,30 @@ +/** + * # The state subsystem + * + * This subsystem implements the ui-router state tree + * + * - The [[StateService]] has state-related service methods such as: + * - [[StateService.get]]: Get a registered [[StateDeclaration]] object + * - [[StateService.go]]: Transition from the current state to a new state + * - [[StateService.reload]]: Reload the current state + * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook) + * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started + * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors + * - The [[StateDeclaration]] interface defines the shape of a state declaration + * - The [[StateRegistry]] contains all the registered states + * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]] + * - Note: Bootstrap state registration differs by front-end framework. + * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]]. + * + * @coreapi + * @preferred + * @module state + */ /** for typedoc */ +export * from "./interface"; +export * from "./stateBuilder"; +export * from "./stateObject"; +export * from "./stateMatcher"; +export * from "./stateQueueManager"; +export * from "./stateRegistry"; +export * from "./stateService"; +export * from "./targetState"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js new file mode 100644 index 00000000..bd7adc68 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js @@ -0,0 +1,8 @@ +export * from "./stateBuilder"; +export * from "./stateObject"; +export * from "./stateMatcher"; +export * from "./stateQueueManager"; +export * from "./stateRegistry"; +export * from "./stateService"; +export * from "./targetState"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js.map new file mode 100644 index 00000000..1e5f3e79 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/index.ts" + ], + "names": [], + "mappings": "AAuBA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC", + "sourcesContent": [ + "/**\n * # The state subsystem\n *\n * This subsystem implements the ui-router state tree\n *\n * - The [[StateService]] has state-related service methods such as:\n * - [[StateService.get]]: Get a registered [[StateDeclaration]] object\n * - [[StateService.go]]: Transition from the current state to a new state\n * - [[StateService.reload]]: Reload the current state\n * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook)\n * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started\n * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors\n * - The [[StateDeclaration]] interface defines the shape of a state declaration\n * - The [[StateRegistry]] contains all the registered states\n * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]]\n * - Note: Bootstrap state registration differs by front-end framework.\n * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]].\n *\n * @coreapi\n * @preferred\n * @module state\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./stateBuilder\";\nexport * from \"./stateObject\";\nexport * from \"./stateMatcher\";\nexport * from \"./stateQueueManager\";\nexport * from \"./stateRegistry\";\nexport * from \"./stateService\";\nexport * from \"./targetState\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.d.ts new file mode 100644 index 00000000..64946778 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.d.ts @@ -0,0 +1,731 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { ParamDeclaration, RawParams } from "../params/interface"; +import { StateObject } from "./stateObject"; +import { ViewContext } from "../view/interface"; +import { IInjectable } from "../common/common"; +import { Transition } from "../transition/transition"; +import { TransitionStateHookFn, TransitionOptions } from "../transition/interface"; +import { ResolvePolicy, ResolvableLiteral, ProviderLike } from "../resolve/interface"; +import { Resolvable } from "../resolve/resolvable"; +import { TargetState } from "./targetState"; +export declare type StateOrName = (string | StateDeclaration | StateObject); +/** @internalapi */ +export interface TransitionPromise extends Promise { + transition: Transition; +} +export interface TargetStateDef { + state: StateOrName; + params?: RawParams; + options?: TransitionOptions; +} +export declare type ResolveTypes = Resolvable | ResolvableLiteral | ProviderLike; +/** + * Base interface for declaring a view + * + * This interface defines the basic data that a normalized view declaration will have on it. + * Each implementation of UI-Router (for a specific framework) should define its own extension of this interface. + * Add any additional fields that the framework requires to that interface. + * + * @internalapi + */ +export interface _ViewDeclaration { + /** + * The raw name for the view declaration, i.e., the [[StateDeclaration.views]] property name. + * @internalapi + */ + $name?: string; + /** + * The normalized address for the `ui-view` which this ViewConfig targets. + * + * A ViewConfig targets a `ui-view` in the DOM (relative to the `uiViewContextAnchor`) which has + * a specific name. + * @example `header` or `$default` + * + * The `uiViewName` can also target a _nested view_ by providing a dot-notation address + * @example `foo.bar` or `foo.$default.bar` + * @internalapi + */ + $uiViewName?: string; + /** + * The normalized context anchor (state name) for the `uiViewName` + * + * When targeting a `ui-view`, the `uiViewName` address is anchored to a context name (state name). + * @internalapi + */ + $uiViewContextAnchor?: string; + /** + * A type identifier for the View + * + * This is used when loading prerequisites for the view, before it enters the DOM. Different types of views + * may load differently (e.g., templateProvider+controllerProvider vs component class) + * @internalapi + */ + $type?: string; + /** + * The context that this view is declared within. + * @internalapi + */ + $context?: ViewContext; +} +/** + * The return value of a [[redirectTo]] function + * + * - string: a state name + * - TargetState: a target state, parameters, and options + * - object: an object with a state name and parameters + */ +export declare type RedirectToResult = string | TargetState | { + state?: string; + params?: RawParams; +} | void; +/** + * The StateDeclaration object is used to define a state or nested state. + * + * Note: Each implementation of UI-Router (for a specific framework) + * extends this interface as necessary. + * + * #### Example: + * ```js + * // StateDeclaration object + * var foldersState = { + * name: 'folders', + * url: '/folders', + * component: FoldersComponent, + * resolve: { + * allfolders: function(FolderService) { + * return FolderService.list(); + * } + * }, + * } + * + * registry.register(foldersState); + * ``` + * + * A state declaration may also be an ES6 class which implements the StateDeclaration interface + * and has a `@State()` decorator + * + * #### Example: + * ```js + * import { State } from "@uirouter/core" + * import { FolderService } from "../folder.service" + * // StateDeclaration class + * @State() + * export class FoldersState implements StateDeclaration { + * name: 'folders', + * url: '/folders', + * component: FoldersComponent + * + * @Resolve({ deps: [ FolderService ] }) + * allfolders(FolderService) { + * return FolderService.list(); + * }, + * } + * + * registry.register(FoldersState); + * ``` + */ +export interface StateDeclaration { + /** + * The state name (required) + * + * A unique state name, e.g. `"home"`, `"about"`, `"contacts"`. + * To create a parent/child state use a dot, e.g. `"about.sales"`, `"home.newest"`. + * + * Note: [State] objects require unique names. + * The name is used like an id. + */ + name?: string; + /** + * Abstract state indicator + * + * An abstract state can never be directly activated. + * Use an abstract state to provide inherited properties (url, resolve, data, etc) to children states. + */ + abstract?: boolean; + /** + * The parent state + * + * Normally, a state's parent is implied from the state's [[name]], e.g., `"parentstate.childstate"`. + * + * Alternatively, you can explicitly set the parent state using this property. + * This allows shorter state names, e.g., `Child` + * instead of `Child + * + * When using this property, the state's name should not have any dots in it. + * + * #### Example: + * ```js + * var parentstate = { + * name: 'parentstate' + * } + * var childstate = { + * name: 'childstate', + * parent: 'parentstate' + * // or use a JS var which is the parent StateDeclaration, i.e.: + * // parent: parentstate + * } + * ``` + */ + parent?: (string | StateDeclaration); + /** + * Gets the internal State object API + * + * Gets the *internal API* for a registered state. + * + * Note: the internal [[StateObject]] API is subject to change without notice + */ + $$state?: () => StateObject; + /** + * Resolve - a mechanism to asynchronously fetch data, participating in the Transition lifecycle + * + * The `resolve:` property defines data (or other dependencies) to be fetched asynchronously when the state is being entered. + * After the data is fetched, it may be used in views, transition hooks or other resolves that belong to this state. + * The data may also be used in any views or resolves that belong to nested states. + * + * ### As an array + * + * Each array element should be a [[ResolvableLiteral]] object. + * + * #### Example: + * The `user` resolve injects the current `Transition` and the `UserService` (using its token, which is a string). + * The [[ResolvableLiteral.resolvePolicy]] sets how the resolve is processed. + * The `user` data, fetched asynchronously, can then be used in a view. + * ```js + * var state = { + * name: 'user', + * url: '/user/:userId + * resolve: [ + * { + * token: 'user', + * policy: { when: 'EAGER' }, + * deps: ['UserService', Transition], + * resolveFn: (userSvc, trans) => userSvc.fetchUser(trans.params().userId) }, + * } + * ] + * } + * ``` + * + * Note: an Angular 2 style [`useFactory` provider literal](https://angular.io/docs/ts/latest/cookbook/dependency-injection.html#!#provide) + * may also be used. See [[ProviderLike]]. + * #### Example: + * ``` + * resolve: [ + * { provide: 'token', useFactory: (http) => http.get('/'), deps: [ Http ] }, + * ] + * ``` + * + * ### As an object + * + * The `resolve` property may be an object where: + * - Each key (string) is the name of the dependency. + * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency. + * + * This style is based on AngularJS injectable functions, but can be used with any UI-Router implementation. + * If your code will be minified, the function should be ["annotated" in the AngularJS manner](https://docs.angularjs.org/guide/di#dependency-annotation). + * + * #### AngularJS Example: + * ```js + * resolve: { + * // If you inject `myStateDependency` into a controller, you'll get "abc" + * myStateDependency: function() { + * return "abc"; + * }, + * // Dependencies are annotated in "Inline Array Annotation" + * myAsyncData: ['$http', '$transition$' function($http, $transition$) { + * // Return a promise (async) for the data + * return $http.get("/foos/" + $transition$.params().foo); + * }] + * } + * ``` + * + * Note: You cannot specify a policy for each Resolvable, nor can you use non-string + * tokens when using the object style `resolve:` block. + * + * ### Lifecycle + * + * Since a resolve function can return a promise, the router will delay entering the state until the promises are ready. + * If any of the promises are rejected, the Transition is aborted with an Error. + * + * By default, resolves for a state are fetched just before that state is entered. + * Note that only states which are being *entered* during the `Transition` have their resolves fetched. + * States that are "retained" do not have their resolves re-fetched. + * + * If you are currently in a parent state `parent` and are transitioning to a child state `parent.child`, the + * previously resolved data for state `parent` can be injected into `parent.child` without delay. + * + * Any resolved data for `parent.child` is retained until `parent.child` is exited, e.g., by transitioning back to the `parent` state. + * + * Because of this scoping and lifecycle, resolves are a great place to fetch your application's primary data. + * + * ### Injecting resolves into other things + * + * During a transition, Resolve data can be injected into: + * + * - Views (the components which fill a `ui-view` tag) + * - Transition Hooks + * - Other resolves (a resolve may depend on asynchronous data from a different resolve) + * + * ### Injecting other things into resolves + * + * Resolve functions usually have dependencies on some other API(s). + * The dependencies are usually declared and injected into the resolve function. + * A common pattern is to inject a custom service such as `UserService`. + * The resolve then delegates to a service method, such as `UserService.list()`; + * + * #### Special injectable tokens + * + * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services. + * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as + * "to" and "from" State Parameters and transition options. + * - `'$transition$'`: A string alias for the `Transition` injectable + * - `'$state$'`: For `onEnter`/`onExit`/`onRetain`, the state being entered/exited/retained. + * - Other resolve tokens: A resolve can depend on another resolve, either from the same state, or from any parent state. + * + * #### Example: + * ```js + * // Injecting a resolve into another resolve + * resolve: [ + * // Define a resolve 'allusers' which delegates to the UserService.list() + * // which returns a promise (async) for all the users + * { provide: 'allusers', useFactory: (UserService) => UserService.list(), deps: [UserService] }, + * + * // Define a resolve 'user' which depends on the allusers resolve. + * // This resolve function is not called until 'allusers' is ready. + * { provide: 'user', (allusers, trans) => _.find(allusers, trans.params().userId, deps: ['allusers', Transition] } + * } + * ``` + */ + resolve?: (ResolveTypes[] | { + [key: string]: IInjectable; + }); + /** + * Sets the resolve policy defaults for all resolves on this state + * + * This should be an [[ResolvePolicy]] object. + * + * It can contain the following optional keys/values: + * + * - `when`: (optional) defines when the resolve is fetched. Accepted values: "LAZY" or "EAGER" + * - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", "RXWAIT" + * + * See [[ResolvePolicy]] for more details. + */ + resolvePolicy?: ResolvePolicy; + /** + * The url fragment for the state + * + * A URL fragment (with optional parameters) which is used to match the browser location with this state. + * + * This fragment will be appended to the parent state's URL in order to build up the overall URL for this state. + * See [[UrlMatcher]] for details on acceptable patterns. + * + * @examples + * ```js + * + * url: "/home" + * // Define a parameter named 'userid' + * url: "/users/:userid" + * // param 'bookid' has a custom regexp + * url: "/books/{bookid:[a-zA-Z_-]}" + * // param 'categoryid' is of type 'int' + * url: "/books/{categoryid:int}" + * // two parameters for this state + * url: "/books/{publishername:string}/{categoryid:int}" + * // Query parameters + * url: "/messages?before&after" + * // Query parameters of type 'date' + * url: "/messages?{before:date}&{after:date}" + * // Path and query parameters + * url: "/messages/:mailboxid?{before:date}&{after:date}" + * ``` + */ + url?: string; + /** + * Params configuration + * + * An object which optionally configures parameters declared in the url, or defines additional non-url + * parameters. For each parameter being configured, add a [[ParamDeclaration]] keyed to the name of the parameter. + * + * #### Example: + * ```js + * params: { + * param1: { + * type: "int", + * array: true, + * value: [] + * }, + * param2: { + * value: "index" + * } + * } + * ``` + */ + params?: { + [key: string]: (ParamDeclaration | any); + }; + /** + * Named views + * + * An optional object which defines multiple views, or explicitly targets specific named ui-views. + * + * - What is a view config + * - What is a ui-view + * - Shorthand controller/template + * - Incompatible with ^ + * + * Examples: + * + * Targets three named ui-views in the parent state's template + * + * #### Example: + * ```js + * views: { + * header: { + * controller: "headerCtrl", + * templateUrl: "header.html" + * }, body: { + * controller: "bodyCtrl", + * templateUrl: "body.html" + * }, footer: { + * controller: "footCtrl", + * templateUrl: "footer.html" + * } + * } + * ``` + * + * @example + * ```js + * // Targets named ui-view="header" from ancestor state 'top''s template, and + * // named `ui-view="body" from parent state's template. + * views: { + * 'header@top': { + * controller: "msgHeaderCtrl", + * templateUrl: "msgHeader.html" + * }, 'body': { + * controller: "messagesCtrl", + * templateUrl: "messages.html" + * } + * } + * ``` + */ + views?: { + [key: string]: _ViewDeclaration; + }; + /** + * An inherited property to store state data + * + * This is a spot for you to store inherited state metadata. + * Child states' `data` object will prototypally inherit from their parent state. + * + * This is a good spot to put metadata such as `requiresAuth`. + * + * Note: because prototypal inheritance is used, changes to parent `data` objects reflect in the child `data` objects. + * Care should be taken if you are using `hasOwnProperty` on the `data` object. + * Properties from parent objects will return false for `hasOwnProperty`. + */ + data?: any; + /** + * Synchronously or asynchronously redirects Transitions to a different state/params + * + * If this property is defined, a Transition directly to this state will be redirected based on the property's value. + * + * - If the value is a `string`, the Transition is redirected to the state named by the string. + * + * - If the property is an object with a `state` and/or `params` property, + * the Transition is redirected to the named `state` and/or `params`. + * + * - If the value is a [[TargetState]] the Transition is redirected to the `TargetState` + * + * - If the property is a function: + * - The function is called with the current [[Transition]] + * - The return value is processed using the previously mentioned rules. + * - If the return value is a promise, the promise is waited for, then the resolved async value is processed using the same rules. + * + * Note: `redirectTo` is processed as an `onStart` hook, before `LAZY` resolves. + * If your redirect function relies on resolve data, get the [[Transition.injector]] and get a + * promise for the resolve data using [[UIInjector.getAsync]]. + * + * #### Example: + * ```js + * // a string + * .state('A', { + * redirectTo: 'A.B' + * }) + * + * // a {state, params} object + * .state('C', { + * redirectTo: { state: 'C.D', params: { foo: 'index' } } + * }) + * + * // a fn + * .state('E', { + * redirectTo: () => "A" + * }) + * + * // a fn conditionally returning a {state, params} + * .state('F', { + * redirectTo: (trans) => { + * if (trans.params().foo < 10) + * return { state: 'F', params: { foo: 10 } }; + * } + * }) + * + * // a fn returning a promise for a redirect + * .state('G', { + * redirectTo: (trans) => { + * let svc = trans.injector().get('SomeAsyncService') + * let promise = svc.getAsyncRedirectTo(trans.params.foo); + * return promise; + * } + * }) + * + * // a fn that fetches resolve data + * .state('G', { + * redirectTo: (trans) => { + * // getAsync tells the resolve to load + * let resolvePromise = trans.injector().getAsync('SomeResolve') + * return resolvePromise.then(resolveData => resolveData === 'login' ? 'login' : null); + * } + * }) + * ``` + */ + redirectTo?: RedirectToResult | ((transition: Transition) => RedirectToResult) | ((transition: Transition) => Promise); + /** + * A Transition Hook called with the state is being entered. See: [[IHookRegistry.onEnter]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onEnter: function(trans, state) { + * console.log("Entering " + state.name); + * } + * }); + * ``` + * + * Note: The above `onEnter` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onEnter({ entering: 'mystate' }, function(trans, state) { + * console.log("Entering " + state.name); + * }); + * ``` + */ + onEnter?: TransitionStateHookFn; + /** + * A [[TransitionStateHookFn]] called with the state is being retained/kept. See: [[IHookRegistry.onRetain]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onRetain: function(trans, state) { + * console.log(state.name + " is still active!"); + * } + * }); + * ``` + * + * Note: The above `onRetain` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onRetain({ retained: 'mystate' }, function(trans, state) { + * console.log(state.name + " is still active!"); + * }); + * ``` + */ + onRetain?: TransitionStateHookFn; + /** + * A Transition Hook called with the state is being exited. See: [[IHookRegistry.onExit]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onExit: function(trans, state) { + * console.log("Leaving " + state.name); + * } + * }); + * ``` + * + * Note: The above `onRetain` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onExit({ exiting: 'mystate' }, function(trans, state) { + * console.log("Leaving " + state.name); + * }); + * ``` + */ + onExit?: TransitionStateHookFn; + /** + * A function used to lazy load code + * + * The `lazyLoad` function is invoked before the state is activated. + * The transition waits while the code is loading. + * + * The function should load the code that is required to activate the state. + * For example, it may load a component class, or some service code. + * The function must return a promise which resolves when loading is complete. + * + * For example, this code lazy loads a service before the `abc` state is activated: + * + * ``` + * .state('abc', { + * lazyLoad: (transition, state) => System.import('./abcService') + * } + * ``` + * + * The `abcService` file is imported and loaded + * (it is assumed that the `abcService` file knows how to register itself as a service). + * + * #### Lifecycle + * + * - The `lazyLoad` function is invoked if a transition is going to enter the state. + * - The function is invoked before the transition starts (using an `onBefore` transition hook). + * - The function is only invoked once; while the `lazyLoad` function is loading code, it will not be invoked again. + * For example, if the user double clicks a ui-sref, `lazyLoad` is only invoked once even though there were two transition attempts. + * Instead, the existing lazy load promise is re-used. + * - When the promise resolves successfully, the `lazyLoad` property is deleted from the state declaration. + * - If the promise resolves to a [[LazyLoadResult]] which has an array of `states`, those states are registered. + * - The original transition is retried (this time without the `lazyLoad` property present). + * + * - If the `lazyLoad` function fails, then the transition also fails. + * The failed transition (and the `lazyLoad` function) could potentially be retried by the user. + * + * ### Lazy loading state definitions (Future States) + * + * State definitions can also be lazy loaded. + * This might be desirable when building large, multi-module applications. + * + * To lazy load state definitions, a Future State should be registered as a placeholder. + * When the state definitions are lazy loaded, the Future State is deregistered. + * + * A future state can act as a placeholder for a single state, or for an entire module of states and substates. + * A future state should have: + * + * - A `name` which ends in `.**`. + * A future state's `name` property acts as a wildcard [[Glob]]. + * It matches any state name that starts with the `name` (including child states that are not yet loaded). + * - A `url` prefix. + * A future state's `url` property acts as a wildcard. + * UI-Router matches all paths that begin with the `url`. + * It effectively appends `.*` to the internal regular expression. + * When the prefix matches, the future state will begin loading. + * - A `lazyLoad` function. + * This function should should return a Promise to lazy load the code for one or more [[StateDeclaration]] objects. + * It should return a [[LazyLoadResult]]. + * Generally, one of the lazy loaded states should have the same name as the future state. + * The new state will then **replace the future state placeholder** in the registry. + * + * ### Additional resources + * + * For in depth information on lazy loading and Future States, see the [Lazy Loading Guide](https://ui-router.github.io/guides/lazyload). + * + * #### Example: states.js + * ```js + * + * // This child state is a lazy loaded future state + * // The `lazyLoad` function loads the final state definition + * { + * name: 'parent.**', + * url: '/parent', + * lazyLoad: () => System.import('./lazy.states.js') + * } + * ``` + * + * #### Example: lazy.states.js + * + * This file is lazy loaded. It exports an array of states. + * + * ```js + * import {ChildComponent} from "./child.component.js"; + * import {ParentComponent} from "./parent.component.js"; + * + * // This fully defined state replaces the future state + * let parentState = { + * // the name should match the future state + * name: 'parent', + * url: '/parent/:parentId', + * component: ParentComponent, + * resolve: { + * parentData: ($transition$, ParentService) => + * ParentService.get($transition$.params().parentId) + * } + * } + * + * let childState = { + * name: 'parent.child', + * url: '/child/:childId', + * params: { + * childId: "default" + * }, + * resolve: { + * childData: ($transition$, ChildService) => + * ChildService.get($transition$.params().childId) + * } + * }; + * + * // This array of states will be registered by the lazyLoad hook + * let lazyLoadResults = { + * states: [ parentState, childState ] + * }; + * + * export default lazyLoadResults; + * ``` + * + * @param transition the [[Transition]] that is activating the future state + * @param state the [[StateDeclaration]] that the `lazyLoad` function is declared on + * @return a Promise to load the states. + * Optionally, if the promise resolves to a [[LazyLoadResult]], + * the states will be registered with the [[StateRegistry]]. + */ + lazyLoad?: (transition: Transition, state: StateDeclaration) => Promise; + /** + * @deprecated define individual parameters as [[ParamDeclaration.dynamic]] + */ + reloadOnSearch?: boolean; +} +/** + * The return type of a [[StateDeclaration.lazyLoad]] function + * + * If your state has a `lazyLoad` function, it should return a promise. + * If promise resolves to an object matching this interface, then the `states` array + * of [[StateDeclaration]] objects will be automatically registered. + */ +export interface LazyLoadResult { + states?: StateDeclaration[]; +} +/** + * An options object for [[StateService.href]] + */ +export interface HrefOptions { + /** + * Defines what state to be "relative from" + * + * When a relative path is found (e.g `^` or `.bar`), defines which state to be relative from. + */ + relative?: StateOrName; + /** + * If true, and if there is no url associated with the state provided in the + * first parameter, then the constructed href url will be built from the first + * ancestor which has a url. + */ + lossy?: boolean; + /** + * If `true` will inherit parameters from the current parameter values. + */ + inherit?: boolean; + /** + * If true will generate an absolute url, e.g. `http://www.example.com/fullurl`. + */ + absolute?: boolean; +} +/** + * Either a [[StateDeclaration]] or an ES6 class that implements [[StateDeclaration]] + * The ES6 class constructor should have no arguments. + */ +export declare type _StateDeclaration = StateDeclaration | { + new (): StateDeclaration; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js new file mode 100644 index 00000000..c51da0a1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js @@ -0,0 +1 @@ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js.map new file mode 100644 index 00000000..2f8a7566 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\nimport { ParamDeclaration, RawParams } from \"../params/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { ViewContext } from \"../view/interface\";\nimport { IInjectable } from \"../common/common\";\nimport { Transition } from \"../transition/transition\";\nimport { TransitionStateHookFn, TransitionOptions } from \"../transition/interface\";\nimport { ResolvePolicy, ResolvableLiteral, ProviderLike } from \"../resolve/interface\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TargetState } from \"./targetState\";\n\nexport type StateOrName = (string|StateDeclaration|StateObject);\n\n/** @internalapi */\nexport interface TransitionPromise extends Promise {\n transition: Transition;\n}\n\nexport interface TargetStateDef {\n state: StateOrName;\n params?: RawParams;\n options?: TransitionOptions;\n}\n\nexport type ResolveTypes = Resolvable | ResolvableLiteral | ProviderLike;\n/**\n * Base interface for declaring a view\n *\n * This interface defines the basic data that a normalized view declaration will have on it.\n * Each implementation of UI-Router (for a specific framework) should define its own extension of this interface.\n * Add any additional fields that the framework requires to that interface.\n *\n * @internalapi\n */\nexport interface _ViewDeclaration {\n /**\n * The raw name for the view declaration, i.e., the [[StateDeclaration.views]] property name.\n * @internalapi\n */\n $name?: string;\n\n /**\n * The normalized address for the `ui-view` which this ViewConfig targets.\n *\n * A ViewConfig targets a `ui-view` in the DOM (relative to the `uiViewContextAnchor`) which has\n * a specific name.\n * @example `header` or `$default`\n *\n * The `uiViewName` can also target a _nested view_ by providing a dot-notation address\n * @example `foo.bar` or `foo.$default.bar`\n * @internalapi\n */\n $uiViewName?: string;\n\n /**\n * The normalized context anchor (state name) for the `uiViewName`\n *\n * When targeting a `ui-view`, the `uiViewName` address is anchored to a context name (state name).\n * @internalapi\n */\n $uiViewContextAnchor?: string;\n\n /**\n * A type identifier for the View\n *\n * This is used when loading prerequisites for the view, before it enters the DOM. Different types of views\n * may load differently (e.g., templateProvider+controllerProvider vs component class)\n * @internalapi\n */\n $type?: string;\n\n /**\n * The context that this view is declared within.\n * @internalapi\n */\n $context?: ViewContext;\n}\n\n/**\n * The return value of a [[redirectTo]] function\n *\n * - string: a state name\n * - TargetState: a target state, parameters, and options\n * - object: an object with a state name and parameters\n */\nexport type RedirectToResult = string | TargetState | { state?: string, params?: RawParams } | void;\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n *\n * Note: Each implementation of UI-Router (for a specific framework)\n * extends this interface as necessary.\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * component: FoldersComponent,\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * }\n *\n * registry.register(foldersState);\n * ```\n *\n * A state declaration may also be an ES6 class which implements the StateDeclaration interface\n * and has a `@State()` decorator\n *\n * #### Example:\n * ```js\n * import { State } from \"@uirouter/core\"\n * import { FolderService } from \"../folder.service\"\n * // StateDeclaration class\n * @State()\n * export class FoldersState implements StateDeclaration {\n * name: 'folders',\n * url: '/folders',\n * component: FoldersComponent\n *\n * @Resolve({ deps: [ FolderService ] })\n * allfolders(FolderService) {\n * return FolderService.list();\n * },\n * }\n *\n * registry.register(FoldersState);\n * ```\n */\nexport interface StateDeclaration {\n /**\n * The state name (required)\n *\n * A unique state name, e.g. `\"home\"`, `\"about\"`, `\"contacts\"`.\n * To create a parent/child state use a dot, e.g. `\"about.sales\"`, `\"home.newest\"`.\n *\n * Note: [State] objects require unique names.\n * The name is used like an id.\n */\n name?: string;\n\n /**\n * Abstract state indicator\n *\n * An abstract state can never be directly activated.\n * Use an abstract state to provide inherited properties (url, resolve, data, etc) to children states.\n */\n abstract?: boolean;\n\n /**\n * The parent state\n *\n * Normally, a state's parent is implied from the state's [[name]], e.g., `\"parentstate.childstate\"`.\n *\n * Alternatively, you can explicitly set the parent state using this property.\n * This allows shorter state names, e.g., `Child`\n * instead of `Child\n *\n * When using this property, the state's name should not have any dots in it.\n *\n * #### Example:\n * ```js\n * var parentstate = {\n * name: 'parentstate'\n * }\n * var childstate = {\n * name: 'childstate',\n * parent: 'parentstate'\n * // or use a JS var which is the parent StateDeclaration, i.e.:\n * // parent: parentstate\n * }\n * ```\n */\n parent?: (string|StateDeclaration);\n\n /**\n * Gets the internal State object API\n *\n * Gets the *internal API* for a registered state.\n *\n * Note: the internal [[StateObject]] API is subject to change without notice\n */\n $$state?: () => StateObject;\n\n /**\n * Resolve - a mechanism to asynchronously fetch data, participating in the Transition lifecycle\n *\n * The `resolve:` property defines data (or other dependencies) to be fetched asynchronously when the state is being entered.\n * After the data is fetched, it may be used in views, transition hooks or other resolves that belong to this state.\n * The data may also be used in any views or resolves that belong to nested states.\n *\n * ### As an array\n *\n * Each array element should be a [[ResolvableLiteral]] object.\n *\n * #### Example:\n * The `user` resolve injects the current `Transition` and the `UserService` (using its token, which is a string).\n * The [[ResolvableLiteral.resolvePolicy]] sets how the resolve is processed.\n * The `user` data, fetched asynchronously, can then be used in a view.\n * ```js\n * var state = {\n * name: 'user',\n * url: '/user/:userId\n * resolve: [\n * {\n * token: 'user',\n * policy: { when: 'EAGER' },\n * deps: ['UserService', Transition],\n * resolveFn: (userSvc, trans) => userSvc.fetchUser(trans.params().userId) },\n * }\n * ]\n * }\n * ```\n *\n * Note: an Angular 2 style [`useFactory` provider literal](https://angular.io/docs/ts/latest/cookbook/dependency-injection.html#!#provide)\n * may also be used. See [[ProviderLike]].\n * #### Example:\n * ```\n * resolve: [\n * { provide: 'token', useFactory: (http) => http.get('/'), deps: [ Http ] },\n * ]\n * ```\n *\n * ### As an object\n *\n * The `resolve` property may be an object where:\n * - Each key (string) is the name of the dependency.\n * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency.\n *\n * This style is based on AngularJS injectable functions, but can be used with any UI-Router implementation.\n * If your code will be minified, the function should be [\"annotated\" in the AngularJS manner](https://docs.angularjs.org/guide/di#dependency-annotation).\n *\n * #### AngularJS Example:\n * ```js\n * resolve: {\n * // If you inject `myStateDependency` into a controller, you'll get \"abc\"\n * myStateDependency: function() {\n * return \"abc\";\n * },\n * // Dependencies are annotated in \"Inline Array Annotation\"\n * myAsyncData: ['$http', '$transition$' function($http, $transition$) {\n * // Return a promise (async) for the data\n * return $http.get(\"/foos/\" + $transition$.params().foo);\n * }]\n * }\n * ```\n *\n * Note: You cannot specify a policy for each Resolvable, nor can you use non-string\n * tokens when using the object style `resolve:` block.\n *\n * ### Lifecycle\n *\n * Since a resolve function can return a promise, the router will delay entering the state until the promises are ready.\n * If any of the promises are rejected, the Transition is aborted with an Error.\n *\n * By default, resolves for a state are fetched just before that state is entered.\n * Note that only states which are being *entered* during the `Transition` have their resolves fetched.\n * States that are \"retained\" do not have their resolves re-fetched.\n *\n * If you are currently in a parent state `parent` and are transitioning to a child state `parent.child`, the\n * previously resolved data for state `parent` can be injected into `parent.child` without delay.\n *\n * Any resolved data for `parent.child` is retained until `parent.child` is exited, e.g., by transitioning back to the `parent` state.\n *\n * Because of this scoping and lifecycle, resolves are a great place to fetch your application's primary data.\n *\n * ### Injecting resolves into other things\n *\n * During a transition, Resolve data can be injected into:\n *\n * - Views (the components which fill a `ui-view` tag)\n * - Transition Hooks\n * - Other resolves (a resolve may depend on asynchronous data from a different resolve)\n *\n * ### Injecting other things into resolves\n *\n * Resolve functions usually have dependencies on some other API(s).\n * The dependencies are usually declared and injected into the resolve function.\n * A common pattern is to inject a custom service such as `UserService`.\n * The resolve then delegates to a service method, such as `UserService.list()`;\n *\n * #### Special injectable tokens\n *\n * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services.\n * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as\n * \"to\" and \"from\" State Parameters and transition options.\n * - `'$transition$'`: A string alias for the `Transition` injectable\n * - `'$state$'`: For `onEnter`/`onExit`/`onRetain`, the state being entered/exited/retained.\n * - Other resolve tokens: A resolve can depend on another resolve, either from the same state, or from any parent state.\n *\n * #### Example:\n * ```js\n * // Injecting a resolve into another resolve\n * resolve: [\n * // Define a resolve 'allusers' which delegates to the UserService.list()\n * // which returns a promise (async) for all the users\n * { provide: 'allusers', useFactory: (UserService) => UserService.list(), deps: [UserService] },\n *\n * // Define a resolve 'user' which depends on the allusers resolve.\n * // This resolve function is not called until 'allusers' is ready.\n * { provide: 'user', (allusers, trans) => _.find(allusers, trans.params().userId, deps: ['allusers', Transition] }\n * }\n * ```\n */\n resolve?: (ResolveTypes[] | { [key: string]: IInjectable; });\n\n /**\n * Sets the resolve policy defaults for all resolves on this state\n *\n * This should be an [[ResolvePolicy]] object.\n *\n * It can contain the following optional keys/values:\n *\n * - `when`: (optional) defines when the resolve is fetched. Accepted values: \"LAZY\" or \"EAGER\"\n * - `async`: (optional) if the transition waits for the resolve. Accepted values: \"WAIT\", \"NOWAIT\", \"RXWAIT\"\n *\n * See [[ResolvePolicy]] for more details.\n */\n resolvePolicy?: ResolvePolicy\n\n /**\n * The url fragment for the state\n *\n * A URL fragment (with optional parameters) which is used to match the browser location with this state.\n *\n * This fragment will be appended to the parent state's URL in order to build up the overall URL for this state.\n * See [[UrlMatcher]] for details on acceptable patterns.\n *\n * @examples\n * ```js\n *\n * url: \"/home\"\n * // Define a parameter named 'userid'\n * url: \"/users/:userid\"\n * // param 'bookid' has a custom regexp\n * url: \"/books/{bookid:[a-zA-Z_-]}\"\n * // param 'categoryid' is of type 'int'\n * url: \"/books/{categoryid:int}\"\n * // two parameters for this state\n * url: \"/books/{publishername:string}/{categoryid:int}\"\n * // Query parameters\n * url: \"/messages?before&after\"\n * // Query parameters of type 'date'\n * url: \"/messages?{before:date}&{after:date}\"\n * // Path and query parameters\n * url: \"/messages/:mailboxid?{before:date}&{after:date}\"\n * ```\n */\n url?: string;\n\n /**\n * Params configuration\n *\n * An object which optionally configures parameters declared in the url, or defines additional non-url\n * parameters. For each parameter being configured, add a [[ParamDeclaration]] keyed to the name of the parameter.\n *\n * #### Example:\n * ```js\n * params: {\n * param1: {\n * type: \"int\",\n * array: true,\n * value: []\n * },\n * param2: {\n * value: \"index\"\n * }\n * }\n * ```\n */\n params?: { [key: string]: (ParamDeclaration|any); };\n\n /**\n * Named views\n *\n * An optional object which defines multiple views, or explicitly targets specific named ui-views.\n *\n * - What is a view config\n * - What is a ui-view\n * - Shorthand controller/template\n * - Incompatible with ^\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * }, body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * }, footer: {\n * controller: \"footCtrl\",\n * templateUrl: \"footer.html\"\n * }\n * }\n * ```\n *\n * @example\n * ```js\n * // Targets named ui-view=\"header\" from ancestor state 'top''s template, and\n * // named `ui-view=\"body\" from parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * }, 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n */\n views?: { [key: string]: _ViewDeclaration; };\n\n /**\n * An inherited property to store state data\n *\n * This is a spot for you to store inherited state metadata.\n * Child states' `data` object will prototypally inherit from their parent state.\n *\n * This is a good spot to put metadata such as `requiresAuth`.\n *\n * Note: because prototypal inheritance is used, changes to parent `data` objects reflect in the child `data` objects.\n * Care should be taken if you are using `hasOwnProperty` on the `data` object.\n * Properties from parent objects will return false for `hasOwnProperty`.\n */\n data?: any;\n\n /**\n * Synchronously or asynchronously redirects Transitions to a different state/params\n *\n * If this property is defined, a Transition directly to this state will be redirected based on the property's value.\n *\n * - If the value is a `string`, the Transition is redirected to the state named by the string.\n *\n * - If the property is an object with a `state` and/or `params` property,\n * the Transition is redirected to the named `state` and/or `params`.\n *\n * - If the value is a [[TargetState]] the Transition is redirected to the `TargetState`\n *\n * - If the property is a function:\n * - The function is called with the current [[Transition]]\n * - The return value is processed using the previously mentioned rules.\n * - If the return value is a promise, the promise is waited for, then the resolved async value is processed using the same rules.\n *\n * Note: `redirectTo` is processed as an `onStart` hook, before `LAZY` resolves.\n * If your redirect function relies on resolve data, get the [[Transition.injector]] and get a\n * promise for the resolve data using [[UIInjector.getAsync]].\n *\n * #### Example:\n * ```js\n * // a string\n * .state('A', {\n * redirectTo: 'A.B'\n * })\n *\n * // a {state, params} object\n * .state('C', {\n * redirectTo: { state: 'C.D', params: { foo: 'index' } }\n * })\n *\n * // a fn\n * .state('E', {\n * redirectTo: () => \"A\"\n * })\n *\n * // a fn conditionally returning a {state, params}\n * .state('F', {\n * redirectTo: (trans) => {\n * if (trans.params().foo < 10)\n * return { state: 'F', params: { foo: 10 } };\n * }\n * })\n *\n * // a fn returning a promise for a redirect\n * .state('G', {\n * redirectTo: (trans) => {\n * let svc = trans.injector().get('SomeAsyncService')\n * let promise = svc.getAsyncRedirectTo(trans.params.foo);\n * return promise;\n * }\n * })\n *\n * // a fn that fetches resolve data\n * .state('G', {\n * redirectTo: (trans) => {\n * // getAsync tells the resolve to load\n * let resolvePromise = trans.injector().getAsync('SomeResolve')\n * return resolvePromise.then(resolveData => resolveData === 'login' ? 'login' : null);\n * }\n * })\n * ```\n */\n redirectTo?: RedirectToResult |\n ((transition: Transition) => RedirectToResult) |\n ((transition: Transition) => Promise);\n\n /**\n * A Transition Hook called with the state is being entered. See: [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onEnter: function(trans, state) {\n * console.log(\"Entering \" + state.name);\n * }\n * });\n * ```\n *\n * Note: The above `onEnter` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onEnter({ entering: 'mystate' }, function(trans, state) {\n * console.log(\"Entering \" + state.name);\n * });\n * ```\n */\n onEnter?: TransitionStateHookFn;\n /**\n * A [[TransitionStateHookFn]] called with the state is being retained/kept. See: [[IHookRegistry.onRetain]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onRetain: function(trans, state) {\n * console.log(state.name + \" is still active!\");\n * }\n * });\n * ```\n *\n * Note: The above `onRetain` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onRetain({ retained: 'mystate' }, function(trans, state) {\n * console.log(state.name + \" is still active!\");\n * });\n * ```\n */\n onRetain?: TransitionStateHookFn;\n /**\n * A Transition Hook called with the state is being exited. See: [[IHookRegistry.onExit]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onExit: function(trans, state) {\n * console.log(\"Leaving \" + state.name);\n * }\n * });\n * ```\n *\n * Note: The above `onRetain` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onExit({ exiting: 'mystate' }, function(trans, state) {\n * console.log(\"Leaving \" + state.name);\n * });\n * ```\n */\n onExit?: TransitionStateHookFn;\n\n /**\n * A function used to lazy load code\n *\n * The `lazyLoad` function is invoked before the state is activated.\n * The transition waits while the code is loading.\n *\n * The function should load the code that is required to activate the state.\n * For example, it may load a component class, or some service code.\n * The function must return a promise which resolves when loading is complete.\n *\n * For example, this code lazy loads a service before the `abc` state is activated:\n *\n * ```\n * .state('abc', {\n * lazyLoad: (transition, state) => System.import('./abcService')\n * }\n * ```\n *\n * The `abcService` file is imported and loaded\n * (it is assumed that the `abcService` file knows how to register itself as a service).\n *\n * #### Lifecycle\n *\n * - The `lazyLoad` function is invoked if a transition is going to enter the state.\n * - The function is invoked before the transition starts (using an `onBefore` transition hook).\n * - The function is only invoked once; while the `lazyLoad` function is loading code, it will not be invoked again.\n * For example, if the user double clicks a ui-sref, `lazyLoad` is only invoked once even though there were two transition attempts.\n * Instead, the existing lazy load promise is re-used.\n * - When the promise resolves successfully, the `lazyLoad` property is deleted from the state declaration.\n * - If the promise resolves to a [[LazyLoadResult]] which has an array of `states`, those states are registered.\n * - The original transition is retried (this time without the `lazyLoad` property present).\n *\n * - If the `lazyLoad` function fails, then the transition also fails.\n * The failed transition (and the `lazyLoad` function) could potentially be retried by the user.\n *\n * ### Lazy loading state definitions (Future States)\n *\n * State definitions can also be lazy loaded.\n * This might be desirable when building large, multi-module applications.\n *\n * To lazy load state definitions, a Future State should be registered as a placeholder.\n * When the state definitions are lazy loaded, the Future State is deregistered.\n *\n * A future state can act as a placeholder for a single state, or for an entire module of states and substates.\n * A future state should have:\n *\n * - A `name` which ends in `.**`.\n * A future state's `name` property acts as a wildcard [[Glob]].\n * It matches any state name that starts with the `name` (including child states that are not yet loaded).\n * - A `url` prefix.\n * A future state's `url` property acts as a wildcard.\n * UI-Router matches all paths that begin with the `url`.\n * It effectively appends `.*` to the internal regular expression.\n * When the prefix matches, the future state will begin loading.\n * - A `lazyLoad` function.\n * This function should should return a Promise to lazy load the code for one or more [[StateDeclaration]] objects.\n * It should return a [[LazyLoadResult]].\n * Generally, one of the lazy loaded states should have the same name as the future state.\n * The new state will then **replace the future state placeholder** in the registry.\n *\n * ### Additional resources\n *\n * For in depth information on lazy loading and Future States, see the [Lazy Loading Guide](https://ui-router.github.io/guides/lazyload).\n *\n * #### Example: states.js\n * ```js\n *\n * // This child state is a lazy loaded future state\n * // The `lazyLoad` function loads the final state definition\n * {\n * name: 'parent.**',\n * url: '/parent',\n * lazyLoad: () => System.import('./lazy.states.js')\n * }\n * ```\n *\n * #### Example: lazy.states.js\n *\n * This file is lazy loaded. It exports an array of states.\n *\n * ```js\n * import {ChildComponent} from \"./child.component.js\";\n * import {ParentComponent} from \"./parent.component.js\";\n *\n * // This fully defined state replaces the future state\n * let parentState = {\n * // the name should match the future state\n * name: 'parent',\n * url: '/parent/:parentId',\n * component: ParentComponent,\n * resolve: {\n * parentData: ($transition$, ParentService) =>\n * ParentService.get($transition$.params().parentId)\n * }\n * }\n *\n * let childState = {\n * name: 'parent.child',\n * url: '/child/:childId',\n * params: {\n * childId: \"default\"\n * },\n * resolve: {\n * childData: ($transition$, ChildService) =>\n * ChildService.get($transition$.params().childId)\n * }\n * };\n *\n * // This array of states will be registered by the lazyLoad hook\n * let lazyLoadResults = {\n * states: [ parentState, childState ]\n * };\n *\n * export default lazyLoadResults;\n * ```\n *\n * @param transition the [[Transition]] that is activating the future state\n * @param state the [[StateDeclaration]] that the `lazyLoad` function is declared on\n * @return a Promise to load the states.\n * Optionally, if the promise resolves to a [[LazyLoadResult]],\n * the states will be registered with the [[StateRegistry]].\n */\n lazyLoad?: (transition: Transition, state: StateDeclaration) => Promise;\n\n /**\n * @deprecated define individual parameters as [[ParamDeclaration.dynamic]]\n */\n reloadOnSearch?: boolean;\n}\n\n/**\n * The return type of a [[StateDeclaration.lazyLoad]] function\n *\n * If your state has a `lazyLoad` function, it should return a promise.\n * If promise resolves to an object matching this interface, then the `states` array\n * of [[StateDeclaration]] objects will be automatically registered.\n */\nexport interface LazyLoadResult {\n states?: StateDeclaration[];\n}\n\n/**\n * An options object for [[StateService.href]]\n */\nexport interface HrefOptions {\n /**\n * Defines what state to be \"relative from\"\n *\n * When a relative path is found (e.g `^` or `.bar`), defines which state to be relative from.\n */\n relative?: StateOrName;\n\n /**\n * If true, and if there is no url associated with the state provided in the\n * first parameter, then the constructed href url will be built from the first\n * ancestor which has a url.\n */\n lossy?: boolean;\n\n /**\n * If `true` will inherit parameters from the current parameter values.\n */\n inherit?: boolean;\n\n /**\n * If true will generate an absolute url, e.g. `http://www.example.com/fullurl`.\n */\n absolute?: boolean;\n}\n\n/**\n * Either a [[StateDeclaration]] or an ES6 class that implements [[StateDeclaration]]\n * The ES6 class constructor should have no arguments.\n */\nexport type _StateDeclaration = StateDeclaration | { new (): StateDeclaration };\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.d.ts new file mode 100644 index 00000000..bc9d723c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.d.ts @@ -0,0 +1,86 @@ +import { StateObject } from "./stateObject"; +import { StateMatcher } from "./stateMatcher"; +import { UrlMatcherFactory } from "../url/urlMatcherFactory"; +import { Resolvable } from "../resolve/resolvable"; +export declare type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any; +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +export declare function resolvablesBuilder(state: StateObject): Resolvable[]; +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +export declare class StateBuilder { + private matcher; + /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */ + private builders; + constructor(matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory); + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + builder(name: string, fn: BuilderFunction): (BuilderFunction | BuilderFunction[] | Function); + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + build(state: StateObject): StateObject; + parentName(state: StateObject): string; + name(state: StateObject): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js new file mode 100644 index 00000000..d26be035 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js @@ -0,0 +1,277 @@ +/** @module state */ /** for typedoc */ +import { omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity } from "../common/common"; +import { isDefined, isFunction, isString, isArray } from "../common/predicates"; +import { stringify } from "../common/strings"; +import { prop, pattern, is, pipe, val } from "../common/hof"; +import { Resolvable } from "../resolve/resolvable"; +import { services } from "../common/coreservices"; +var parseUrl = function (url) { + if (!isString(url)) + return false; + var root = url.charAt(0) === '^'; + return { val: root ? url.substring(1) : url, root: root }; +}; +function nameBuilder(state) { + return state.name; +} +function selfBuilder(state) { + state.self.$$state = function () { return state; }; + return state.self; +} +function dataBuilder(state) { + if (state.parent && state.parent.data) { + state.data = state.self.data = inherit(state.parent.data, state.data); + } + return state.data; +} +var getUrlBuilder = function ($urlMatcherFactoryProvider, root) { + return function urlBuilder(state) { + var stateDec = state; + // For future states, i.e., states whose name ends with `.**`, + // match anything that starts with the url prefix + if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\.\*\*$/)) { + stateDec.url += "{remainder:any}"; // match any path (.*) + } + var parsed = parseUrl(stateDec.url), parent = state.parent; + var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { + params: state.params || {}, + paramMap: function (paramConfig, isSearch) { + if (stateDec.reloadOnSearch === false && isSearch) + paramConfig = extend(paramConfig || {}, { dynamic: true }); + return paramConfig; + } + }); + if (!url) + return null; + if (!$urlMatcherFactoryProvider.isMatcher(url)) + throw new Error("Invalid url '" + url + "' in state '" + state + "'"); + return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append(url); + }; +}; +var getNavigableBuilder = function (isRoot) { + return function navigableBuilder(state) { + return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null); + }; +}; +var getParamsBuilder = function (paramFactory) { + return function paramsBuilder(state) { + var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, config); }; + var urlParams = (state.url && state.url.parameters({ inherit: false })) || []; + var nonUrlParams = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam)); + return urlParams.concat(nonUrlParams).map(function (p) { return [p.id, p]; }).reduce(applyPairs, {}); + }; +}; +function pathBuilder(state) { + return state.parent ? state.parent.path.concat(state) : /*root*/ [state]; +} +function includesBuilder(state) { + var includes = state.parent ? extend({}, state.parent.includes) : {}; + includes[state.name] = true; + return includes; +} +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +export function resolvablesBuilder(state) { + /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */ + var objects2Tuples = function (resolveObj, resolvePolicies) { + return Object.keys(resolveObj || {}).map(function (token) { return ({ token: token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token] }); }); + }; + /** fetch DI annotations from a function or ng1-style array */ + var annotate = function (fn) { + var $injector = services.$injector; + // ng1 doesn't have an $injector until runtime. + // If the $injector doesn't exist, use "deferred" literal as a + // marker indicating they should be annotated when runtime starts + return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || "deferred"; + }; + /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */ + var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); }; + /** true if the object looks like a provide literal, or a ng2 Provider */ + var isLikeNg2Provider = function (obj) { return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); }; + /** true if the object looks like a tuple from obj2Tuples */ + var isTupleFromObj = function (obj) { return !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val))); }; + /** extracts the token from a Provider or provide literal */ + var token = function (p) { return p.provide || p.token; }; + /** Given a literal resolve or provider object, returns a Resolvable */ + var literal2Resolvable = pattern([ + [prop('resolveFn'), function (p) { return new Resolvable(token(p), p.resolveFn, p.deps, p.policy); }], + [prop('useFactory'), function (p) { return new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy); }], + [prop('useClass'), function (p) { return new Resolvable(token(p), function () { return new p.useClass(); }, [], p.policy); }], + [prop('useValue'), function (p) { return new Resolvable(token(p), function () { return p.useValue; }, [], p.policy, p.useValue); }], + [prop('useExisting'), function (p) { return new Resolvable(token(p), identity, [p.useExisting], p.policy); }], + ]); + var tuple2Resolvable = pattern([ + [pipe(prop("val"), isString), function (tuple) { return new Resolvable(tuple.token, identity, [tuple.val], tuple.policy); }], + [pipe(prop("val"), isArray), function (tuple) { return new Resolvable(tuple.token, tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }], + [pipe(prop("val"), isFunction), function (tuple) { return new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }], + ]); + var item2Resolvable = pattern([ + [is(Resolvable), function (r) { return r; }], + [isResolveLiteral, literal2Resolvable], + [isLikeNg2Provider, literal2Resolvable], + [isTupleFromObj, tuple2Resolvable], + [val(true), function (obj) { throw new Error("Invalid resolve value: " + stringify(obj)); }] + ]); + // If resolveBlock is already an array, use it as-is. + // Otherwise, assume it's an object and convert to an Array of tuples + var decl = state.resolve; + var items = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {}); + return items.map(item2Resolvable); +} +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +var StateBuilder = /** @class */ (function () { + function StateBuilder(matcher, urlMatcherFactory) { + this.matcher = matcher; + var self = this; + var root = function () { return matcher.find(""); }; + var isRoot = function (state) { return state.name === ""; }; + function parentBuilder(state) { + if (isRoot(state)) + return null; + return matcher.find(self.parentName(state)) || root(); + } + this.builders = { + name: [nameBuilder], + self: [selfBuilder], + parent: [parentBuilder], + data: [dataBuilder], + // Build a URLMatcher if necessary, either via a relative or absolute URL + url: [getUrlBuilder(urlMatcherFactory, root)], + // Keep track of the closest ancestor state that has a URL (i.e. is navigable) + navigable: [getNavigableBuilder(isRoot)], + params: [getParamsBuilder(urlMatcherFactory.paramFactory)], + // Each framework-specific ui-router implementation should define its own `views` builder + // e.g., src/ng1/statebuilders/views.ts + views: [], + // Keep a full path from the root down to this state as this is needed for state activation. + path: [pathBuilder], + // Speed up $state.includes() as it's used a lot + includes: [includesBuilder], + resolvables: [resolvablesBuilder] + }; + } + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + StateBuilder.prototype.builder = function (name, fn) { + var builders = this.builders; + var array = builders[name] || []; + // Backwards compat: if only one builder exists, return it, else return whole arary. + if (isString(name) && !isDefined(fn)) + return array.length > 1 ? array : array[0]; + if (!isString(name) || !isFunction(fn)) + return; + builders[name] = array; + builders[name].push(fn); + return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; }; + }; + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + StateBuilder.prototype.build = function (state) { + var _a = this, matcher = _a.matcher, builders = _a.builders; + var parent = this.parentName(state); + if (parent && !matcher.find(parent, undefined, false)) { + return null; + } + for (var key in builders) { + if (!builders.hasOwnProperty(key)) + continue; + var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, noop); + state[key] = chain(state); + } + return state; + }; + StateBuilder.prototype.parentName = function (state) { + // name = 'foo.bar.baz.**' + var name = state.name || ""; + // segments = ['foo', 'bar', 'baz', '.**'] + var segments = name.split('.'); + // segments = ['foo', 'bar', 'baz'] + var lastSegment = segments.pop(); + // segments = ['foo', 'bar'] (ignore .** segment for future states) + if (lastSegment === '**') + segments.pop(); + if (segments.length) { + if (state.parent) { + throw new Error("States that specify the 'parent:' property should not have a '.' in their name (" + name + ")"); + } + // 'foo.bar' + return segments.join("."); + } + if (!state.parent) + return ""; + return isString(state.parent) ? state.parent : state.parent.name; + }; + StateBuilder.prototype.name = function (state) { + var name = state.name; + if (name.indexOf('.') !== -1 || !state.parent) + return name; + var parentName = isString(state.parent) ? state.parent : state.parent.name; + return parentName ? parentName + "." + name : name; + }; + return StateBuilder; +}()); +export { StateBuilder }; +//# sourceMappingURL=stateBuilder.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js.map new file mode 100644 index 00000000..f7001675 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateBuilder.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateBuilder.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateBuilder.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,kBAAkB;AACvC,OAAO,EAAM,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AAQ3D,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAIhD,IAAM,QAAQ,GAAG,UAAC,GAAW;IAC3B,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAAC,MAAM,CAAC,KAAK,CAAC;IACjC,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;IACjC,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,MAAA,EAAE,CAAC;AACtD,CAAC,CAAC;AAoBF,qBAAqB,KAAkB;IACrC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,q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AC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,qFAAmF,IAAI,MAAG,CAAC,CAAC;YAC9G,CAAC;YAED,YAAY;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IACnE,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAkB;QACrB,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACtB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC;QAE3D,IAAI,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3E,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC;IACH,mBAAC;AAAD,CAAC,AA/GD,IA+GC", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.d.ts new file mode 100644 index 00000000..6ddc155d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.d.ts @@ -0,0 +1,11 @@ +import { StateOrName } from "./interface"; +import { StateObject } from "./stateObject"; +export declare class StateMatcher { + private _states; + constructor(_states: { + [key: string]: StateObject; + }); + isRelative(stateName: string): boolean; + find(stateOrName: StateOrName, base?: StateOrName, matchGlob?: boolean): StateObject; + resolvePath(name: string, base: StateOrName): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js new file mode 100644 index 00000000..fbe95327 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js @@ -0,0 +1,61 @@ +/** @module state */ /** for typedoc */ +import { isString } from "../common/predicates"; +import { values } from "../common/common"; +var StateMatcher = /** @class */ (function () { + function StateMatcher(_states) { + this._states = _states; + } + StateMatcher.prototype.isRelative = function (stateName) { + stateName = stateName || ""; + return stateName.indexOf(".") === 0 || stateName.indexOf("^") === 0; + }; + StateMatcher.prototype.find = function (stateOrName, base, matchGlob) { + if (matchGlob === void 0) { matchGlob = true; } + if (!stateOrName && stateOrName !== "") + return undefined; + var isStr = isString(stateOrName); + var name = isStr ? stateOrName : stateOrName.name; + if (this.isRelative(name)) + name = this.resolvePath(name, base); + var state = this._states[name]; + if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { + return state; + } + else if (isStr && matchGlob) { + var _states = values(this._states); + var matches = _states.filter(function (state) { + return state.__stateObjectCache.nameGlob && + state.__stateObjectCache.nameGlob.matches(name); + }); + if (matches.length > 1) { + console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; })); + } + return matches[0]; + } + return undefined; + }; + StateMatcher.prototype.resolvePath = function (name, base) { + if (!base) + throw new Error("No reference point given for path '" + name + "'"); + var baseState = this.find(base); + var splitName = name.split("."), i = 0, pathLength = splitName.length, current = baseState; + for (; i < pathLength; i++) { + if (splitName[i] === "" && i === 0) { + current = baseState; + continue; + } + if (splitName[i] === "^") { + if (!current.parent) + throw new Error("Path '" + name + "' not valid for state '" + baseState.name + "'"); + current = current.parent; + continue; + } + break; + } + var relName = splitName.slice(i).join("."); + return current.name + (current.name && relName ? "." : "") + relName; + }; + return StateMatcher; +}()); +export { StateMatcher }; +//# sourceMappingURL=stateMatcher.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js.map new file mode 100644 index 00000000..52f86d14 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateMatcher.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateMatcher.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateMatcher.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,kBAAkB;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;IACE,sBAAqB,OAAuC;QAAvC,YAAO,GAAP,OAAO,CAAgC;IAAI,CAAC;IAEjE,iCAAU,GAAV,UAAW,SAAiB;QAC1B,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QAC5B,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAGD,2BAAI,GAAJ,UAAK,WAAwB,EAAE,IAAkB,EAAE,SAAgB;QAAhB,0BAAA,EAAA,gBAAgB;QACjE,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,WAAW,KAAK,EAAE,CAAC;YAAC,MAAM,CAAC,SAAS,CAAC;QACzD,IAAI,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,IAAI,GAAW,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAO,WAAY,CAAC,IAAI,CAAC;QAEjE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE/B,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,KAA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AAG,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACnC,OAAO,GAAG,SAAS,CAAC;gBACpB,QAAQ,CAAC;YACX,CAAC;YACD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBACzB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;oBAAC,MAAM,IAAI,KAAK,CAAC,WAAS,IAAI,+BAA0B,SAAS,CAAC,IAAI,MAAG,CAAC,CAAC;gBAC/F,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;gBACzB,QAAQ,CAAC;YACX,CAAC;YACD,KAAK,CAAC;QACR,CAAC;QACD,IAAI,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACvE,CAAC;IACH,mBAAC;AAAD,CAAC,AAxDD,IAwDC", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.d.ts new file mode 100644 index 00000000..4400be87 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.d.ts @@ -0,0 +1,158 @@ +/** + * @coreapi + * @module state + */ +/** for typedoc */ +import { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from "./interface"; +import { Param } from "../params/param"; +import { UrlMatcher } from "../url/urlMatcher"; +import { Resolvable } from "../resolve/resolvable"; +import { TransitionStateHookFn } from "../transition/interface"; +import { TargetState } from "./targetState"; +import { Transition } from "../transition/transition"; +import { Glob } from "../common/glob"; +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +export declare class StateObject { + /** The parent [[StateObject]] */ + parent: StateObject; + /** The name used to register the state */ + name: string; + /** Prototypally inherits from [[StateDeclaration.abstract]] */ + abstract: boolean; + /** Prototypally inherits from [[StateDeclaration.resolve]] */ + resolve: ({ + [key: string]: (string | any[] | Function); + } | any[]); + /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */ + resolvables: Resolvable[]; + /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */ + resolvePolicy: any; + /** A compiled URLMatcher which detects when the state's URL is matched */ + url: UrlMatcher; + /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */ + params: { + [key: string]: Param; + }; + /** + * The views for the state. + * Note: `@uirouter/core` does not register a builder for views. + * The framework specific code should register a `views` builder. + */ + views: { + [key: string]: _ViewDeclaration; + }; + /** + * The original [[StateDeclaration]] used to build this [[StateObject]]. + * Note: `this` object also prototypally inherits from the `self` declaration object. + */ + self: StateDeclaration; + /** The nearest parent [[StateObject]] which has a URL */ + navigable: StateObject; + /** The parent [[StateObject]] objects from this state up to the root */ + path: StateObject[]; + /** + * Prototypally inherits from [[StateDeclaration.data]] + * Note: This is the only field on the [[StateDeclaration]] which is mutated. + * The definition object's `data` field is replaced with a new object + * which prototypally inherits from the parent state definition's `data` field. + */ + data: any; + /** + * An object containing the parent States' names as keys and + * true as their values. + */ + includes: { + [name: string]: boolean; + }; + /** Prototypally inherits from [[StateDeclaration.onExit]] */ + onExit: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.onRetain]] */ + onRetain: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.onEnter]] */ + onEnter: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */ + lazyLoad: (transition: Transition, state: StateDeclaration) => Promise; + /** Prototypally inherits from [[StateDeclaration.redirectTo]] */ + redirectTo: (string | (($transition$: Transition) => TargetState) | { + state: (string | StateDeclaration); + params: { + [key: string]: any; + }; + }); + /** @hidden */ + __stateObjectCache: { + /** Might be null */ + nameGlob?: Glob; + }; + /** @deprecated use State.create() */ + constructor(config?: StateDeclaration); + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + static create(stateDecl: _StateDeclaration): StateObject; + /** Predicate which returns true if the object is an class with @State() decorator */ + static isStateClass: (stateDecl: _StateDeclaration) => stateDecl is new () => StateDeclaration; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + static isState: (obj: any) => obj is StateObject; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + is(ref: StateObject | StateDeclaration | string): boolean; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + fqn(): string; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + root(): StateObject; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + parameters(opts?: { + inherit?: boolean; + matchingKeys?: any; + }): Param[]; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + parameter(id: string, opts?: { + inherit?: boolean; + }): Param; + toString(): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js new file mode 100644 index 00000000..78623b80 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js @@ -0,0 +1,112 @@ +import { defaults, values, find, inherit } from "../common/common"; +import { propEq } from "../common/hof"; +import { Glob } from "../common/glob"; +import { isObject, isFunction } from "../common/predicates"; +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +var StateObject = /** @class */ (function () { + /** @deprecated use State.create() */ + function StateObject(config) { + return StateObject.create(config || {}); + } + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + StateObject.create = function (stateDecl) { + stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl; + var state = inherit(inherit(stateDecl, StateObject.prototype)); + stateDecl.$$state = function () { return state; }; + state.self = stateDecl; + state.__stateObjectCache = { + nameGlob: Glob.fromString(state.name) // might return null + }; + return state; + }; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + StateObject.prototype.is = function (ref) { + return this === ref || this.self === ref || this.fqn() === ref; + }; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + StateObject.prototype.fqn = function () { + if (!this.parent || !(this.parent instanceof this.constructor)) + return this.name; + var name = this.parent.fqn(); + return name ? name + "." + this.name : this.name; + }; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + StateObject.prototype.root = function () { + return this.parent && this.parent.root() || this; + }; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + StateObject.prototype.parameters = function (opts) { + opts = defaults(opts, { inherit: true, matchingKeys: null }); + var inherited = opts.inherit && this.parent && this.parent.parameters() || []; + return inherited.concat(values(this.params)) + .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); }); + }; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + StateObject.prototype.parameter = function (id, opts) { + if (opts === void 0) { opts = {}; } + return (this.url && this.url.parameter(id, opts) || + find(values(this.params), propEq('id', id)) || + opts.inherit && this.parent && this.parent.parameter(id)); + }; + StateObject.prototype.toString = function () { + return this.fqn(); + }; + /** Predicate which returns true if the object is an class with @State() decorator */ + StateObject.isStateClass = function (stateDecl) { + return isFunction(stateDecl) && stateDecl['__uiRouterState'] === true; + }; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + StateObject.isState = function (obj) { + return isObject(obj['__stateObjectCache']); + }; + return StateObject; +}()); +export { StateObject }; +//# sourceMappingURL=stateObject.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js.map new file mode 100644 index 00000000..e023dfcc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateObject.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateObject.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateObject.ts" + ], + "names": [], + "mappings": "AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOvC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;GASG;AACH;IAkFE,qCAAqC;IACrC,qBAAY,MAAyB;QACnC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACI,kBAAM,GAAb,UAAc,SAA4B;QACxC,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9E,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,CAAgB,CAAC;QAC9E,SAAS,CAAC,OAAO,GAAG,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC;QAChC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QACvB,KAAK,CAAC,kBAAkB,GAAG;YACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,oBAAoB;SAC3D,CAAC;QACF,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IAUD;;;;;;;;;;OAUG;IACH,wBAAE,GAAF,UAAG,GAAwC;QACzC,MAAM,CAAC,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,KAAK,GAA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;QACpD,MAAM,CAAC,CACH,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC;YACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED,8BAAQ,GAAR;QACE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;IA3ED,qFAAqF;IAC9E,wBAAY,GAAG,UAAC,SAA4B;QAC/C,OAAA,UAAU,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,iBAAiB,CAAC,KAAK,IAAI;IAA9D,CAA8D,CAAC;IAEnE,uFAAuF;IAChF,mBAAO,GAAG,UAAC,GAAQ;QACtB,OAAA,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAAnC,CAAmC,CAAC;IAsE1C,kBAAC;CAAA,AAvLD,IAuLC;SAvLY,WAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.d.ts new file mode 100644 index 00000000..cc9ebb05 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.d.ts @@ -0,0 +1,29 @@ +import { _StateDeclaration } from "./interface"; +import { StateObject } from "./stateObject"; +import { StateBuilder } from "./stateBuilder"; +import { StateRegistryListener, StateRegistry } from "./stateRegistry"; +import { Disposable } from "../interface"; +import { UrlRouter } from "../url/urlRouter"; +import { StateMatcher } from "./stateMatcher"; +/** @internalapi */ +export declare class StateQueueManager implements Disposable { + private $registry; + private $urlRouter; + states: { + [key: string]: StateObject; + }; + builder: StateBuilder; + listeners: StateRegistryListener[]; + queue: StateObject[]; + matcher: StateMatcher; + constructor($registry: StateRegistry, $urlRouter: UrlRouter, states: { + [key: string]: StateObject; + }, builder: StateBuilder, listeners: StateRegistryListener[]); + /** @internalapi */ + dispose(): void; + register(stateDecl: _StateDeclaration): StateObject; + flush(): { + [key: string]: StateObject; + }; + attachRoute(state: StateObject): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js new file mode 100644 index 00000000..81a50844 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js @@ -0,0 +1,90 @@ +/** @module state */ /** for typedoc */ +import { inArray } from "../common/common"; +import { isString } from "../common/predicates"; +import { StateObject } from "./stateObject"; +import { prop } from "../common/hof"; +/** @internalapi */ +var StateQueueManager = /** @class */ (function () { + function StateQueueManager($registry, $urlRouter, states, builder, listeners) { + this.$registry = $registry; + this.$urlRouter = $urlRouter; + this.states = states; + this.builder = builder; + this.listeners = listeners; + this.queue = []; + this.matcher = $registry.matcher; + } + /** @internalapi */ + StateQueueManager.prototype.dispose = function () { + this.queue = []; + }; + StateQueueManager.prototype.register = function (stateDecl) { + var queue = this.queue; + var state = StateObject.create(stateDecl); + var name = state.name; + if (!isString(name)) + throw new Error("State must have a valid name"); + if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name)) + throw new Error("State '" + name + "' is already defined"); + queue.push(state); + this.flush(); + return state; + }; + StateQueueManager.prototype.flush = function () { + var _this = this; + var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder; + var registered = [], // states that got registered + orphans = [], // states that don't yet have a parent registered + previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered + var getState = function (name) { + return _this.states.hasOwnProperty(name) && _this.states[name]; + }; + while (queue.length > 0) { + var state = queue.shift(); + var name_1 = state.name; + var result = builder.build(state); + var orphanIdx = orphans.indexOf(state); + if (result) { + var existingState = getState(name_1); + if (existingState && existingState.name === name_1) { + throw new Error("State '" + name_1 + "' is already defined"); + } + var existingFutureState = getState(name_1 + ".**"); + if (existingFutureState) { + // Remove future state of the same name + this.$registry.deregister(existingFutureState); + } + states[name_1] = state; + this.attachRoute(state); + if (orphanIdx >= 0) + orphans.splice(orphanIdx, 1); + registered.push(state); + continue; + } + var prev = previousQueueLength[name_1]; + previousQueueLength[name_1] = queue.length; + if (orphanIdx >= 0 && prev === queue.length) { + // Wait until two consecutive iterations where no additional states were dequeued successfully. + // throw new Error(`Cannot register orphaned state '${name}'`); + queue.push(state); + return states; + } + else if (orphanIdx < 0) { + orphans.push(state); + } + queue.push(state); + } + if (registered.length) { + this.listeners.forEach(function (listener) { return listener("registered", registered.map(function (s) { return s.self; })); }); + } + return states; + }; + StateQueueManager.prototype.attachRoute = function (state) { + if (state.abstract || !state.url) + return; + this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state)); + }; + return StateQueueManager; +}()); +export { StateQueueManager }; +//# sourceMappingURL=stateQueueManager.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js.map new file mode 100644 index 00000000..37de1206 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateQueueManager.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateQueueManager.ts" + ], + "names": [], + "mappings": "AAAA,oBAAoB,CAAC,kBAAkB;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE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AAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;IACH,wBAAC;AAAD,CAAC,AA7FD,IA6FC", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.d.ts new file mode 100644 index 00000000..274a14c8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.d.ts @@ -0,0 +1,122 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { StateObject } from "./stateObject"; +import { StateMatcher } from "./stateMatcher"; +import { StateQueueManager } from "./stateQueueManager"; +import { StateDeclaration, _StateDeclaration } from "./interface"; +import { BuilderFunction } from "./stateBuilder"; +import { StateOrName } from "./interface"; +import { UIRouter } from "../router"; +/** + * The signature for the callback function provided to [[StateRegistry.onStatesChanged]]. + * + * This callback receives two parameters: + * + * @param event a string; either "registered" or "deregistered" + * @param states the list of [[StateDeclaration]]s that were registered (or deregistered). + */ +export declare type StateRegistryListener = (event: "registered" | "deregistered", states: StateDeclaration[]) => void; +export declare class StateRegistry { + private _router; + private _root; + private states; + matcher: StateMatcher; + private builder; + stateQueue: StateQueueManager; + listeners: StateRegistryListener[]; + /** @internalapi */ + constructor(_router: UIRouter); + /** @internalapi */ + private _registerRoot(); + /** @internalapi */ + dispose(): void; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + onStatesChanged(listener: StateRegistryListener): () => void; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + root(): StateObject; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + register(stateDefinition: _StateDeclaration): StateObject; + /** @hidden */ + private _deregisterTree(state); + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + deregister(stateOrName: StateOrName): StateObject[]; + /** + * Gets all registered states + * + * Calling this method with no arguments will return a list of all the states that are currently registered. + * Note: this does not return states that are *queued* but not yet registered. + * + * @return a list of [[StateDeclaration]]s + */ + get(): StateDeclaration[]; + /** + * Gets a registered state + * + * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry. + * Note: this does not return states that are *queued* but not yet registered. + * + * @param stateOrName either the name of a state, or a state object. + * @param base the base state to use when stateOrName is relative. + * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered. + */ + get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration; + decorator(name: string, func: BuilderFunction): Function | BuilderFunction | BuilderFunction[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js new file mode 100644 index 00000000..d49fbb8d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js @@ -0,0 +1,154 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { StateMatcher } from "./stateMatcher"; +import { StateBuilder } from "./stateBuilder"; +import { StateQueueManager } from "./stateQueueManager"; +import { removeFrom } from "../common/common"; +import { propEq } from "../common/hof"; +var StateRegistry = /** @class */ (function () { + /** @internalapi */ + function StateRegistry(_router) { + this._router = _router; + this.states = {}; + this.listeners = []; + this.matcher = new StateMatcher(this.states); + this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory); + this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners); + this._registerRoot(); + } + /** @internalapi */ + StateRegistry.prototype._registerRoot = function () { + var rootStateDef = { + name: '', + url: '^', + views: null, + params: { + '#': { value: null, type: 'hash', dynamic: true } + }, + abstract: true + }; + var _root = this._root = this.stateQueue.register(rootStateDef); + _root.navigable = null; + }; + /** @internalapi */ + StateRegistry.prototype.dispose = function () { + var _this = this; + this.stateQueue.dispose(); + this.listeners = []; + this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); }); + }; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + StateRegistry.prototype.onStatesChanged = function (listener) { + this.listeners.push(listener); + return function deregisterListener() { + removeFrom(this.listeners)(listener); + }.bind(this); + }; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + StateRegistry.prototype.root = function () { + return this._root; + }; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + StateRegistry.prototype.register = function (stateDefinition) { + return this.stateQueue.register(stateDefinition); + }; + /** @hidden */ + StateRegistry.prototype._deregisterTree = function (state) { + var _this = this; + var all = this.get().map(function (s) { return s.$$state(); }); + var getChildren = function (states) { + var children = all.filter(function (s) { return states.indexOf(s.parent) !== -1; }); + return children.length === 0 ? children : children.concat(getChildren(children)); + }; + var children = getChildren([state]); + var deregistered = [state].concat(children).reverse(); + deregistered.forEach(function (state) { + var $ur = _this._router.urlRouter; + // Remove URL rule + $ur.rules().filter(propEq("state", state)).forEach($ur.removeRule.bind($ur)); + // Remove state from registry + delete _this.states[state.name]; + }); + return deregistered; + }; + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + StateRegistry.prototype.deregister = function (stateOrName) { + var _state = this.get(stateOrName); + if (!_state) + throw new Error("Can't deregister state; not found: " + stateOrName); + var deregisteredStates = this._deregisterTree(_state.$$state()); + this.listeners.forEach(function (listener) { return listener("deregistered", deregisteredStates.map(function (s) { return s.self; })); }); + return deregisteredStates; + }; + StateRegistry.prototype.get = function (stateOrName, base) { + var _this = this; + if (arguments.length === 0) + return Object.keys(this.states).map(function (name) { return _this.states[name].self; }); + var found = this.matcher.find(stateOrName, base); + return found && found.self || null; + }; + StateRegistry.prototype.decorator = function (name, func) { + return this.builder.builder(name, func); + }; + return StateRegistry; +}()); +export { StateRegistry }; +//# sourceMappingURL=stateRegistry.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js.map new file mode 100644 index 00000000..8ceb8c3b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateRegistry.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateRegistry.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateRegistry.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAYvC;IAUE,mBAAmB;IACnB,uBAAoB,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;QAT7B,WAAM,GAAmC,EAAE,CAAC;QAMpD,cAAS,GAA4B,EAAE,CAAC;QAItC,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,C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AAI,IAAI,CAAC;IACrC,CAAC;IAED,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IACH,oBAAC;AAAD,CAAC,AAlLD,IAkLC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.d.ts new file mode 100644 index 00000000..9214873a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.d.ts @@ -0,0 +1,349 @@ +import { HookResult, TransitionOptions } from '../transition/interface'; +import { Transition } from '../transition/transition'; +import { HrefOptions, LazyLoadResult, StateDeclaration, StateOrName, TransitionPromise } from './interface'; +import { StateObject } from './stateObject'; +import { TargetState } from './targetState'; +import { RawParams } from '../params/interface'; +import { UIRouter } from '../router'; +import { UIInjector } from '../interface'; +import { StateParams } from '../params/stateParams'; +export declare type OnInvalidCallback = (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult; +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +export declare class StateService { + private router; + /** @internalapi */ + invalidCallbacks: OnInvalidCallback[]; + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + transition: Transition; + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + params: StateParams; + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + current: StateDeclaration; + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + $current: StateObject; + /** @internalapi */ + constructor(router: UIRouter); + /** @internalapi */ + dispose(): void; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + private _handleInvalidTargetState(fromPath, toState); + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + onInvalid(callback: OnInvalidCallback): Function; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + reload(reloadState?: StateOrName): Promise; + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + go(to: StateOrName, params?: RawParams, options?: TransitionOptions): TransitionPromise; + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + target(identifier: StateOrName, params?: RawParams, options?: TransitionOptions): TargetState; + private getCurrentPath(); + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + transitionTo(to: StateOrName, toParams?: RawParams, options?: TransitionOptions): TransitionPromise; + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + is(stateOrName: StateOrName, params?: RawParams, options?: { + relative?: StateOrName; + }): boolean; + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + includes(stateOrName: StateOrName, params?: RawParams, options?: TransitionOptions): boolean; + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + href(stateOrName: StateOrName, params: RawParams, options?: HrefOptions): string; + /** @hidden */ + private _defaultErrorHandler; + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + defaultErrorHandler(handler?: (error: any) => void): (error: any) => void; + /** + * Gets a registered [[StateDeclaration]] object + * + * Returns the state declaration object for any specific state, or for all registered states. + * + * @param stateOrName (absolute or relative) If provided, will only get the declaration object for the requested state. + * If not provided, returns an array of ALL states. + * @param base When `stateOrName` is a relative state reference (such as `.bar.baz`), the state will be retrieved relative to this state. + * + * @returns a [[StateDeclaration]] object (or array of all registered [[StateDeclaration]] objects.) + */ + get(stateOrName: StateOrName, base: StateOrName): StateDeclaration; + get(stateOrName: StateOrName): StateDeclaration; + get(): StateDeclaration[]; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + lazyLoad(stateOrName: StateOrName, transition?: Transition): Promise; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js new file mode 100644 index 00000000..8d0d82ce --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js @@ -0,0 +1,570 @@ +/** + * @coreapi + * @module state + */ +/** */ +import { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } from '../common/common'; +import { isDefined, isObject, isString } from '../common/predicates'; +import { Queue } from '../common/queue'; +import { services } from '../common/coreservices'; +import { PathUtils } from '../path/pathFactory'; +import { PathNode } from '../path/pathNode'; +import { defaultTransOpts } from '../transition/transitionService'; +import { Rejection, RejectType } from '../transition/rejectFactory'; +import { TargetState } from './targetState'; +import { Param } from '../params/param'; +import { Glob } from '../common/glob'; +import { ResolveContext } from '../resolve/resolveContext'; +import { lazyLoadState } from '../hooks/lazyLoad'; +import { not, val } from '../common/hof'; +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +var StateService = /** @class */ (function () { + /** @internalapi */ + function StateService(router) { + this.router = router; + /** @internalapi */ + this.invalidCallbacks = []; + /** @hidden */ + this._defaultErrorHandler = function $defaultErrorHandler($error$) { + if ($error$ instanceof Error && $error$.stack) { + console.error($error$); + console.error($error$.stack); + } + else if ($error$ instanceof Rejection) { + console.error($error$.toString()); + if ($error$.detail && $error$.detail.stack) + console.error($error$.detail.stack); + } + else { + console.error($error$); + } + }; + var getters = ['current', '$current', 'params', 'transition']; + var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters))); + createProxyFunctions(val(StateService.prototype), this, val(this), boundFns); + } + Object.defineProperty(StateService.prototype, "transition", { + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + get: function () { return this.router.globals.transition; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "params", { + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + get: function () { return this.router.globals.params; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "current", { + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + get: function () { return this.router.globals.current; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "$current", { + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + get: function () { return this.router.globals.$current; }, + enumerable: true, + configurable: true + }); + /** @internalapi */ + StateService.prototype.dispose = function () { + this.defaultErrorHandler(noop); + this.invalidCallbacks = []; + }; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + StateService.prototype._handleInvalidTargetState = function (fromPath, toState) { + var _this = this; + var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath); + var globals = this.router.globals; + var latestThing = function () { return globals.transitionHistory.peekTail(); }; + var latest = latestThing(); + var callbackQueue = new Queue(this.invalidCallbacks.slice()); + var injector = new ResolveContext(fromPath).injector(); + var checkForRedirect = function (result) { + if (!(result instanceof TargetState)) { + return; + } + var target = result; + // Recreate the TargetState, in case the state is now defined. + target = _this.target(target.identifier(), target.params(), target.options()); + if (!target.valid()) { + return Rejection.invalid(target.error()).toPromise(); + } + if (latestThing() !== latest) { + return Rejection.superseded().toPromise(); + } + return _this.transitionTo(target.identifier(), target.params(), target.options()); + }; + function invokeNextCallback() { + var nextCallback = callbackQueue.dequeue(); + if (nextCallback === undefined) + return Rejection.invalid(toState.error()).toPromise(); + var callbackResult = services.$q.when(nextCallback(toState, fromState, injector)); + return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); }); + } + return invokeNextCallback(); + }; + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + StateService.prototype.onInvalid = function (callback) { + this.invalidCallbacks.push(callback); + return function deregisterListener() { + removeFrom(this.invalidCallbacks)(callback); + }.bind(this); + }; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + StateService.prototype.reload = function (reloadState) { + return this.transitionTo(this.current, this.params, { + reload: isDefined(reloadState) ? reloadState : true, + inherit: false, + notify: false, + }); + }; + ; + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + StateService.prototype.go = function (to, params, options) { + var defautGoOpts = { relative: this.$current, inherit: true }; + var transOpts = defaults(options, defautGoOpts, defaultTransOpts); + return this.transitionTo(to, params, transOpts); + }; + ; + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + StateService.prototype.target = function (identifier, params, options) { + if (options === void 0) { options = {}; } + // If we're reloading, find the state object to reload from + if (isObject(options.reload) && !options.reload.name) + throw new Error('Invalid reload state object'); + var reg = this.router.stateRegistry; + options.reloadState = options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative); + if (options.reload && !options.reloadState) + throw new Error("No such reload state '" + (isString(options.reload) ? options.reload : options.reload.name) + "'"); + return new TargetState(this.router.stateRegistry, identifier, params, options); + }; + ; + StateService.prototype.getCurrentPath = function () { + var _this = this; + var globals = this.router.globals; + var latestSuccess = globals.successfulTransitions.peekTail(); + var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; }; + return latestSuccess ? latestSuccess.treeChanges().to : rootPath(); + }; + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + StateService.prototype.transitionTo = function (to, toParams, options) { + var _this = this; + if (toParams === void 0) { toParams = {}; } + if (options === void 0) { options = {}; } + var router = this.router; + var globals = router.globals; + options = defaults(options, defaultTransOpts); + var getCurrent = function () { + return globals.transition; + }; + options = extend(options, { current: getCurrent }); + var ref = this.target(to, toParams, options); + var currentPath = this.getCurrentPath(); + if (!ref.exists()) + return this._handleInvalidTargetState(currentPath, ref); + if (!ref.valid()) + return silentRejection(ref.error()); + /** + * Special handling for Ignored, Aborted, and Redirected transitions + * + * The semantics for the transition.run() promise and the StateService.transitionTo() + * promise differ. For instance, the run() promise may be rejected because it was + * IGNORED, but the transitionTo() promise is resolved because from the user perspective + * no error occurred. Likewise, the transition.run() promise may be rejected because of + * a Redirect, but the transitionTo() promise is chained to the new Transition's promise. + */ + var rejectedTransitionHandler = function (transition) { return function (error) { + if (error instanceof Rejection) { + var isLatest = router.globals.lastStartedTransitionId === transition.$id; + if (error.type === RejectType.IGNORED) { + isLatest && router.urlRouter.update(); + // Consider ignored `Transition.run()` as a successful `transitionTo` + return services.$q.when(globals.current); + } + var detail = error.detail; + if (error.type === RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) { + // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully + // by returning the promise for the new (redirect) `Transition.run()`. + var redirect = transition.redirect(detail); + return redirect.run().catch(rejectedTransitionHandler(redirect)); + } + if (error.type === RejectType.ABORTED) { + isLatest && router.urlRouter.update(); + return services.$q.reject(error); + } + } + var errorHandler = _this.defaultErrorHandler(); + errorHandler(error); + return services.$q.reject(error); + }; }; + var transition = this.router.transitionService.create(currentPath, ref); + var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition)); + silenceUncaughtInPromise(transitionToPromise); // issue #2676 + // Return a promise for the transition, which also has the transition object on it. + return extend(transitionToPromise, { transition: transition }); + }; + ; + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + StateService.prototype.is = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return undefined; + if (this.$current !== state) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + ; + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + StateService.prototype.includes = function (stateOrName, params, options) { + options = defaults(options, { relative: this.$current }); + var glob = isString(stateOrName) && Glob.fromString(stateOrName); + if (glob) { + if (!glob.matches(this.$current.name)) + return false; + stateOrName = this.$current.name; + } + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes; + if (!isDefined(state)) + return undefined; + if (!isDefined(include[state.name])) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return Param.equals(schema, Param.values(schema, params), this.params); + }; + ; + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + StateService.prototype.href = function (stateOrName, params, options) { + var defaultHrefOpts = { + lossy: true, + inherit: true, + absolute: false, + relative: this.$current, + }; + options = defaults(options, defaultHrefOpts); + params = params || {}; + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!isDefined(state)) + return null; + if (options.inherit) + params = this.params.$inherit(params, this.$current, state); + var nav = (state && options.lossy) ? state.navigable : state; + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return this.router.urlRouter.href(nav.url, params, { + absolute: options.absolute, + }); + }; + ; + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + StateService.prototype.defaultErrorHandler = function (handler) { + return this._defaultErrorHandler = handler || this._defaultErrorHandler; + }; + StateService.prototype.get = function (stateOrName, base) { + var reg = this.router.stateRegistry; + if (arguments.length === 0) + return reg.get(); + return reg.get(stateOrName, base || this.$current); + }; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + StateService.prototype.lazyLoad = function (stateOrName, transition) { + var state = this.get(stateOrName); + if (!state || !state.lazyLoad) + throw new Error("Can not lazy load " + stateOrName); + var currentPath = this.getCurrentPath(); + var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath); + transition = transition || this.router.transitionService.create(currentPath, target); + return lazyLoadState(transition, state); + }; + return StateService; +}()); +export { StateService }; +//# sourceMappingURL=stateService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js.map new file mode 100644 index 00000000..a4daddfc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/stateService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateService.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChJ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO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,CAAC,CAAC;QAC/E,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErF,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACH,mBAAC;AAAD,CAAC,AAhjBD,IAgjBC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.d.ts new file mode 100644 index 00000000..c5f37f26 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.d.ts @@ -0,0 +1,104 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { StateDeclaration, StateOrName, TargetStateDef } from "./interface"; +import { TransitionOptions } from "../transition/interface"; +import { StateObject } from "./stateObject"; +import { StateRegistry } from './stateRegistry'; +import { RawParams } from '../params'; +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +export declare class TargetState { + private _stateRegistry; + private _identifier; + private _definition; + private _params; + private _options; + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + constructor(_stateRegistry: StateRegistry, _identifier: StateOrName, _params?: RawParams, _options?: TransitionOptions); + /** The name of the state this object targets */ + name(): string; + /** The identifier used when creating this TargetState */ + identifier(): StateOrName; + /** The target parameter values */ + params(): RawParams; + /** The internal state object (if it was found) */ + $state(): StateObject; + /** The internal state declaration (if it was found) */ + state(): StateDeclaration; + /** The target options */ + options(): TransitionOptions; + /** True if the target state was found */ + exists(): boolean; + /** True if the object is valid */ + valid(): boolean; + /** If the object is invalid, returns the reason why */ + error(): string; + toString(): string; + /** Returns true if the object has a state property that might be a state or state name */ + static isDef: (obj: any) => obj is TargetStateDef; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + withState(state: StateOrName): TargetState; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + withParams(params: RawParams, replace?: boolean): TargetState; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + withOptions(options: TransitionOptions, replace?: boolean): TargetState; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js new file mode 100644 index 00000000..5945636e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js @@ -0,0 +1,147 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { isString } from "../common/predicates"; +import { stringify } from '../common/strings'; +import { extend } from '../common'; +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +var TargetState = /** @class */ (function () { + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + function TargetState(_stateRegistry, _identifier, _params, _options) { + this._stateRegistry = _stateRegistry; + this._identifier = _identifier; + this._identifier = _identifier; + this._params = extend({}, _params || {}); + this._options = extend({}, _options || {}); + this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative); + } + /** The name of the state this object targets */ + TargetState.prototype.name = function () { + return this._definition && this._definition.name || this._identifier; + }; + /** The identifier used when creating this TargetState */ + TargetState.prototype.identifier = function () { + return this._identifier; + }; + /** The target parameter values */ + TargetState.prototype.params = function () { + return this._params; + }; + /** The internal state object (if it was found) */ + TargetState.prototype.$state = function () { + return this._definition; + }; + /** The internal state declaration (if it was found) */ + TargetState.prototype.state = function () { + return this._definition && this._definition.self; + }; + /** The target options */ + TargetState.prototype.options = function () { + return this._options; + }; + /** True if the target state was found */ + TargetState.prototype.exists = function () { + return !!(this._definition && this._definition.self); + }; + /** True if the object is valid */ + TargetState.prototype.valid = function () { + return !this.error(); + }; + /** If the object is invalid, returns the reason why */ + TargetState.prototype.error = function () { + var base = this.options().relative; + if (!this._definition && !!base) { + var stateName = base.name ? base.name : base; + return "Could not resolve '" + this.name() + "' from state '" + stateName + "'"; + } + if (!this._definition) + return "No such state '" + this.name() + "'"; + if (!this._definition.self) + return "State '" + this.name() + "' has an invalid definition"; + }; + TargetState.prototype.toString = function () { + return "'" + this.name() + "'" + stringify(this.params()); + }; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + TargetState.prototype.withState = function (state) { + return new TargetState(this._stateRegistry, state, this._params, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + TargetState.prototype.withParams = function (params, replace) { + if (replace === void 0) { replace = false; } + var newParams = replace ? params : extend({}, this._params, params); + return new TargetState(this._stateRegistry, this._identifier, newParams, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + TargetState.prototype.withOptions = function (options, replace) { + if (replace === void 0) { replace = false; } + var newOpts = replace ? options : extend({}, this._options, options); + return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts); + }; + /** Returns true if the object has a state property that might be a state or state name */ + TargetState.isDef = function (obj) { + return obj && obj.state && (isString(obj.state) || isString(obj.state.name)); + }; + return TargetState; +}()); +export { TargetState }; +//# sourceMappingURL=targetState.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js.map new file mode 100644 index 00000000..94c7dfe9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/state/targetState.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "targetState.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/targetState.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AAKtB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAKE;;;;;;;;;;;;;OAaG;IACH,qBACU,cAA6B,EAC7B,WAAwB,EAChC,OAAmB,EACnB,QAA4B;QAHpB,mBAAc,GAAd,cAAc,CAAe;QAC7B,gBAAW,GAAX,WAAW,CAAa;QAIhC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,IA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AQ,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IApCD,0FAA0F;IACnF,iBAAK,GAAG,UAAC,GAAG;QACf,OAAA,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAArE,CAAqE,CAAC;IAmC5E,kBAAC;CAAA,AA7HD,IA6HC;SA7HY,WAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.d.ts new file mode 100644 index 00000000..f25d3aab --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.d.ts @@ -0,0 +1,46 @@ +import { TreeChanges, TransitionHookPhase } from "./interface"; +import { Transition } from "./transition"; +import { TransitionHook } from "./transitionHook"; +import { TransitionEventType } from "./transitionEventType"; +import { RegisteredHook } from "./hookRegistry"; +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +export declare class HookBuilder { + private transition; + constructor(transition: Transition); + buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[]; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + buildHooks(hookType: TransitionEventType): TransitionHook[]; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js new file mode 100644 index 00000000..bafbda29 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js @@ -0,0 +1,117 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +import { extend, assertPredicate, unnestR, identity } from "../common/common"; +import { isArray } from "../common/predicates"; +import { TransitionHookPhase, TransitionHookScope } from "./interface"; +import { TransitionHook } from "./transitionHook"; +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +var HookBuilder = /** @class */ (function () { + function HookBuilder(transition) { + this.transition = transition; + } + HookBuilder.prototype.buildHooksForPhase = function (phase) { + var _this = this; + var $transitions = this.transition.router.transitionService; + return $transitions._pluginapi._getEvents(phase) + .map(function (type) { return _this.buildHooks(type); }) + .reduce(unnestR, []) + .filter(identity); + }; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + HookBuilder.prototype.buildHooks = function (hookType) { + var transition = this.transition; + var treeChanges = transition.treeChanges(); + // Find all the matching registered hooks for a given hook type + var matchingHooks = this.getMatchingHooks(hookType, treeChanges); + if (!matchingHooks) + return []; + var baseHookOptions = { + transition: transition, + current: transition.options().current + }; + var makeTransitionHooks = function (hook) { + // Fetch the Nodes that caused this hook to match. + var matches = hook.matches(treeChanges); + // Select the PathNode[] that will be used as TransitionHook context objects + var matchingNodes = matches[hookType.criteriaMatchPath.name]; + // Return an array of HookTuples + return matchingNodes.map(function (node) { + var _options = extend({ + bind: hook.bind, + traceData: { hookType: hookType.name, context: node } + }, baseHookOptions); + var state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null; + var transitionHook = new TransitionHook(transition, state, hook, _options); + return { hook: hook, node: node, transitionHook: transitionHook }; + }); + }; + return matchingHooks.map(makeTransitionHooks) + .reduce(unnestR, []) + .sort(tupleSort(hookType.reverseSort)) + .map(function (tuple) { return tuple.transitionHook; }); + }; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges) { + var isCreate = hookType.hookPhase === TransitionHookPhase.CREATE; + // Instance and Global hook registries + var $transitions = this.transition.router.transitionService; + var registries = isCreate ? [$transitions] : [this.transition, $transitions]; + return registries.map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries + .filter(assertPredicate(isArray, "broken event named: " + hookType.name)) // Sanity check + .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array + .filter(function (hook) { return hook.matches(treeChanges); }); // Only those satisfying matchCriteria + }; + return HookBuilder; +}()); +export { HookBuilder }; +/** + * A factory for a sort function for HookTuples. + * + * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares + * the EventHook priority. + * + * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth + * @returns a tuple sort function + */ +function tupleSort(reverseDepthSort) { + if (reverseDepthSort === void 0) { reverseDepthSort = false; } + return function nodeDepthThenPriority(l, r) { + var factor = reverseDepthSort ? -1 : 1; + var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor; + return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority; + }; +} +//# sourceMappingURL=hookBuilder.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js.map new file mode 100644 index 00000000..a162a367 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hookBuilder.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/hookBuilder.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AAEtB,OAAO,EAAC,MAAM,EAAQ,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAEH,mBAAmB,EAAE,mBAAmB,EAC3C,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAOhD;;;;;;;;;;;;;GAaG;AACH;IACE,qBAAoB,UAAsB;QA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AC,QAAQ,CAAC,IAAI,CAAC,EAA3B,CAA2B,CAAC,CAAI,kCAAkC;aAC3G,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,yBAAuB,QAAQ,CAAC,IAAM,CAAC,CAAC,CAAC,eAAe;aACxF,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAsD,uDAAuD;aAChI,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAA+B,sCAAsC;IACtH,CAAC;IACH,kBAAC;AAAD,CAAC,AAjFD,IAiFC;;AAID;;;;;;;;GAQG;AACH,mBAAmB,gBAAwB;IAAxB,iCAAA,EAAA,wBAAwB;IACzC,MAAM,CAAC,+BAA+B,CAAY,EAAE,CAAY;QAC9D,IAAI,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;QAChF,MAAM,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC3E,CAAC,CAAA;AACH,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.d.ts new file mode 100644 index 00000000..1426d33b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.d.ts @@ -0,0 +1,93 @@ +import { IHookRegistry } from "./interface"; +import { HookRegOptions, HookMatchCriteria, TreeChanges, HookMatchCriterion, IMatchingNodes, HookFn } from "./interface"; +import { StateObject } from "../state/stateObject"; +import { TransitionEventType } from "./transitionEventType"; +import { TransitionService } from "./transitionService"; +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +export declare function matchState(state: StateObject, criterion: HookMatchCriterion): boolean; +/** + * @internalapi + * The registration data for a registered transition hook + */ +export declare class RegisteredHook { + tranSvc: TransitionService; + eventType: TransitionEventType; + callback: HookFn; + matchCriteria: HookMatchCriteria; + removeHookFromRegistry: (hook: RegisteredHook) => void; + priority: number; + bind: any; + invokeCount: number; + invokeLimit: number; + _deregistered: boolean; + constructor(tranSvc: TransitionService, eventType: TransitionEventType, callback: HookFn, matchCriteria: HookMatchCriteria, removeHookFromRegistry: (hook: RegisteredHook) => void, options?: HookRegOptions); + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + private _matchingNodes(nodes, criterion); + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + private _getDefaultMatchCriteria(); + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + private _getMatchingNodes(treeChanges); + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + matches(treeChanges: TreeChanges): IMatchingNodes; + deregister(): void; +} +/** @hidden Return a registration function of the requested type. */ +export declare function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType): (matchObject: any, callback: any, options?: {}) => any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js new file mode 100644 index 00000000..5d165e3f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js @@ -0,0 +1,157 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +import { extend, removeFrom, tail, values, identity, map } from "../common/common"; +import { isString, isFunction } from "../common/predicates"; +import { TransitionHookScope, } from "./interface"; // has or is using +import { Glob } from "../common/glob"; +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +export function matchState(state, criterion) { + var toMatch = isString(criterion) ? [criterion] : criterion; + function matchGlobs(_state) { + var globStrings = toMatch; + for (var i = 0; i < globStrings.length; i++) { + var glob = new Glob(globStrings[i]); + if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) { + return true; + } + } + return false; + } + var matchFn = (isFunction(toMatch) ? toMatch : matchGlobs); + return !!matchFn(state); +} +/** + * @internalapi + * The registration data for a registered transition hook + */ +var RegisteredHook = /** @class */ (function () { + function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) { + if (options === void 0) { options = {}; } + this.tranSvc = tranSvc; + this.eventType = eventType; + this.callback = callback; + this.matchCriteria = matchCriteria; + this.removeHookFromRegistry = removeHookFromRegistry; + this.invokeCount = 0; + this._deregistered = false; + this.priority = options.priority || 0; + this.bind = options.bind || null; + this.invokeLimit = options.invokeLimit; + } + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + RegisteredHook.prototype._matchingNodes = function (nodes, criterion) { + if (criterion === true) + return nodes; + var matching = nodes.filter(function (node) { return matchState(node.state, criterion); }); + return matching.length ? matching : null; + }; + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + RegisteredHook.prototype._getDefaultMatchCriteria = function () { + return map(this.tranSvc._pluginapi._getPathTypes(), function () { return true; }); + }; + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + RegisteredHook.prototype._getMatchingNodes = function (treeChanges) { + var _this = this; + var criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria); + var paths = values(this.tranSvc._pluginapi._getPathTypes()); + return paths.reduce(function (mn, pathtype) { + // STATE scope criteria matches against every node in the path. + // TRANSITION scope criteria matches against only the last node in the path + var isStateHook = pathtype.scope === TransitionHookScope.STATE; + var path = treeChanges[pathtype.name] || []; + var nodes = isStateHook ? path : [tail(path)]; + mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name]); + return mn; + }, {}); + }; + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + RegisteredHook.prototype.matches = function (treeChanges) { + var matches = this._getMatchingNodes(treeChanges); + // Check if all the criteria matched the TreeChanges object + var allMatched = values(matches).every(identity); + return allMatched ? matches : null; + }; + RegisteredHook.prototype.deregister = function () { + this.removeHookFromRegistry(this); + this._deregistered = true; + }; + return RegisteredHook; +}()); +export { RegisteredHook }; +/** @hidden Return a registration function of the requested type. */ +export function makeEvent(registry, transitionService, eventType) { + // Create the object which holds the registered transition hooks. + var _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {}); + var hooks = _registeredHooks[eventType.name] = []; + var removeHookFn = removeFrom(hooks); + // Create hook registration function on the IHookRegistry for the event + registry[eventType.name] = hookRegistrationFn; + function hookRegistrationFn(matchObject, callback, options) { + if (options === void 0) { options = {}; } + var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options); + hooks.push(registeredHook); + return registeredHook.deregister.bind(registeredHook); + } + return hookRegistrationFn; +} +//# sourceMappingURL=hookRegistry.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js.map new file mode 100644 index 00000000..ad650289 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hookRegistry.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/hookRegistry.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAC2D,mBAAmB,GACpF,MAAM,aAAa,CAAC,CAAC,kBAAkB;AAMxC,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAKpC;;;;;;;;;;;;GAYG;AACH,MAAM,qBAAqB,KAAkB,EAAE,SAA6B;IAC1E,IAAI,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5D,oBAAoB,MAAmB;QACrC,IAAI,WAAW,GAAc,OAAO,CAAC;QACrC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,IAAI,IAAI,GAAG,IAAI,I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AC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC;AAC5B,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.d.ts new file mode 100644 index 00000000..ebcb8d60 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.d.ts @@ -0,0 +1,22 @@ +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ +export * from "./interface"; +export * from "./hookBuilder"; +export * from "./hookRegistry"; +export * from "./rejectFactory"; +export * from "./transition"; +export * from "./transitionHook"; +export * from "./transitionEventType"; +export * from "./transitionService"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js new file mode 100644 index 00000000..99dfdc01 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js @@ -0,0 +1,23 @@ +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ +export * from "./interface"; +export * from "./hookBuilder"; +export * from "./hookRegistry"; +export * from "./rejectFactory"; +export * from "./transition"; +export * from "./transitionHook"; +export * from "./transitionEventType"; +export * from "./transitionService"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js.map new file mode 100644 index 00000000..bdcac75d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/index.ts" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;;;GAaG,CAAC,kBAAkB;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC", + "sourcesContent": [ + "/**\n * # Transition subsystem\n *\n * This module contains APIs related to a Transition.\n *\n * See:\n * - [[TransitionService]]\n * - [[Transition]]\n * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]]\n *\n * @coreapi\n * @preferred\n * @module transition\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./hookBuilder\";\nexport * from \"./hookRegistry\";\nexport * from \"./rejectFactory\";\nexport * from \"./transition\";\nexport * from \"./transitionHook\";\nexport * from \"./transitionEventType\";\nexport * from \"./transitionService\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.d.ts new file mode 100644 index 00000000..c97f8a77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.d.ts @@ -0,0 +1,794 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +import { StateDeclaration } from "../state/interface"; +import { Predicate } from "../common/common"; +import { Transition } from "./transition"; +import { StateObject } from "../state/stateObject"; +import { PathNode } from "../path/pathNode"; +import { TargetState } from "../state/targetState"; +import { RegisteredHook } from "./hookRegistry"; +/** + * The TransitionOptions object can be used to change the behavior of a transition. + * + * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]]. + * It can also be used with a `uiSref`. + */ +export interface TransitionOptions { + /** + * This option changes how the Transition interacts with the browser's location bar (URL). + * + * - If `true`, it will update the url in the location bar. + * - If `false`, it will not update the url in the location bar. + * - If it is the string `"replace"`, it will update the url and also replace the last history record. + * + * @default `true` + */ + location?: (boolean | string); + /** + * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from. + * @default `$state.current` + */ + relative?: (string | StateDeclaration | StateObject); + /** + * This option sets whether or not the transition's parameter values should be inherited from + * the current parameter values. + * + * - If `true`, it will inherit parameter values from the current parameter values. + * - If `false`, only the parameters which are provided to `transitionTo` will be used. + * + * @default `false` + */ + inherit?: boolean; + /** + * @deprecated + */ + notify?: boolean; + /** + * This option may be used to force states which are currently active to reload. + * + * During a normal transition, a state is "retained" if: + * - It was previously active + * - The state's parameter values have not changed + * - All the parent states' parameter values have not changed + * + * Forcing a reload of a state will cause it to be exited and entered, which will: + * - Refetch that state's resolve data + * - Exit the state (onExit hook) + * - Re-enter the state (onEnter hook) + * - Re-render the views (controllers and templates) + * + * - When `true`, the destination state (and all parent states) will be reloaded. + * - When it is a string and is the name of a state, or when it is a State object, + * that state and any children states will be reloaded. + * + * @default `false` + */ + reload?: (boolean | string | StateDeclaration | StateObject); + /** + * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook + */ + custom?: any; + /** @internalapi */ + reloadState?: (StateObject); + /** @internalapi + * If this transition is a redirect, this property should be the original Transition (which was redirected to this one) + */ + redirectedFrom?: Transition; + /** @internalapi */ + current?: () => Transition; + /** @internalapi */ + source?: "sref" | "url" | "redirect" | "otherwise" | "unknown"; +} +/** @internalapi */ +export interface TransitionHookOptions { + current?: () => Transition; + transition?: Transition; + hookType?: string; + target?: any; + traceData?: any; + bind?: any; + stateHook?: boolean; +} +/** + * TreeChanges encapsulates the various Paths that are involved in a Transition. + * + * Get a TreeChanges object using [[Transition.treeChanges]] + * + * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition, + * this object stores the "to" and "from" paths, as well as subsets of those: the "retained", + * "exiting" and "entering" paths. + * + * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion + * of a nested state. + * + * For example, if you had a nested state named `foo.bar.baz`, it would have three + * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]] + * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`. + * + * --- + * + * @todo show visual state tree + */ +export interface TreeChanges { + /** @nodoc */ + [key: string]: PathNode[]; + /** The path of nodes in the state tree that the transition is coming *from* */ + from: PathNode[]; + /** The path of nodes in the state tree that the transition is going *to* */ + to: PathNode[]; + /** + * The path of active nodes that the transition is retaining. + * + * These nodes are neither exited, nor entered. + * Before and after the transition is successful, these nodes are active. + */ + retained: PathNode[]; + /** + * The path of previously active nodes that the transition is exiting. + * + * After the Transition is successful, these nodes are no longer active. + * + * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the + * `exiting` and `entering` paths. + */ + exiting: PathNode[]; + /** + * The path of nodes that the transition is entering. + * + * After the Transition is successful, these nodes will be active. + * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views + * (component(s) or controller(s)+template(s)) refreshed. + * + * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the + * `exiting` and `entering` paths. + */ + entering: PathNode[]; +} +export declare type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function; +/** + * The signature for Transition Hooks. + * + * Transition hooks are callback functions that hook into the lifecycle of transitions. + * As a transition runs, it reaches certain lifecycle events. + * As each event occurs, the hooks which are registered for the event are called (in priority order). + * + * A transition hook may alter a Transition by returning a [[HookResult]]. + * + * #### See: + * + * - [[IHookRegistry.onBefore]] + * - [[IHookRegistry.onStart]] + * - [[IHookRegistry.onFinish]] + * - [[IHookRegistry.onSuccess]] + * - [[IHookRegistry.onError]] + * + * @param transition the current [[Transition]] + * @param injector (for ng1 or ng2 only) the injector service + * + * @returns a [[HookResult]] which may alter the transition + * + */ +export interface TransitionHookFn { + (transition: Transition): HookResult; +} +/** + * The signature for Transition State Hooks. + * + * A function which hooks into a lifecycle event for a specific state. + * + * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition. + * As a transition runs, it may exit some states, retain (keep) states, and enter states. + * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order). + * + * #### See: + * + * - [[IHookRegistry.onExit]] + * - [[IHookRegistry.onRetain]] + * - [[IHookRegistry.onEnter]] + * + * @param transition the current [[Transition]] + * @param state the [[StateObject]] that the hook is bound to + * @param injector (for ng1 or ng2 only) the injector service + * + * @returns a [[HookResult]] which may alter the transition + */ +export interface TransitionStateHookFn { + (transition: Transition, state: StateDeclaration): HookResult; +} +/** + * The signature for Transition onCreate Hooks. + * + * Transition onCreate Hooks are callbacks that allow customization or preprocessing of + * a Transition before it is returned from [[TransitionService.create]] + * + * @param transition the [[Transition]] that was just created + * @return a [[Transition]] which will then be returned from [[TransitionService.create]] + */ +export interface TransitionCreateHookFn { + (transition: Transition): void; +} +export declare type HookFn = (TransitionHookFn | TransitionStateHookFn | TransitionCreateHookFn); +/** + * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]] + * + * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]: + * + * - `false`: the transition will be cancelled. + * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]]) + * - `Promise`: the transition will wait for the promise to resolve or reject + * - If the promise is rejected (or resolves to `false`), the transition will be cancelled + * - If the promise resolves to a [[TargetState]], the transition will be redirected + * - If the promise resolves to anything else, the transition will resume + * - Anything else: the transition will resume + */ +export declare type HookResult = (boolean | TargetState | void | Promise); +/** + * These options may be provided when registering a Transition Hook (such as `onStart`) + */ +export interface HookRegOptions { + /** + * Sets the priority of the registered hook + * + * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority + * is invoked before a hook with a lower priority. + * + * The default hook priority is 0 + */ + priority?: number; + /** + * Specifies what `this` is bound to during hook invocation. + */ + bind?: any; + /** + * Limits the number of times that the hook will be invoked. + * Once the hook has been invoked this many times, it is automatically deregistered. + */ + invokeLimit?: number; +} +/** + * This interface specifies the api for registering Transition Hooks. Both the + * [[TransitionService]] and also the [[Transition]] object itself implement this interface. + * Note: the Transition object only allows hooks to be registered before the Transition is started. + */ +export interface IHookRegistry { + /** + * Registers a [[TransitionHookFn]], called *before a transition starts*. + * + * Registers a transition lifecycle hook, which is invoked before a transition even begins. + * This hook can be useful to implement logic which prevents a transition from even starting, such + * as authentication, redirection + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onBefore` hooks are invoked *before a Transition starts*. + * No resolves have been fetched yet. + * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]]. + * The registered `onBefore` hooks are invoked in priority order. + * + * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance. + * These "on-the-fly" hooks only affect the currently running transition.. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning + * a [[TargetState]]), the remainder of the hooks are skipped. + * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously. + * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition. + * + * ### Examples + * + * #### Default Substate + * + * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a + * "default substate". + * + * @example + * ```js + * // ng2 + * transitionService.onBefore({ to: 'home' }, (trans: Transition) => + * trans.router.stateService.target("home.dashboard")); + * ``` + * + * #### Data Driven Default Substate + * + * This example provides data-driven default substate functionality. It matches on a transition to any state + * which has `defaultSubstate: "some.sub.state"` defined. See: [[Transition.to]] which returns the "to state" + * definition. + * + * @example + * ```js + * // ng1 + * // state declaration + * { + * name: 'home', + * template: '
    ', + * defaultSubstate: 'home.dashboard' + * } + * + * var criteria = { + * to: function(state) { + * return state.defaultSubstate != null; + * } + * } + * + * $transitions.onBefore(criteria, function(trans: Transition) { + * var substate = trans.to().defaultSubstate; + * return trans.router.stateService.target(substate); + * }); + * ``` + * + * + * #### Require authentication + * + * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated. + * + * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state. + * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`. + * + * #### Example: + * ```js + * // ng1 + * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) { + * var myAuthService = trans.injector().get('MyAuthService'); + * // If isAuthenticated returns false, the transition is cancelled. + * return myAuthService.isAuthenticated(); + * }); + * ``` + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @returns a function which deregisters the hook. + */ + onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called when a transition starts. + * + * Registers a transition lifecycle hook, which is invoked as a transition starts running. + * This hook can be useful to perform some asynchronous action before completing a transition. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onStart` hooks are invoked asynchronously when the Transition starts running. + * This happens after the `onBefore` phase is complete. + * At this point, the Transition has not yet exited nor entered any states. + * The registered `onStart` hooks are invoked in priority order. + * + * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Example + * + * #### Login during transition + * + * This example intercepts any transition to a state which requires authentication, when the user is + * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the + * transition. If the user did not authenticate successfully, it redirects to the "guest" state, which + * does not require authentication. + * + * This example assumes: + * - a state tree where all states which require authentication are children of a parent `'auth'` state. + * - `MyAuthService.isAuthenticated()` synchronously returns a boolean. + * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved + * or rejected, whether or not the login attempt was successful. + * + * #### Example: + * ```js + * // ng1 + * $transitions.onStart( { to: 'auth.**' }, function(trans) { + * var $state = trans.router.stateService; + * var MyAuthService = trans.injector().get('MyAuthService'); + * + * // If the user is not authenticated + * if (!MyAuthService.isAuthenticated()) { + * + * // Then return a promise for a successful login. + * // The transition will wait for this promise to settle + * + * return MyAuthService.authenticate().catch(function() { + * + * // If the authenticate() method failed for whatever reason, + * // redirect to a 'guest' state which doesn't require auth. + * return $state.target("guest"); + * }); + * } + * }); + * ``` + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is entered. + * + * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered. + * + * Since this hook is run only when the specific state is being *entered*, it can be useful for + * performing tasks when entering a submodule/feature area such as initializing a stateful service, + * or for guarding access to a submodule/feature area. + * + * See [[TransitionStateHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onEnter` hooks generally specify `{ entering: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onEnter` hooks are invoked when the Transition is entering a state. + * States are entered after the `onRetain` phase is complete. + * If more than one state is being entered, the parent state is entered first. + * The registered `onEnter` hooks for a state are invoked in priority order. + * + * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook + * directly on a state declaration (see: [[StateDeclaration.onEnter]]). + * + * + * ### Examples + * + * #### Audit Log + * + * This example uses a service to log that a user has entered the admin section of an app. + * This assumes that there are substates of the "admin" state, such as "admin.users", "admin.pages", etc. + * @example + * ``` + * + * $transitions.onEnter({ entering: 'admin' }, function(transition, state) { + * var AuditService = trans.injector().get('AuditService'); + * AuditService.log("Entered " + state.name + " module while transitioning to " + transition.to().name); + * } + * ``` + * + * #### Audit Log (inside a state declaration) + * + * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example. + * ``` + * { + * name: 'admin', + * component: 'admin', + * onEnter: function($transition$, $state$) { + * var AuditService = $transition$.injector().get('AuditService'); + * AuditService.log("Entered " + state.name + " module while transitioning to " + transition.to().name); + * } + * } + * ``` + * + * Note: A state declaration's `onEnter` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept. + * + * Registers a lifecycle hook, which is invoked (during a transition) for + * a specific state that was previously active will remain active (is not being entered nor exited). + * + * This hook is invoked when a state is "retained" or "kept". + * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state. + * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onRetain` hooks generally specify `{ retained: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onRetain` hooks are invoked after any `onExit` hooks have been fired. + * If more than one state is retained, the child states' `onRetain` hooks are invoked first. + * The registered `onRetain` hooks for a state are invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook + * directly on a state declaration (see: [[StateDeclaration.onRetain]]). + * + * Note: A state declaration's `onRetain` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is exited. + * + * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited. + * + * Since this hook is run only when the specific state is being *exited*, it can be useful for + * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service, + * or for preventing the user from leaving a state or submodule until some criteria is satisfied. + * + * See [[TransitionStateHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onExit` hooks generally specify `{ exiting: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onExit` hooks are invoked when the Transition is exiting a state. + * States are exited after any `onStart` phase is complete. + * If more than one state is being exited, the child states are exited first. + * The registered `onExit` hooks for a state are invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook + * directly on a state declaration (see: [[StateDeclaration.onExit]]). + * + * Note: A state declaration's `onExit` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called *just before a transition finishes*. + * + * Registers a transition lifecycle hook, which is invoked just before a transition finishes. + * This hook is a last chance to cancel or redirect a transition. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onFinish` hooks are invoked after the `onEnter` phase is complete. + * These hooks are invoked just before the transition is "committed". + * Each hook is invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called after a successful transition completed. + * + * Registers a transition lifecycle hook, which is invoked after a transition successfully completes. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]). + * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked. + * Since these hooks are run after the transition is over, their return value is ignored. + * The `onSuccess` hooks are invoked in priority order. + * + * ### Return value + * + * Since the Transition is already completed, the hook's return value is ignored + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called after a transition has errored. + * + * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]). + * If a Transition fails, its promise is rejected and the `onError` hooks are invoked. + * The `onError` hooks are invoked in priority order. + * + * Since these hooks are run after the transition is over, their return value is ignored. + * + * A transition "errors" if it was started, but failed to complete (for any reason). + * A *non-exhaustive list* of reasons a transition can error: + * + * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`) + * - A transition was cancelled by a Transition Hook returning false + * - A transition was redirected by a Transition Hook returning a [[TargetState]] + * - A Transition Hook or resolve function threw an error + * - A Transition Hook returned a rejected promise + * - A resolve function returned a rejected promise + * + * To check the failure reason, inspect the return value of [[Transition.error]]. + * + * Note: `onError` should be used for targeted error handling, or error recovery. + * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]]. + * + * ### Return value + * + * Since the Transition is already completed, the hook's return value is ignored + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Returns all the registered hooks of a given `hookName` type + * + * #### Example: + * ``` + * $transitions.getHooks("onEnter") + * ``` + */ + getHooks(hookName: string): RegisteredHook[]; + /** @hidden place to store the hooks */ + _registeredHooks: { + [key: string]: RegisteredHook[]; + }; +} +/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */ +export declare type IStateMatch = Predicate; +/** + * This object is used to configure whether or not a Transition Hook is invoked for a particular transition, + * based on the Transition's "to state" and "from state". + * + * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string, + * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]]) + * + * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches. + * To match any transition, use an empty criteria object `{}`. + * + * #### Example: + * ```js + * // This matches a transition coming from the `parent` state and going to the `parent.child` state. + * var match = { + * to: 'parent', + * from: 'parent.child' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state. + * var match = { + * to: 'parent', + * from: 'parent.**' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any state and going to any substate of `mymodule` + * var match = { + * to: 'mymodule.**' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any state and going to any state that has `data.authRequired` + * // set to a truthy value. + * var match = { + * to: function(state) { + * return state.data != null && state.data.authRequired === true; + * } + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition that is exiting `parent.child` + * var match = { + * exiting: 'parent.child' + * } + * ``` + */ +export interface HookMatchCriteria { + [key: string]: HookMatchCriterion | undefined; + /** A [[HookMatchCriterion]] to match the destination state */ + to?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match the original (from) state */ + from?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be exiting */ + exiting?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be retained */ + retained?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be entering */ + entering?: HookMatchCriterion; +} +export interface IMatchingNodes { + [key: string]: PathNode[]; + to: PathNode[]; + from: PathNode[]; + exiting: PathNode[]; + retained: PathNode[]; + entering: PathNode[]; +} +/** @hidden */ +export interface RegisteredHooks { + [key: string]: RegisteredHook[]; +} +/** @hidden */ +export interface PathTypes { + [key: string]: PathType; + to: PathType; + from: PathType; + exiting: PathType; + retained: PathType; + entering: PathType; +} +/** @hidden */ +export interface PathType { + name: string; + scope: TransitionHookScope; +} +/** + * Hook Criterion used to match a transition. + * + * A [[Glob]] string that matches the name of a state. + * + * Or, a function with the signature `function(state) { return matches; }` + * which should return a boolean to indicate if a state matches. + * + * Or, `true` to always match + */ +export declare type HookMatchCriterion = (string | IStateMatch | boolean); +export declare enum TransitionHookPhase { + CREATE = 0, + BEFORE = 1, + RUN = 2, + SUCCESS = 3, + ERROR = 4, +} +export declare enum TransitionHookScope { + TRANSITION = 0, + STATE = 1, +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js new file mode 100644 index 00000000..e8f16b2b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js @@ -0,0 +1,14 @@ +export var TransitionHookPhase; +(function (TransitionHookPhase) { + TransitionHookPhase[TransitionHookPhase["CREATE"] = 0] = "CREATE"; + TransitionHookPhase[TransitionHookPhase["BEFORE"] = 1] = "BEFORE"; + TransitionHookPhase[TransitionHookPhase["RUN"] = 2] = "RUN"; + TransitionHookPhase[TransitionHookPhase["SUCCESS"] = 3] = "SUCCESS"; + TransitionHookPhase[TransitionHookPhase["ERROR"] = 4] = "ERROR"; +})(TransitionHookPhase || (TransitionHookPhase = {})); +export var TransitionHookScope; +(function (TransitionHookScope) { + TransitionHookScope[TransitionHookScope["TRANSITION"] = 0] = "TRANSITION"; + TransitionHookScope[TransitionHookScope["STATE"] = 1] = "STATE"; +})(TransitionHookScope || (TransitionHookScope = {})); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js.map new file mode 100644 index 00000000..f81ee1f9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/interface.ts" + ], + "names": [], + "mappings": "AAwzBA,MAAM,CAAN,IAAY,mBAA2D;AAAvE,WAAY,mBAAmB;IAAG,iEAAM,CAAA;IAAE,iEAAM,CAAA;IAAE,2DAAG,CAAA;IAAE,mEAAO,CAAA;IAAE,+DAAK,CAAA;AAAC,CAAC,EAA3D,mBAAmB,KAAnB,mBAAmB,QAAwC;AACvE,MAAM,CAAN,IAAY,mBAAyC;AAArD,WAAY,mBAAmB;IAAG,yEAAU,CAAA;IAAE,+DAAK,CAAA;AAAC,CAAC,EAAzC,mBAAmB,KAAnB,mBAAmB,QAAsB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.d.ts new file mode 100644 index 00000000..d3d915f3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.d.ts @@ -0,0 +1,41 @@ +export declare enum RejectType { + SUPERSEDED = 2, + ABORTED = 3, + INVALID = 4, + IGNORED = 5, + ERROR = 6, +} +export declare class Rejection { + $id: number; + type: number; + message: string; + detail: any; + redirected: boolean; + constructor(type: number, message?: string, detail?: any); + toString(): string; + toPromise(): Promise; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + static isRejectionPromise(obj: any): boolean; + /** Returns a Rejection due to transition superseded */ + static superseded(detail?: any, options?: any): Rejection; + /** Returns a Rejection due to redirected transition */ + static redirected(detail?: any): Rejection; + /** Returns a Rejection due to invalid transition */ + static invalid(detail?: any): Rejection; + /** Returns a Rejection due to ignored transition */ + static ignored(detail?: any): Rejection; + /** Returns a Rejection due to aborted transition */ + static aborted(detail?: any): Rejection; + /** Returns a Rejection due to aborted transition */ + static errored(detail?: any): Rejection; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + static normalize(detail?: Rejection | Error | any): Rejection; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js new file mode 100644 index 00000000..f6383f25 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js @@ -0,0 +1,88 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +"use strict"; +import { extend, silentRejection } from "../common/common"; +import { stringify } from "../common/strings"; +import { is } from '../common/hof'; +export var RejectType; +(function (RejectType) { + RejectType[RejectType["SUPERSEDED"] = 2] = "SUPERSEDED"; + RejectType[RejectType["ABORTED"] = 3] = "ABORTED"; + RejectType[RejectType["INVALID"] = 4] = "INVALID"; + RejectType[RejectType["IGNORED"] = 5] = "IGNORED"; + RejectType[RejectType["ERROR"] = 6] = "ERROR"; +})(RejectType || (RejectType = {})); +/** @hidden */ var id = 0; +var Rejection = /** @class */ (function () { + function Rejection(type, message, detail) { + this.$id = id++; + this.type = type; + this.message = message; + this.detail = detail; + } + Rejection.prototype.toString = function () { + var detailString = function (d) { + return d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d); + }; + var detail = detailString(this.detail); + var _a = this, $id = _a.$id, type = _a.type, message = _a.message; + return "Transition Rejection($id: " + $id + " type: " + type + ", message: " + message + ", detail: " + detail + ")"; + }; + Rejection.prototype.toPromise = function () { + return extend(silentRejection(this), { _transitionRejection: this }); + }; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + Rejection.isRejectionPromise = function (obj) { + return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection); + }; + /** Returns a Rejection due to transition superseded */ + Rejection.superseded = function (detail, options) { + var message = "The transition has been superseded by a different transition"; + var rejection = new Rejection(RejectType.SUPERSEDED, message, detail); + if (options && options.redirected) { + rejection.redirected = true; + } + return rejection; + }; + /** Returns a Rejection due to redirected transition */ + Rejection.redirected = function (detail) { + return Rejection.superseded(detail, { redirected: true }); + }; + /** Returns a Rejection due to invalid transition */ + Rejection.invalid = function (detail) { + var message = "This transition is invalid"; + return new Rejection(RejectType.INVALID, message, detail); + }; + /** Returns a Rejection due to ignored transition */ + Rejection.ignored = function (detail) { + var message = "The transition was ignored"; + return new Rejection(RejectType.IGNORED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.aborted = function (detail) { + var message = "The transition has been aborted"; + return new Rejection(RejectType.ABORTED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.errored = function (detail) { + var message = "The transition errored"; + return new Rejection(RejectType.ERROR, message, detail); + }; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + Rejection.normalize = function (detail) { + return is(Rejection)(detail) ? detail : Rejection.errored(detail); + }; + return Rejection; +}()); +export { Rejection }; +//# sourceMappingURL=rejectFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js.map new file mode 100644 index 00000000..9e56c166 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "rejectFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/rejectFactory.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,YAAY,CAAC;AACb,OAAO,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OAAO,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED,oDAAoD;IAC7C,iBAAO,GAAd,UAAe,MAAY;QACzB,IAAI,OAAO,GAAG,wBAAwB,CAAC;QACvC,MAAM,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACI,mBAAS,GAAhB,UAAiB,MAAgC;QAC/C,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IACH,gBAAC;AAAD,CAAC,AAjFD,IAiFC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.d.ts new file mode 100644 index 00000000..409efc0c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.d.ts @@ -0,0 +1,450 @@ +import { StateDeclaration, StateOrName } from '../state/interface'; +import { TransitionOptions, TreeChanges, IHookRegistry, RegisteredHooks, HookRegOptions, HookMatchCriteria, TransitionStateHookFn, TransitionHookFn } from './interface'; +import { RegisteredHook } from './hookRegistry'; +import { PathNode } from '../path/pathNode'; +import { StateObject } from '../state/stateObject'; +import { TargetState } from '../state/targetState'; +import { Resolvable } from '../resolve/resolvable'; +import { ViewConfig } from '../view/interface'; +import { UIRouter } from '../router'; +import { UIInjector } from '../interface'; +import { ResolvableLiteral } from '../resolve/interface'; +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +export declare class Transition implements IHookRegistry { + /** @hidden */ + static diToken: typeof Transition; + /** + * A unique identifier for the transition. + * + * This is an auto incrementing integer, starting from `0`. + */ + $id: number; + /** + * A reference to the [[UIRouter]] instance + * + * This reference can be used to access the router services, such as the [[StateService]] + */ + router: UIRouter; + /** @hidden */ + private _deferred; + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + promise: Promise; + /** + * A boolean which indicates if the transition was successful + * + * After a successful transition, this value is set to true. + * After an unsuccessful transition, this value is set to false. + * + * The value will be undefined if the transition is not complete + */ + success: boolean; + /** @hidden */ + _aborted: boolean; + /** @hidden */ + private _error; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + _registeredHooks: RegisteredHooks; + /** @hidden */ + private _options; + /** @hidden */ + private _treeChanges; + /** @hidden */ + private _targetState; + /** @hidden */ + private _hookBuilder; + /** @hidden */ + onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + private createTransitionHookRegFns(); + /** @internalapi */ + getHooks(hookName: string): RegisteredHook[]; + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter); + private applyViewConfigs(router); + /** + * @internalapi + * + * @returns the internal from [State] object + */ + $from(): StateObject; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + $to(): StateObject; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + from(): StateDeclaration; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + to(): StateDeclaration; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + targetState(): TargetState; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + is(compare: (Transition | { + to?: any; + from?: any; + })): boolean; + /** + * Gets transition parameter values + * + * Returns the parameter values for a transition as key/value pairs. + * This object is immutable. + * + * By default, returns the new parameter values (for the "to state"). + * + * #### Example: + * ```js + * var toParams = transition.params(); + * ``` + * + * To return the previous parameter values, supply `'from'` as the `pathname` argument. + * + * #### Example: + * ```js + * var fromParams = transition.params('from'); + * ``` + * + * @param pathname the name of the treeChanges path to get parameter values for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * + * @returns transition parameter values for the desired path. + */ + params(pathname?: string): any; + params(pathname?: string): T; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + injector(state?: StateOrName, pathName?: string): UIInjector; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + getResolveTokens(pathname?: string): any[]; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + addResolvable(resolvable: Resolvable | ResolvableLiteral, state?: StateOrName): void; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + redirectedFrom(): Transition; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + originalTransition(): Transition; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + options(): TransitionOptions; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + entering(): StateDeclaration[]; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + exiting(): StateDeclaration[]; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + retained(): StateDeclaration[]; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + views(pathname?: string, state?: StateObject): ViewConfig[]; + /** + * Return the transition's tree changes + * + * A transition goes from one state/parameters to another state/parameters. + * During a transition, states are entered and/or exited. + * + * This function returns various branches (paths) which represent the changes to the + * active state tree that are caused by the transition. + * + * @param pathname The name of the tree changes path to get: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + */ + treeChanges(pathname: string): PathNode[]; + treeChanges(): TreeChanges; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + redirect(targetState: TargetState): Transition; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + private _changedParams(); + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + dynamic(): boolean; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + ignored(): boolean; + /** @hidden */ + _ignoredReason(): "SameAsCurrent" | "SameAsPending" | undefined; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + run(): Promise; + /** Checks if this transition is currently active/running. */ + isActive: () => boolean; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + valid(): boolean; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + abort(): void; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + error(): any; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + toString(): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js new file mode 100644 index 00000000..b36074cd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js @@ -0,0 +1,628 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { trace } from '../common/trace'; +import { services } from '../common/coreservices'; +import { stringify } from '../common/strings'; +import { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common'; +import { isObject, isUndefined } from '../common/predicates'; +import { prop, propEq, val, not, is } from '../common/hof'; +import { TransitionHookPhase, } from './interface'; // has or is using +import { TransitionHook } from './transitionHook'; +import { matchState, makeEvent } from './hookRegistry'; +import { HookBuilder } from './hookBuilder'; +import { PathUtils } from '../path/pathFactory'; +import { Param } from '../params/param'; +import { Resolvable } from '../resolve/resolvable'; +import { ResolveContext } from '../resolve/resolveContext'; +/** @hidden */ +var stateSelf = prop("self"); +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +var Transition = /** @class */ (function () { + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + function Transition(fromPath, targetState, router) { + var _this = this; + /** @hidden */ + this._deferred = services.$q.defer(); + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + this.promise = this._deferred.promise; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + this._registeredHooks = {}; + /** @hidden */ + this._hookBuilder = new HookBuilder(this); + /** Checks if this transition is currently active/running. */ + this.isActive = function () { + return _this.router.globals.transition === _this; + }; + this.router = router; + this._targetState = targetState; + if (!targetState.valid()) { + throw new Error(targetState.error()); + } + // current() is assumed to come from targetState.options, but provide a naive implementation otherwise. + this._options = extend({ current: val(this) }, targetState.options()); + this.$id = router.transitionService._transitionCount++; + var toPath = PathUtils.buildToPath(fromPath, targetState); + this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState); + this.createTransitionHookRegFns(); + var onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE); + TransitionHook.invokeHooks(onCreateHooks, function () { return null; }); + this.applyViewConfigs(router); + } + /** @hidden */ + Transition.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onError = function (criteria, callback, options) { return; }; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + Transition.prototype.createTransitionHookRegFns = function () { + var _this = this; + this.router.transitionService._pluginapi._getEvents() + .filter(function (type) { return type.hookPhase !== TransitionHookPhase.CREATE; }) + .forEach(function (type) { return makeEvent(_this, _this.router.transitionService, type); }); + }; + /** @internalapi */ + Transition.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + Transition.prototype.applyViewConfigs = function (router) { + var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; }); + PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates); + }; + /** + * @internalapi + * + * @returns the internal from [State] object + */ + Transition.prototype.$from = function () { + return tail(this._treeChanges.from).state; + }; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + Transition.prototype.$to = function () { + return tail(this._treeChanges.to).state; + }; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + Transition.prototype.from = function () { + return this.$from().self; + }; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + Transition.prototype.to = function () { + return this.$to().self; + }; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + Transition.prototype.targetState = function () { + return this._targetState; + }; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + Transition.prototype.is = function (compare) { + if (compare instanceof Transition) { + // TODO: Also compare parameters + return this.is({ to: compare.$to().name, from: compare.$from().name }); + } + return !((compare.to && !matchState(this.$to(), compare.to)) || + (compare.from && !matchState(this.$from(), compare.from))); + }; + Transition.prototype.params = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return Object.freeze(this._treeChanges[pathname].map(prop("paramValues")).reduce(mergeR, {})); + }; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + Transition.prototype.injector = function (state, pathName) { + if (pathName === void 0) { pathName = "to"; } + var path = this._treeChanges[pathName]; + if (state) + path = PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; }); + return new ResolveContext(path).injector(); + }; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + Transition.prototype.getResolveTokens = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return new ResolveContext(this._treeChanges[pathname]).getTokens(); + }; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + Transition.prototype.addResolvable = function (resolvable, state) { + if (state === void 0) { state = ""; } + resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable); + var stateName = (typeof state === "string") ? state : state.name; + var topath = this._treeChanges.to; + var targetNode = find(topath, function (node) { return node.state.name === stateName; }); + var resolveContext = new ResolveContext(topath); + resolveContext.addResolvables([resolvable], targetNode.state); + }; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + Transition.prototype.redirectedFrom = function () { + return this._options.redirectedFrom || null; + }; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + Transition.prototype.originalTransition = function () { + var rf = this.redirectedFrom(); + return (rf && rf.originalTransition()) || this; + }; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + Transition.prototype.options = function () { + return this._options; + }; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + Transition.prototype.entering = function () { + return map(this._treeChanges.entering, prop('state')).map(stateSelf); + }; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + Transition.prototype.exiting = function () { + return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse(); + }; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + Transition.prototype.retained = function () { + return map(this._treeChanges.retained, prop('state')).map(stateSelf); + }; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + Transition.prototype.views = function (pathname, state) { + if (pathname === void 0) { pathname = "entering"; } + var path = this._treeChanges[pathname]; + path = !state ? path : path.filter(propEq('state', state)); + return path.map(prop("views")).filter(identity).reduce(unnestR, []); + }; + Transition.prototype.treeChanges = function (pathname) { + return pathname ? this._treeChanges[pathname] : this._treeChanges; + }; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + Transition.prototype.redirect = function (targetState) { + var redirects = 1, trans = this; + while ((trans = trans.redirectedFrom()) != null) { + if (++redirects > 20) + throw new Error("Too many consecutive Transition redirects (20+)"); + } + var redirectOpts = { redirectedFrom: this, source: "redirect" }; + // If the original transition was caused by URL sync, then use { location: 'replace' } + // on the new transition (unless the target state explicitly specifies location: false). + // This causes the original url to be replaced with the url for the redirect target + // so the original url disappears from the browser history. + if (this.options().source === 'url' && targetState.options().location !== false) { + redirectOpts.location = 'replace'; + } + var newOptions = extend({}, this.options(), targetState.options(), redirectOpts); + targetState = targetState.withOptions(newOptions, true); + var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState); + var originalEnteringNodes = this._treeChanges.entering; + var redirectEnteringNodes = newTransition._treeChanges.entering; + // --- Re-use resolve data from original transition --- + // When redirecting from a parent state to a child state where the parent parameter values haven't changed + // (because of the redirect), the resolves fetched by the original transition are still valid in the + // redirected transition. + // + // This allows you to define a redirect on a parent state which depends on an async resolve value. + // You can wait for the resolve, then redirect to a child state based on the result. + // The redirected transition does not have to re-fetch the resolve. + // --------------------------------------------------------- + var nodeIsReloading = function (reloadState) { return function (node) { + return reloadState && node.state.includes[reloadState.name]; + }; }; + // Find any "entering" nodes in the redirect path that match the original path and aren't being reloaded + var matchingEnteringNodes = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams) + .filter(not(nodeIsReloading(targetState.options().reloadState))); + // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes. + matchingEnteringNodes.forEach(function (node, idx) { + node.resolvables = originalEnteringNodes[idx].resolvables; + }); + return newTransition; + }; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + Transition.prototype._changedParams = function () { + var tc = this._treeChanges; + /** Return undefined if it's not a "dynamic" transition, for the following reasons */ + // If user explicitly wants a reload + if (this._options.reload) + return undefined; + // If any states are exiting or entering + if (tc.exiting.length || tc.entering.length) + return undefined; + // If to/from path lengths differ + if (tc.to.length !== tc.from.length) + return undefined; + // If the to/from paths are different + var pathsDiffer = arrayTuples(tc.to, tc.from) + .map(function (tuple) { return tuple[0].state !== tuple[1].state; }) + .reduce(anyTrueR, false); + if (pathsDiffer) + return undefined; + // Find any parameter values that differ + var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; }); + var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1]; + var tuples = arrayTuples(nodeSchemas, toValues, fromValues); + return tuples.map(function (_a) { + var schema = _a[0], toVals = _a[1], fromVals = _a[2]; + return Param.changed(schema, toVals, fromVals); + }).reduce(unnestR, []); + }; + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + Transition.prototype.dynamic = function () { + var changes = this._changedParams(); + return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(anyTrueR, false); + }; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + Transition.prototype.ignored = function () { + return !!this._ignoredReason(); + }; + /** @hidden */ + Transition.prototype._ignoredReason = function () { + var pending = this.router.globals.transition; + var reloadState = this._options.reloadState; + var same = function (pathA, pathB) { + if (pathA.length !== pathB.length) + return false; + var matching = PathUtils.matching(pathA, pathB); + return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length; + }; + var newTC = this.treeChanges(); + var pendTC = pending && pending.treeChanges(); + if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) + return "SameAsPending"; + if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) + return "SameAsCurrent"; + }; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + Transition.prototype.run = function () { + var _this = this; + var runAllHooks = TransitionHook.runAllHooks; + // Gets transition hooks array for the given phase + var getHooksFor = function (phase) { + return _this._hookBuilder.buildHooksForPhase(phase); + }; + // When the chain is complete, then resolve or reject the deferred + var transitionSuccess = function () { + trace.traceSuccess(_this.$to(), _this); + _this.success = true; + _this._deferred.resolve(_this.to()); + runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS)); + }; + var transitionError = function (reason) { + trace.traceError(reason, _this); + _this.success = false; + _this._deferred.reject(reason); + _this._error = reason; + runAllHooks(getHooksFor(TransitionHookPhase.ERROR)); + }; + var runTransition = function () { + // Wait to build the RUN hook chain until the BEFORE hooks are done + // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object. + var allRunHooks = getHooksFor(TransitionHookPhase.RUN); + var done = function () { return services.$q.when(undefined); }; + return TransitionHook.invokeHooks(allRunHooks, done); + }; + var startTransition = function () { + var globals = _this.router.globals; + globals.lastStartedTransitionId = _this.$id; + globals.transition = _this; + globals.transitionHistory.enqueue(_this); + trace.traceTransitionStart(_this); + return services.$q.when(undefined); + }; + var allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE); + TransitionHook.invokeHooks(allBeforeHooks, startTransition) + .then(runTransition) + .then(transitionSuccess, transitionError); + return this.promise; + }; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + Transition.prototype.valid = function () { + return !this.error() || this.success !== undefined; + }; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + Transition.prototype.abort = function () { + // Do not set flag if the transition is already complete + if (isUndefined(this.success)) { + this._aborted = true; + } + }; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + Transition.prototype.error = function () { + var state = this.$to(); + if (state.self.abstract) + return "Cannot transition to abstract state '" + state.name + "'"; + var paramDefs = state.parameters(), values = this.params(); + var invalidParams = paramDefs.filter(function (param) { return !param.validates(values[param.id]); }); + if (invalidParams.length) { + return "Param values not valid for state '" + state.name + "'. Invalid params: [ " + invalidParams.map(function (param) { return param.id; }).join(', ') + " ]"; + } + if (this.success === false) + return this._error; + }; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + Transition.prototype.toString = function () { + var fromStateOrName = this.from(); + var toStateOrName = this.to(); + var avoidEmptyHash = function (params) { + return (params["#"] !== null && params["#"] !== undefined) ? params : omit(params, ["#"]); + }; + // (X) means the to state is invalid. + var id = this.$id, from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))), toValid = this.valid() ? "" : "(X) ", to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = stringify(avoidEmptyHash(this.params())); + return "Transition#" + id + "( '" + from + "'" + fromParams + " -> " + toValid + "'" + to + "'" + toParams + " )"; + }; + /** @hidden */ + Transition.diToken = Transition; + return Transition; +}()); +export { Transition }; +//# sourceMappingURL=transition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js.map new file mode 100644 index 00000000..990f3873 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transition.js.map @@ -0,0 +1,13 @@ +{ + "version": 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AAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAC1G,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EACpC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,EACjE,QAAQ,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAExD,MAAM,CAAC,gBAAc,EAAE,WAAM,IAAI,SAAI,UAAU,YAAO,OAAO,SAAI,EAAE,SAAI,QAAQ,OAAI,CAAC;IACtF,CAAC;IArtBD,cAAc;IACP,kBAAO,GAAG,UAAU,CAAC;IAqtB9B,iBAAC;CAAA,AAxtBD,IAwtBC;SAxtBY,UAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.d.ts new file mode 100644 index 00000000..7af6e74a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.d.ts @@ -0,0 +1,20 @@ +/** @module transition */ /** */ +import { TransitionHookPhase, PathType } from "./interface"; +import { GetErrorHandler, GetResultHandler } from "./transitionHook"; +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +export declare class TransitionEventType { + name: string; + hookPhase: TransitionHookPhase; + hookOrder: number; + criteriaMatchPath: PathType; + reverseSort: boolean; + getResultHandler: GetResultHandler; + getErrorHandler: GetErrorHandler; + synchronous: boolean; + constructor(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, synchronous?: boolean); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js new file mode 100644 index 00000000..2e95d8af --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js @@ -0,0 +1,26 @@ +import { TransitionHook } from "./transitionHook"; +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +var TransitionEventType = /** @class */ (function () { + function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + this.name = name; + this.hookPhase = hookPhase; + this.hookOrder = hookOrder; + this.criteriaMatchPath = criteriaMatchPath; + this.reverseSort = reverseSort; + this.getResultHandler = getResultHandler; + this.getErrorHandler = getErrorHandler; + this.synchronous = synchronous; + } + return TransitionEventType; +}()); +export { TransitionEventType }; +//# sourceMappingURL=transitionEventType.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js.map new file mode 100644 index 00000000..abf5df09 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionEventType.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionEventType.ts" + ], + "names": [], + "mappings": "AAEA,OAAO,EAAqC,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrF;;;;;GAKG;AACH;IAEE,6BAAmB,IAA0B,EAC1B,SAAuC,EACvC,SAA0B,EAC1B,iBAA4B,EAC5B,WAAmC,EACnC,gBAAmE,EACnE,eAAiE,EACjE,WAAmC;QAHnC,4BAAA,EAAA,mBAAmC;QACnC,iCAAA,EAAA,mBAAuC,cAAc,CAAC,aAAa;QACnE,gCAAA,EAAA,kBAAsC,cAAc,CAAC,YAAY;QACjE,4BAAA,EAAA,mBAAmC;QAPnC,SAAI,GAAJ,IAAI,CAAsB;QAC1B,cAAS,GAAT,SAAS,CAA8B;QACvC,cAAS,GAAT,SAAS,CAAiB;QAC1B,sBAAiB,GAAjB,iBAAiB,CAAW;QAC5B,gBAAW,GAAX,WAAW,CAAwB;QACnC,qBAAgB,GAAhB,gBAAgB,CAAmD;QACnE,oBAAe,GAAf,eAAe,CAAkD;QACjE,gBAAW,GAAX,WAAW,CAAwB;IAClD,CAAC;IACP,0BAAC;AAAD,CAAC,AAXD,IAWC", + "sourcesContent": [ + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.d.ts new file mode 100644 index 00000000..bc067b04 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.d.ts @@ -0,0 +1,94 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { TransitionHookOptions, HookResult } from './interface'; +import { Transition } from './transition'; +import { TransitionEventType } from './transitionEventType'; +import { RegisteredHook } from './hookRegistry'; +import { StateDeclaration } from '../state/interface'; +export declare type GetResultHandler = (hook: TransitionHook) => ResultHandler; +export declare type GetErrorHandler = (hook: TransitionHook) => ErrorHandler; +export declare type ResultHandler = (result: HookResult) => Promise; +export declare type ErrorHandler = (error: any) => Promise; +/** @hidden */ +export declare class TransitionHook { + private transition; + private stateContext; + private registeredHook; + private options; + type: TransitionEventType; + constructor(transition: Transition, stateContext: StateDeclaration, registeredHook: RegisteredHook, options: TransitionHookOptions); + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + static HANDLE_RESULT: GetResultHandler; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + static LOG_REJECTED_RESULT: GetResultHandler; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + static LOG_ERROR: GetErrorHandler; + static REJECT_ERROR: GetErrorHandler; + static THROW_ERROR: GetErrorHandler; + private isSuperseded; + logError(err: any): any; + invokeHook(): Promise | void; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + handleHookResult(result: HookResult): Promise; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + private getNotCurrentRejection(); + toString(): string; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + static chain(hooks: TransitionHook[], waitFor?: Promise): Promise; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T; + /** + * Run all TransitionHooks, ignoring their return value. + */ + static runAllHooks(hooks: TransitionHook[]): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js new file mode 100644 index 00000000..90bdfe6b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js @@ -0,0 +1,223 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { TransitionHookPhase } from './interface'; +import { defaults, noop, silentRejection } from '../common/common'; +import { fnToString, maxLength } from '../common/strings'; +import { isPromise } from '../common/predicates'; +import { is, parse } from '../common/hof'; +import { trace } from '../common/trace'; +import { services } from '../common/coreservices'; +import { Rejection } from './rejectFactory'; +import { TargetState } from '../state/targetState'; +var defaultOptions = { + current: noop, + transition: null, + traceData: {}, + bind: null, +}; +/** @hidden */ +var TransitionHook = /** @class */ (function () { + function TransitionHook(transition, stateContext, registeredHook, options) { + var _this = this; + this.transition = transition; + this.stateContext = stateContext; + this.registeredHook = registeredHook; + this.options = options; + this.isSuperseded = function () { + return _this.type.hookPhase === TransitionHookPhase.RUN && !_this.options.transition.isActive(); + }; + this.options = defaults(options, defaultOptions); + this.type = registeredHook.eventType; + } + TransitionHook.prototype.logError = function (err) { + this.transition.router.stateService.defaultErrorHandler()(err); + }; + TransitionHook.prototype.invokeHook = function () { + var _this = this; + var hook = this.registeredHook; + if (hook._deregistered) + return; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + var options = this.options; + trace.traceHookInvocation(this, this.transition, options); + var invokeCallback = function () { + return hook.callback.call(options.bind, _this.transition, _this.stateContext); + }; + var normalizeErr = function (err) { + return Rejection.normalize(err).toPromise(); + }; + var handleError = function (err) { + return hook.eventType.getErrorHandler(_this)(err); + }; + var handleResult = function (result) { + return hook.eventType.getResultHandler(_this)(result); + }; + try { + var result = invokeCallback(); + if (!this.type.synchronous && isPromise(result)) { + return result.catch(normalizeErr) + .then(handleResult, handleError); + } + else { + return handleResult(result); + } + } + catch (err) { + // If callback throws (synchronously) + return handleError(Rejection.normalize(err)); + } + finally { + if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) { + hook.deregister(); + } + } + }; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + TransitionHook.prototype.handleHookResult = function (result) { + var _this = this; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + // Hook returned a promise + if (isPromise(result)) { + // Wait for the promise, then reprocess with the resulting value + return result.then(function (val) { return _this.handleHookResult(val); }); + } + trace.traceHookResult(result, this.transition, this.options); + // Hook returned false + if (result === false) { + // Abort this Transition + return Rejection.aborted("Hook aborted transition").toPromise(); + } + var isTargetState = is(TargetState); + // hook returned a TargetState + if (isTargetState(result)) { + // Halt the current Transition and redirect (a new Transition) to the TargetState. + return Rejection.redirected(result).toPromise(); + } + }; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + TransitionHook.prototype.getNotCurrentRejection = function () { + var router = this.transition.router; + // The router is stopped + if (router._disposed) { + return Rejection.aborted("UIRouter instance #" + router.$id + " has been stopped (disposed)").toPromise(); + } + if (this.transition._aborted) { + return Rejection.aborted().toPromise(); + } + // This transition is no longer current. + // Another transition started while this hook was still running. + if (this.isSuperseded()) { + // Abort this transition + return Rejection.superseded(this.options.current()).toPromise(); + } + }; + TransitionHook.prototype.toString = function () { + var _a = this, options = _a.options, registeredHook = _a.registeredHook; + var event = parse("traceData.hookType")(options) || "internal", context = parse("traceData.context.state.name")(options) || parse("traceData.context")(options) || "unknown", name = fnToString(registeredHook.callback); + return event + " context: " + context + ", " + maxLength(200, name); + }; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + TransitionHook.chain = function (hooks, waitFor) { + // Chain the next hook off the previous + var createHookChainR = function (prev, nextHook) { + return prev.then(function () { return nextHook.invokeHook(); }); + }; + return hooks.reduce(createHookChainR, waitFor || services.$q.when()); + }; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + TransitionHook.invokeHooks = function (hooks, doneCallback) { + for (var idx = 0; idx < hooks.length; idx++) { + var hookResult = hooks[idx].invokeHook(); + if (isPromise(hookResult)) { + var remainingHooks = hooks.slice(idx + 1); + return TransitionHook.chain(remainingHooks, hookResult) + .then(doneCallback); + } + } + return doneCallback(); + }; + /** + * Run all TransitionHooks, ignoring their return value. + */ + TransitionHook.runAllHooks = function (hooks) { + hooks.forEach(function (hook) { return hook.invokeHook(); }); + }; + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.HANDLE_RESULT = function (hook) { return function (result) { + return hook.handleHookResult(result); + }; }; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) { + isPromise(result) && result.catch(function (err) { + return hook.logError(Rejection.normalize(err)); + }); + return undefined; + }; }; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.LOG_ERROR = function (hook) { return function (error) { + return hook.logError(error); + }; }; + TransitionHook.REJECT_ERROR = function (hook) { return function (error) { + return silentRejection(error); + }; }; + TransitionHook.THROW_ERROR = function (hook) { return function (error) { + throw error; + }; }; + return TransitionHook; +}()); +export { TransitionHook }; +//# sourceMappingURL=transitionHook.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js.map new file mode 100644 index 00000000..7e6a6919 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionHook.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionHook.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionHook.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,kBAAkB;AAClB,OAAO,EAAqC,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMnD,IAAI,cAAc,GAA0B;IAC1C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,EAAE;IACb,IAAI,EAAE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;QACrE,OAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAApB,CAAoB,EADsC,CACtC,CAAC;IAElB,2BAAY,GAAoB,UAAC,IAAoB,IAAK,OAAA,UAAC,KAAU;QACxE,OAAA,eAAe,CAAC,KAAK,CAAC;IAAtB,CAAsB,EADuC,CACvC,CAAC;IAEpB,0BAAW,GAAoB,UAAC,IAAoB,IAAK,OAAA,UAAC,KAAU;QACzE,MAAM,KAAK,CAAC;IACd,CAAC,EAF+D,CAE/D,CAAA;IAiLH,qBAAC;CAAA,AAxND,IAwNC;SAxNY,cAAc", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.d.ts new file mode 100644 index 00000000..8c99b6f5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.d.ts @@ -0,0 +1,190 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria, HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn } from "./interface"; +import { Transition } from "./transition"; +import { RegisteredHook } from "./hookRegistry"; +import { TargetState } from "../state/targetState"; +import { PathNode } from "../path/pathNode"; +import { ViewService } from "../view/view"; +import { UIRouter } from "../router"; +import { TransitionEventType } from "./transitionEventType"; +import { GetResultHandler, GetErrorHandler } from "./transitionHook"; +import { Disposable } from "../interface"; +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +export declare let defaultTransOpts: TransitionOptions; +/** + * Plugin API for Transition Service + * @internalapi + */ +export interface TransitionServicePluginAPI { + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + */ + _definePathType(name: string, hookScope: TransitionHookScope): any; + /** + * Gets a Path definition used as a criterion against a TreeChanges path + */ + _getPathTypes(): PathTypes; + /** + * Defines a transition hook type and returns a transition hook registration + * function (which can then be used to register hooks of this type). + */ + _defineEvent(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, rejectIfSuperseded?: boolean): any; + /** + * Returns the known event types, such as `onBefore` + * If a phase argument is provided, returns only events for the given phase. + */ + _getEvents(phase?: TransitionHookPhase): TransitionEventType[]; + /** Returns the hooks registered for the given hook name */ + getHooks(hookName: string): RegisteredHook[]; +} +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +export declare class TransitionService implements IHookRegistry, Disposable { + /** @hidden */ + _transitionCount: number; + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @hidden */ + $view: ViewService; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + private _eventTypes; + /** @hidden The registered transition hooks */ + _registeredHooks: RegisteredHooks; + /** @hidden The paths on a criteria object */ + private _criteriaPaths; + /** @hidden */ + private _router; + /** @internalapi */ + _pluginapi: TransitionServicePluginAPI; + /** + * This object has hook de-registration functions for the built-in hooks. + * This can be used by third parties libraries that wish to customize the behaviors + * + * @hidden + */ + _deregisterHookFns: { + addCoreResolves: Function; + ignored: Function; + invalid: Function; + redirectTo: Function; + onExit: Function; + onRetain: Function; + onEnter: Function; + eagerResolve: Function; + lazyResolve: Function; + loadViews: Function; + activateViews: Function; + updateGlobals: Function; + updateUrl: Function; + lazyLoad: Function; + }; + /** @hidden */ + constructor(_router: UIRouter); + /** + * dispose + * @internalapi + */ + dispose(router: UIRouter): void; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + create(fromPath: PathNode[], targetState: TargetState): Transition; + /** @hidden */ + private _defineCoreEvents(); + /** @hidden */ + private _defineCorePaths(); + /** @hidden */ + _defineEvent(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, synchronous?: boolean): void; + /** @hidden */ + private _getEvents(phase?); + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + private _definePathType(name, hookScope); + /** * @hidden */ + private _getPathTypes(); + /** @hidden */ + getHooks(hookName: string): RegisteredHook[]; + /** @hidden */ + private _registerCoreTransitionHooks(); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js new file mode 100644 index 00000000..c6031397 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js @@ -0,0 +1,237 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { TransitionHookScope, TransitionHookPhase } from "./interface"; +import { Transition } from "./transition"; +import { makeEvent } from "./hookRegistry"; +import { registerAddCoreResolvables } from "../hooks/coreResolvables"; +import { registerRedirectToHook } from "../hooks/redirectTo"; +import { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from "../hooks/onEnterExitRetain"; +import { registerEagerResolvePath, registerLazyResolveState } from "../hooks/resolve"; +import { registerLoadEnteringViews, registerActivateViews } from "../hooks/views"; +import { registerUpdateGlobalState } from "../hooks/updateGlobals"; +import { registerUpdateUrl } from "../hooks/url"; +import { registerLazyLoadHook } from "../hooks/lazyLoad"; +import { TransitionEventType } from "./transitionEventType"; +import { TransitionHook } from "./transitionHook"; +import { isDefined } from "../common/predicates"; +import { removeFrom, values, createProxyFunctions } from "../common/common"; +import { val } from "../common/hof"; +import { registerIgnoredTransitionHook } from '../hooks/ignoredTransition'; +import { registerInvalidTransitionHook } from '../hooks/invalidTransition'; +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +export var defaultTransOpts = { + location: true, + relative: null, + inherit: false, + notify: true, + reload: false, + custom: {}, + current: function () { return null; }, + source: "unknown" +}; +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +var TransitionService = /** @class */ (function () { + /** @hidden */ + function TransitionService(_router) { + /** @hidden */ + this._transitionCount = 0; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + this._eventTypes = []; + /** @hidden The registered transition hooks */ + this._registeredHooks = {}; + /** @hidden The paths on a criteria object */ + this._criteriaPaths = {}; + this._router = _router; + this.$view = _router.viewService; + this._deregisterHookFns = {}; + this._pluginapi = createProxyFunctions(val(this), {}, val(this), [ + '_definePathType', + '_defineEvent', + '_getPathTypes', + '_getEvents', + 'getHooks', + ]); + this._defineCorePaths(); + this._defineCoreEvents(); + this._registerCoreTransitionHooks(); + } + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + TransitionService.prototype.onCreate = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onError = function (criteria, callback, options) { return; }; + /** + * dispose + * @internalapi + */ + TransitionService.prototype.dispose = function (router) { + values(this._registeredHooks).forEach(function (hooksArray) { return hooksArray.forEach(function (hook) { + hook._deregistered = true; + removeFrom(hooksArray, hook); + }); }); + }; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + TransitionService.prototype.create = function (fromPath, targetState) { + return new Transition(fromPath, targetState, this._router); + }; + /** @hidden */ + TransitionService.prototype._defineCoreEvents = function () { + var Phase = TransitionHookPhase; + var TH = TransitionHook; + var paths = this._criteriaPaths; + var NORMAL_SORT = false, REVERSE_SORT = true; + var ASYNCHRONOUS = false, SYNCHRONOUS = true; + this._defineEvent("onCreate", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS); + this._defineEvent("onBefore", Phase.BEFORE, 0, paths.to); + this._defineEvent("onStart", Phase.RUN, 0, paths.to); + this._defineEvent("onExit", Phase.RUN, 100, paths.exiting, REVERSE_SORT); + this._defineEvent("onRetain", Phase.RUN, 200, paths.retained); + this._defineEvent("onEnter", Phase.RUN, 300, paths.entering); + this._defineEvent("onFinish", Phase.RUN, 400, paths.to); + this._defineEvent("onSuccess", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + this._defineEvent("onError", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + }; + /** @hidden */ + TransitionService.prototype._defineCorePaths = function () { + var STATE = TransitionHookScope.STATE, TRANSITION = TransitionHookScope.TRANSITION; + this._definePathType("to", TRANSITION); + this._definePathType("from", TRANSITION); + this._definePathType("exiting", STATE); + this._definePathType("retained", STATE); + this._definePathType("entering", STATE); + }; + /** @hidden */ + TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous); + this._eventTypes.push(eventType); + makeEvent(this, this, eventType); + }; + ; + /** @hidden */ + TransitionService.prototype._getEvents = function (phase) { + var transitionHookTypes = isDefined(phase) ? + this._eventTypes.filter(function (type) { return type.hookPhase === phase; }) : + this._eventTypes.slice(); + return transitionHookTypes.sort(function (l, r) { + var cmpByPhase = l.hookPhase - r.hookPhase; + return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase; + }); + }; + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + TransitionService.prototype._definePathType = function (name, hookScope) { + this._criteriaPaths[name] = { name: name, scope: hookScope }; + }; + /** * @hidden */ + TransitionService.prototype._getPathTypes = function () { + return this._criteriaPaths; + }; + /** @hidden */ + TransitionService.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + /** @hidden */ + TransitionService.prototype._registerCoreTransitionHooks = function () { + var fns = this._deregisterHookFns; + fns.addCoreResolves = registerAddCoreResolvables(this); + fns.ignored = registerIgnoredTransitionHook(this); + fns.invalid = registerInvalidTransitionHook(this); + // Wire up redirectTo hook + fns.redirectTo = registerRedirectToHook(this); + // Wire up onExit/Retain/Enter state hooks + fns.onExit = registerOnExitHook(this); + fns.onRetain = registerOnRetainHook(this); + fns.onEnter = registerOnEnterHook(this); + // Wire up Resolve hooks + fns.eagerResolve = registerEagerResolvePath(this); + fns.lazyResolve = registerLazyResolveState(this); + // Wire up the View management hooks + fns.loadViews = registerLoadEnteringViews(this); + fns.activateViews = registerActivateViews(this); + // Updates global state after a transition + fns.updateGlobals = registerUpdateGlobalState(this); + // After globals.current is updated at priority: 10000 + fns.updateUrl = registerUpdateUrl(this); + // Lazy load state trees + fns.lazyLoad = registerLazyLoadHook(this); + }; + return TransitionService; +}()); +export { TransitionService }; +//# sourceMappingURL=transitionService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js.map new file mode 100644 index 00000000..6b09269e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/transition/transitionService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionService.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,kBAAkB;AAClB,OAAO,EAC6B,mBAAmB,EAAE,mBAAmB,EAE3E,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAK3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAq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coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.d.ts new file mode 100644 index 00000000..5806ad4d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.d.ts @@ -0,0 +1,10 @@ +/** + * @coreapi + * @module url + */ /** for typedoc */ +export * from "./interface"; +export * from "./urlMatcher"; +export * from "./urlMatcherFactory"; +export * from "./urlRouter"; +export * from "./urlRule"; +export * from "./urlService"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js new file mode 100644 index 00000000..d635dbaf --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js @@ -0,0 +1,6 @@ +export * from "./urlMatcher"; +export * from "./urlMatcherFactory"; +export * from "./urlRouter"; +export * from "./urlRule"; +export * from "./urlService"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js.map new file mode 100644 index 00000000..2a625308 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/index.ts" + ], + "names": [], + "mappings": "AAKA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./urlMatcher\";\nexport * from \"./urlMatcherFactory\";\nexport * from \"./urlRouter\";\nexport * from \"./urlRule\";\nexport * from \"./urlService\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.d.ts new file mode 100644 index 00000000..1855aad3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.d.ts @@ -0,0 +1,513 @@ +/** + * # URL subsystem + * + * Contains code related to managing the URL + * + * The primary API is found in [[UrlService]], [[UrlService.config]], and [[UrlService.rules]]. + * + * @preferred + * @coreapi + * @module url + */ /** */ +import { LocationConfig } from "../common/coreservices"; +import { ParamType } from "../params/paramType"; +import { Param } from "../params/param"; +import { UIRouter } from "../router"; +import { TargetState } from "../state/targetState"; +import { TargetStateDef } from "../state/interface"; +import { UrlMatcher } from "./urlMatcher"; +import { StateObject } from "../state/stateObject"; +import { ParamTypeDefinition } from "../params/interface"; +/** @internalapi */ +export interface ParamFactory { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig(id: string, type: ParamType, config: any): Param; + /** Creates a new [[Param]] from a url PATH */ + fromPath(id: string, type: ParamType, config: any): Param; + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch(id: string, type: ParamType, config: any): Param; +} +/** + * An API to customize the URL behavior and retrieve URL configuration + * + * + * This API can customize the behavior of the URL. + * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]), + * and custom parameter encoding (custom [[type]]). + * + * It also has information about the location (url) configuration such as [[port]] and [[baseHref]]. + * This information can be used to build absolute URLs, such as + * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`; + * + * This API is found on [[UrlService.config]]. + */ +export interface UrlConfigApi extends LocationConfig, UrlMatcherConfig { +} +export interface UrlMatcherConfig { + /** + * Defines whether URL matching should be case sensitive (the default behavior), or not. + * + * #### Example: + * ```js + * // Allow case insensitive url matches + * urlService.config.caseInsensitive(true); + * ``` + * + * @param value `false` to match URL in a case sensitive manner; otherwise `true`; + * @returns the current value of caseInsensitive + */ + caseInsensitive(value?: boolean): boolean; + /** + * Defines whether URLs should match trailing slashes, or not (the default behavior). + * + * #### Example: + * ```js + * // Allow optional trailing slashes + * urlService.config.strictMode(false); + * ``` + * + * @param value `false` to match trailing slashes in URLs, otherwise `true`. + * @returns the current value of strictMode + */ + strictMode(value?: boolean): boolean; + /** + * Sets the default behavior when generating or matching URLs with default parameter values. + * + * #### Example: + * ```js + * // Remove default parameter values from the url + * urlService.config.defaultSquashPolicy(true); + * ``` + * + * @param value A string that defines the default parameter URL squashing behavior. + * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL + * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the + * parameter is surrounded by slashes, squash (remove) one slash from the URL + * - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) + * the parameter value from the URL and replace it with this string. + * @returns the current value of defaultSquashPolicy + */ + defaultSquashPolicy(value?: (boolean | string)): (boolean | string); + /** + * Creates and registers a custom [[ParamTypeDefinition]] object + * + * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding. + * + * #### Note: Register custom types *before using them* in a state definition. + * + * #### Example: + * ```js + * // Encode object parameter as JSON string + * urlService.config.type('myjson', { + * encode: (obj) => JSON.stringify(obj), + * decode: (str) => JSON.parse(str), + * is: (val) => typeof(val) === 'object', + * pattern: /[^/]+/, + * equals: (a, b) => _.isEqual(a, b), + * }); + * ``` + * + * @param name The type name. + * @param type The type definition. See [[ParamTypeDefinition]] for examples and information. + * + * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + */ + type(name: string, type?: ParamTypeDefinition): ParamType; +} +/** @internalapi */ +export interface UrlSyncApi { + /** + * Checks the URL for a matching [[UrlRule]] + * + * Checks the current URL for a matching url rule, then invokes that rule's handler. + * This method is called internally any time the URL has changed. + * + * This effectively activates the state which matches the current URL. + * + * #### Example: + * ```js + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * urlService.listen(); + * // Find the matching URL and invoke the handler. + * urlService.sync(); + * }); + * ``` + */ + sync(evt?: any): void; + /** + * Starts or stops listening for URL changes + * + * Call this sometime after calling [[deferIntercept]] to start monitoring the url. + * This causes [[UrlRouter]] to start listening for changes to the URL, if it wasn't already listening. + * + * If called with `false`, will stop listening. Call listen() again to start listening + * + * #### Example: + * ```js + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * // Start responding to URL changes + * urlService.listen(); + * urlService.sync(); + * }); + * ``` + */ + listen(enabled?: boolean): Function; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * // Prevent $urlRouter from automatically intercepting URL changes when it starts; + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * urlService.listen(); + * urlService.sync(); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + deferIntercept(defer?: boolean): any; +} +/** + * API for managing URL rules + * + * This API can be used to create and manage URL rules. + * URL rules are a mechanism to respond to specific URL patterns. + * + * The most commonly used methods are [[otherwise]] and [[when]]. + */ +export interface UrlRulesApi { + /** + * Defines URL Rule priorities + * + * More than one rule ([[UrlRule]]) might match a given URL. + * This `compareFn` is used to sort the rules by priority. + * Higher priority rules should sort earlier. + * + * The [[defaultRuleSortFn]] is used by default. + * + * You only need to call this function once. + * The `compareFn` will be used to sort the rules as each is registered. + * + * If called without any parameter, it will re-sort the rules. + * + * --- + * + * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]]. + * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]] + * The `$id` is is the order in which the rule was registered. + * + * The sort function should use these data, or data found on a specific type + * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired. + * + * #### Example: + * This compare function prioritizes rules by the order in which the rules were registered. + * A rule registered earlier has higher priority. + * + * ```js + * function compareFn(a, b) { + * return a.$id - b.$id; + * } + * ``` + * + * @param compareFn a function that compares to [[UrlRule]] objects. + * The `compareFn` should abide by the `Array.sort` compare function rules. + * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority. + * Return a positive number if `b` should be higher priority. + * Return `0` if the rules are identical. + * + * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description) + * for details. + */ + sort(compareFn?: (a: UrlRule, b: UrlRule) => number): any; + /** + * Registers a `matcher` and `handler` for custom URLs handling. + * + * The `matcher` can be: + * + * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]] + * - a `string`: The string is compiled to a [[UrlMatcher]] + * - a `RegExp`: The regexp is used to match the url. + * + * The `handler` can be: + * + * - a string: The url is redirected to the value of the string. + * - a function: The url is redirected to the return value of the function. + * + * --- + * + * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect + * string is interpolated with parameter values. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when("/foo/:param1", "/bar/:param1") + * ``` + * + * --- + * + * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is + * interpolated with capture groups from the RegExp. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when(new RegExp("^/foo/(.*)$"), "/bar/$1"); + * ``` + * + * --- + * + * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]). + * The "matched value" differs based on the `matcher`. + * For [[UrlMatcher]]s, it will be the matched state params. + * For `RegExp`, it will be the match array from `regexp.exec()`. + * + * If the handler returns a string, the URL is redirected to the string. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when(new RegExp("^/foo/(.*)$"), match => "/bar/" + match[1]); + * ``` + * + * Note: the `handler` may also invoke arbitrary code, such as `$state.go()` + * + * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`. + * @param handler The path to redirect to, or a function that returns the path. + * @param options `{ priority: number }` + * + * @return the registered [[UrlRule]] + */ + when(matcher: (RegExp | UrlMatcher | string), handler: string | UrlRuleHandlerFn, options?: { + priority: number; + }): UrlRule; + /** + * Defines the state, url, or behavior to use when no other rule matches the URL. + * + * This rule is matched when *no other rule* matches. + * It is generally used to handle unknown URLs (similar to "404" behavior, but on the client side). + * + * - If `handler` a string, it is treated as a url redirect + * + * #### Example: + * When no other url rule matches, redirect to `/index` + * ```js + * .otherwise('/index'); + * ``` + * + * - If `handler` is an object with a `state` property, the state is activated. + * + * #### Example: + * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value. + * ```js + * .otherwise({ state: 'home', params: { dashboard: 'default' } }); + * ``` + * + * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object. + * The function can perform actions, and/or return a value. + * + * #### Example: + * When no other url rule matches, manually trigger a transition to the `home` state + * ```js + * .otherwise((matchValue, urlParts, router) => { + * router.stateService.go('home'); + * }); + * ``` + * + * #### Example: + * When no other url rule matches, go to `home` state + * ```js + * .otherwise((matchValue, urlParts, router) => { + * return { state: 'home' }; + * }); + * ``` + * + * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic). + */ + otherwise(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** + * Defines the initial state, path, or behavior to use when the app starts. + * + * This rule defines the initial/starting state for the application. + * + * This rule is triggered the first time the URL is checked (when the app initially loads). + * The rule is triggered only when the url matches either `""` or `"/"`. + * + * Note: The rule is intended to be used when the root of the application is directly linked to. + * When the URL is *not* `""` or `"/"` and doesn't match other rules, the [[otherwise]] rule is triggered. + * This allows 404-like behavior when an unknown URL is deep-linked. + * + * #### Example: + * Start app at `home` state. + * ```js + * .initial({ state: 'home' }); + * ``` + * + * #### Example: + * Start app at `/home` (by url) + * ```js + * .initial('/home'); + * ``` + * + * #### Example: + * When no other url rule matches, go to `home` state + * ```js + * .initial((matchValue, url, router) => { + * console.log('initial state'); + * return { state: 'home' }; + * }) + * ``` + * + * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic). + */ + initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef, options?: { + priority: number; + }): void; + /** + * Gets all registered rules + * + * @returns an array of all the registered rules + */ + rules(): UrlRule[]; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * @return a function that deregisters the rule + */ + rule(rule: UrlRule): Function; + /** + * Remove a rule previously registered + * + * @param rule the matcher rule that was previously registered using [[rule]] + */ + removeRule(rule: UrlRule): void; +} +/** + * An object containing the three parts of a URL + */ +export interface UrlParts { + path: string; + search?: { + [key: string]: any; + }; + hash?: string; +} +/** + * A UrlRule match result + * + * The result of UrlRouter.match() + */ +export interface MatchResult { + /** The matched value from a [[UrlRule]] */ + match: any; + /** The rule that matched */ + rule: UrlRule; + /** The match result weight */ + weight: number; +} +/** + * A function that matches the URL for a [[UrlRule]] + * + * Implementations should match against the provided [[UrlParts]] and return the matched value (truthy) if the rule matches. + * If this rule is selected, the matched value is passed to the [[UrlRuleHandlerFn]]. + * + * @return the matched value, either truthy or falsey + */ +export interface UrlRuleMatchFn { + (url?: UrlParts, router?: UIRouter): any; +} +/** + * Handler invoked when a rule is matched + * + * The matched value from the rule's [[UrlRuleMatchFn]] is passed as the first argument + * The handler should return a string (to redirect), a [[TargetState]]/[[TargetStateDef]], or void + * + * If the handler returns a string, the url is replaced with the string. + * If the handler returns a [[TargetState]], the target state is activated. + */ +export interface UrlRuleHandlerFn { + (matchValue?: any, url?: UrlParts, router?: UIRouter): (string | TargetState | TargetStateDef | void); +} +/** @internalapi */ +export declare type UrlRuleType = "STATE" | "URLMATCHER" | "REGEXP" | "RAW" | "OTHER"; +/** + * The interface for a URL Rule + * + * If you are creating a rule for use with [[UrlRulesApi.rule]], it should implement this interface. + */ +export interface UrlRule { + /** + * The rule's ID. + * + * IDs are auto-assigned when the rule is registered, in increasing order. + */ + $id: number; + /** + * The rule's priority (defaults to 0). + * + * This can be used to explicitly modify the rule's priority. + * Higher numbers are higher priority. + */ + priority: number; + /** + * The priority of a given match. + * + * Sometimes more than one UrlRule might have matched. + * This method is used to choose the best match. + * + * If multiple rules matched, each rule's `matchPriority` is called with the value from [[match]]. + * The rule with the highest `matchPriority` has its [[handler]] called. + */ + matchPriority(match: any): number; + /** The type of the rule */ + type: UrlRuleType; + /** + * This function should match the url and return the match details + * + * See [[UrlRuleMatchFn]] for details + */ + match: UrlRuleMatchFn; + /** + * This function is called if the rule matched, and was selected as the "best match". + * This function handles the rule match event. + * + * See [[UrlRuleHandlerFn]] for details + */ + handler: UrlRuleHandlerFn; +} +/** @internalapi */ +export interface MatcherUrlRule extends UrlRule { + type: "URLMATCHER" | "STATE"; + urlMatcher: UrlMatcher; +} +/** @internalapi */ +export interface StateRule extends MatcherUrlRule { + type: "STATE"; + state: StateObject; +} +/** @internalapi */ +export interface RegExpRule extends UrlRule { + type: "REGEXP"; + regexp: RegExp; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js new file mode 100644 index 00000000..c51da0a1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js @@ -0,0 +1 @@ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js.map new file mode 100644 index 00000000..ce4e8631 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * # URL subsystem\n *\n * Contains code related to managing the URL\n *\n * The primary API is found in [[UrlService]], [[UrlService.config]], and [[UrlService.rules]].\n *\n * @preferred\n * @coreapi\n * @module url\n */ /** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { ParamType } from \"../params/paramType\";\nimport { Param } from \"../params/param\";\nimport { UIRouter } from \"../router\";\nimport { TargetState } from \"../state/targetState\";\nimport { TargetStateDef } from \"../state/interface\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { StateObject } from \"../state/stateObject\";\nimport { ParamTypeDefinition } from \"../params/interface\";\n\n/** @internalapi */\nexport interface ParamFactory {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig(id: string, type: ParamType, config: any): Param;\n /** Creates a new [[Param]] from a url PATH */\n fromPath(id: string, type: ParamType, config: any): Param;\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch(id: string, type: ParamType, config: any): Param;\n}\n\n/**\n * An API to customize the URL behavior and retrieve URL configuration\n *\n *\n * This API can customize the behavior of the URL.\n * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]),\n * and custom parameter encoding (custom [[type]]).\n *\n * It also has information about the location (url) configuration such as [[port]] and [[baseHref]].\n * This information can be used to build absolute URLs, such as\n * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;\n *\n * This API is found on [[UrlService.config]].\n */\nexport interface UrlConfigApi extends LocationConfig, UrlMatcherConfig {}\n\nexport interface UrlMatcherConfig {\n /**\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * #### Example:\n * ```js\n * // Allow case insensitive url matches\n * urlService.config.caseInsensitive(true);\n * ```\n *\n * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns the current value of caseInsensitive\n */\n caseInsensitive(value?: boolean): boolean;\n\n /**\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * #### Example:\n * ```js\n * // Allow optional trailing slashes\n * urlService.config.strictMode(false);\n * ```\n *\n * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns the current value of strictMode\n */\n strictMode(value?: boolean): boolean;\n\n /**\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * #### Example:\n * ```js\n * // Remove default parameter values from the url\n * urlService.config.defaultSquashPolicy(true);\n * ```\n *\n * @param value A string that defines the default parameter URL squashing behavior.\n * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n * @returns the current value of defaultSquashPolicy\n */\n defaultSquashPolicy(value?: (boolean|string)): (boolean|string);\n\n /**\n * Creates and registers a custom [[ParamTypeDefinition]] object\n *\n * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.\n *\n * #### Note: Register custom types *before using them* in a state definition.\n *\n * #### Example:\n * ```js\n * // Encode object parameter as JSON string\n * urlService.config.type('myjson', {\n * encode: (obj) => JSON.stringify(obj),\n * decode: (str) => JSON.parse(str),\n * is: (val) => typeof(val) === 'object',\n * pattern: /[^/]+/,\n * equals: (a, b) => _.isEqual(a, b),\n * });\n * ```\n *\n * @param name The type name.\n * @param type The type definition. See [[ParamTypeDefinition]] for examples and information.\n *\n * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n */\n type(name: string, type?: ParamTypeDefinition): ParamType;\n}\n\n/** @internalapi */\nexport interface UrlSyncApi {\n /**\n * Checks the URL for a matching [[UrlRule]]\n *\n * Checks the current URL for a matching url rule, then invokes that rule's handler.\n * This method is called internally any time the URL has changed.\n *\n * This effectively activates the state which matches the current URL.\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * // Find the matching URL and invoke the handler.\n * urlService.sync();\n * });\n * ```\n */\n sync(evt?): void;\n\n /**\n * Starts or stops listening for URL changes\n *\n * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n * This causes [[UrlRouter]] to start listening for changes to the URL, if it wasn't already listening.\n *\n * If called with `false`, will stop listening. Call listen() again to start listening\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * // Start responding to URL changes\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n */\n listen(enabled?: boolean): Function\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * // Prevent $urlRouter from automatically intercepting URL changes when it starts;\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean)\n}\n\n/**\n * API for managing URL rules\n *\n * This API can be used to create and manage URL rules.\n * URL rules are a mechanism to respond to specific URL patterns.\n *\n * The most commonly used methods are [[otherwise]] and [[when]].\n */\nexport interface UrlRulesApi {\n /**\n * Defines URL Rule priorities\n *\n * More than one rule ([[UrlRule]]) might match a given URL.\n * This `compareFn` is used to sort the rules by priority.\n * Higher priority rules should sort earlier.\n *\n * The [[defaultRuleSortFn]] is used by default.\n *\n * You only need to call this function once.\n * The `compareFn` will be used to sort the rules as each is registered.\n *\n * If called without any parameter, it will re-sort the rules.\n *\n * ---\n *\n * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]].\n * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]]\n * The `$id` is is the order in which the rule was registered.\n *\n * The sort function should use these data, or data found on a specific type\n * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired.\n *\n * #### Example:\n * This compare function prioritizes rules by the order in which the rules were registered.\n * A rule registered earlier has higher priority.\n *\n * ```js\n * function compareFn(a, b) {\n * return a.$id - b.$id;\n * }\n * ```\n *\n * @param compareFn a function that compares to [[UrlRule]] objects.\n * The `compareFn` should abide by the `Array.sort` compare function rules.\n * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority.\n * Return a positive number if `b` should be higher priority.\n * Return `0` if the rules are identical.\n *\n * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description)\n * for details.\n */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number);\n\n /**\n * Registers a `matcher` and `handler` for custom URLs handling.\n *\n * The `matcher` can be:\n *\n * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]]\n * - a `string`: The string is compiled to a [[UrlMatcher]]\n * - a `RegExp`: The regexp is used to match the url.\n *\n * The `handler` can be:\n *\n * - a string: The url is redirected to the value of the string.\n * - a function: The url is redirected to the return value of the function.\n *\n * ---\n *\n * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect\n * string is interpolated with parameter values.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(\"/foo/:param1\", \"/bar/:param1\")\n * ```\n *\n * ---\n *\n * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is\n * interpolated with capture groups from the RegExp.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), \"/bar/$1\");\n * ```\n *\n * ---\n *\n * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).\n * The \"matched value\" differs based on the `matcher`.\n * For [[UrlMatcher]]s, it will be the matched state params.\n * For `RegExp`, it will be the match array from `regexp.exec()`.\n *\n * If the handler returns a string, the URL is redirected to the string.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), match => \"/bar/\" + match[1]);\n * ```\n *\n * Note: the `handler` may also invoke arbitrary code, such as `$state.go()`\n *\n * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`.\n * @param handler The path to redirect to, or a function that returns the path.\n * @param options `{ priority: number }`\n *\n * @return the registered [[UrlRule]]\n */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule;\n\n /**\n * Defines the state, url, or behavior to use when no other rule matches the URL.\n *\n * This rule is matched when *no other rule* matches.\n * It is generally used to handle unknown URLs (similar to \"404\" behavior, but on the client side).\n *\n * - If `handler` a string, it is treated as a url redirect\n *\n * #### Example:\n * When no other url rule matches, redirect to `/index`\n * ```js\n * .otherwise('/index');\n * ```\n *\n * - If `handler` is an object with a `state` property, the state is activated.\n *\n * #### Example:\n * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.\n * ```js\n * .otherwise({ state: 'home', params: { dashboard: 'default' } });\n * ```\n *\n * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.\n * The function can perform actions, and/or return a value.\n *\n * #### Example:\n * When no other url rule matches, manually trigger a transition to the `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * router.stateService.go('home');\n * });\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * return { state: 'home' };\n * });\n * ```\n *\n * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).\n */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): void;\n\n /**\n * Defines the initial state, path, or behavior to use when the app starts.\n *\n * This rule defines the initial/starting state for the application.\n *\n * This rule is triggered the first time the URL is checked (when the app initially loads).\n * The rule is triggered only when the url matches either `\"\"` or `\"/\"`.\n *\n * Note: The rule is intended to be used when the root of the application is directly linked to.\n * When the URL is *not* `\"\"` or `\"/\"` and doesn't match other rules, the [[otherwise]] rule is triggered.\n * This allows 404-like behavior when an unknown URL is deep-linked.\n *\n * #### Example:\n * Start app at `home` state.\n * ```js\n * .initial({ state: 'home' });\n * ```\n *\n * #### Example:\n * Start app at `/home` (by url)\n * ```js\n * .initial('/home');\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .initial((matchValue, url, router) => {\n * console.log('initial state');\n * return { state: 'home' };\n * })\n * ```\n *\n * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).\n */\n initial(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef, options?: { priority: number }): void;\n\n /**\n * Gets all registered rules\n *\n * @returns an array of all the registered rules\n */\n rules(): UrlRule[];\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function;\n\n /**\n * Remove a rule previously registered\n *\n * @param rule the matcher rule that was previously registered using [[rule]]\n */\n removeRule(rule: UrlRule): void;\n}\n\n/**\n * An object containing the three parts of a URL\n */\nexport interface UrlParts {\n path: string;\n search?: { [key: string]: any };\n hash?: string;\n}\n\n/**\n * A UrlRule match result\n *\n * The result of UrlRouter.match()\n */\nexport interface MatchResult {\n /** The matched value from a [[UrlRule]] */\n match: any;\n /** The rule that matched */\n rule: UrlRule;\n /** The match result weight */\n weight: number;\n}\n/**\n * A function that matches the URL for a [[UrlRule]]\n *\n * Implementations should match against the provided [[UrlParts]] and return the matched value (truthy) if the rule matches.\n * If this rule is selected, the matched value is passed to the [[UrlRuleHandlerFn]].\n *\n * @return the matched value, either truthy or falsey\n */\nexport interface UrlRuleMatchFn {\n (url?: UrlParts, router?: UIRouter): any;\n}\n\n/**\n * Handler invoked when a rule is matched\n *\n * The matched value from the rule's [[UrlRuleMatchFn]] is passed as the first argument\n * The handler should return a string (to redirect), a [[TargetState]]/[[TargetStateDef]], or void\n *\n * If the handler returns a string, the url is replaced with the string.\n * If the handler returns a [[TargetState]], the target state is activated.\n */\nexport interface UrlRuleHandlerFn {\n (matchValue?: any, url?: UrlParts, router?: UIRouter): (string|TargetState|TargetStateDef|void);\n}\n\n/** @internalapi */\nexport type UrlRuleType = \"STATE\" | \"URLMATCHER\" | \"REGEXP\" | \"RAW\" | \"OTHER\";\n\n/**\n * The interface for a URL Rule\n *\n * If you are creating a rule for use with [[UrlRulesApi.rule]], it should implement this interface.\n */\nexport interface UrlRule {\n /**\n * The rule's ID.\n *\n * IDs are auto-assigned when the rule is registered, in increasing order.\n */\n $id: number;\n\n /**\n * The rule's priority (defaults to 0).\n *\n * This can be used to explicitly modify the rule's priority.\n * Higher numbers are higher priority.\n */\n priority: number;\n\n /**\n * The priority of a given match.\n *\n * Sometimes more than one UrlRule might have matched.\n * This method is used to choose the best match.\n *\n * If multiple rules matched, each rule's `matchPriority` is called with the value from [[match]].\n * The rule with the highest `matchPriority` has its [[handler]] called.\n */\n matchPriority(match: any): number;\n\n /** The type of the rule */\n type: UrlRuleType;\n\n /**\n * This function should match the url and return the match details\n *\n * See [[UrlRuleMatchFn]] for details\n */\n match: UrlRuleMatchFn;\n\n /**\n * This function is called if the rule matched, and was selected as the \"best match\".\n * This function handles the rule match event.\n *\n * See [[UrlRuleHandlerFn]] for details\n */\n handler: UrlRuleHandlerFn;\n}\n\n/** @internalapi */\nexport interface MatcherUrlRule extends UrlRule {\n type: \"URLMATCHER\"|\"STATE\";\n urlMatcher: UrlMatcher;\n}\n\n/** @internalapi */\nexport interface StateRule extends MatcherUrlRule {\n type: \"STATE\";\n state: StateObject;\n}\n\n/** @internalapi */\nexport interface RegExpRule extends UrlRule {\n type: \"REGEXP\";\n regexp: RegExp;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.d.ts new file mode 100644 index 00000000..410d9d02 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.d.ts @@ -0,0 +1,178 @@ +import { Param } from "../params/param"; +import { ParamTypes } from "../params/paramTypes"; +import { RawParams } from "../params/interface"; +import { ParamFactory } from "./interface"; +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +export declare class UrlMatcher { + config: any; + /** @hidden */ + static nameValidator: RegExp; + /** @hidden */ + private _cache; + /** @hidden */ + private _children; + /** @hidden */ + private _params; + /** @hidden */ + private _segments; + /** @hidden */ + private _compiled; + /** The pattern that was passed into the constructor */ + pattern: string; + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, config?: any); + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + append(url: UrlMatcher): UrlMatcher; + /** @hidden */ + isRoot(): boolean; + /** Returns the input pattern string */ + toString(): string; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + exec(path: string, search?: any, hash?: string, options?: any): RawParams; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + parameters(opts?: any): Param[]; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + parameter(id: string, opts?: any): Param; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + validates(params: RawParams): boolean; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + format(values?: RawParams): string; + /** @hidden */ + static encodeDashes(str: string): string; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + static pathSegmentsAndParams(matcher: UrlMatcher): any; + /** @hidden Given a matcher, return an array with the matcher's query params */ + static queryParams(matcher: UrlMatcher): Param[]; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + static compare(a: UrlMatcher, b: UrlMatcher): number; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js new file mode 100644 index 00000000..3d1ec74e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js @@ -0,0 +1,513 @@ +/** + * @coreapi + * @module url + */ +/** for typedoc */ +import { map, defaults, inherit, identity, unnest, tail, find, allTrueR, unnestR, arrayTuples } from "../common/common"; +import { prop, propEq } from "../common/hof"; +import { isArray, isString, isDefined } from "../common/predicates"; +import { Param, DefType } from "../params/param"; +import { joinNeighborsR, splitOnDelim } from "../common/strings"; +/** @hidden */ +function quoteRegExp(string, param) { + var surroundPattern = ['', ''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!param) + return result; + switch (param.squash) { + case false: + surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; + break; + case true: + result = result.replace(/\/$/, ''); + surroundPattern = ['(?:\/(', ')|\/)?']; + break; + default: + surroundPattern = ["(" + param.squash + "|", ')?']; + break; + } + return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1]; +} +/** @hidden */ +var memoizeTo = function (obj, prop, fn) { + return obj[prop] = obj[prop] || fn(); +}; +/** @hidden */ +var splitOnSlash = splitOnDelim('/'); +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +var UrlMatcher = /** @class */ (function () { + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + function UrlMatcher(pattern, paramTypes, paramFactory, config) { + var _this = this; + this.config = config; + /** @hidden */ + this._cache = { path: [this] }; + /** @hidden */ + this._children = []; + /** @hidden */ + this._params = []; + /** @hidden */ + this._segments = []; + /** @hidden */ + this._compiled = []; + this.pattern = pattern; + this.config = defaults(this.config, { + params: {}, + strict: true, + caseInsensitive: false, + paramMap: identity + }); + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, last = 0, m, patterns = []; + var checkParamErrors = function (id) { + if (!UrlMatcher.nameValidator.test(id)) + throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); + if (find(_this._params, propEq('id', id))) + throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); + }; + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + var matchDetails = function (m, isSearch) { + // IE[78] returns '' for unmatched groups instead of null + var id = m[2] || m[3]; + var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\s\\S]*' : null); + var makeRegexpType = function (regexp) { return inherit(paramTypes.type(isSearch ? "query" : "path"), { + pattern: new RegExp(regexp, _this.config.caseInsensitive ? 'i' : undefined) + }); }; + return { + id: id, + regexp: regexp, + cfg: _this.config.params[id], + segment: pattern.substring(last, m.index), + type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp) + }; + }; + var p, segment; + while ((m = placeholder.exec(pattern))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) + break; // we're into the search part + checkParamErrors(p.id); + this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false))); + this._segments.push(p.segment); + patterns.push([p.segment, tail(this._params)]); + last = placeholder.lastIndex; + } + segment = pattern.substring(last); + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + if (i >= 0) { + var search = segment.substring(i); + segment = segment.substring(0, i); + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + checkParamErrors(p.id); + this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true))); + last = placeholder.lastIndex; + // check if ?& + } + } + } + this._segments.push(segment); + this._compiled = patterns.map(function (pattern) { return quoteRegExp.apply(null, pattern); }).concat(quoteRegExp(segment)); + } + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + UrlMatcher.prototype.append = function (url) { + this._children.push(url); + url._cache = { + path: this._cache.path.concat(url), + parent: this, + pattern: null, + }; + return url; + }; + /** @hidden */ + UrlMatcher.prototype.isRoot = function () { + return this._cache.path[0] === this; + }; + /** Returns the input pattern string */ + UrlMatcher.prototype.toString = function () { + return this.pattern; + }; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + UrlMatcher.prototype.exec = function (path, search, hash, options) { + var _this = this; + if (search === void 0) { search = {}; } + if (options === void 0) { options = {}; } + var match = memoizeTo(this._cache, 'pattern', function () { + return new RegExp([ + '^', + unnest(_this._cache.path.map(prop('_compiled'))).join(''), + _this.config.strict === false ? '\/?' : '', + '$' + ].join(''), _this.config.caseInsensitive ? 'i' : undefined); + }).exec(path); + if (!match) + return null; + //options = defaults(options, { isolate: false }); + var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {}; + if (nPathSegments !== match.length - 1) + throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); + function decodePathArray(string) { + var reverseString = function (str) { return str.split("").reverse().join(""); }; + var unquoteDashes = function (str) { return str.replace(/\\-/g, "-"); }; + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = map(split, reverseString); + return map(allReversed, unquoteDashes).reverse(); + } + for (var i = 0; i < nPathSegments; i++) { + var param = pathParams[i]; + var value = match[i + 1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (value && param.array === true) + value = decodePathArray(value); + if (isDefined(value)) + value = param.type.decode(value); + values[param.id] = param.value(value); + } + searchParams.forEach(function (param) { + var value = search[param.id]; + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (isDefined(value)) + value = param.type.decode(value); + values[param.id] = param.value(value); + }); + if (hash) + values["#"] = hash; + return values; + }; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + UrlMatcher.prototype.parameters = function (opts) { + if (opts === void 0) { opts = {}; } + if (opts.inherit === false) + return this._params; + return unnest(this._cache.path.map(function (matcher) { return matcher._params; })); + }; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + UrlMatcher.prototype.parameter = function (id, opts) { + var _this = this; + if (opts === void 0) { opts = {}; } + var findParam = function () { + for (var _i = 0, _a = _this._params; _i < _a.length; _i++) { + var param = _a[_i]; + if (param.id === id) + return param; + } + }; + var parent = this._cache.parent; + return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null; + }; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + UrlMatcher.prototype.validates = function (params) { + var validParamVal = function (param, val) { + return !param || param.validates(val); + }; + params = params || {}; + // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher + var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); }); + return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(allTrueR, true); + }; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + UrlMatcher.prototype.format = function (values) { + if (values === void 0) { values = {}; } + // Build the full path of UrlMatchers (including all parent UrlMatchers) + var urlMatchers = this._cache.path; + // Extract all the static segments and Params (processed as ParamDetails) + // into an ordered array + var pathSegmentsAndParams = urlMatchers.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .map(function (x) { return isString(x) ? x : getDetails(x); }); + // Extract the query params into a separate array + var queryParams = urlMatchers.map(UrlMatcher.queryParams) + .reduce(unnestR, []) + .map(getDetails); + var isInvalid = function (param) { return param.isValid === false; }; + if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) { + return null; + } + /** + * Given a Param, applies the parameter value, then returns detailed information about it + */ + function getDetails(param) { + // Normalize to typed value + var value = param.value(values[param.id]); + var isValid = param.validates(value); + var isDefaultValue = param.isDefaultValue(value); + // Check if we're in squash mode for the parameter + var squash = isDefaultValue ? param.squash : false; + // Allow the Parameter's Type to encode the value + var encoded = param.type.encode(value); + return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded }; + } + // Build up the path-portion from the list of static segments and parameters + var pathString = pathSegmentsAndParams.reduce(function (acc, x) { + // The element is a static segment (a raw string); just append it + if (isString(x)) + return acc + x; + // Otherwise, it's a ParamDetails. + var squash = x.squash, encoded = x.encoded, param = x.param; + // If squash is === true, try to remove a slash from the path + if (squash === true) + return (acc.match(/\/$/)) ? acc.slice(0, -1) : acc; + // If squash is a string, use the string for the param value + if (isString(squash)) + return acc + squash; + if (squash !== false) + return acc; // ? + if (encoded == null) + return acc; + // If this parameter value is an array, encode the value using encodeDashes + if (isArray(encoded)) + return acc + map(encoded, UrlMatcher.encodeDashes).join("-"); + // If the parameter type is "raw", then do not encodeURIComponent + if (param.raw) + return acc + encoded; + // Encode the value + return acc + encodeURIComponent(encoded); + }, ""); + // Build the query string by applying parameter values (array or regular) + // then mapping to key=value, then flattening and joining using "&" + var queryString = queryParams.map(function (paramDetails) { + var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue; + if (encoded == null || (isDefaultValue && squash !== false)) + return; + if (!isArray(encoded)) + encoded = [encoded]; + if (encoded.length === 0) + return; + if (!param.raw) + encoded = map(encoded, encodeURIComponent); + return encoded.map(function (val) { return param.id + "=" + val; }); + }).filter(identity).reduce(unnestR, []).join("&"); + // Concat the pathstring with the queryString (if exists) and the hashString (if exists) + return pathString + (queryString ? "?" + queryString : "") + (values["#"] ? "#" + values["#"] : ""); + }; + /** @hidden */ + UrlMatcher.encodeDashes = function (str) { + return encodeURIComponent(str).replace(/-/g, function (c) { return "%5C%" + c.charCodeAt(0).toString(16).toUpperCase(); }); + }; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + UrlMatcher.pathSegmentsAndParams = function (matcher) { + var staticSegments = matcher._segments; + var pathParams = matcher._params.filter(function (p) { return p.location === DefType.PATH; }); + return arrayTuples(staticSegments, pathParams.concat(undefined)) + .reduce(unnestR, []) + .filter(function (x) { return x !== "" && isDefined(x); }); + }; + /** @hidden Given a matcher, return an array with the matcher's query params */ + UrlMatcher.queryParams = function (matcher) { + return matcher._params.filter(function (p) { return p.location === DefType.SEARCH; }); + }; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + UrlMatcher.compare = function (a, b) { + /** + * Turn a UrlMatcher and all its parent matchers into an array + * of slash literals '/', string literals, and Param objects + * + * This example matcher matches strings like "/foo/:param/tail": + * var matcher = $umf.compile("/foo").append($umf.compile("/:param")).append($umf.compile("/")).append($umf.compile("tail")); + * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ] + * + * Caches the result as `matcher._cache.segments` + */ + var segments = function (matcher) { + return matcher._cache.segments = matcher._cache.segments || + matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams) + .reduce(unnestR, []) + .reduce(joinNeighborsR, []) + .map(function (x) { return isString(x) ? splitOnSlash(x) : x; }) + .reduce(unnestR, []); + }; + /** + * Gets the sort weight for each segment of a UrlMatcher + * + * Caches the result as `matcher._cache.weights` + */ + var weights = function (matcher) { + return matcher._cache.weights = matcher._cache.weights || + segments(matcher).map(function (segment) { + // Sort slashes first, then static strings, the Params + if (segment === '/') + return 1; + if (isString(segment)) + return 2; + if (segment instanceof Param) + return 3; + }); + }; + /** + * Pads shorter array in-place (mutates) + */ + var padArrays = function (l, r, padVal) { + var len = Math.max(l.length, r.length); + while (l.length < len) + l.push(padVal); + while (r.length < len) + r.push(padVal); + }; + var weightsA = weights(a), weightsB = weights(b); + padArrays(weightsA, weightsB, 0); + var cmp, i, pairs = arrayTuples(weightsA, weightsB); + for (i = 0; i < pairs.length; i++) { + cmp = pairs[i][0] - pairs[i][1]; + if (cmp !== 0) + return cmp; + } + return 0; + }; + /** @hidden */ + UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/; + return UrlMatcher; +}()); +export { UrlMatcher }; +//# sourceMappingURL=urlMatcher.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js.map new file mode 100644 index 00000000..f9095aba --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcher.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlMatcher.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlMatcher.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,kBAAkB;AAClB,OAAO,EACL,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAc,QAAQ,EAAE,OAAO,EAAE,WAAW,EACjG,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjE,cAAc;AACd,qBAAqB,MAAW,EAAE,KAAW;IAC3C,IAAI,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IACzF,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAAC,MAAM,CAAC,MAAM,CAAC;IAE1B,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QACrB,KAAK,KAAK;YACR,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,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AAG,GAAG;gBAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC;QAEF,IAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACjC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEpD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;gBAAC,MAAM,CAAC,GAAG,CAAC;QAC5B,CAAC;QAED,MAAM,CAAC,CAAC,CAAC;IACX,CAAC;IA5bD,cAAc;IACP,wBAAa,GAAW,2BAA2B,CAAC;IA4b7D,iBAAC;CAAA,AA9bD,IA8bC;SA9bY,UAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.d.ts new file mode 100644 index 00000000..a1c1715a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.d.ts @@ -0,0 +1,70 @@ +import { UrlMatcher } from "./urlMatcher"; +import { ParamTypes } from "../params/paramTypes"; +import { ParamTypeDefinition } from "../params/interface"; +import { Disposable } from "../interface"; +import { ParamFactory, UrlMatcherConfig } from "./interface"; +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +export declare class UrlMatcherFactory implements Disposable, UrlMatcherConfig { + /** @hidden */ paramTypes: ParamTypes; + /** @hidden */ _isCaseInsensitive: boolean; + /** @hidden */ _isStrictMode: boolean; + /** @hidden */ _defaultSquashPolicy: (boolean | string); + constructor(); + /** @inheritdoc */ + caseInsensitive(value?: boolean): boolean; + /** @inheritdoc */ + strictMode(value?: boolean): boolean; + /** @inheritdoc */ + defaultSquashPolicy(value?: (boolean | string)): string | boolean; + /** @hidden */ + private _getConfig; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + compile(pattern: string, config?: { + [key: string]: any; + }): UrlMatcher; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + isMatcher(object: any): boolean; + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition): any; + /** @hidden */ + $get(): this; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + paramFactory: ParamFactory; + /** @internalapi */ + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js new file mode 100644 index 00000000..f2bf5025 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js @@ -0,0 +1,125 @@ +/** + * @internalapi + * @module url + */ /** for typedoc */ +import { forEach, extend } from "../common/common"; +import { isObject, isDefined, isFunction, isString } from "../common/predicates"; +import { UrlMatcher } from "./urlMatcher"; +import { Param, DefType } from "../params/param"; +import { ParamTypes } from "../params/paramTypes"; +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +var UrlMatcherFactory = /** @class */ (function () { + function UrlMatcherFactory() { + var _this = this; + /** @hidden */ this.paramTypes = new ParamTypes(); + /** @hidden */ this._isCaseInsensitive = false; + /** @hidden */ this._isStrictMode = true; + /** @hidden */ this._defaultSquashPolicy = false; + /** @hidden */ + this._getConfig = function (config) { + return extend({ strict: _this._isStrictMode, caseInsensitive: _this._isCaseInsensitive }, config); + }; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + this.paramFactory = { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig: function (id, type, config) { + return new Param(id, type, config, DefType.CONFIG, _this); + }, + /** Creates a new [[Param]] from a url PATH */ + fromPath: function (id, type, config) { + return new Param(id, type, config, DefType.PATH, _this); + }, + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch: function (id, type, config) { + return new Param(id, type, config, DefType.SEARCH, _this); + }, + }; + extend(this, { UrlMatcher: UrlMatcher, Param: Param }); + } + /** @inheritdoc */ + UrlMatcherFactory.prototype.caseInsensitive = function (value) { + return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.strictMode = function (value) { + return this._isStrictMode = isDefined(value) ? value : this._isStrictMode; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.defaultSquashPolicy = function (value) { + if (isDefined(value) && value !== true && value !== false && !isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy; + }; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + UrlMatcherFactory.prototype.compile = function (pattern, config) { + return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config)); + }; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + UrlMatcherFactory.prototype.isMatcher = function (object) { + // TODO: typeof? + if (!isObject(object)) + return false; + var result = true; + forEach(UrlMatcher.prototype, function (val, name) { + if (isFunction(val)) + result = result && (isDefined(object[name]) && isFunction(object[name])); + }); + return result; + }; + ; + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + UrlMatcherFactory.prototype.type = function (name, definition, definitionFn) { + var type = this.paramTypes.type(name, definition, definitionFn); + return !isDefined(definition) ? type : this; + }; + ; + /** @hidden */ + UrlMatcherFactory.prototype.$get = function () { + this.paramTypes.enqueue = false; + this.paramTypes._flushTypeQueue(); + return this; + }; + ; + /** @internalapi */ + UrlMatcherFactory.prototype.dispose = function () { + this.paramTypes.dispose(); + }; + return UrlMatcherFactory; +}()); +export { UrlMatcherFactory }; +//# sourceMappingURL=urlMatcherFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js.map new file mode 100644 index 00000000..ddbd04f0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlMatcherFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlMatcherFactory.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMlD;;;;;GAKG;AACH;IAME;QAAA,iBAEC;QAPD,cAAc,CAAC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7C,cAAc,CAAC,uBAAkB,GAAY,KAAK,CAAC;QACnD,cAAc,CAAC,kBAAa,GAAY,IAAI,CAAC;QAC7C,cAAc,CAAC,yBAAoB,GAAqB,KAAK,CAAC;QAuB9D,cAAc;QACN,eAAU,GAAG,UAAC,MAAM;YACxB,OAAA,MAAM,CAAC,EAAE,MAAM,EAAE,KAAI,CAAC,aAAa,EAAE,eAAe,EAAE,KAAI,CAAC,kBAAkB,EAAE,EAAE,MAAM,CAAC;QAAxF,CAAwF,CAAC;QA8D7F,0EAA0E;QAC1E,iBAAY,GAAiB;YAC3B,kDAAkD;YAClD,UAAU,EAAE,UAAC,EAAU,EAAE,IAAe,EAAE,MAAW;gBACjD,OAAA,IAAI,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,KAAI,CAAC;YAAjD,CAAiD;YAErD,8CAA8C;YAC9C,QAAQ,EAAE,UAAC,EAAU,EAAE,IAAe,EAAE,MAAW;gBAC/C,OAAA,IAAI,KAAK,CAAC,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;QACE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACH,wBAAC;AAAD,CAAC,AA9GD,IA8GC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.d.ts new file mode 100644 index 00000000..48c68695 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.d.ts @@ -0,0 +1,117 @@ +import { UrlMatcher } from './urlMatcher'; +import { RawParams } from '../params/interface'; +import { Disposable } from '../interface'; +import { UIRouter } from '../router'; +import { UrlRuleFactory } from './urlRule'; +import { TargetState } from '../state/targetState'; +import { MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRulesApi, UrlSyncApi } from './interface'; +import { TargetStateDef } from '../state/interface'; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +export declare class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable { + /** used to create [[UrlRule]] objects for common cases */ + urlRuleFactory: UrlRuleFactory; + /** @hidden */ private _router; + /** @hidden */ private location; + /** @hidden */ private _sortFn; + /** @hidden */ private _stopFn; + /** @hidden */ _rules: UrlRule[]; + /** @hidden */ private _otherwiseFn; + /** @hidden */ interceptDeferred: boolean; + /** @hidden */ private _id; + /** @hidden */ private _sorted; + /** @hidden */ + constructor(router: UIRouter); + /** @internalapi */ + dispose(): void; + /** @inheritdoc */ + sort(compareFn?: (a: UrlRule, b: UrlRule) => number): void; + private ensureSorted(); + private stableSort(arr, compareFn); + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + match(url: UrlParts): MatchResult; + /** @inheritdoc */ + sync(evt?: any): void; + /** @inheritdoc */ + listen(enabled?: boolean): Function; + /** + * Internal API. + * @internalapi + */ + update(read?: boolean): void; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + push(urlMatcher: UrlMatcher, params?: RawParams, options?: { + replace?: (string | boolean); + }): void; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + href(urlMatcher: UrlMatcher, params?: any, options?: { + absolute: boolean; + }): string; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + rule(rule: UrlRule): Function; + /** @inheritdoc */ + removeRule(rule: any): void; + /** @inheritdoc */ + rules(): UrlRule[]; + /** @inheritdoc */ + otherwise(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** @inheritdoc */ + initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** @inheritdoc */ + when(matcher: (RegExp | UrlMatcher | string), handler: string | UrlRuleHandlerFn, options?: { + priority: number; + }): UrlRule; + /** @inheritdoc */ + deferIntercept(defer?: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js new file mode 100644 index 00000000..26a01e33 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js @@ -0,0 +1,313 @@ +/** + * @internalapi + * @module url + */ +/** for typedoc */ +import { createProxyFunctions, extend, removeFrom } from '../common/common'; +import { isDefined, isFunction, isString } from '../common/predicates'; +import { UrlMatcher } from './urlMatcher'; +import { is, pattern, val } from '../common/hof'; +import { UrlRuleFactory } from './urlRule'; +import { TargetState } from '../state/targetState'; +import { stripFile } from '../common'; +/** @hidden */ +function appendBasePath(url, isHtml5, absolute, baseHref) { + if (baseHref === '/') + return url; + if (isHtml5) + return stripFile(baseHref) + url; + if (absolute) + return baseHref.slice(1) + url; + return url; +} +/** @hidden */ +var prioritySort = function (a, b) { + return (b.priority || 0) - (a.priority || 0); +}; +/** @hidden */ +var typeSort = function (a, b) { + var weights = { "STATE": 4, "URLMATCHER": 4, "REGEXP": 3, "RAW": 2, "OTHER": 1 }; + return (weights[a.type] || 0) - (weights[b.type] || 0); +}; +/** @hidden */ +var urlMatcherSort = function (a, b) { + return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher); +}; +/** @hidden */ +var idSort = function (a, b) { + // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL + var useMatchPriority = { STATE: true, URLMATCHER: true }; + var equal = useMatchPriority[a.type] && useMatchPriority[b.type]; + return equal ? 0 : (a.$id || 0) - (b.$id || 0); +}; +/** + * Default rule priority sorting function. + * + * Sorts rules by: + * + * - Explicit priority (set rule priority using [[UrlRulesApi.when]]) + * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1) + * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule. + * - Rule registration order (for rule types other than STATE and URLMATCHER) + * - Equally sorted State and UrlMatcher rules will each match the URL. + * Then, the *best* match is chosen based on how many parameter values were matched. + * + * @coreapi + */ +var defaultRuleSortFn; +defaultRuleSortFn = function (a, b) { + var cmp = prioritySort(a, b); + if (cmp !== 0) + return cmp; + cmp = typeSort(a, b); + if (cmp !== 0) + return cmp; + cmp = urlMatcherSort(a, b); + if (cmp !== 0) + return cmp; + return idSort(a, b); +}; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +var UrlRouter = /** @class */ (function () { + /** @hidden */ + function UrlRouter(router) { + /** @hidden */ this._sortFn = defaultRuleSortFn; + /** @hidden */ this._rules = []; + /** @hidden */ this.interceptDeferred = false; + /** @hidden */ this._id = 0; + /** @hidden */ this._sorted = false; + this._router = router; + this.urlRuleFactory = new UrlRuleFactory(router); + createProxyFunctions(val(UrlRouter.prototype), this, val(this)); + } + /** @internalapi */ + UrlRouter.prototype.dispose = function () { + this.listen(false); + this._rules = []; + delete this._otherwiseFn; + }; + /** @inheritdoc */ + UrlRouter.prototype.sort = function (compareFn) { + this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn); + this._sorted = true; + }; + UrlRouter.prototype.ensureSorted = function () { + this._sorted || this.sort(); + }; + UrlRouter.prototype.stableSort = function (arr, compareFn) { + var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); }); + arrOfWrapper.sort(function (wrapperA, wrapperB) { + var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem); + return cmpDiff === 0 + ? wrapperA.idx - wrapperB.idx + : cmpDiff; + }); + return arrOfWrapper.map(function (wrapper) { return wrapper.elem; }); + }; + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + UrlRouter.prototype.match = function (url) { + var _this = this; + this.ensureSorted(); + url = extend({ path: '', search: {}, hash: '' }, url); + var rules = this.rules(); + if (this._otherwiseFn) + rules.push(this._otherwiseFn); + // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined + var checkRule = function (rule) { + var match = rule.match(url, _this._router); + return match && { match: match, rule: rule, weight: rule.matchPriority(match) }; + }; + // The rules are pre-sorted. + // - Find the first matching rule. + // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`. + // - Choose the rule with the highest match weight. + var best; + for (var i = 0; i < rules.length; i++) { + // Stop when there is a 'best' rule and the next rule sorts differently than it. + if (best && this._sortFn(rules[i], best.rule) !== 0) + break; + var current = checkRule(rules[i]); + // Pick the best MatchResult + best = (!best || current && current.weight > best.weight) ? current : best; + } + return best; + }; + /** @inheritdoc */ + UrlRouter.prototype.sync = function (evt) { + if (evt && evt.defaultPrevented) + return; + var router = this._router, $url = router.urlService, $state = router.stateService; + var url = { + path: $url.path(), search: $url.search(), hash: $url.hash(), + }; + var best = this.match(url); + var applyResult = pattern([ + [isString, function (newurl) { return $url.url(newurl, true); }], + [TargetState.isDef, function (def) { return $state.go(def.state, def.params, def.options); }], + [is(TargetState), function (target) { return $state.go(target.state(), target.params(), target.options()); }], + ]); + applyResult(best && best.rule.handler(best.match, url, router)); + }; + /** @inheritdoc */ + UrlRouter.prototype.listen = function (enabled) { + var _this = this; + if (enabled === false) { + this._stopFn && this._stopFn(); + delete this._stopFn; + } + else { + return this._stopFn = this._stopFn || this._router.urlService.onChange(function (evt) { return _this.sync(evt); }); + } + }; + /** + * Internal API. + * @internalapi + */ + UrlRouter.prototype.update = function (read) { + var $url = this._router.locationService; + if (read) { + this.location = $url.path(); + return; + } + if ($url.path() === this.location) + return; + $url.url(this.location, true); + }; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + UrlRouter.prototype.push = function (urlMatcher, params, options) { + var replace = options && !!options.replace; + this._router.urlService.url(urlMatcher.format(params || {}), replace); + }; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + UrlRouter.prototype.href = function (urlMatcher, params, options) { + var url = urlMatcher.format(params); + if (url == null) + return null; + options = options || { absolute: false }; + var cfg = this._router.urlService.config; + var isHtml5 = cfg.html5Mode(); + if (!isHtml5 && url !== null) { + url = "#" + cfg.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref()); + if (!options.absolute || !url) { + return url; + } + var slash = (!isHtml5 && url ? '/' : ''), port = cfg.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + return [cfg.protocol(), '://', cfg.host(), port, slash, url].join(''); + }; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + UrlRouter.prototype.rule = function (rule) { + var _this = this; + if (!UrlRuleFactory.isUrlRule(rule)) + throw new Error("invalid rule"); + rule.$id = this._id++; + rule.priority = rule.priority || 0; + this._rules.push(rule); + this._sorted = false; + return function () { return _this.removeRule(rule); }; + }; + /** @inheritdoc */ + UrlRouter.prototype.removeRule = function (rule) { + removeFrom(this._rules, rule); + }; + /** @inheritdoc */ + UrlRouter.prototype.rules = function () { + this.ensureSorted(); + return this._rules.slice(); + }; + /** @inheritdoc */ + UrlRouter.prototype.otherwise = function (handler) { + var handlerFn = getHandlerFn(handler); + this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn); + this._sorted = false; + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.initial = function (handler) { + var handlerFn = getHandlerFn(handler); + var matchFn = function (urlParts, router) { + return router.globals.transitionHistory.size() === 0 && !!/^\/?$/.exec(urlParts.path); + }; + this.rule(this.urlRuleFactory.create(matchFn, handlerFn)); + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.when = function (matcher, handler, options) { + var rule = this.urlRuleFactory.create(matcher, handler); + if (isDefined(options && options.priority)) + rule.priority = options.priority; + this.rule(rule); + return rule; + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.deferIntercept = function (defer) { + if (defer === undefined) + defer = true; + this.interceptDeferred = defer; + }; + ; + return UrlRouter; +}()); +export { UrlRouter }; +function getHandlerFn(handler) { + if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) { + throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property"); + } + return isFunction(handler) ? handler : val(handler); +} +//# sourceMappingURL=urlRouter.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js.map new file mode 100644 index 00000000..9208e570 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRouter.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlRouter.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlRouter.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,kBAAkB;AAClB,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACjD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AAC,CAAC,KAAK,KAAK,SAAS,CAAC;YAAC,KAAK,GAAG,IAAI,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAAA,CAAC;IACJ,gBAAC;AAAD,CAAC,AAlQD,IAkQC;;AAED,sBAAsB,OAA2D;IAC/E,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3G,MAAM,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;IAC9G,CAAC;IACD,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAA2B,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.d.ts new file mode 100644 index 00000000..3f4b6dba --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.d.ts @@ -0,0 +1,123 @@ +/** + * @coreapi + * @module url + */ /** */ +import { UrlMatcher } from "./urlMatcher"; +import { UIRouter } from "../router"; +import { StateObject } from "../state/stateObject"; +import { UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, MatcherUrlRule, StateRule, RegExpRule } from "./interface"; +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +export declare class UrlRuleFactory { + router: UIRouter; + constructor(router: UIRouter); + compile(str: string): UrlMatcher; + static isUrlRule: (obj: any) => boolean; + create(what: string | UrlMatcher | StateObject | RegExp | UrlRuleMatchFn, handler?: string | UrlRuleHandlerFn): UrlRule; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + fromUrlMatcher(urlMatcher: UrlMatcher, handler: string | UrlMatcher | UrlRuleHandlerFn): MatcherUrlRule; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + fromState(state: StateObject, router: UIRouter): StateRule; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + fromRegExp(regexp: RegExp, handler: string | UrlRuleHandlerFn): RegExpRule; +} +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +export declare class BaseUrlRule implements UrlRule { + match: UrlRuleMatchFn; + $id: number; + priority: number; + type: UrlRuleType; + handler: UrlRuleHandlerFn; + matchPriority: (match: any) => number; + constructor(match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js new file mode 100644 index 00000000..933609cd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js @@ -0,0 +1,207 @@ +/** + * @coreapi + * @module url + */ /** */ +import { UrlMatcher } from "./urlMatcher"; +import { isString, isDefined, isFunction, isState } from "../common/predicates"; +import { identity, extend } from "../common/common"; +import { is, pattern } from "../common/hof"; +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +var UrlRuleFactory = /** @class */ (function () { + function UrlRuleFactory(router) { + this.router = router; + } + UrlRuleFactory.prototype.compile = function (str) { + return this.router.urlMatcherFactory.compile(str); + }; + UrlRuleFactory.prototype.create = function (what, handler) { + var _this = this; + var makeRule = pattern([ + [isString, function (_what) { return makeRule(_this.compile(_what)); }], + [is(UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }], + [isState, function (_what) { return _this.fromState(_what, _this.router); }], + [is(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }], + [isFunction, function (_what) { return new BaseUrlRule(_what, handler); }], + ]); + var rule = makeRule(what); + if (!rule) + throw new Error("invalid 'what' in when()"); + return rule; + }; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) { + var _handler = handler; + if (isString(handler)) + handler = this.router.urlMatcherFactory.compile(handler); + if (is(UrlMatcher)(handler)) + _handler = function (match) { return handler.format(match); }; + function match(url) { + var match = urlMatcher.exec(url.path, url.search, url.hash); + return urlMatcher.validates(match) && match; + } + // Prioritize URLs, lowest to highest: + // - Some optional URL parameters, but none matched + // - No optional parameters in URL + // - Some optional parameters, some matched + // - Some optional parameters, all matched + function matchPriority(params) { + var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; }); + if (!optional.length) + return 0.000001; + var matched = optional.filter(function (param) { return params[param.id]; }); + return matched.length / optional.length; + } + var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: "URLMATCHER" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + UrlRuleFactory.prototype.fromState = function (state, router) { + /** + * Handles match by transitioning to matched state + * + * First checks if the router should start a new transition. + * A new transition is not required if the current state's URL + * and the new URL are already identical + */ + var handler = function (match) { + var $state = router.stateService; + var globals = router.globals; + if ($state.href(state, match) !== $state.href(globals.current, globals.params)) { + $state.transitionTo(state, match, { inherit: true, source: "url" }); + } + }; + var details = { state: state, type: "STATE" }; + return extend(this.fromUrlMatcher(state.url, handler), details); + }; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) { + if (regexp.global || regexp.sticky) + throw new Error("Rule RegExp must not be global or sticky"); + /** + * If handler is a string, the url will be replaced by the string. + * If the string has any String.replace() style variables in it (like `$2`), + * they will be replaced by the captures from [[match]] + */ + var redirectUrlTo = function (match) { + // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern + return handler.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + }; + var _handler = isString(handler) ? redirectUrlTo : handler; + var match = function (url) { + return regexp.exec(url.path); + }; + var details = { regexp: regexp, type: "REGEXP" }; + return extend(new BaseUrlRule(match, _handler), details); + }; + UrlRuleFactory.isUrlRule = function (obj) { + return obj && ['type', 'match', 'handler'].every(function (key) { return isDefined(obj[key]); }); + }; + return UrlRuleFactory; +}()); +export { UrlRuleFactory }; +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +var BaseUrlRule = /** @class */ (function () { + function BaseUrlRule(match, handler) { + var _this = this; + this.match = match; + this.type = "RAW"; + this.matchPriority = function (match) { return 0 - _this.$id; }; + this.handler = handler || identity; + } + return BaseUrlRule; +}()); +export { BaseUrlRule }; +//# sourceMappingURL=urlRule.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js.map new file mode 100644 index 00000000..f8a4fe1c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlRule.js.map @@ -0,0 +1,13 @@ +{ + "version": 3,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AKG;AACH;IAOE,qBAAmB,KAAqB,EAAE,OAA0B;QAApE,iBAEC;QAFkB,UAAK,GAAL,KAAK,CAAgB;QAJxC,SAAI,GAAgB,KAAK,CAAC;QAE1B,kBAAa,GAAG,UAAC,KAAK,IAAK,OAAA,CAAC,GAAG,KAAI,CAAC,GAAG,EAAZ,CAAY,CAAC;QAGtC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;IACrC,CAAC;IACH,kBAAC;AAAD,CAAC,AAVD,IAUC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.d.ts new file mode 100644 index 00000000..11b49c9f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.d.ts @@ -0,0 +1,63 @@ +/** + * @coreapi + * @module url + */ /** */ +import { UIRouter } from "../router"; +import { LocationServices, LocationConfig } from "../common/coreservices"; +import { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from "./interface"; +/** + * API for URL management + */ +export declare class UrlService implements LocationServices, UrlSyncApi { + /** @hidden */ + static locationServiceStub: LocationServices; + /** @hidden */ + static locationConfigStub: LocationConfig; + /** @inheritdoc */ + url(): string; + /** @inheritdoc */ + url(newurl: string, replace?: boolean, state?: any): void; + /** @inheritdoc */ + path(): string; + /** @inheritdoc */ + search(): { + [key: string]: any; + }; + /** @inheritdoc */ + hash(): string; + /** @inheritdoc */ + onChange(callback: Function): Function; + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + parts(): UrlParts; + dispose(): void; + /** @inheritdoc */ + sync(evt?: any): void; + /** @inheritdoc */ + listen(enabled?: boolean): Function; + /** @inheritdoc */ + deferIntercept(defer?: boolean): void; + /** @inheritdoc */ + match(urlParts: UrlParts): MatchResult; + /** + * A nested API for managing URL rules and rewrites + * + * See: [[UrlRulesApi]] for details + */ + rules: UrlRulesApi; + /** + * A nested API to configure the URL and retrieve URL information + * + * See: [[UrlConfigApi]] for details + */ + config: UrlConfigApi; + /** @hidden */ + private router; + /** @hidden */ + constructor(router: UIRouter, lateBind?: boolean); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js new file mode 100644 index 00000000..386f0e4b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js @@ -0,0 +1,78 @@ +/** + * @coreapi + * @module url + */ /** */ +import { notImplemented } from "../common/coreservices"; +import { noop, createProxyFunctions } from "../common/common"; +/** @hidden */ +var makeStub = function (keys) { + return keys.reduce(function (acc, key) { return (acc[key] = notImplemented(key), acc); }, { dispose: noop }); +}; +/** @hidden */ var locationServicesFns = ["url", "path", "search", "hash", "onChange"]; +/** @hidden */ var locationConfigFns = ["port", "protocol", "host", "baseHref", "html5Mode", "hashPrefix"]; +/** @hidden */ var umfFns = ["type", "caseInsensitive", "strictMode", "defaultSquashPolicy"]; +/** @hidden */ var rulesFns = ["sort", "when", "initial", "otherwise", "rules", "rule", "removeRule"]; +/** @hidden */ var syncFns = ["deferIntercept", "listen", "sync", "match"]; +/** + * API for URL management + */ +var UrlService = /** @class */ (function () { + /** @hidden */ + function UrlService(router, lateBind) { + if (lateBind === void 0) { lateBind = true; } + this.router = router; + this.rules = {}; + this.config = {}; + // proxy function calls from UrlService to the LocationService/LocationConfig + var locationServices = function () { return router.locationService; }; + createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind); + var locationConfig = function () { return router.locationConfig; }; + createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind); + var umf = function () { return router.urlMatcherFactory; }; + createProxyFunctions(umf, this.config, umf, umfFns); + var urlRouter = function () { return router.urlRouter; }; + createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns); + createProxyFunctions(urlRouter, this, urlRouter, syncFns); + } + UrlService.prototype.url = function (newurl, replace, state) { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.path = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.search = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.hash = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.onChange = function (callback) { return; }; + ; + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + UrlService.prototype.parts = function () { + return { path: this.path(), search: this.search(), hash: this.hash() }; + }; + UrlService.prototype.dispose = function () { }; + /** @inheritdoc */ + UrlService.prototype.sync = function (evt) { return; }; + /** @inheritdoc */ + UrlService.prototype.listen = function (enabled) { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.deferIntercept = function (defer) { return; }; + /** @inheritdoc */ + UrlService.prototype.match = function (urlParts) { return; }; + /** @hidden */ + UrlService.locationServiceStub = makeStub(locationServicesFns); + /** @hidden */ + UrlService.locationConfigStub = makeStub(locationConfigFns); + return UrlService; +}()); +export { UrlService }; +//# sourceMappingURL=urlService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js.map new file mode 100644 index 00000000..3122f631 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/url/urlService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlService.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AAGV,OAAO,EAAoB,cAAc,EAAkB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG9D,cAAc;AACd,IAAM,QAAQ,GAAG,UAAC,IAAc;IAC5B,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAArC,CAAqC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAnF,CAAmF,CAAC;AAExF,cAAc,CAAC,IAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AACzF,cAAc,CAAC,IAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAC7G,cAAc,CAAC,IAAM,MAAM,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC;AAC/F,cAAc,CAAC,IAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AACxG,cAAc,CAAC,IAAM,OAAO,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7E;;GAEG;AACH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AC;IAC5C,kBAAkB;IAClB,yBAAI,GAAJ,cAAiB,MAAM,CAAA,CAAC,CAAC;IAAA,CAAC;IAC1B,kBAAkB;IAClB,6BAAQ,GAAR,UAAS,QAAkB,IAAc,MAAM,CAAA,CAAC,CAAC;IAAA,CAAC;IAGlD;;;;;;OAMG;IACH,0BAAK,GAAL;QACE,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IACxE,CAAC;IAED,4BAAO,GAAP,cAAY,CAAC;IAEb,kBAAkB;IAClB,yBAAI,GAAJ,UAAK,GAAI,IAAI,MAAM,CAAA,CAAC,CAAC;IACrB,kBAAkB;IAClB,2BAAM,GAAN,UAAO,OAAiB,IAAc,MAAM,CAAA,CAAC,CAAC;IAAA,CAAC;IAC/C,kBAAkB;IAClB,mCAAc,GAAd,UAAe,KAAe,IAAI,MAAM,CAAA,CAAC,CAAC;IAC1C,kBAAkB;IAClB,0BAAK,GAAL,UAAM,QAAkB,IAAiB,MAAM,CAAA,CAAC,CAAC;IAxCjD,cAAc;IACP,8BAAmB,GAAqB,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC7E,cAAc;IACP,6BAAkB,GAAmB,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IA4E1E,iBAAC;CAAA,AAhFD,IAgFC;SAhFY,UAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.d.ts new file mode 100644 index 00000000..bfd03885 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.d.ts @@ -0,0 +1,6 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +export * from "./vanilla/index"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js new file mode 100644 index 00000000..1d9698b4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js @@ -0,0 +1,7 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +export * from "./vanilla/index"; +//# sourceMappingURL=vanilla.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js.map new file mode 100644 index 00000000..21b7ec29 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "vanilla.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,cAAc,iBAAiB,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./vanilla/index\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.d.ts new file mode 100644 index 00000000..298fa1a2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.d.ts @@ -0,0 +1,48 @@ +/** + * @internalapi + * @module vanilla + */ /** */ +import { LocationServices } from '../common'; +import { Disposable } from '../interface'; +import { UIRouter } from '../router'; +import { HistoryLike, LocationLike } from './interface'; +/** A base `LocationServices` */ +export declare abstract class BaseLocationServices implements LocationServices, Disposable { + fireAfterUpdate: boolean; + constructor(router: UIRouter, fireAfterUpdate: boolean); + _listener: (evt: any) => void; + private _listeners; + _location: LocationLike; + _history: HistoryLike; + /** + * This should return the current internal URL representation. + * + * The internal URL includes only the portion that UI-Router matches. + * It does not include: + * - protocol + * - server + * - port + * - base href or hash + */ + abstract _get(): string; + /** + * This should set the current URL. + * + * The `url` param should include only the portion that UI-Router matches on. + * It should not include: + * - protocol + * - server + * - port + * - base href or hash + * + * However, after this function completes, the browser URL should reflect the entire (fully qualified) + * HREF including those data. + */ + abstract _set(state: any, title: string, url: string, replace: boolean): any; + hash: () => any; + path: () => any; + search: () => any; + url(url?: string, replace?: boolean): string; + onChange(cb: EventListener): () => Function[]; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js new file mode 100644 index 00000000..77f81fc7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js @@ -0,0 +1,41 @@ +/** + * @internalapi + * @module vanilla + */ /** */ +import { deregAll, isDefined, removeFrom, root } from '../common'; +import { buildUrl, getParams, parseUrl } from './utils'; +/** A base `LocationServices` */ +var BaseLocationServices = /** @class */ (function () { + function BaseLocationServices(router, fireAfterUpdate) { + var _this = this; + this.fireAfterUpdate = fireAfterUpdate; + this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); }; + this._listeners = []; + this.hash = function () { return parseUrl(_this._get()).hash; }; + this.path = function () { return parseUrl(_this._get()).path; }; + this.search = function () { return getParams(parseUrl(_this._get()).search); }; + this._location = root.location; + this._history = root.history; + } + BaseLocationServices.prototype.url = function (url, replace) { + if (replace === void 0) { replace = true; } + if (isDefined(url) && url !== this._get()) { + this._set(null, null, url, replace); + if (this.fireAfterUpdate) { + this._listeners.forEach(function (cb) { return cb({ url: url }); }); + } + } + return buildUrl(this); + }; + BaseLocationServices.prototype.onChange = function (cb) { + var _this = this; + this._listeners.push(cb); + return function () { return removeFrom(_this._listeners, cb); }; + }; + BaseLocationServices.prototype.dispose = function (router) { + deregAll(this._listeners); + }; + return BaseLocationServices; +}()); +export { BaseLocationServices }; +//# sourceMappingURL=baseLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js.map new file mode 100644 index 00000000..bd647e8f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "baseLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/baseLocationService.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,MAAM;AAEV,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAoB,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIpF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExD,gCAAgC;AAChC;IACE,8BAAY,MAAgB,EAAS,eAAwB;QAA7D,iBAGC;QAHoC,oBAAe,GAAf,eAAe,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AR,UAAS,EAAiB;QAA1B,iBAGC;QAFC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,MAAM,CAAC,cAAM,OAAA,UAAU,CAAC,KAAI,CAAC,UAAU,EAAE,EAAE,CAAC,EAA/B,CAA+B,CAAC;IAC/C,CAAC;IAED,sCAAO,GAAP,UAAQ,MAAgB;QACtB,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC;IACH,2BAAC;AAAD,CAAC,AA/DD,IA+DC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.d.ts new file mode 100644 index 00000000..cc7422de --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.d.ts @@ -0,0 +1,16 @@ +import { LocationConfig } from "../common/coreservices"; +/** A `LocationConfig` that delegates to the browser's `location` object */ +export declare class BrowserLocationConfig implements LocationConfig { + private _isHtml5; + private _baseHref; + private _hashPrefix; + constructor(router?: any, _isHtml5?: boolean); + port(): number; + protocol(): string; + host(): string; + html5Mode(): boolean; + hashPrefix(): string; + baseHref(href?: string): string; + applyDocumentBaseHref(): string; + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js new file mode 100644 index 00000000..afc0c123 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js @@ -0,0 +1,46 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { isDefined } from "../common/predicates"; +/** A `LocationConfig` that delegates to the browser's `location` object */ +var BrowserLocationConfig = /** @class */ (function () { + function BrowserLocationConfig(router, _isHtml5) { + if (_isHtml5 === void 0) { _isHtml5 = false; } + this._isHtml5 = _isHtml5; + this._baseHref = undefined; + this._hashPrefix = ""; + } + BrowserLocationConfig.prototype.port = function () { + if (location.port) { + return Number(location.port); + } + return this.protocol() === 'https' ? 443 : 80; + }; + BrowserLocationConfig.prototype.protocol = function () { + return location.protocol.replace(/:/g, ''); + }; + BrowserLocationConfig.prototype.host = function () { + return location.hostname; + }; + BrowserLocationConfig.prototype.html5Mode = function () { + return this._isHtml5; + }; + BrowserLocationConfig.prototype.hashPrefix = function (newprefix) { + return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix; + }; + ; + BrowserLocationConfig.prototype.baseHref = function (href) { + return isDefined(href) ? this._baseHref = href : + isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref(); + }; + BrowserLocationConfig.prototype.applyDocumentBaseHref = function () { + var baseTag = document.getElementsByTagName("base")[0]; + return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : ""; + }; + BrowserLocationConfig.prototype.dispose = function () { }; + return BrowserLocationConfig; +}()); +export { BrowserLocationConfig }; +//# sourceMappingURL=browserLocationConfig.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js.map new file mode 100644 index 00000000..aa9525f2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "browserLocationConfig.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/browserLocationConfig.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,2EAA2E;AAC3E;IAIE,+BAAY,MAAO,EAAU,QAAgB;QAAhB,yBAAA,EAAA,gBAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAHrC,cAAS,GAAG,SAAS,CAAC;QACtB,gBAAW,GAAG,EAAE,CAAC;IAEwB,CAAC;IAElD,oCAAI,GAAJ;QACE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,CAAC,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la\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.d.ts new file mode 100644 index 00000000..884b662c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.d.ts @@ -0,0 +1,9 @@ +import { UIRouter } from '../router'; +import { BaseLocationServices } from './baseLocationService'; +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +export declare class HashLocationService extends BaseLocationServices { + constructor(router: UIRouter); + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js new file mode 100644 index 00000000..58022abb --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js @@ -0,0 +1,39 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +import { root, trimHashVal } from '../common'; +import { BaseLocationServices } from './baseLocationService'; +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +var HashLocationService = /** @class */ (function (_super) { + __extends(HashLocationService, _super); + function HashLocationService(router) { + var _this = _super.call(this, router, false) || this; + root.addEventListener('hashchange', _this._listener, false); + return _this; + } + HashLocationService.prototype._get = function () { + return trimHashVal(this._location.hash); + }; + HashLocationService.prototype._set = function (state, title, url, replace) { + this._location.hash = url; + }; + HashLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('hashchange', this._listener); + }; + return HashLocationService; +}(BaseLocationServices)); +export { HashLocationService }; +//# sourceMappingURL=hashLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js.map new file mode 100644 index 00000000..ae871710 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hashLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/hashLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;;;;AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,0FAA0F;AAC1F;IAAyC,uCAAoB;IAC3D,6BAAY,MAAgB;QAA5B,YACE,kBAAM,MAAM,EAAE,KAAK,CAAC,SAErB;QADC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;;IAC7D,CAAC;IAED,kCAAI,GAAJ;QACE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACD,kCAAI,GAAJ,UAAK,KAAU,EAAE,KAAa,EAAE,GAAW,EAAE,OAAgB;QAC3D,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,GAAG,CAAC;IAC5B,CAAC;IAED,qCAAO,GAAP,UAAS,MAAgB;QACvB,iBAAM,OAAO,YAAC,MAAM,CAAC,CAAC;QACtB,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,CAAyC,oBAAoB,GAiB5D", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.d.ts new file mode 100644 index 00000000..010c5068 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.d.ts @@ -0,0 +1,19 @@ +/** + * Naive, pure JS implementation of core ui-router services + * + * + * @internalapi + * @module vanilla + */ +/** */ +export * from "./interface"; +export * from "./q"; +export * from "./injector"; +export * from "./baseLocationService"; +export * from "./hashLocationService"; +export * from "./memoryLocationService"; +export * from "./pushStateLocationService"; +export * from "./memoryLocationConfig"; +export * from "./browserLocationConfig"; +export * from "./utils"; +export * from "./plugins"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js new file mode 100644 index 00000000..9f4f4c99 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js @@ -0,0 +1,11 @@ +export * from "./q"; +export * from "./injector"; +export * from "./baseLocationService"; +export * from "./hashLocationService"; +export * from "./memoryLocationService"; +export * from "./pushStateLocationService"; +export * from "./memoryLocationConfig"; +export * from "./browserLocationConfig"; +export * from "./utils"; +export * from "./plugins"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js.map new file mode 100644 index 00000000..b472efe4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/index.ts" + ], + "names": [], + "mappings": "AAUA,cAAc,KAAK,CAAC;AACpB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC", + "sourcesContent": [ + "/**\n * Naive, pure JS implementation of core ui-router services\n *\n *\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./interface\";\n\nexport * from \"./q\";\nexport * from \"./injector\";\n\nexport * from \"./baseLocationService\";\nexport * from \"./hashLocationService\";\nexport * from \"./memoryLocationService\";\nexport * from \"./pushStateLocationService\";\n\nexport * from \"./memoryLocationConfig\";\nexport * from \"./browserLocationConfig\";\n\nexport * from \"./utils\";\nexport * from \"./plugins\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.d.ts new file mode 100644 index 00000000..7c8fdb36 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.d.ts @@ -0,0 +1,48 @@ +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +export declare const $injector: any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js new file mode 100644 index 00000000..c4dcded8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js @@ -0,0 +1,98 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { extend, assertPredicate, isFunction, isArray, isInjectable } from "../common/index"; +// globally available injectables +var globals = {}; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var ARGUMENT_NAMES = /([^\s,]+)/g; +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +export var $injector = { + /** Gets an object from DI based on a string token */ + get: function (name) { return globals[name]; }, + /** Returns true if an object named `name` exists in global DI */ + has: function (name) { return $injector.get(name) != null; }, + /** + * Injects a function + * + * @param fn the function to inject + * @param context the function's `this` binding + * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }` + */ + invoke: function (fn, context, locals) { + var all = extend({}, globals, locals || {}); + var params = $injector.annotate(fn); + var ensureExist = assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; }); + var args = params.filter(ensureExist).map(function (x) { return all[x]; }); + if (isFunction(fn)) + return fn.apply(context, args); + else + return fn.slice(-1)[0].apply(context, args); + }, + /** + * Returns a function's dependencies + * + * Analyzes a function (or array) and returns an array of DI tokens that the function requires. + * @return an array of `string`s + */ + annotate: function (fn) { + if (!isInjectable(fn)) + throw new Error("Not an injectable function: " + fn); + if (fn && fn.$inject) + return fn.$inject; + if (isArray(fn)) + return fn.slice(0, -1); + var fnStr = fn.toString().replace(STRIP_COMMENTS, ''); + var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); + return result || []; + } +}; +//# sourceMappingURL=injector.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js.map new file mode 100644 index 00000000..ffde4d3f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/injector.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "injector.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/injector.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EACL,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAC3D,MAAM,iBAAiB,CAAC;AAEzB,iCAAiC;AACjC,IAAI,OAAO,GAAG,EAAE,CAAC;AACjB,IAAI,cAAc,GAAG,kCAAkC,CAAC;AACxD,IAAI,cAAc,GAAG,YAAY,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,qDAAqD;IACrD,GAAG,EAAE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U,CAAC,OAAO,CAAC;YAAC,MAAM,CAAE,EAAU,CAAC,OAAO,CAAC;QAC1D,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACtD,IAAI,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC3F,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;CACe,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.d.ts new file mode 100644 index 00000000..50253f51 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.d.ts @@ -0,0 +1,27 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig, LocationServices } from "../common/coreservices"; +import { UIRouterPlugin } from "../interface"; +import { $InjectorLike, $QLike } from "../common/index"; +export interface LocationPlugin extends UIRouterPlugin { + service: LocationServices; + configuration: LocationConfig; +} +export interface ServicesPlugin extends UIRouterPlugin { + $q: $QLike; + $injector: $InjectorLike; +} +export interface LocationLike { + hash: string; + pathname: string; + search: string; +} +export interface HistoryLike { + back(distance?: any): void; + forward(distance?: any): void; + pushState(statedata: any, title?: string, url?: string): void; + replaceState(statedata: any, title?: string, url?: string): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js new file mode 100644 index 00000000..c51da0a1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js @@ -0,0 +1 @@ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js.map new file mode 100644 index 00000000..766db6cc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig, LocationServices } from \"../common/coreservices\";\nimport { UIRouterPlugin } from \"../interface\";\nimport { $InjectorLike, $QLike } from \"../common/index\";\n\nexport interface LocationPlugin extends UIRouterPlugin {\n service: LocationServices;\n configuration: LocationConfig;\n}\n\nexport interface ServicesPlugin extends UIRouterPlugin {\n $q: $QLike,\n $injector: $InjectorLike\n}\n\nexport interface LocationLike {\n hash: string;\n pathname: string;\n search: string;\n}\n\nexport interface HistoryLike {\n back(distance?: any): void;\n forward(distance?: any): void;\n pushState(statedata: any, title?: string, url?: string): void;\n replaceState(statedata: any, title?: string, url?: string): void;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.d.ts new file mode 100644 index 00000000..95b8d4e1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.d.ts @@ -0,0 +1,22 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig } from "../common/coreservices"; +import { noop } from "../common/common"; +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +export declare class MemoryLocationConfig implements LocationConfig { + _baseHref: string; + _port: number; + _protocol: string; + _host: string; + _hashPrefix: string; + port: () => number; + protocol: () => string; + host: () => string; + baseHref: () => string; + html5Mode: () => boolean; + hashPrefix: (newval?: any) => any; + dispose: typeof noop; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js new file mode 100644 index 00000000..d93476da --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js @@ -0,0 +1,23 @@ +import { isDefined } from "../common/predicates"; +import { noop } from "../common/common"; +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +var MemoryLocationConfig = /** @class */ (function () { + function MemoryLocationConfig() { + var _this = this; + this._baseHref = ''; + this._port = 80; + this._protocol = "http"; + this._host = "localhost"; + this._hashPrefix = ""; + this.port = function () { return _this._port; }; + this.protocol = function () { return _this._protocol; }; + this.host = function () { return _this._host; }; + this.baseHref = function () { return _this._baseHref; }; + this.html5Mode = function () { return false; }; + this.hashPrefix = function (newval) { return isDefined(newval) ? _this._hashPrefix = newval : _this._hashPrefix; }; + this.dispose = noop; + } + return MemoryLocationConfig; +}()); +export { MemoryLocationConfig }; +//# sourceMappingURL=memoryLocationConfig.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js.map new file mode 100644 index 00000000..ab2ec555 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "memoryLocationConfig.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/memoryLocationConfig.ts" + ], + "names": [], + "mappings": "AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,iFAAiF;AACjF;IAAA;QAAA,iBAcC;QAbC,cAAS,GAAG,EAAE,CAAC;QACf,UAAK,GAAG,EAAE,CAAC;QACX,cAAS,GAAG,MAAM,CAAC;QACnB,UAAK,GAAG,WAAW,CAAC;QACpB,gBAAW,GAAG,EAAE,CAAC;QAEjB,SAAI,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC;QACxB,aAAQ,GAAG,cAAM,OAAA,KAAI,CAAC,SAAS,EAAd,CAAc,CAAC;QAChC,SAAI,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC;QACxB,aAAQ,GAAG,cAAM,OAAA,KAAI,CAAC,SAAS,EAAd,CAAc,CAAC;QAChC,cAAS,GAAG,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC;QACxB,eAAU,GAAG,UAAC,MAAO,IAAK,OAAA,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,EAAhE,CAAgE,CAAC;QAC3F,YAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAAD,2BAAC;AAAD,CAAC,AAdD,IAcC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.d.ts new file mode 100644 index 00000000..2805e2cd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.d.ts @@ -0,0 +1,14 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { BaseLocationServices } from './baseLocationService'; +import { UIRouter } from '../router'; +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +export declare class MemoryLocationService extends BaseLocationServices { + _url: string; + constructor(router: UIRouter); + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js new file mode 100644 index 00000000..720cdd02 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js @@ -0,0 +1,32 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +/** + * @internalapi + * @module vanilla + */ +/** */ +import { BaseLocationServices } from './baseLocationService'; +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +var MemoryLocationService = /** @class */ (function (_super) { + __extends(MemoryLocationService, _super); + function MemoryLocationService(router) { + return _super.call(this, router, true) || this; + } + MemoryLocationService.prototype._get = function () { + return this._url; + }; + MemoryLocationService.prototype._set = function (state, title, url, replace) { + this._url = url; + }; + return MemoryLocationService; +}(BaseLocationServices)); +export { MemoryLocationService }; +//# sourceMappingURL=memoryLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js.map new file mode 100644 index 00000000..7e95bfb7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "memoryLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/memoryLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;;;;AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D,wFAAwF;AACxF;IAA2C,yCAAoB;IAG7D,+BAAY,MAAgB;eAC1B,kBAAM,MAAM,EAAE,IAAI,CAAC;IACrB,CAAC;IAED,oCAAI,GAAJ;QACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,oCAAI,GAAJ,UAAK,KAAU,EAAE,KAAa,EAAE,GAAW,EAAE,OAAgB;QAC3D,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IACH,4BAAC;AAAD,CAAC,AAdD,CAA2C,oBAAoB,GAc9D", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.d.ts new file mode 100644 index 00000000..98f50892 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.d.ts @@ -0,0 +1,9 @@ +import { LocationPlugin, ServicesPlugin } from "./interface"; +import { UIRouter } from "../router"; +export declare function servicesPlugin(router: UIRouter): ServicesPlugin; +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +export declare const hashLocationPlugin: (router: UIRouter) => LocationPlugin; +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +export declare const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin; +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +export declare const memoryLocationPlugin: (router: UIRouter) => LocationPlugin; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js new file mode 100644 index 00000000..45b449f7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js @@ -0,0 +1,26 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { BrowserLocationConfig } from "./browserLocationConfig"; +import { HashLocationService } from "./hashLocationService"; +import { locationPluginFactory } from "./utils"; +import { PushStateLocationService } from "./pushStateLocationService"; +import { MemoryLocationService } from "./memoryLocationService"; +import { MemoryLocationConfig } from "./memoryLocationConfig"; +import { $injector } from "./injector"; +import { $q } from "./q"; +import { services } from "../common/coreservices"; +export function servicesPlugin(router) { + services.$injector = $injector; + services.$q = $q; + return { name: "vanilla.services", $q: $q, $injector: $injector, dispose: function () { return null; } }; +} +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +export var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +export var pushStateLocationPlugin = locationPluginFactory("vanilla.pushStateLocation", true, PushStateLocationService, BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +export var memoryLocationPlugin = locationPluginFactory("vanilla.memoryLocation", false, MemoryLocationService, MemoryLocationConfig); +//# sourceMappingURL=plugins.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js.map new file mode 100644 index 00000000..c6f0d4fd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/plugins.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "plugins.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/plugins.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,yBAAyB,MAAgB;IAC7C,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,IAAA,EAAE,SAAS,WAAA,EAAE,OAAO,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAE,CAAC;AAC1E,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,IAAM,kBAAkB,GAC3B,qBAAqB,CAAC,0BAA0B,EAAE,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;AAEzG,+GAA+G;AAC/G,MAAM,CAAC,IAAM,uBAAuB,GAChC,qBAAqB,CAAC,2BAA2B,EAAE,IAAI,EAAE,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAE9G,sFAAsF;AACtF,MAAM,CAAC,IAAM,oBAAoB,GAC7B,qBAAqB,CAAC,wBAAwB,EAAE,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.d.ts new file mode 100644 index 00000000..70449647 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.d.ts @@ -0,0 +1,32 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { UIRouter } from '../router'; +import { BaseLocationServices } from './baseLocationService'; +import { LocationConfig } from '../common'; +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +export declare class PushStateLocationService extends BaseLocationServices { + _config: LocationConfig; + constructor(router: UIRouter); + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + _getBasePrefix(): string; + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js new file mode 100644 index 00000000..6241a7a3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js @@ -0,0 +1,67 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +import { BaseLocationServices } from './baseLocationService'; +import { root, splitHash, splitQuery, stripFile } from '../common'; +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +var PushStateLocationService = /** @class */ (function (_super) { + __extends(PushStateLocationService, _super); + function PushStateLocationService(router) { + var _this = _super.call(this, router, true) || this; + _this._config = router.urlService.config; + root.addEventListener('popstate', _this._listener, false); + return _this; + } + ; + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + PushStateLocationService.prototype._getBasePrefix = function () { + return stripFile(this._config.baseHref()); + }; + PushStateLocationService.prototype._get = function () { + var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search; + search = splitQuery(search)[1]; // strip ? if found + hash = splitHash(hash)[1]; // strip # if found + var basePrefix = this._getBasePrefix(); + var exactMatch = pathname === this._config.baseHref(); + var startsWith = pathname.startsWith(basePrefix); + pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname; + return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : ''); + }; + PushStateLocationService.prototype._set = function (state, title, url, replace) { + var fullUrl = this._getBasePrefix() + url; + if (replace) { + this._history.replaceState(state, title, fullUrl); + } + else { + this._history.pushState(state, title, fullUrl); + } + }; + PushStateLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + root.removeEventListener('popstate', this._listener); + }; + return PushStateLocationService; +}(BaseLocationServices)); +export { PushStateLocationService }; +//# sourceMappingURL=pushStateLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js.map new file mode 100644 index 00000000..ac211e63 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pushStateLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/pushStateLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;;;;AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAkB,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEnF;;;;GAIG;AACH;IAA8C,4CAAoB;IAGhE,kCAAY,MAAgB;QAA5B,YACE,kBAAM,MAAM,EAAE,IAAI,CAAC,SAGpB;QAFC,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;QACxC,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;;IAC3D,CAAC;IAAA,CAAC;IAEF;;;;;;;;;;OAUG;IACH,iDAAc,GAAd;QACE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,uCAAI,GAAJ;QACM,IAAA,mBAA2C,EAAzC,sBAAQ,EAAE,cAAI,EAAE,kBAAM,CAAoB;QAChD,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB;QAC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IACvD,CAAC;IACH,+BAAC;AAAD,CAAC,AAnDD,CAA8C,oBAAoB,GAmDjE", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.d.ts new file mode 100644 index 00000000..78d27a77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.d.ts @@ -0,0 +1,16 @@ +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +export declare const $q: any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js new file mode 100644 index 00000000..c88c86b9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js @@ -0,0 +1,53 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { isArray, isObject } from "../common/index"; +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +export var $q = { + /** Normalizes a value as a promise */ + when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); }, + /** Normalizes a value as a promise rejection */ + reject: function (val) { return new Promise(function (resolve, reject) { reject(val); }); }, + /** @returns a deferred object, which has `resolve` and `reject` functions */ + defer: function () { + var deferred = {}; + deferred.promise = new Promise(function (resolve, reject) { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }, + /** Like Promise.all(), but also supports object key/promise notation like $q */ + all: function (promises) { + if (isArray(promises)) { + return Promise.all(promises); + } + if (isObject(promises)) { + // Convert promises map to promises array. + // When each promise resolves, map it to a tuple { key: key, val: val } + var chain = Object.keys(promises) + .map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); }); + // Then wait for all promises to resolve, and convert them back to an object + return $q.all(chain).then(function (values) { + return values.reduce(function (acc, tuple) { acc[tuple.key] = tuple.val; return acc; }, {}); + }); + } + } +}; +//# sourceMappingURL=q.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js.map new file mode 100644 index 00000000..c1ff2be3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/q.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "q.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/q.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,IAAM,EAAE,GAAG;IAChB,sCAAsC;IACtC,IAAI,EAAE,UAAC,GAAG,IAAK,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,EAAZ,CAAY,CAAC,EAA9C,CAA8C;IAE7D,gDAAgD;IAChD,MAAM,EAAE,UAAC,GAAG,IAAK,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM,IAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAlD,CAAkD;IAEnE,6EAA6E;IAC7E,KAAK,EAAE;QACL,IAAI,QAAQ,GAAQ,EAAE,CAAC;QACvB,QAAQ,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC7C,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;YAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IAChF,GAAG,EAAE,UAAC,QAA0D;QAC9D,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC;QAED,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACvB,0CAA0C;YAC1C,uEAAuE;YACvE,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;iBAC5B,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,EAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAC,CAAC,EAAZ,CAAY,CAAC,EAAvC,CAAuC,CAAC,CAAC;YAEzD,4EAA4E;YAC5E,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAA,MAAM;gBAC9B,OAAA,MAAM,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,KAAK,IAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAA9E,CAA8E,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;CACQ,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.d.ts new file mode 100644 index 00000000..4c8d80a9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.d.ts @@ -0,0 +1,26 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig, LocationServices } from "../common"; +import { UIRouter } from "../router"; +export declare const keyValsToObjectR: (accum: any, [key, val]: [any, any]) => any; +export declare const getParams: (queryString: string) => any; +export declare function parseUrl(url: string): { + path: any; + search: any; + hash: any; + url: string; +}; +export declare const buildUrl: (loc: LocationServices) => string; +export declare function locationPluginFactory(name: string, isHtml5: boolean, serviceClass: { + new (router?: UIRouter): LocationServices; +}, configurationClass: { + new (router?: UIRouter, isHtml5?: boolean): LocationConfig; +}): (router: UIRouter) => { + name: string; + service: LocationServices; + configuration: LocationConfig; + dispose: (router: UIRouter) => void; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js new file mode 100644 index 00000000..afd3024a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js @@ -0,0 +1,51 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { identity, unnestR, isArray, splitEqual, splitHash, splitQuery } from "../common"; +export var keyValsToObjectR = function (accum, _a) { + var key = _a[0], val = _a[1]; + if (!accum.hasOwnProperty(key)) { + accum[key] = val; + } + else if (isArray(accum[key])) { + accum[key].push(val); + } + else { + accum[key] = [accum[key], val]; + } + return accum; +}; +export var getParams = function (queryString) { + return queryString.split("&").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {}); +}; +export function parseUrl(url) { + var orEmptyString = function (x) { return x || ""; }; + var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1]; + var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1]; + return { path: path, search: search, hash: hash, url: url }; +} +export var buildUrl = function (loc) { + var path = loc.path(); + var searchObject = loc.search(); + var hash = loc.hash(); + var search = Object.keys(searchObject).map(function (key) { + var param = searchObject[key]; + var vals = isArray(param) ? param : [param]; + return vals.map(function (val) { return key + "=" + val; }); + }).reduce(unnestR, []).join("&"); + return path + (search ? "?" + search : "") + (hash ? "#" + hash : ""); +}; +export function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) { + return function (router) { + var service = router.locationService = new serviceClass(router); + var configuration = router.locationConfig = new configurationClass(router, isHtml5); + function dispose(router) { + router.dispose(service); + router.dispose(configuration); + } + return { name: name, service: service, configuration: configuration, dispose: dispose }; + }; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js.map new file mode 100644 index 00000000..31417598 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/vanilla/utils.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "utils.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/utils.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG;AACH,MAAM;AACN,OAAO,EAC6B,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAChG,MAAM,WAAW,CAAC;AAGnB,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAK,EAAE,EAAU;QAAT,WAAG,EAAE,WAAG;IAC/C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACnB,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;IAChC,CAAC;IACD,MAAM,CAAC,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,WAAmB;IACzC,OAAA,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC;AAApF,CAAo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AAC;AACxE,CAAC,CAAC;AAEF,MAAM,gCACF,IAAY,EACZ,OAAgB,EAChB,YAA0D,EAC1D,kBAAiF;IAEnF,MAAM,CAAC,UAAS,MAAgB;QAC9B,IAAI,OAAO,GAAS,MAAM,CAAC,eAAe,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc,GAAI,IAAI,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAErF,iBAAiB,MAAgB;YAC/B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACxB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,aAAa,eAAA,EAAE,OAAO,SAAA,EAAE,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.d.ts new file mode 100644 index 00000000..7d0b82f7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.d.ts @@ -0,0 +1,6 @@ +/** + * @coreapi + * @module view + */ /** for typedoc */ +export * from "./interface"; +export * from "./view"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js new file mode 100644 index 00000000..9d2501a9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js @@ -0,0 +1,2 @@ +export * from "./view"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js.map new file mode 100644 index 00000000..f2a993e0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/index.ts" + ], + "names": [], + "mappings": "AAKA,cAAc,QAAQ,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./view\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.d.ts new file mode 100644 index 00000000..b796a326 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.d.ts @@ -0,0 +1,50 @@ +/** @module view */ /** for typedoc */ +import { _ViewDeclaration } from "../state/interface"; +import { PathNode } from "../path/pathNode"; +/** + * The context ref can be anything that has a `name` and a `parent` reference to another IContextRef + */ +export interface ViewContext { + name: string; + parent: ViewContext; +} +/** @internalapi */ +export interface ActiveUIView { + /** type of framework, e.g., "ng1" or "ng2" */ + $type: string; + /** An auto-incremented id */ + id: number; + /** The ui-view short name */ + name: string; + /** The ui-view's fully qualified name */ + fqn: string; + /** The ViewConfig that is currently loaded into the ui-view */ + config: ViewConfig; + /** The state context in which the ui-view tag was created. */ + creationContext: ViewContext; + /** A callback that should apply a ViewConfig (or clear the ui-view, if config is undefined) */ + configUpdated: (config: ViewConfig) => void; +} +/** + * This interface represents a [[_ViewDeclaration]] that is bound to a [[PathNode]]. + * + * A `ViewConfig` is the runtime definition of a single view. + * + * During a transition, `ViewConfig`s are created for each [[_ViewDeclaration]] defined on each "entering" [[StateObject]]. + * Then, the [[ViewService]] finds any matching `ui-view`(s) in the DOM, and supplies the ui-view + * with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`. + * + * A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the + * context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches + * the `uiViewName` address. + */ +export interface ViewConfig { + $id: number; + /** The normalized view declaration from [[State.views]] */ + viewDecl: _ViewDeclaration; + /** The node the ViewConfig is bound to */ + path: PathNode[]; + /** Fetches templates, runs dynamic (controller|template)Provider code, lazy loads Components, etc */ + load(): Promise; + loaded: boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js new file mode 100644 index 00000000..c51da0a1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js @@ -0,0 +1 @@ +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js.map new file mode 100644 index 00000000..fcc41757 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/** @module view */ /** for typedoc */\nimport {_ViewDeclaration} from \"../state/interface\";\nimport {PathNode} from \"../path/pathNode\";\n\n/**\n * The context ref can be anything that has a `name` and a `parent` reference to another IContextRef\n */\nexport interface ViewContext {\n name: string;\n parent: ViewContext;\n}\n\n/** @internalapi */\nexport interface ActiveUIView {\n /** type of framework, e.g., \"ng1\" or \"ng2\" */\n $type: string;\n /** An auto-incremented id */\n id: number;\n /** The ui-view short name */\n name: string;\n /** The ui-view's fully qualified name */\n fqn: string;\n /** The ViewConfig that is currently loaded into the ui-view */\n config: ViewConfig;\n /** The state context in which the ui-view tag was created. */\n creationContext: ViewContext;\n /** A callback that should apply a ViewConfig (or clear the ui-view, if config is undefined) */\n configUpdated: (config: ViewConfig) => void;\n}\n\n/**\n * This interface represents a [[_ViewDeclaration]] that is bound to a [[PathNode]].\n *\n * A `ViewConfig` is the runtime definition of a single view.\n *\n * During a transition, `ViewConfig`s are created for each [[_ViewDeclaration]] defined on each \"entering\" [[StateObject]].\n * Then, the [[ViewService]] finds any matching `ui-view`(s) in the DOM, and supplies the ui-view\n * with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`.\n *\n * A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the\n * context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches\n * the `uiViewName` address.\n */\nexport interface ViewConfig {\n /* The unique id for the ViewConfig instance */\n $id: number;\n /** The normalized view declaration from [[State.views]] */\n viewDecl: _ViewDeclaration;\n\n /** The node the ViewConfig is bound to */\n path: PathNode[];\n\n /** Fetches templates, runs dynamic (controller|template)Provider code, lazy loads Components, etc */\n load(): Promise;\n \n loaded: boolean;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.d.ts new file mode 100644 index 00000000..eaa38fd0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.d.ts @@ -0,0 +1,154 @@ +/** + * @coreapi + * @module view + */ /** for typedoc */ +import { TypedMap } from "../common/common"; +import { PathNode } from "../path/pathNode"; +import { ActiveUIView, ViewContext, ViewConfig } from "./interface"; +import { _ViewDeclaration } from "../state/interface"; +export declare type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig | ViewConfig[]; +export interface ViewServicePluginAPI { + _rootViewContext(context?: ViewContext): ViewContext; + _viewConfigFactory(viewType: string, factory: ViewConfigFactory): any; + _registeredUIViews(): ActiveUIView[]; + _activeViewConfigs(): ViewConfig[]; +} +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +export declare class ViewService { + private _uiViews; + private _viewConfigs; + private _rootContext; + private _viewConfigFactories; + constructor(); + _pluginapi: ViewServicePluginAPI; + private _rootViewContext(context?); + private _viewConfigFactory(viewType, factory); + createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[]; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + deactivateViewConfig(viewConfig: ViewConfig): void; + activateViewConfig(viewConfig: ViewConfig): void; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + static matches: (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => boolean; + sync(): void; + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + registerUIView(uiView: ActiveUIView): () => void; + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + available(): any[]; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + active(): any[]; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + static normalizeUIViewTarget(context: ViewContext, rawViewName?: string): { + uiViewName: string; + uiViewContextAnchor: string; + }; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js new file mode 100644 index 00000000..2b88665b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js @@ -0,0 +1,283 @@ +/** + * @coreapi + * @module view + */ /** for typedoc */ +import { equals, applyPairs, removeFrom } from "../common/common"; +import { curry, prop } from "../common/hof"; +import { isString, isArray } from "../common/predicates"; +import { trace } from "../common/trace"; +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +var ViewService = /** @class */ (function () { + function ViewService() { + var _this = this; + this._uiViews = []; + this._viewConfigs = []; + this._viewConfigFactories = {}; + this._pluginapi = { + _rootViewContext: this._rootViewContext.bind(this), + _viewConfigFactory: this._viewConfigFactory.bind(this), + _registeredUIViews: function () { return _this._uiViews; }, + _activeViewConfigs: function () { return _this._viewConfigs; }, + }; + } + ViewService.prototype._rootViewContext = function (context) { + return this._rootContext = context || this._rootContext; + }; + ; + ViewService.prototype._viewConfigFactory = function (viewType, factory) { + this._viewConfigFactories[viewType] = factory; + }; + ViewService.prototype.createViewConfig = function (path, decl) { + var cfgFactory = this._viewConfigFactories[decl.$type]; + if (!cfgFactory) + throw new Error("ViewService: No view config factory registered for type " + decl.$type); + var cfgs = cfgFactory(path, decl); + return isArray(cfgs) ? cfgs : [cfgs]; + }; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + ViewService.prototype.deactivateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("<- Removing", viewConfig); + removeFrom(this._viewConfigs, viewConfig); + }; + ViewService.prototype.activateViewConfig = function (viewConfig) { + trace.traceViewServiceEvent("-> Registering", viewConfig); + this._viewConfigs.push(viewConfig); + }; + ViewService.prototype.sync = function () { + var _this = this; + var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {}); + // Return a weighted depth value for a uiView. + // The depth is the nesting depth of ui-views (based on FQN; times 10,000) + // plus the depth of the state that is populating the uiView + function uiViewDepth(uiView) { + var stateDepth = function (context) { + return context && context.parent ? stateDepth(context.parent) + 1 : 1; + }; + return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext); + } + // Return the ViewConfig's context's depth in the context tree. + function viewConfigDepth(config) { + var context = config.viewDecl.$context, count = 0; + while (++count && context.parent) + context = context.parent; + return count; + } + // Given a depth function, returns a compare function which can return either ascending or descending order + var depthCompare = curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); }); + var matchingConfigPair = function (uiView) { + var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView)); + if (matchingConfigs.length > 1) { + // This is OK. Child states can target a ui-view that the parent state also targets (the child wins) + // Sort by depth and return the match from the deepest child + // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs); + matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending + } + return [uiView, matchingConfigs[0]]; + }; + var configureUIView = function (_a) { + var uiView = _a[0], viewConfig = _a[1]; + // If a parent ui-view is reconfigured, it could destroy child ui-views. + // Before configuring a child ui-view, make sure it's still in the active uiViews array. + if (_this._uiViews.indexOf(uiView) !== -1) + uiView.configUpdated(viewConfig); + }; + // Sort views by FQN and state depth. Process uiviews nearest the root first. + var pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair); + trace.traceViewSync(pairs); + pairs.forEach(configureUIView); + }; + ; + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + ViewService.prototype.registerUIView = function (uiView) { + trace.traceViewServiceUIViewEvent("-> Registering", uiView); + var uiViews = this._uiViews; + var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; }; + if (uiViews.filter(fqnAndTypeMatches).length) + trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:", uiView); + uiViews.push(uiView); + this.sync(); + return function () { + var idx = uiViews.indexOf(uiView); + if (idx === -1) { + trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView", uiView); + return; + } + trace.traceViewServiceUIViewEvent("<- Deregistering", uiView); + removeFrom(uiViews)(uiView); + }; + }; + ; + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.available = function () { + return this._uiViews.map(prop("fqn")); + }; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.active = function () { + return this._uiViews.filter(prop("$config")).map(prop("name")); + }; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + ViewService.normalizeUIViewTarget = function (context, rawViewName) { + if (rawViewName === void 0) { rawViewName = ""; } + // TODO: Validate incoming view name with a regexp to allow: + // ex: "view.name@foo.bar" , "^.^.view.name" , "view.name@^.^" , "" , + // "@" , "$default@^" , "!$default.$default" , "!foo.bar" + var viewAtContext = rawViewName.split("@"); + var uiViewName = viewAtContext[0] || "$default"; // default to unnamed view + var uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : "^"; // default to parent context + // Handle relative view-name sugar syntax. + // Matches rawViewName "^.^.^.foo.bar" into array: ["^.^.^.foo.bar", "^.^.^", "foo.bar"], + var relativeViewNameSugar = /^(\^(?:\.\^)*)\.(.*$)/.exec(uiViewName); + if (relativeViewNameSugar) { + // Clobbers existing contextAnchor (rawViewName validation will fix this) + uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to "^.^.^" + uiViewName = relativeViewNameSugar[2]; // set view-name to "foo.bar" + } + if (uiViewName.charAt(0) === '!') { + uiViewName = uiViewName.substr(1); + uiViewContextAnchor = ""; // target absolutely from root + } + // handle parent relative targeting "^.^.^" + var relativeMatch = /^(\^(?:\.\^)*)$/; + if (relativeMatch.exec(uiViewContextAnchor)) { + var anchor = uiViewContextAnchor.split(".").reduce((function (anchor, x) { return anchor.parent; }), context); + uiViewContextAnchor = anchor.name; + } + else if (uiViewContextAnchor === '.') { + uiViewContextAnchor = context.name; + } + return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor }; + }; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) { + // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc + if (uiView.$type !== viewConfig.viewDecl.$type) + return false; + // Split names apart from both viewConfig and uiView into segments + var vc = viewConfig.viewDecl; + var vcSegments = vc.$uiViewName.split("."); + var uivSegments = uiView.fqn.split("."); + // Check if the tails of the segment arrays match. ex, these arrays' tails match: + // vc: ["foo", "bar"], uiv fqn: ["$default", "foo", "bar"] + if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length))) + return false; + // Now check if the fqn ending at the first segment of the viewConfig matches the context: + // ["$default", "foo"].join(".") == "$default.foo", does the ui-view $default.foo context match? + var negOffset = (1 - vcSegments.length) || undefined; + var fqnToFirstSegment = uivSegments.slice(0, negOffset).join("."); + var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext; + return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name); + }; }; + return ViewService; +}()); +export { ViewService }; +//# sourceMappingURL=view.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js.map b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js.map new file mode 100644 index 00000000..c207beab --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib-esm/view/view.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "view.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/view.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAW,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAetC;;;;;;;;;;;;;;;GAeG;AACH;IAME;QAAA,iBAAiB;QALT,aAAQ,GAAmB,EAAE,CAAC;QAC9B,iBAAY,GAAiB,EAAE,CAAC;QAEhC,yBAAoB,GAAyC,EAAE,CAAC;QAIjE,eAAU,GAAyB;YACxC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;YACtD,kBAAkB,EAAE,cAAM,OAAA,KAAI,CAAC,QAAQ,EAAb,CAAa;YACvC,kBAAkB,EAAE,cAAM,OAAA,KAAI,CAAC,YAAY,EAA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;;;;;;;;;;;;OAwDG;IACI,mBAAO,GAAG,UAAC,YAAoC,EAAE,MAAoB,IAAK,OAAA,UAAC,UAAsB;QACtG,0DAA0D;QAC1D,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;QAE7D,kEAAkE;QAClE,IAAI,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC7B,IAAI,UAAU,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3C,IAAI,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAExC,iFAAiF;QACjF,0DAA0D;QAC1D,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAChE,MAAM,CAAC,KAAK,CAAC;QAEf,0FAA0F;QAC1F,gGAAgG;QAChG,IAAI,SAAS,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;QACrD,IAAI,iBAAiB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,aAAa,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC;QACpE,MAAM,CAAC,EAAE,CAAC,oBAAoB,KAAK,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC,EApBgF,CAoBhF,CAAA;IAqJH,kBAAC;CAAA,AAlRD,IAkRC;SAlRY,WAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/common.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.d.ts new file mode 100644 index 00000000..fa499c01 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.d.ts @@ -0,0 +1,376 @@ +import { StateObject } from "../state/stateObject"; +export declare const root: any; +export declare const fromJson: any; +export declare const toJson: any; +export declare const forEach: any; +export declare const extend: { + (target: T, source: U): T & U; + (target: T, source1: U, source2: V): T & U & V; + (target: T, source1: U, source2: V, source3: W): T & U & V & W; + (target: object, ...sources: any[]): any; +}; +export declare const equals: any; +export declare function identity(x: any): any; +export declare function noop(): any; +export declare type Mapper = (x: X, key?: (string | number)) => T; +export interface TypedMap { + [key: string]: T; +} +export declare type Predicate = (x?: X) => boolean; +/** + * An ng1-style injectable + * + * This could be a (non-minified) function such as: + * ```js + * function injectableFunction(SomeDependency) { + * + * } + * ``` + * + * or an explicitly annotated function (minify safe) + * ```js + * injectableFunction.$inject = [ 'SomeDependency' ]; + * function injectableFunction(SomeDependency) { + * + * } + * ``` + * + * or an array style annotated function (minify safe) + * ```js + * ['SomeDependency', function injectableFunction(SomeDependency) { + * + * }]; + * ``` + * + * @publicapi + */ +export declare type IInjectable = (Function | any[]); +export interface Obj extends Object { + [key: string]: any; +} +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +export declare function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind?: boolean): Obj; +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +export declare const inherit: (parent: Obj, extra?: Obj) => any; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +export declare const inArray: typeof _inArray; +export declare function _inArray(array: any[], obj: any): boolean; +export declare function _inArray(array: any[]): (obj: any) => boolean; +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +export declare const removeFrom: typeof _removeFrom; +export declare function _removeFrom(array: T[], obj: T): T[]; +export declare function _removeFrom(array: T[]): (obj: T) => T[]; +/** pushes a values to an array and returns the value */ +export declare const pushTo: typeof _pushTo; +export declare function _pushTo(arr: T[], val: T): T; +export declare function _pushTo(arr: T[]): (val: T) => T; +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +export declare const deregAll: (functions: Function[]) => void; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +export declare function defaults(opts: any, ...defaultsList: Obj[]): any; +/** Reduce function that merges each element of the list into a single object, using extend */ +export declare const mergeR: (memo: Obj, item: Obj) => Obj; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +export declare function ancestors(first: StateObject, second: StateObject): StateObject[]; +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +export declare function pick(obj: Obj, propNames: string[]): Obj; +/** + * Return a copy of the object omitting the blacklisted properties. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +export declare function omit(obj: Obj, propNames: string[]): Obj; +/** Given an array of objects, maps each element to a named property of the element. */ +export declare function pluck(collection: Obj[], propName: string): T[]; +/** Given an object, maps each property of the object to a named property of the property. */ +export declare function pluck(collection: { + [key: string]: any; +}, propName: string): { + [key: string]: any; +}; +/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */ +export declare function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[]; +/** Given an object, returns a new object with only those properties that passed the callback predicate */ +export declare function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap; +/** Given an object, return the first property of that object which passed the callback predicate */ +export declare function find(collection: TypedMap, callback: Predicate): T; +/** Given an array of objects, returns the first object which passed the callback predicate */ +export declare function find(collection: T[], callback: Predicate): T; +/** Given an object, returns a new object, where each property is transformed by the callback function */ +export declare let mapObj: (collection: { + [key: string]: T; +}, callback: Mapper) => { + [key: string]: U; +}; +/** Given an array, returns a new array, where each element is transformed by the callback function */ +export declare function map(collection: T[], callback: Mapper): U[]; +export declare function map(collection: { + [key: string]: T; +}, callback: Mapper): { + [key: string]: U; +}; +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +export declare const values: ((obj: TypedMap) => T[]); +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +export declare const allTrueR: (memo: boolean, elem: any) => any; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +export declare const anyTrueR: (memo: boolean, elem: any) => any; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export declare const unnestR: (memo: any[], elem: any[]) => any[]; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export declare const flattenR: (memo: any[], elem: any) => any; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +export declare function pushR(arr: any[], obj: any): any[]; +/** Reduce function that filters out duplicates */ +export declare const uniqR: (acc: T[], token: T) => T[]; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +export declare const unnest: (arr: any[]) => any; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +export declare const flatten: (arr: any[]) => any; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +export declare const assertPredicate: (predicate: Predicate, errMsg: (string | Function)) => Predicate; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +export declare const assertMap: (mapFn: (t: T) => U, errMsg: (string | Function)) => (t: T) => U; +export declare function assertFn(predicateOrMap: Function, errMsg?: (string | Function)): any; +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +export declare const pairs: (obj: Obj) => any[][]; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +export declare function arrayTuples(...args: any[]): any[]; +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +export declare function applyPairs(memo: TypedMap, keyValTuple: any[]): TypedMap; +/** Get the last element of an array */ +export declare function tail(arr: T[]): T; +/** + * shallow copy from src to dest + */ +export declare function copy(src: Obj, dest?: Obj): Obj; +/** Like Object.assign() */ +export declare function _extend(toObj: Obj, ...fromObjs: Obj[]): any; +export declare const silenceUncaughtInPromise: (promise: Promise) => Promise; +export declare const silentRejection: (error: any) => Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js new file mode 100644 index 00000000..9ea4dae1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js @@ -0,0 +1,560 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Random utility functions used in the UI-Router code + * + * These functions are exported, but are subject to change without notice. + * + * @preferred + * @module common + */ +/** for typedoc */ +var predicates_1 = require("./predicates"); +var hof_1 = require("./hof"); +var coreservices_1 = require("./coreservices"); +exports.root = (typeof self === 'object' && self.self === self && self) || + (typeof global === 'object' && global.global === global && global) || this; +var angular = exports.root.angular || {}; +exports.fromJson = angular.fromJson || JSON.parse.bind(JSON); +exports.toJson = angular.toJson || JSON.stringify.bind(JSON); +exports.forEach = angular.forEach || _forEach; +exports.extend = Object.assign || _extend; +exports.equals = angular.equals || _equals; +function identity(x) { return x; } +exports.identity = identity; +function noop() { } +exports.noop = noop; +/** + * Builds proxy functions on the `to` object which pass through to the `from` object. + * + * For each key in `fnNames`, creates a proxy function on the `to` object. + * The proxy function calls the real function on the `from` object. + * + * + * #### Example: + * This example creates an new class instance whose functions are prebound to the new'd object. + * ```js + * class Foo { + * constructor(data) { + * // Binds all functions from Foo.prototype to 'this', + * // then copies them to 'this' + * bindFunctions(Foo.prototype, this, this); + * this.data = data; + * } + * + * log() { + * console.log(this.data); + * } + * } + * + * let myFoo = new Foo([1,2,3]); + * var logit = myFoo.log; + * logit(); // logs [1, 2, 3] from the myFoo 'this' instance + * ``` + * + * #### Example: + * This example creates a bound version of a service function, and copies it to another object + * ``` + * + * var SomeService = { + * this.data = [3, 4, 5]; + * this.log = function() { + * console.log(this.data); + * } + * } + * + * // Constructor fn + * function OtherThing() { + * // Binds all functions from SomeService to SomeService, + * // then copies them to 'this' + * bindFunctions(SomeService, this, SomeService); + * } + * + * let myOtherThing = new OtherThing(); + * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' + * ``` + * + * @param source A function that returns the source object which contains the original functions to be bound + * @param target A function that returns the target object which will receive the bound functions + * @param bind A function that returns the object which the functions will be bound to + * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) + * @param latebind If true, the binding of the function is delayed until the first time it's invoked + */ +function createProxyFunctions(source, target, bind, fnNames, latebind) { + if (latebind === void 0) { latebind = false; } + var bindFunction = function (fnName) { + return source()[fnName].bind(bind()); + }; + var makeLateRebindFn = function (fnName) { return function lateRebindFunction() { + target[fnName] = bindFunction(fnName); + return target[fnName].apply(null, arguments); + }; }; + fnNames = fnNames || Object.keys(source()); + return fnNames.reduce(function (acc, name) { + acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name); + return acc; + }, target); +} +exports.createProxyFunctions = createProxyFunctions; +/** + * prototypal inheritance helper. + * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it + */ +exports.inherit = function (parent, extra) { + return exports.extend(Object.create(parent), extra); +}; +/** Given an array, returns true if the object is found in the array, (using indexOf) */ +exports.inArray = hof_1.curry(_inArray); +function _inArray(array, obj) { + return array.indexOf(obj) !== -1; +} +exports._inArray = _inArray; +/** + * Given an array, and an item, if the item is found in the array, it removes it (in-place). + * The same array is returned + */ +exports.removeFrom = hof_1.curry(_removeFrom); +function _removeFrom(array, obj) { + var idx = array.indexOf(obj); + if (idx >= 0) + array.splice(idx, 1); + return array; +} +exports._removeFrom = _removeFrom; +/** pushes a values to an array and returns the value */ +exports.pushTo = hof_1.curry(_pushTo); +function _pushTo(arr, val) { + return (arr.push(val), val); +} +exports._pushTo = _pushTo; +/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ +exports.deregAll = function (functions) { + return functions.slice().forEach(function (fn) { + typeof fn === 'function' && fn(); + exports.removeFrom(functions, fn); + }); +}; +/** + * Applies a set of defaults to an options object. The options object is filtered + * to only those properties of the objects in the defaultsList. + * Earlier objects in the defaultsList take precedence when applying defaults. + */ +function defaults(opts) { + var defaultsList = []; + for (var _i = 1; _i < arguments.length; _i++) { + defaultsList[_i - 1] = arguments[_i]; + } + var _defaultsList = defaultsList.concat({}).reverse(); + var defaultVals = exports.extend.apply(null, _defaultsList); + return exports.extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals))); +} +exports.defaults = defaults; +/** Reduce function that merges each element of the list into a single object, using extend */ +exports.mergeR = function (memo, item) { return exports.extend(memo, item); }; +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +function ancestors(first, second) { + var path = []; + for (var n in first.path) { + if (first.path[n] !== second.path[n]) + break; + path.push(first.path[n]); + } + return path; +} +exports.ancestors = ancestors; +/** + * Return a copy of the object only containing the whitelisted properties. + * + * #### Example: + * ``` + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the whitelisted property names + */ +function pick(obj, propNames) { + var objCopy = {}; + for (var prop_1 in obj) { + if (propNames.indexOf(prop_1) !== -1) { + objCopy[prop_1] = obj[prop_1]; + } + } + return objCopy; +} +exports.pick = pick; +/** + * Return a copy of the object omitting the blacklisted properties. + * + * @example + * ``` + * + * var foo = { a: 1, b: 2, c: 3 }; + * var ab = omit(foo, ['a', 'b']); // { c: 3 } + * ``` + * @param obj the source object + * @param propNames an Array of strings, which are the blacklisted property names + */ +function omit(obj, propNames) { + return Object.keys(obj) + .filter(hof_1.not(exports.inArray(propNames))) + .reduce(function (acc, key) { return (acc[key] = obj[key], acc); }, {}); +} +exports.omit = omit; +/** + * Maps an array, or object to a property (by name) + */ +function pluck(collection, propName) { + return map(collection, hof_1.prop(propName)); +} +exports.pluck = pluck; +/** Filters an Array or an Object's properties based on a predicate */ +function filter(collection, callback) { + var arr = predicates_1.isArray(collection), result = arr ? [] : {}; + var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return result[key] = x; }; + exports.forEach(collection, function (item, i) { + if (callback(item, i)) + accept(item, i); + }); + return result; +} +exports.filter = filter; +/** Finds an object from an array, or a property of an object, that matches a predicate */ +function find(collection, callback) { + var result; + exports.forEach(collection, function (item, i) { + if (result) + return; + if (callback(item, i)) + result = item; + }); + return result; +} +exports.find = find; +/** Given an object, returns a new object, where each property is transformed by the callback function */ +exports.mapObj = map; +/** Maps an array or object properties using a callback function */ +function map(collection, callback) { + var result = predicates_1.isArray(collection) ? [] : {}; + exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); }); + return result; +} +exports.map = map; +/** + * Given an object, return its enumerable property values + * + * @example + * ``` + * + * let foo = { a: 1, b: 2, c: 3 } + * let vals = values(foo); // [ 1, 2, 3 ] + * ``` + */ +exports.values = function (obj) { + return Object.keys(obj).map(function (key) { return obj[key]; }); +}; +/** + * Reduce function that returns true if all of the values are truthy. + * + * @example + * ``` + * + * let vals = [ 1, true, {}, "hello world"]; + * vals.reduce(allTrueR, true); // true + * + * vals.push(0); + * vals.reduce(allTrueR, true); // false + * ``` + */ +exports.allTrueR = function (memo, elem) { return memo && elem; }; +/** + * Reduce function that returns true if any of the values are truthy. + * + * * @example + * ``` + * + * let vals = [ 0, null, undefined ]; + * vals.reduce(anyTrueR, true); // false + * + * vals.push("hello world"); + * vals.reduce(anyTrueR, true); // true + * ``` + */ +exports.anyTrueR = function (memo, elem) { return memo || elem; }; +/** + * Reduce function which un-nests a single level of arrays + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +exports.unnestR = function (memo, elem) { return memo.concat(elem); }; +/** + * Reduce function which recursively un-nests all arrays + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +exports.flattenR = function (memo, elem) { + return predicates_1.isArray(elem) ? memo.concat(elem.reduce(exports.flattenR, [])) : pushR(memo, elem); +}; +/** + * Reduce function that pushes an object to an array, then returns the array. + * Mostly just for [[flattenR]] and [[uniqR]] + */ +function pushR(arr, obj) { + arr.push(obj); + return arr; +} +exports.pushR = pushR; +/** Reduce function that filters out duplicates */ +exports.uniqR = function (acc, token) { + return exports.inArray(acc, token) ? acc : pushR(acc, token); +}; +/** + * Return a new array with a single level of arrays unnested. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] + * ``` + */ +exports.unnest = function (arr) { return arr.reduce(exports.unnestR, []); }; +/** + * Return a completely flattened version of an array. + * + * @example + * ``` + * + * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; + * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] + * ``` + */ +exports.flatten = function (arr) { return arr.reduce(exports.flattenR, []); }; +/** + * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. + * @example + * ``` + * + * let isNumber = (obj) => typeof(obj) === 'number'; + * let allNumbers = [ 1, 2, 3, 4, 5 ]; + * allNumbers.filter(assertPredicate(isNumber)); //OK + * + * let oneString = [ 1, 2, 3, 4, "5" ]; + * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); + * ``` + */ +exports.assertPredicate = assertFn; +/** + * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. + * @example + * ``` + * + * var data = { foo: 1, bar: 2 }; + * + * let keys = [ 'foo', 'bar' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // values is [1, 2] + * + * let keys = [ 'foo', 'bar', 'baz' ] + * let values = keys.map(assertMap(key => data[key], "Key not found")); + * // throws Error("Key not found") + * ``` + */ +exports.assertMap = assertFn; +function assertFn(predicateOrMap, errMsg) { + if (errMsg === void 0) { errMsg = "assert failure"; } + return function (obj) { + var result = predicateOrMap(obj); + if (!result) { + throw new Error(predicates_1.isFunction(errMsg) ? errMsg(obj) : errMsg); + } + return result; + }; +} +exports.assertFn = assertFn; +/** + * Like _.pairs: Given an object, returns an array of key/value pairs + * + * @example + * ``` + * + * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] + * ``` + */ +exports.pairs = function (obj) { + return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); +}; +/** + * Given two or more parallel arrays, returns an array of tuples where + * each tuple is composed of [ a[i], b[i], ... z[i] ] + * + * @example + * ``` + * + * let foo = [ 0, 2, 4, 6 ]; + * let bar = [ 1, 3, 5, 7 ]; + * let baz = [ 10, 30, 50, 70 ]; + * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] + * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] + * ``` + */ +function arrayTuples() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (args.length === 0) + return []; + var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER + var i, result = []; + for (i = 0; i < maxArrayLen; i++) { + // This is a hot function + // Unroll when there are 1-4 arguments + switch (args.length) { + case 1: + result.push([args[0][i]]); + break; + case 2: + result.push([args[0][i], args[1][i]]); + break; + case 3: + result.push([args[0][i], args[1][i], args[2][i]]); + break; + case 4: + result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); + break; + default: + result.push(args.map(function (array) { return array[i]; })); + break; + } + } + return result; +} +exports.arrayTuples = arrayTuples; +/** + * Reduce function which builds an object from an array of [key, value] pairs. + * + * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. + * + * Each keyValueTuple should be an array with values [ key: string, value: any ] + * + * @example + * ``` + * + * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] + * + * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * + * // Or, more simply: + * var pairsToObj = pairs.reduce(applyPairs, {}) + * // pairsToObj == { fookey: "fooval", barkey: "barval" } + * ``` + */ +function applyPairs(memo, keyValTuple) { + var key, value; + if (predicates_1.isArray(keyValTuple)) + key = keyValTuple[0], value = keyValTuple[1]; + if (!predicates_1.isString(key)) + throw new Error("invalid parameters to applyPairs"); + memo[key] = value; + return memo; +} +exports.applyPairs = applyPairs; +/** Get the last element of an array */ +function tail(arr) { + return arr.length && arr[arr.length - 1] || undefined; +} +exports.tail = tail; +/** + * shallow copy from src to dest + */ +function copy(src, dest) { + if (dest) + Object.keys(dest).forEach(function (key) { return delete dest[key]; }); + if (!dest) + dest = {}; + return exports.extend(dest, src); +} +exports.copy = copy; +/** Naive forEach implementation works with Objects or Arrays */ +function _forEach(obj, cb, _this) { + if (predicates_1.isArray(obj)) + return obj.forEach(cb, _this); + Object.keys(obj).forEach(function (key) { return cb(obj[key], key); }); +} +function _extend(toObj) { + for (var i = 1; i < arguments.length; i++) { + var obj = arguments[i]; + if (!obj) + continue; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + toObj[keys[j]] = obj[keys[j]]; + } + } + return toObj; +} +exports._extend = _extend; +function _equals(o1, o2) { + if (o1 === o2) + return true; + if (o1 === null || o2 === null) + return false; + if (o1 !== o1 && o2 !== o2) + return true; // NaN === NaN + var t1 = typeof o1, t2 = typeof o2; + if (t1 !== t2 || t1 !== 'object') + return false; + var tup = [o1, o2]; + if (hof_1.all(predicates_1.isArray)(tup)) + return _arraysEq(o1, o2); + if (hof_1.all(predicates_1.isDate)(tup)) + return o1.getTime() === o2.getTime(); + if (hof_1.all(predicates_1.isRegExp)(tup)) + return o1.toString() === o2.toString(); + if (hof_1.all(predicates_1.isFunction)(tup)) + return true; // meh + var predicates = [predicates_1.isFunction, predicates_1.isArray, predicates_1.isDate, predicates_1.isRegExp]; + if (predicates.map(hof_1.any).reduce(function (b, fn) { return b || !!fn(tup); }, false)) + return false; + var key, keys = {}; + for (key in o1) { + if (!_equals(o1[key], o2[key])) + return false; + keys[key] = true; + } + for (key in o2) { + if (!keys[key]) + return false; + } + return true; +} +function _arraysEq(a1, a2) { + if (a1.length !== a2.length) + return false; + return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true); +} +// issue #2676 +exports.silenceUncaughtInPromise = function (promise) { + return promise.catch(function (e) { return 0; }) && promise; +}; +exports.silentRejection = function (error) { + return exports.silenceUncaughtInPromise(coreservices_1.services.$q.reject(error)); +}; +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js.map new file mode 100644 index 00000000..0357defa --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/common.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "common.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/common.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;;GAOG;AACH,kBAAkB;AAClB,2CAA+E;AAC/E,6BAAmD;AACnD,+CAA0C;AAI7B,QAAA,IAAI,GAAQ,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC;IAC/E,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC;AAC7E,IAAM,OAAO,GAAG,YAAI,CAAC,OAAO,IAAI,EAAE,CAAC;AAEtB,QAAA,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrD,QAAA,MAAM,GAA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,EAAE,CAAC,CAAC,CAAC;QACf,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AAED,mBAAmB,EAAS,EAAE,EAAS;IACrC,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC,KAAK,CAAC;IAC1C,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAxB,CAAwB,EAAE,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,cAAc;AACD,QAAA,wBAAwB,GAAG,UAAC,OAAqB;IAC1D,OAAA,OAAO,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC,CAAC,IAAI,OAAO;AAAhC,CAAgC,CAAC;AACxB,QAAA,eAAe,GAAG,UAAC,KAAU;IACtC,OAAA,gCAAwB,CAAC,uBAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAAnD,CAAmD,CAAC", + "sourcesContent": [ + "/**\n * Random utility functions used in the UI-Router code\n *\n * These functions are exported, but are subject to change without notice.\n *\n * @preferred\n * @module common\n */\n/** for typedoc */\nimport { isFunction, isString, isArray, isRegExp, isDate } from \"./predicates\";\nimport { all, any, prop, curry, not } from \"./hof\";\nimport { services } from \"./coreservices\";\nimport { StateObject } from \"../state/stateObject\";\n\ndeclare const global;\nexport const root: any = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) || this;\nconst angular = root.angular || {};\n\nexport const fromJson = angular.fromJson || JSON.parse.bind(JSON);\nexport const toJson = angular.toJson || JSON.stringify.bind(JSON);\nexport const forEach = angular.forEach || _forEach;\nexport const extend = Object.assign || _extend;\nexport const equals = angular.equals || _equals;\nexport function identity(x: any) { return x; }\nexport function noop(): any {}\n\nexport type Mapper = (x: X, key?: (string|number)) => T;\nexport interface TypedMap { [key: string]: T; }\nexport type Predicate = (x?: X) => boolean;\n/**\n * An ng1-style injectable\n *\n * This could be a (non-minified) function such as:\n * ```js\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an explicitly annotated function (minify safe)\n * ```js\n * injectableFunction.$inject = [ 'SomeDependency' ];\n * function injectableFunction(SomeDependency) {\n *\n * }\n * ```\n *\n * or an array style annotated function (minify safe)\n * ```js\n * ['SomeDependency', function injectableFunction(SomeDependency) {\n *\n * }];\n * ```\n *\n * @publicapi\n */\nexport type IInjectable = (Function|any[]);\n\nexport interface Obj extends Object {\n [key: string]: any;\n}\n\n/**\n * Builds proxy functions on the `to` object which pass through to the `from` object.\n *\n * For each key in `fnNames`, creates a proxy function on the `to` object.\n * The proxy function calls the real function on the `from` object.\n *\n *\n * #### Example:\n * This example creates an new class instance whose functions are prebound to the new'd object.\n * ```js\n * class Foo {\n * constructor(data) {\n * // Binds all functions from Foo.prototype to 'this',\n * // then copies them to 'this'\n * bindFunctions(Foo.prototype, this, this);\n * this.data = data;\n * }\n *\n * log() {\n * console.log(this.data);\n * }\n * }\n *\n * let myFoo = new Foo([1,2,3]);\n * var logit = myFoo.log;\n * logit(); // logs [1, 2, 3] from the myFoo 'this' instance\n * ```\n *\n * #### Example:\n * This example creates a bound version of a service function, and copies it to another object\n * ```\n *\n * var SomeService = {\n * this.data = [3, 4, 5];\n * this.log = function() {\n * console.log(this.data);\n * }\n * }\n *\n * // Constructor fn\n * function OtherThing() {\n * // Binds all functions from SomeService to SomeService,\n * // then copies them to 'this'\n * bindFunctions(SomeService, this, SomeService);\n * }\n *\n * let myOtherThing = new OtherThing();\n * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'\n * ```\n *\n * @param source A function that returns the source object which contains the original functions to be bound\n * @param target A function that returns the target object which will receive the bound functions\n * @param bind A function that returns the object which the functions will be bound to\n * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)\n * @param latebind If true, the binding of the function is delayed until the first time it's invoked\n */\nexport function createProxyFunctions(source: Function, target: Obj, bind: Function, fnNames?: string[], latebind = false): Obj {\n const bindFunction = (fnName) =>\n source()[fnName].bind(bind());\n\n const makeLateRebindFn = fnName => function lateRebindFunction() {\n target[fnName] = bindFunction(fnName);\n return target[fnName].apply(null, arguments);\n };\n\n fnNames = fnNames || Object.keys(source());\n\n return fnNames.reduce((acc, name) => {\n acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);\n return acc;\n }, target);\n}\n\n\n/**\n * prototypal inheritance helper.\n * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it\n */\nexport const inherit = (parent: Obj, extra?: Obj) =>\n extend(Object.create(parent), extra);\n\n/** Given an array, returns true if the object is found in the array, (using indexOf) */\nexport const inArray: typeof _inArray = curry(_inArray) as any;\nexport function _inArray(array: any[], obj: any): boolean;\nexport function _inArray(array: any[]): (obj: any) => boolean;\nexport function _inArray(array, obj?): any {\n return array.indexOf(obj) !== -1;\n}\n\n/**\n * Given an array, and an item, if the item is found in the array, it removes it (in-place).\n * The same array is returned\n */\nexport const removeFrom: typeof _removeFrom = curry(_removeFrom) as any;\nexport function _removeFrom(array: T[], obj: T): T[];\nexport function _removeFrom(array: T[]): (obj: T) => T[];\nexport function _removeFrom(array, obj?) {\n let idx = array.indexOf(obj);\n if (idx >= 0) array.splice(idx, 1);\n return array;\n}\n\n/** pushes a values to an array and returns the value */\nexport const pushTo: typeof _pushTo = curry(_pushTo) as any;\nexport function _pushTo(arr: T[], val: T): T ;\nexport function _pushTo(arr: T[]): (val: T) => T ;\nexport function _pushTo(arr, val?): any {\n return (arr.push(val), val);\n}\n\n/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */\nexport const deregAll = (functions: Function[]) =>\n functions.slice().forEach(fn => {\n typeof fn === 'function' && fn();\n removeFrom(functions, fn);\n });\n/**\n * Applies a set of defaults to an options object. The options object is filtered\n * to only those properties of the objects in the defaultsList.\n * Earlier objects in the defaultsList take precedence when applying defaults.\n */\nexport function defaults(opts, ...defaultsList: Obj[]) {\n let _defaultsList = defaultsList.concat({}).reverse();\n let defaultVals = extend.apply(null, _defaultsList);\n return extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}\n\n/** Reduce function that merges each element of the list into a single object, using extend */\nexport const mergeR = (memo: Obj, item: Obj) => extend(memo, item);\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nexport function ancestors(first: StateObject, second: StateObject) {\n let path: StateObject[] = [];\n\n for (let n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}\n\n/**\n * Return a copy of the object only containing the whitelisted properties.\n *\n * #### Example:\n * ```\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the whitelisted property names\n */\nexport function pick(obj: Obj, propNames: string[]): Obj {\n let objCopy = {};\n for (let prop in obj) {\n if (propNames.indexOf(prop) !== -1) {\n objCopy[prop] = obj[prop];\n }\n }\n return objCopy;\n}\n\n/**\n * Return a copy of the object omitting the blacklisted properties.\n *\n * @example\n * ```\n *\n * var foo = { a: 1, b: 2, c: 3 };\n * var ab = omit(foo, ['a', 'b']); // { c: 3 }\n * ```\n * @param obj the source object\n * @param propNames an Array of strings, which are the blacklisted property names\n */\nexport function omit(obj: Obj, propNames: string[]): Obj {\n return Object.keys(obj)\n .filter(not(inArray(propNames)))\n .reduce((acc, key) => (acc[key] = obj[key], acc), {});\n}\n\n\n/** Given an array of objects, maps each element to a named property of the element. */\nexport function pluck(collection: Obj[], propName: string): T[];\n/** Given an object, maps each property of the object to a named property of the property. */\nexport function pluck(collection: { [key: string]: any }, propName: string): { [key: string]: any };\n/**\n * Maps an array, or object to a property (by name)\n */\nexport function pluck(collection: any, propName: string): any {\n return map(collection, > prop(propName));\n}\n\n\n/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */\nexport function filter(collection: T[], callback: (t: T, key?: number) => boolean): T[];\n/** Given an object, returns a new object with only those properties that passed the callback predicate */\nexport function filter(collection: TypedMap, callback: (t: T, key?: string) => boolean): TypedMap;\n/** Filters an Array or an Object's properties based on a predicate */\nexport function filter(collection: any, callback: Function): T {\n let arr = isArray(collection), result: any = arr ? [] : {};\n let accept = arr ? x => result.push(x) : (x, key) => result[key] = x;\n forEach(collection, function(item, i) {\n if (callback(item, i)) accept(item, i);\n });\n return result;\n}\n\n\n/** Given an object, return the first property of that object which passed the callback predicate */\nexport function find(collection: TypedMap, callback: Predicate): T;\n/** Given an array of objects, returns the first object which passed the callback predicate */\nexport function find(collection: T[], callback: Predicate): T;\n/** Finds an object from an array, or a property of an object, that matches a predicate */\nexport function find(collection: any, callback: any) {\n let result;\n\n forEach(collection, function(item, i) {\n if (result) return;\n if (callback(item, i)) result = item;\n });\n\n return result;\n}\n\n/** Given an object, returns a new object, where each property is transformed by the callback function */\nexport let mapObj: (collection: { [key: string]: T }, callback: Mapper) => { [key: string]: U } = map;\n/** Given an array, returns a new array, where each element is transformed by the callback function */\nexport function map(collection: T[], callback: Mapper): U[];\nexport function map(collection: { [key: string]: T }, callback: Mapper): { [key: string]: U };\n/** Maps an array or object properties using a callback function */\nexport function map(collection: any, callback: any): any {\n let result = isArray(collection) ? [] : {};\n forEach(collection, (item, i) => result[i] = callback(item, i));\n return result;\n}\n\n/**\n * Given an object, return its enumerable property values\n *\n * @example\n * ```\n *\n * let foo = { a: 1, b: 2, c: 3 }\n * let vals = values(foo); // [ 1, 2, 3 ]\n * ```\n */\nexport const values: ( (obj: TypedMap) => T[]) = (obj: Obj) =>\n Object.keys(obj).map(key => obj[key]);\n\n/**\n * Reduce function that returns true if all of the values are truthy.\n *\n * @example\n * ```\n *\n * let vals = [ 1, true, {}, \"hello world\"];\n * vals.reduce(allTrueR, true); // true\n *\n * vals.push(0);\n * vals.reduce(allTrueR, true); // false\n * ```\n */\nexport const allTrueR = (memo: boolean, elem: any) => memo && elem;\n\n/**\n * Reduce function that returns true if any of the values are truthy.\n *\n * * @example\n * ```\n *\n * let vals = [ 0, null, undefined ];\n * vals.reduce(anyTrueR, true); // false\n *\n * vals.push(\"hello world\");\n * vals.reduce(anyTrueR, true); // true\n * ```\n */\nexport const anyTrueR = (memo: boolean, elem: any) => memo || elem;\n\n/**\n * Reduce function which un-nests a single level of arrays\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnestR = (memo: any[], elem: any[]) => memo.concat(elem);\n\n/**\n * Reduce function which recursively un-nests all arrays\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * input.reduce(unnestR, []) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flattenR = (memo: any[], elem: any) =>\n isArray(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem);\n\n/**\n * Reduce function that pushes an object to an array, then returns the array.\n * Mostly just for [[flattenR]] and [[uniqR]]\n */\nexport function pushR(arr: any[], obj: any) {\n arr.push(obj);\n return arr;\n}\n\n/** Reduce function that filters out duplicates */\nexport const uniqR = (acc: T[], token: T): T[] =>\n inArray(acc, token) ? acc : pushR(acc, token);\n\n/**\n * Return a new array with a single level of arrays unnested.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * unnest(input) // [ \"a\", \"b\", \"c\", \"d\", [ \"double, \"nested\" ] ]\n * ```\n */\nexport const unnest = (arr: any[]) => arr.reduce(unnestR, []);\n/**\n * Return a completely flattened version of an array.\n *\n * @example\n * ```\n *\n * let input = [ [ \"a\", \"b\" ], [ \"c\", \"d\" ], [ [ \"double\", \"nested\" ] ] ];\n * flatten(input) // [ \"a\", \"b\", \"c\", \"d\", \"double, \"nested\" ]\n * ```\n */\nexport const flatten = (arr: any[]) => arr.reduce(flattenR, []);\n\n/**\n * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass.\n * @example\n * ```\n *\n * let isNumber = (obj) => typeof(obj) === 'number';\n * let allNumbers = [ 1, 2, 3, 4, 5 ];\n * allNumbers.filter(assertPredicate(isNumber)); //OK\n *\n * let oneString = [ 1, 2, 3, 4, \"5\" ];\n * oneString.filter(assertPredicate(isNumber, \"Not all numbers\")); // throws Error(\"\"Not all numbers\"\");\n * ```\n */\nexport const assertPredicate: (predicate: Predicate, errMsg: (string|Function)) => Predicate = assertFn;\n/**\n * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.\n * @example\n * ```\n *\n * var data = { foo: 1, bar: 2 };\n *\n * let keys = [ 'foo', 'bar' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // values is [1, 2]\n *\n * let keys = [ 'foo', 'bar', 'baz' ]\n * let values = keys.map(assertMap(key => data[key], \"Key not found\"));\n * // throws Error(\"Key not found\")\n * ```\n */\nexport const assertMap: (mapFn: (t: T) => U, errMsg: (string|Function)) => (t: T) => U = assertFn;\nexport function assertFn(predicateOrMap: Function, errMsg: (string|Function) = \"assert failure\"): any {\n return (obj) => {\n let result = predicateOrMap(obj);\n if (!result) {\n throw new Error(isFunction(errMsg) ? ( errMsg)(obj) : errMsg);\n }\n return result;\n };\n}\n\n/**\n * Like _.pairs: Given an object, returns an array of key/value pairs\n *\n * @example\n * ```\n *\n * pairs({ foo: \"FOO\", bar: \"BAR }) // [ [ \"foo\", \"FOO\" ], [ \"bar\": \"BAR\" ] ]\n * ```\n */\nexport const pairs = (obj: Obj) =>\n Object.keys(obj).map(key => [ key, obj[key]] );\n\n/**\n * Given two or more parallel arrays, returns an array of tuples where\n * each tuple is composed of [ a[i], b[i], ... z[i] ]\n *\n * @example\n * ```\n *\n * let foo = [ 0, 2, 4, 6 ];\n * let bar = [ 1, 3, 5, 7 ];\n * let baz = [ 10, 30, 50, 70 ];\n * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ]\n * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ]\n * ```\n */\nexport function arrayTuples(...args: any[]): any[] {\n if (args.length === 0) return [];\n let maxArrayLen = args.reduce((min, arr) => Math.min(arr.length, min), 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER\n\n let i, result = [];\n\n for (i = 0; i < maxArrayLen; i++) {\n // This is a hot function\n // Unroll when there are 1-4 arguments\n switch (args.length) {\n case 1: result.push([args[0][i]]); break;\n case 2: result.push([args[0][i], args[1][i]]); break;\n case 3: result.push([args[0][i], args[1][i], args[2][i]]); break;\n case 4: result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); break;\n default:\n result.push(args.map(array => array[i])); break;\n }\n }\n\n return result;\n}\n\n/**\n * Reduce function which builds an object from an array of [key, value] pairs.\n *\n * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.\n *\n * Each keyValueTuple should be an array with values [ key: string, value: any ]\n *\n * @example\n * ```\n *\n * var pairs = [ [\"fookey\", \"fooval\"], [\"barkey\", \"barval\"] ]\n *\n * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n *\n * // Or, more simply:\n * var pairsToObj = pairs.reduce(applyPairs, {})\n * // pairsToObj == { fookey: \"fooval\", barkey: \"barval\" }\n * ```\n */\nexport function applyPairs(memo: TypedMap, keyValTuple: any[]) {\n let key: string, value: any;\n if (isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error(\"invalid parameters to applyPairs\");\n memo[key] = value;\n return memo;\n}\n\n/** Get the last element of an array */\nexport function tail(arr: T[]): T {\n return arr.length && arr[arr.length - 1] || undefined;\n}\n\n/**\n * shallow copy from src to dest\n */\nexport function copy(src: Obj, dest?: Obj) {\n if (dest) Object.keys(dest).forEach(key => delete dest[key]);\n if (!dest) dest = {};\n return extend(dest, src);\n}\n\n/** Naive forEach implementation works with Objects or Arrays */\nfunction _forEach(obj: (any[]|any), cb: (el, idx?) => void, _this: Obj) {\n if (isArray(obj)) return obj.forEach(cb, _this);\n Object.keys(obj).forEach(key => cb(obj[key], key));\n}\n\n/** Like Object.assign() */\nexport function _extend(toObj: Obj, ...fromObjs: Obj[]): any;\nexport function _extend(toObj: Obj): any {\n for (let i = 1; i < arguments.length; i++) {\n let obj = arguments[i];\n if (!obj) continue;\n let keys = Object.keys(obj);\n\n for (let j = 0; j < keys.length; j++) {\n toObj[keys[j]] = obj[keys[j]];\n }\n }\n\n return toObj;\n}\n\nfunction _equals(o1: any, o2: any): boolean {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n let t1 = typeof o1, t2 = typeof o2;\n if (t1 !== t2 || t1 !== 'object') return false;\n\n const tup = [o1, o2];\n if (all(isArray)(tup)) return _arraysEq(o1, o2);\n if (all(isDate)(tup)) return o1.getTime() === o2.getTime();\n if (all(isRegExp)(tup)) return o1.toString() === o2.toString();\n if (all(isFunction)(tup)) return true; // meh\n\n let predicates = [isFunction, isArray, isDate, isRegExp];\n if (predicates.map(any).reduce((b, fn) => b || !!fn(tup), false)) return false;\n\n let key: string, keys: { [i: string]: boolean } = {};\n for (key in o1) {\n if (!_equals(o1[key], o2[key])) return false;\n keys[key] = true;\n }\n for (key in o2) {\n if (!keys[key]) return false;\n }\n\n return true;\n}\n\nfunction _arraysEq(a1: any[], a2: any[]) {\n if (a1.length !== a2.length) return false;\n return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);\n}\n\n// issue #2676\nexport const silenceUncaughtInPromise = (promise: Promise) =>\n promise.catch(e => 0) && promise;\nexport const silentRejection = (error: any) =>\n silenceUncaughtInPromise(services.$q.reject(error));\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.d.ts new file mode 100644 index 00000000..8d394a6b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.d.ts @@ -0,0 +1,183 @@ +/** + * This module is a stub for core services such as Dependency Injection or Browser Location. + * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript. + * + * @module common + */ +/** for typedoc */ +import { IInjectable, Obj } from "./common"; +import { Disposable } from "../interface"; +export declare let notImplemented: (fnname: string) => () => never; +declare let services: CoreServices; +export interface $QLikeDeferred { + resolve: (val?: any) => void; + reject: (reason?: any) => void; + promise: Promise; +} +export interface $QLike { + when(value?: T | PromiseLike): Promise; + reject(reason: any): Promise; + defer(): $QLikeDeferred; + all(promises: { + [key: string]: Promise; + }): Promise; + all(promises: Promise[]): Promise; +} +export interface $InjectorLike { + get(token: any): any; + get(token: any): T; + has(token: any): boolean; + invoke(fn: IInjectable, context?: any, locals?: Obj): any; + annotate(fn: IInjectable, strictDi?: boolean): any[]; + strictDi?: boolean; +} +export interface CoreServices { + $q: $QLike; + $injector: $InjectorLike; +} +export interface LocationServices extends Disposable { + /** + * Gets the current url string + * + * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values. + * + * For example, the URL may be stored in the hash ([[HashLocationServices]]) or + * have a base HREF prepended ([[PushStateLocationServices]]). + * + * The raw URL in the browser might be: + * + * ``` + * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor + * ``` + * + * or + * + * ``` + * http://mysite.com/basepath/internal/path/123?param1=foo#anchor + * ``` + * + * then this method returns: + * + * ``` + * /internal/path/123?param1=foo#anchor + * ``` + * + * + * #### Example: + * ```js + * locationServices.url(); // "/some/path?query=value#anchor" + * ``` + * + * @returns the current value of the url, as a string. + */ + url(): string; + /** + * Updates the url, or gets the current url + * + * Updates the url, changing it to the value in `newurl` + * + * #### Example: + * ```js + * locationServices.url("/some/path?query=value#anchor", true); + * ``` + * + * @param newurl The new value for the URL. + * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values. + * It should not include the protocol, site, port, or base path of an absolute HREF. + * @param replace When true, replaces the current history entry (instead of appending it) with this new url + * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it) + * @return the url (after potentially being processed) + */ + url(newurl: string, replace?: boolean, state?: any): string; + /** + * Gets the path part of the current url + * + * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path` + * + * @return the path portion of the url + */ + path(): string; + /** + * Gets the search part of the current url as an object + * + * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }` + * + * @return the search (querystring) portion of the url, as an object + */ + search(): { + [key: string]: any; + }; + /** + * Gets the hash part of the current url + * + * If the current URL is `/some/path?query=value#anchor`, this returns `anchor` + * + * @return the hash (anchor) portion of the url + */ + hash(): string; + /** + * Registers a url change handler + * + * #### Example: + * ```js + * let deregisterFn = locationServices.onChange((evt) => console.log("url change", evt)); + * ``` + * + * @param callback a function that will be called when the url is changing + * @return a function that de-registers the callback + */ + onChange(callback: Function): Function; +} +/** + * This service returns the location configuration + * + * This service returns information about the location configuration. + * This service is primarily used when building URLs (e.g., for `hrefs`) + */ +export interface LocationConfig extends Disposable { + /** + * Gets the port, e.g., `80` + * + * @return the port number + */ + port(): number; + /** + * Gets the protocol, e.g., `http` + * + * @return the protocol + */ + protocol(): string; + /** + * Gets the host, e.g., `localhost` + * + * @return the protocol + */ + host(): string; + /** + * Gets the base Href, e.g., `http://localhost/approot/` + * + * @return the application's base href + */ + baseHref(): string; + /** + * Returns true when running in pushstate mode + * + * @return true when running in pushstate mode + */ + html5Mode(): boolean; + /** + * Gets the hashPrefix (when not running in pushstate mode) + * + * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the "hashbang" portion. + * + * @return the hash prefix + */ + hashPrefix(): string; + /** + * Sets the hashPrefix (when not running in pushstate mode) + * + * @return the new hash prefix + */ + hashPrefix(newprefix: string): string; +} +export { services }; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js new file mode 100644 index 00000000..66da5fc9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.notImplemented = function (fnname) { return function () { + throw new Error(fnname + "(): No coreservices implementation for UI-Router is loaded."); +}; }; +var services = { + $q: undefined, + $injector: undefined, +}; +exports.services = services; +//# sourceMappingURL=coreservices.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js.map new file mode 100644 index 00000000..12329292 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/coreservices.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "coreservices.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/coreservices.ts" + ], + "names": [], + "mappings": ";;AAWW,QAAA,cAAc,GAAG,UAAC,MAAc,IAAK,OAAA;IAC9C,MAAM,IAAI,KAAK,CAAI,MAAM,gEAA6D,CAAC,CAAC;AAC1F,CAAC,EAF+C,CAE/C,CAAC;AAEF,IAAI,QAAQ,GAAiB;IAC3B,EAAE,EAAE,SAAS;IACb,SAAS,EAAE,SAAS;CACrB,CAAC;AAoLM,4BAAQ", + "sourcesContent": [ + "/**\n * This module is a stub for core services such as Dependency Injection or Browser Location.\n * Core services may be implemented by a specific framework, such as ng1 or ng2, or be pure javascript.\n *\n * @module common\n */\n/** for typedoc */\nimport {IInjectable, Obj} from \"./common\";\nimport { Disposable } from \"../interface\";\nimport { UrlParts } from \"../url/interface\";\n\nexport let notImplemented = (fnname: string) => () => {\n throw new Error(`${fnname}(): No coreservices implementation for UI-Router is loaded.`);\n};\n\nlet services: CoreServices = {\n $q: undefined,\n $injector: undefined,\n};\n\nexport interface $QLikeDeferred {\n resolve: (val?: any) => void;\n reject: (reason?: any) => void;\n promise: Promise;\n}\n\nexport interface $QLike {\n when(value?: T | PromiseLike): Promise;\n reject(reason: any): Promise;\n defer(): $QLikeDeferred;\n all(promises: { [key: string]: Promise }): Promise;\n all(promises: Promise[]): Promise;\n}\n\nexport interface $InjectorLike {\n get(token: any): any;\n get(token: any): T;\n has(token: any): boolean;\n invoke(fn: IInjectable, context?: any, locals?: Obj): any;\n annotate(fn: IInjectable, strictDi?: boolean): any[];\n strictDi?: boolean;\n}\n\nexport interface CoreServices {\n $q: $QLike;\n $injector: $InjectorLike;\n}\n\nexport interface LocationServices extends Disposable {\n /**\n * Gets the current url string\n *\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * @returns the current value of the url, as a string.\n */\n url(): string;\n\n /**\n * Updates the url, or gets the current url\n *\n * Updates the url, changing it to the value in `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n * @return the url (after potentially being processed)\n */\n url(newurl: string, replace?: boolean, state?: any): string;\n\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n path(): string;\n\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (querystring) portion of the url, as an object\n */\n search(): { [key: string]: any };\n\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n hash(): string;\n\n /**\n * Registers a url change handler\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n onChange(callback: Function): Function;\n}\n\n/**\n * This service returns the location configuration\n *\n * This service returns information about the location configuration.\n * This service is primarily used when building URLs (e.g., for `hrefs`)\n */\nexport interface LocationConfig extends Disposable {\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n port(): number;\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n protocol(): string;\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n host(): string;\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n baseHref(): string;\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in pushstate mode\n */\n html5Mode(): boolean;\n /**\n * Gets the hashPrefix (when not running in pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n hashPrefix(): string;\n /**\n * Sets the hashPrefix (when not running in pushstate mode)\n *\n * @return the new hash prefix\n */\n hashPrefix(newprefix: string): string;\n}\n\nexport {services};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.d.ts new file mode 100644 index 00000000..6dffcd04 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.d.ts @@ -0,0 +1,63 @@ +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +export declare class Glob { + text: string; + glob: Array; + regexp: RegExp; + constructor(text: string); + matches(name: string): boolean; + /** Returns true if the string has glob-like characters in it */ + static is(text: string): boolean; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + static fromString(text: string): Glob; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js new file mode 100644 index 00000000..5d2d5dee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js @@ -0,0 +1,83 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module core + */ +/** + * Matches state names using glob-like pattern strings. + * + * Globs can be used in specific APIs including: + * + * - [[StateService.is]] + * - [[StateService.includes]] + * - The first argument to Hook Registration functions like [[TransitionService.onStart]] + * - [[HookMatchCriteria]] and [[HookMatchCriterion]] + * + * A `Glob` string is a pattern which matches state names. + * Nested state names are split into segments (separated by a dot) when processing. + * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] + * + * Globs work according to the following rules: + * + * ### Exact match: + * + * The glob `'A.B'` matches the state named exactly `'A.B'`. + * + * | Glob |Matches states named|Does not match state named| + * |:------------|:--------------------|:---------------------| + * | `'A'` | `'A'` | `'B'` , `'A.C'` | + * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | + * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| + * + * ### Single star (`*`) + * + * A single star (`*`) is a wildcard that matches exactly one segment. + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:---------------------|:--------------------------| + * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | + * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | + * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| + * + * ### Double star (`**`) + * + * A double star (`'**'`) is a wildcard that matches *zero or more segments* + * + * | Glob |Matches states named |Does not match state named | + * |:------------|:----------------------------------------------|:----------------------------------| + * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | + * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | + * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | + * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | + * + */ +var Glob = /** @class */ (function () { + function Glob(text) { + this.text = text; + this.glob = text.split('.'); + var regexpString = this.text.split('.') + .map(function (seg) { + if (seg === '**') + return '(?:|(?:\\.[^.]*)*)'; + if (seg === '*') + return '\\.[^.]*'; + return '\\.' + seg; + }).join(''); + this.regexp = new RegExp("^" + regexpString + "$"); + } + Glob.prototype.matches = function (name) { + return this.regexp.test('.' + name); + }; + /** Returns true if the string has glob-like characters in it */ + Glob.is = function (text) { + return !!/[!,*]+/.exec(text); + }; + /** Returns a glob from the string, or null if the string isn't Glob-like */ + Glob.fromString = function (text) { + return Glob.is(text) ? new Glob(text) : null; + }; + return Glob; +}()); +exports.Glob = Glob; +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js.map new file mode 100644 index 00000000..e96bd8b3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/glob.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "glob.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/glob.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;A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ern strings.\n *\n * Globs can be used in specific APIs including:\n *\n * - [[StateService.is]]\n * - [[StateService.includes]]\n * - The first argument to Hook Registration functions like [[TransitionService.onStart]]\n * - [[HookMatchCriteria]] and [[HookMatchCriterion]]\n *\n * A `Glob` string is a pattern which matches state names.\n * Nested state names are split into segments (separated by a dot) when processing.\n * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']\n *\n * Globs work according to the following rules:\n *\n * ### Exact match:\n *\n * The glob `'A.B'` matches the state named exactly `'A.B'`.\n *\n * | Glob |Matches states named|Does not match state named|\n * |:------------|:--------------------|:---------------------|\n * | `'A'` | `'A'` | `'B'` , `'A.C'` |\n * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |\n * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|\n *\n * ### Single star (`*`)\n *\n * A single star (`*`) is a wildcard that matches exactly one segment.\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:---------------------|:--------------------------|\n * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |\n * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |\n * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|\n *\n * ### Double star (`**`)\n *\n * A double star (`'**'`) is a wildcard that matches *zero or more segments*\n *\n * | Glob |Matches states named |Does not match state named |\n * |:------------|:----------------------------------------------|:----------------------------------|\n * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |\n * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |\n * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |\n * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |\n *\n */\nexport class Glob {\n text: string;\n glob: Array;\n regexp: RegExp;\n\n constructor(text: string) {\n this.text = text;\n this.glob = text.split('.');\n\n let regexpString = this.text.split('.')\n .map(seg => {\n if (seg === '**') return '(?:|(?:\\\\.[^.]*)*)';\n if (seg === '*') return '\\\\.[^.]*';\n return '\\\\.' + seg;\n }).join('');\n\n this.regexp = new RegExp(\"^\" + regexpString + \"$\");\n }\n\n matches(name: string) {\n return this.regexp.test('.' + name);\n }\n\n /** Returns true if the string has glob-like characters in it */\n static is(text: string) {\n return !!/[!,*]+/.exec(text);\n }\n\n /** Returns a glob from the string, or null if the string isn't Glob-like */\n static fromString(text: string) {\n return Glob.is(text) ? new Glob(text) : null;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.d.ts new file mode 100644 index 00000000..c8fd2eb2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.d.ts @@ -0,0 +1,162 @@ +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +import { Predicate } from "./common"; +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +export declare function curry(fn: Function): Function; +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +export declare function compose(): () => any; +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +export declare function pipe(...funcs: Function[]): (obj: any) => any; +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +export declare const prop: (name: string) => (obj: any) => any; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +export declare const propEq: Function; +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +export declare const parse: (name: string) => any; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +export declare const not: (fn: Predicate) => Predicate; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +export declare function and(fn1: Predicate, fn2: Predicate): Predicate; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +export declare function or(fn1: Predicate, fn2: Predicate): Predicate; +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +export declare const all: (fn1: Predicate) => (arr: any[]) => boolean; +export declare const any: (fn1: Predicate) => (arr: any[]) => boolean; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +export declare const is: (ctor: new (...args: any[]) => T) => (obj: any) => obj is T; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +export declare const eq: (comp: any) => Predicate; +/** Given a value, returns a function which returns the value */ +export declare const val: (v: T) => () => T; +export declare function invoke(fnName: string): Function; +export declare function invoke(fnName: string, args: any[]): Function; +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +export declare function pattern(struct: Function[][]): Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js new file mode 100644 index 00000000..0131ed01 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js @@ -0,0 +1,245 @@ +"use strict"; +/** + * Higher order functions + * + * These utility functions are exported, but are subject to change without notice. + * + * @module common_hof + */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. + * + * Given a function with N parameters, returns a new function that supports partial application. + * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, + * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to + * accept more parameters until all N parameters have been supplied. + * + * + * This contrived example uses a partially applied function as an predicate, which returns true + * if an object is found in both arrays. + * @example + * ``` + * // returns true if an object is in both of the two arrays + * function inBoth(array1, array2, object) { + * return array1.indexOf(object) !== -1 && + * array2.indexOf(object) !== 1; + * } + * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 + * let foos = [obj1, obj3] + * let bars = [obj3, obj4, obj5] + * + * // A curried "copy" of inBoth + * let curriedInBoth = curry(inBoth); + * // Partially apply both the array1 and array2 + * let inFoosAndBars = curriedInBoth(foos, bars); + * + * // Supply the final argument; since all arguments are + * // supplied, the original inBoth function is then called. + * let obj1InBoth = inFoosAndBars(obj1); // false + * + * // Use the inFoosAndBars as a predicate. + * // Filter, on each iteration, supplies the final argument + * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; + * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] + * + * ``` + * + * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function + * + * @param fn + * @returns {*|function(): (*|any)} + */ +function curry(fn) { + var initial_args = [].slice.apply(arguments, [1]); + var func_args_length = fn.length; + function curried(args) { + if (args.length >= func_args_length) + return fn.apply(null, args); + return function () { + return curried(args.concat([].slice.apply(arguments))); + }; + } + return curried(initial_args); +} +exports.curry = curry; +/** + * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left + * given: f(x), g(x), h(x) + * let composed = compose(f,g,h) + * then, composed is: f(g(h(x))) + */ +function compose() { + var args = arguments; + var start = args.length - 1; + return function () { + var i = start, result = args[start].apply(this, arguments); + while (i--) + result = args[i].call(this, result); + return result; + }; +} +exports.compose = compose; +/** + * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right + * given: f(x), g(x), h(x) + * let piped = pipe(f,g,h); + * then, piped is: h(g(f(x))) + */ +function pipe() { + var funcs = []; + for (var _i = 0; _i < arguments.length; _i++) { + funcs[_i] = arguments[_i]; + } + return compose.apply(null, [].slice.call(arguments).reverse()); +} +exports.pipe = pipe; +/** + * Given a property name, returns a function that returns that property from an object + * let obj = { foo: 1, name: "blarg" }; + * let getName = prop("name"); + * getName(obj) === "blarg" + */ +exports.prop = function (name) { + return function (obj) { return obj && obj[name]; }; +}; +/** + * Given a property name and a value, returns a function that returns a boolean based on whether + * the passed object has a property that matches the value + * let obj = { foo: 1, name: "blarg" }; + * let getName = propEq("name", "blarg"); + * getName(obj) === true + */ +exports.propEq = curry(function (name, val, obj) { return obj && obj[name] === val; }); +/** + * Given a dotted property name, returns a function that returns a nested property from an object, or undefined + * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; + * let getName = prop("nestedObj.name"); + * getName(obj) === "blarg" + * let propNotFound = prop("this.property.doesnt.exist"); + * propNotFound(obj) === undefined + */ +exports.parse = function (name) { + return pipe.apply(null, name.split(".").map(exports.prop)); +}; +/** + * Given a function that returns a truthy or falsey value, returns a + * function that returns the opposite (falsey or truthy) value given the same inputs + */ +exports.not = function (fn) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return !fn.apply(null, args); + }; +}; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if both functions return truthy for the given arguments + */ +function and(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) && fn2.apply(null, args); + }; +} +exports.and = and; +/** + * Given two functions that return truthy or falsey values, returns a function that returns truthy + * if at least one of the functions returns truthy for the given arguments + */ +function or(fn1, fn2) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return fn1.apply(null, args) || fn2.apply(null, args); + }; +} +exports.or = or; +/** + * Check if all the elements of an array match a predicate function + * + * @param fn1 a predicate function `fn1` + * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array + */ +exports.all = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; +}; +exports.any = function (fn1) { + return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; +}; +/** Given a class, returns a Predicate function that returns true if the object is of that class */ +exports.is = function (ctor) { + return function (obj) { + return (obj != null && obj.constructor === ctor || obj instanceof ctor); + }; +}; +/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ +exports.eq = function (val) { return function (other) { + return val === other; +}; }; +/** Given a value, returns a function which returns the value */ +exports.val = function (v) { return function () { return v; }; }; +function invoke(fnName, args) { + return function (obj) { + return obj[fnName].apply(obj, args); + }; +} +exports.invoke = invoke; +/** + * Sorta like Pattern Matching (a functional programming conditional construct) + * + * See http://c2.com/cgi/wiki?PatternMatching + * + * This is a conditional construct which allows a series of predicates and output functions + * to be checked and then applied. Each predicate receives the input. If the predicate + * returns truthy, then its matching output function (mapping function) is provided with + * the input and, then the result is returned. + * + * Each combination (2-tuple) of predicate + output function should be placed in an array + * of size 2: [ predicate, mapFn ] + * + * These 2-tuples should be put in an outer array. + * + * @example + * ``` + * + * // Here's a 2-tuple where the first element is the isString predicate + * // and the second element is a function that returns a description of the input + * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; + * + * // Second tuple: predicate "isNumber", mapfn returns a description + * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; + * + * let third = [ (input) => input === null, (input) => `Oh, null...` ]; + * + * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; + * + * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); + * + * console.log(descriptionOf(undefined)); // 'notdefined' + * console.log(descriptionOf(55)); // '(55) That's a number!' + * console.log(descriptionOf("foo")); // 'Here's your string foo' + * ``` + * + * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, + * with a Predicate and a mapping/output function + * @returns {function(any): *} + */ +function pattern(struct) { + return function (x) { + for (var i = 0; i < struct.length; i++) { + if (struct[i][0](x)) + return struct[i][1](x); + } + }; +} +exports.pattern = pattern; +//# sourceMappingURL=hof.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js.map new file mode 100644 index 00000000..7176db76 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/hof.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hof.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/hof.ts" + ], + "names": [], + "mappings": ";AAAA;;;;;;GAMG,CAAC,MAAM;;AAGV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAsB,EAAY;IAChC,IAAI,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;IAEjC,iBAAiB,IAAW;QAC1B,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,gBAAgB,CAAC;YAClC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,MAAM,CAAC;YACL,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC;I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H,CAAC,CAAC;AACJ,CAAC;AAND,0BAMC", + "sourcesContent": [ + "/**\n * Higher order functions\n *\n * These utility functions are exported, but are subject to change without notice.\n *\n * @module common_hof\n */ /** */\n\nimport {Predicate} from \"./common\";\n/**\n * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.\n *\n * Given a function with N parameters, returns a new function that supports partial application.\n * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,\n * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to\n * accept more parameters until all N parameters have been supplied.\n *\n *\n * This contrived example uses a partially applied function as an predicate, which returns true\n * if an object is found in both arrays.\n * @example\n * ```\n * // returns true if an object is in both of the two arrays\n * function inBoth(array1, array2, object) {\n * return array1.indexOf(object) !== -1 &&\n * array2.indexOf(object) !== 1;\n * }\n * let obj1, obj2, obj3, obj4, obj5, obj6, obj7\n * let foos = [obj1, obj3]\n * let bars = [obj3, obj4, obj5]\n *\n * // A curried \"copy\" of inBoth\n * let curriedInBoth = curry(inBoth);\n * // Partially apply both the array1 and array2\n * let inFoosAndBars = curriedInBoth(foos, bars);\n *\n * // Supply the final argument; since all arguments are\n * // supplied, the original inBoth function is then called.\n * let obj1InBoth = inFoosAndBars(obj1); // false\n *\n * // Use the inFoosAndBars as a predicate.\n * // Filter, on each iteration, supplies the final argument\n * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];\n * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]\n *\n * ```\n *\n * Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function\n *\n * @param fn\n * @returns {*|function(): (*|any)}\n */\nexport function curry(fn: Function): Function {\n let initial_args = [].slice.apply(arguments, [1]);\n let func_args_length = fn.length;\n\n function curried(args: any[]) {\n if (args.length >= func_args_length)\n return fn.apply(null, args);\n return function () {\n return curried(args.concat([].slice.apply(arguments)));\n };\n }\n return curried(initial_args);\n}\n\n\n\n/**\n * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left\n * given: f(x), g(x), h(x)\n * let composed = compose(f,g,h)\n * then, composed is: f(g(h(x)))\n */\nexport function compose() {\n let args = arguments;\n let start = args.length - 1;\n return function() {\n let i = start, result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n/**\n * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right\n * given: f(x), g(x), h(x)\n * let piped = pipe(f,g,h);\n * then, piped is: h(g(f(x)))\n */\nexport function pipe(...funcs: Function[]): (obj: any) => any {\n return compose.apply(null, [].slice.call(arguments).reverse());\n}\n\n/**\n * Given a property name, returns a function that returns that property from an object\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = prop(\"name\");\n * getName(obj) === \"blarg\"\n */\nexport const prop = (name: string) =>\n (obj: any) => obj && obj[name];\n\n/**\n * Given a property name and a value, returns a function that returns a boolean based on whether\n * the passed object has a property that matches the value\n * let obj = { foo: 1, name: \"blarg\" };\n * let getName = propEq(\"name\", \"blarg\");\n * getName(obj) === true\n */\nexport const propEq = curry((name: string, val: any, obj: any) => obj && obj[name] === val);\n\n/**\n * Given a dotted property name, returns a function that returns a nested property from an object, or undefined\n * let obj = { id: 1, nestedObj: { foo: 1, name: \"blarg\" }, };\n * let getName = prop(\"nestedObj.name\");\n * getName(obj) === \"blarg\"\n * let propNotFound = prop(\"this.property.doesnt.exist\");\n * propNotFound(obj) === undefined\n */\nexport const parse = (name: string) =>\n pipe.apply(null, name.split(\".\").map(prop));\n\n/**\n * Given a function that returns a truthy or falsey value, returns a\n * function that returns the opposite (falsey or truthy) value given the same inputs\n */\nexport const not: (fn: Predicate) => Predicate = (fn: Predicate) =>\n (...args: any[]) => !fn.apply(null, args);\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if both functions return truthy for the given arguments\n */\nexport function and(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) && fn2.apply(null, args);\n}\n\n/**\n * Given two functions that return truthy or falsey values, returns a function that returns truthy\n * if at least one of the functions returns truthy for the given arguments\n */\nexport function or(fn1: Predicate, fn2: Predicate): Predicate {\n return (...args: any[]) => fn1.apply(null, args) || fn2.apply(null, args);\n}\n\n/**\n * Check if all the elements of an array match a predicate function\n *\n * @param fn1 a predicate function `fn1`\n * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array\n */\nexport const all = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b && !!fn1(x), true) as boolean;\nexport const any = (fn1: Predicate) =>\n (arr: any[]) => arr.reduce((b, x) => b || !!fn1(x), false) as boolean;\n\n/** Given a class, returns a Predicate function that returns true if the object is of that class */\nexport const is = (ctor: { new(...args): T }) =>\n (obj: any): obj is T =>\n (obj != null && obj.constructor === ctor || obj instanceof ctor);\n\n/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */\nexport const eq: (comp: any) => Predicate = (val: any) => (other: any) =>\n val === other;\n\n/** Given a value, returns a function which returns the value */\nexport const val = (v: T) => () => v;\n\n\n\nexport function invoke(fnName: string): Function;\nexport function invoke(fnName: string, args: any[]): Function;\nexport function invoke(fnName: string, args?: any[]): Function {\n return (obj: any) =>\n obj[fnName].apply(obj, args);\n}\n\n/**\n * Sorta like Pattern Matching (a functional programming conditional construct)\n *\n * See http://c2.com/cgi/wiki?PatternMatching\n *\n * This is a conditional construct which allows a series of predicates and output functions\n * to be checked and then applied. Each predicate receives the input. If the predicate\n * returns truthy, then its matching output function (mapping function) is provided with\n * the input and, then the result is returned.\n *\n * Each combination (2-tuple) of predicate + output function should be placed in an array\n * of size 2: [ predicate, mapFn ]\n *\n * These 2-tuples should be put in an outer array.\n *\n * @example\n * ```\n *\n * // Here's a 2-tuple where the first element is the isString predicate\n * // and the second element is a function that returns a description of the input\n * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];\n *\n * // Second tuple: predicate \"isNumber\", mapfn returns a description\n * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];\n *\n * let third = [ (input) => input === null, (input) => `Oh, null...` ];\n *\n * let fourth = [ (input) => input === undefined, (input) => `notdefined` ];\n *\n * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);\n *\n * console.log(descriptionOf(undefined)); // 'notdefined'\n * console.log(descriptionOf(55)); // '(55) That's a number!'\n * console.log(descriptionOf(\"foo\")); // 'Here's your string foo'\n * ```\n *\n * @param struct A 2D array. Each element of the array should be an array, a 2-tuple,\n * with a Predicate and a mapping/output function\n * @returns {function(any): *}\n */\nexport function pattern(struct: Function[][]): Function {\n return function(x: any) {\n for (var i = 0; i < struct.length; i++) {\n if (struct[i][0](x)) return struct[i][1](x);\n }\n };\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.d.ts new file mode 100644 index 00000000..0dd053e2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.d.ts @@ -0,0 +1,9 @@ +/** @module common */ /** for typedoc */ +export * from "./common"; +export * from "./coreservices"; +export * from "./glob"; +export * from "./hof"; +export * from "./predicates"; +export * from "./queue"; +export * from "./strings"; +export * from "./trace"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js new file mode 100644 index 00000000..4c60c94b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js @@ -0,0 +1,15 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module common */ /** for typedoc */ +__export(require("./common")); +__export(require("./coreservices")); +__export(require("./glob")); +__export(require("./hof")); +__export(require("./predicates")); +__export(require("./queue")); +__export(require("./strings")); +__export(require("./trace")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js.map new file mode 100644 index 00000000..62b4f9ba --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/index.ts" + ], + "names": [], + "mappings": ";;;;;AAAA,qBAAqB,CAAC,kBAAkB;AACxC,8BAAyB;AACzB,oCAA+B;AAC/B,4BAAuB;AACvB,2BAAsB;AACtB,kCAA6B;AAC7B,6BAAwB;AACxB,+BAA0B;AAC1B,6BAAwB", + "sourcesContent": [ + "/** @module common */ /** for typedoc */\nexport * from \"./common\";\nexport * from \"./coreservices\";\nexport * from \"./glob\";\nexport * from \"./hof\";\nexport * from \"./predicates\";\nexport * from \"./queue\";\nexport * from \"./strings\";\nexport * from \"./trace\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.d.ts new file mode 100644 index 00000000..d37fa7f5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.d.ts @@ -0,0 +1,27 @@ +import { Predicate } from "./common"; +import { StateObject } from "../state/stateObject"; +export declare const isUndefined: (x: any) => boolean; +export declare const isDefined: Predicate; +export declare const isNull: (o: any) => boolean; +export declare const isNullOrUndefined: Predicate; +export declare const isFunction: (x: any) => x is Function; +export declare const isNumber: (x: any) => x is number; +export declare const isString: (x: any) => x is string; +export declare const isObject: (x: any) => boolean; +export declare const isArray: (arg: any) => arg is any[]; +export declare const isDate: (x: any) => x is Date; +export declare const isRegExp: (x: any) => x is RegExp; +export declare const isState: (x: any) => x is StateObject; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +export declare function isInjectable(val: any): boolean; +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +export declare const isPromise: (x: any) => x is Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js new file mode 100644 index 00000000..4a3dff87 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** Predicates + * + * These predicates return true/false based on the input. + * Although these functions are exported, they are subject to change without notice. + * + * @module common_predicates + */ +/** */ +var hof_1 = require("./hof"); +var stateObject_1 = require("../state/stateObject"); +var toStr = Object.prototype.toString; +var tis = function (t) { return function (x) { return typeof (x) === t; }; }; +exports.isUndefined = tis('undefined'); +exports.isDefined = hof_1.not(exports.isUndefined); +exports.isNull = function (o) { return o === null; }; +exports.isNullOrUndefined = hof_1.or(exports.isNull, exports.isUndefined); +exports.isFunction = tis('function'); +exports.isNumber = tis('number'); +exports.isString = tis('string'); +exports.isObject = function (x) { return x !== null && typeof x === 'object'; }; +exports.isArray = Array.isArray; +exports.isDate = (function (x) { return toStr.call(x) === '[object Date]'; }); +exports.isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; }); +exports.isState = stateObject_1.StateObject.isState; +/** + * Predicate which checks if a value is injectable + * + * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array + * where all the elements in the array are Strings, except the last one, which is a Function + */ +function isInjectable(val) { + if (exports.isArray(val) && val.length) { + var head = val.slice(0, -1), tail = val.slice(-1); + return !(head.filter(hof_1.not(exports.isString)).length || tail.filter(hof_1.not(exports.isFunction)).length); + } + return exports.isFunction(val); +} +exports.isInjectable = isInjectable; +/** + * Predicate which checks if a value looks like a Promise + * + * It is probably a Promise if it's an object, and it has a `then` property which is a Function + */ +exports.isPromise = hof_1.and(exports.isObject, hof_1.pipe(hof_1.prop('then'), exports.isFunction)); +//# sourceMappingURL=predicates.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js.map new file mode 100644 index 00000000..ff2615be --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/predicates.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "predicates.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/predicates.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;GAMG;AACH,MAAM;AACN,6BAAiD;AAEjD,oDAAmD;AAEnD,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AACxC,IAAM,GAAG,GAAG,UAAC,CAAS,IAAK,OAAA,UAAC,CAAM,IAAK,OAAA,OAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAf,CAAe,EAA3B,CAA2B,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;AAC/B,QAAA,SAAS,GAAG,SAAG,CAAC,mBAAW,CAAC,CAAC;AAC7B,QAAA,MAAM,GAAG,UAAC,CAAM,IAAK,OAAA,CAAC,KAAK,IAAI,EAAV,CAAU,CAAC;AAChC,QAAA,iBAAiB,GAAG,QAAE,CAAC,cAAM,EAAE,mBAAW,CAAC,CAAC;AAC5C,QAAA,UAAU,GAAoC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC9D,QAAA,QAAQ,GAAkC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACxD,QAAA,QAAQ,GAA6B,GAAG,CAAC,QAAQ,CAAC,CAAC;AACnD,QAAA,QAAQ,GAAG,UAAC,CAAM,IAAK,OAAA,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAnC,CAAmC,CAAC;AAC3D,QAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AACxB,QAAA,MAAM,GAAgC,CAAC,UAAC,CAAM,IAAK,OAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,eAAe,EAAjC,CAAiC,CAAC,CAAC;AACtF,QAAA,QAAQ,GAAkC,CAAC,UAAC,CAAM,IAAK,OAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,iBAAiB,EAAnC,CAAmC,CAAC,CAAC;AAC5F,QAAA,OAAO,GAAiC,yBAAW,CAAC,OAAO,CAAC;AAEzE;;;;;GAKG;AACH,sBAA6B,GAAQ;IACnC,EAAE,CAAC,CAAC,eAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAG,CAAC,gBAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,SAAG,CAAC,kBAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,CAAC,kBAAU,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAND,oCAMC;AAED;;;;GAIG;AACU,QAAA,SAAS,GAAmC,SAAG,CAAC,gBAAQ,EAAE,UAAI,CAAC,UAAI,CAAC,MAAM,CAAC,EAAE,kBAAU,CAAC,CAAC,CAAC", + "sourcesContent": [ + "/** Predicates\n *\n * These predicates return true/false based on the input.\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_predicates\n */\n/** */\nimport { and, not, pipe, prop, or } from \"./hof\";\nimport { Predicate } from \"./common\"; // has or is using\nimport { StateObject } from \"../state/stateObject\";\n\nconst toStr = Object.prototype.toString;\nconst tis = (t: string) => (x: any) => typeof(x) === t;\nexport const isUndefined = tis('undefined');\nexport const isDefined = not(isUndefined);\nexport const isNull = (o: any) => o === null;\nexport const isNullOrUndefined = or(isNull, isUndefined);\nexport const isFunction: (x: any) => x is Function = tis('function');\nexport const isNumber: (x: any) => x is number = tis('number');\nexport const isString = <(x: any) => x is string> tis('string');\nexport const isObject = (x: any) => x !== null && typeof x === 'object';\nexport const isArray = Array.isArray;\nexport const isDate: (x: any) => x is Date = ((x: any) => toStr.call(x) === '[object Date]');\nexport const isRegExp: (x: any) => x is RegExp = ((x: any) => toStr.call(x) === '[object RegExp]');\nexport const isState: (x: any) => x is StateObject = StateObject.isState;\n\n/**\n * Predicate which checks if a value is injectable\n *\n * A value is \"injectable\" if it is a function, or if it is an ng1 array-notation-style array\n * where all the elements in the array are Strings, except the last one, which is a Function\n */\nexport function isInjectable(val: any) {\n if (isArray(val) && val.length) {\n let head = val.slice(0, -1), tail = val.slice(-1);\n return !(head.filter(not(isString)).length || tail.filter(not(isFunction)).length);\n }\n return isFunction(val);\n}\n\n/**\n * Predicate which checks if a value looks like a Promise\n *\n * It is probably a Promise if it's an object, and it has a `then` property which is a Function\n */\nexport const isPromise = <(x: any) => x is Promise> and(isObject, pipe(prop('then'), isFunction));\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.d.ts new file mode 100644 index 00000000..fef21fae --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.d.ts @@ -0,0 +1,15 @@ +/** + * @module common + */ /** for typedoc */ +export declare class Queue { + private _items; + private _limit; + constructor(_items?: T[], _limit?: number); + enqueue(item: T): T; + dequeue(): T; + clear(): Array; + size(): number; + remove(item: T): T; + peekTail(): T; + peekHead(): T; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js new file mode 100644 index 00000000..f11bd4a2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js @@ -0,0 +1,46 @@ +"use strict"; +/** + * @module common + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var Queue = /** @class */ (function () { + function Queue(_items, _limit) { + if (_items === void 0) { _items = []; } + if (_limit === void 0) { _limit = null; } + this._items = _items; + this._limit = _limit; + } + Queue.prototype.enqueue = function (item) { + var items = this._items; + items.push(item); + if (this._limit && items.length > this._limit) + items.shift(); + return item; + }; + Queue.prototype.dequeue = function () { + if (this.size()) + return this._items.splice(0, 1)[0]; + }; + Queue.prototype.clear = function () { + var current = this._items; + this._items = []; + return current; + }; + Queue.prototype.size = function () { + return this._items.length; + }; + Queue.prototype.remove = function (item) { + var idx = this._items.indexOf(item); + return idx > -1 && this._items.splice(idx, 1)[0]; + }; + Queue.prototype.peekTail = function () { + return this._items[this._items.length - 1]; + }; + Queue.prototype.peekHead = function () { + if (this.size()) + return this._items[0]; + }; + return Queue; +}()); +exports.Queue = Queue; +//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js.map new file mode 100644 index 00000000..3cf3bd5c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/queue.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "queue.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/queue.ts" + ], + "names": [], + "mappings": ";AAAA;;GAEG,CAAC,kBAAkB;;AAEtB;IACE,eAAoB,MAAgB,EAAU,MAAqB;QAA/C,uBAAA,EAAA,WAAgB;QAAU,uBAAA,EAAA,aAAqB;QAA/C,WAAM,GAAN,MAAM,CAAU;QAAU,WAAM,GAAN,MAAM,CAAe;IAAI,CAAC;IAExE,uBAAO,GAAP,UAAQ,IAAO;QACb,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAC7D,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED,uBAAO,GAAP;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,qBAAK,GAAL;QACE,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;IAED,oBAAI,GAAJ;QACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,sBAAM,GAAN,UAAO,IAAO;QACZ,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,wBAAQ,GAAR;QACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,wBAAQ,GAAR;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IACH,YAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,sBAAK", + "sourcesContent": [ + "/**\n * @module common\n */ /** for typedoc */\n\nexport class Queue {\n constructor(private _items: T[] = [], private _limit: number = null) { }\n\n enqueue(item: T) {\n let items = this._items;\n items.push(item);\n if (this._limit && items.length > this._limit) items.shift();\n return item;\n }\n\n dequeue(): T {\n if (this.size())\n return this._items.splice(0, 1)[0];\n }\n\n clear(): Array {\n let current = this._items;\n this._items = [];\n return current;\n }\n\n size(): number {\n return this._items.length;\n }\n\n remove(item: T) {\n let idx = this._items.indexOf(item);\n return idx > -1 && this._items.splice(idx, 1)[0];\n }\n\n peekTail(): T {\n return this._items[this._items.length - 1];\n }\n\n peekHead(): T {\n if (this.size())\n return this._items[0];\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.d.ts new file mode 100644 index 00000000..4486c92e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.d.ts @@ -0,0 +1,57 @@ +import { IInjectable } from "./common"; +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +export declare function maxLength(max: number, str: string): string; +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +export declare function padString(length: number, str: string): string; +export declare function kebobString(camelCase: string): string; +export declare function functionToString(fn: Function): any; +export declare function fnToString(fn: IInjectable): any; +export declare function stringify(o: any): string; +/** Returns a function that splits a string on a character or substring */ +export declare const beforeAfterSubstr: (char: string) => (str: string) => string[]; +export declare const hostRegex: RegExp; +export declare const stripFile: (str: string) => string; +export declare const splitHash: (str: string) => string[]; +export declare const splitQuery: (str: string) => string[]; +export declare const splitEqual: (str: string) => string[]; +export declare const trimHashVal: (str: string) => string; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +export declare function splitOnDelim(delim: string): (str: string) => string[]; +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +export declare function joinNeighborsR(acc: any[], x: any): any[]; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js new file mode 100644 index 00000000..9fe912d1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js @@ -0,0 +1,158 @@ +"use strict"; +/** + * Functions that manipulate strings + * + * Although these functions are exported, they are subject to change without notice. + * + * @module common_strings + */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +var predicates_1 = require("./predicates"); +var rejectFactory_1 = require("../transition/rejectFactory"); +var common_1 = require("./common"); +var hof_1 = require("./hof"); +var transition_1 = require("../transition/transition"); +var resolvable_1 = require("../resolve/resolvable"); +/** + * Returns a string shortened to a maximum length + * + * If the string is already less than the `max` length, return the string. + * Else return the string, shortened to `max - 3` and append three dots ("..."). + * + * @param max the maximum length of the string to return + * @param str the input string + */ +function maxLength(max, str) { + if (str.length <= max) + return str; + return str.substr(0, max - 3) + "..."; +} +exports.maxLength = maxLength; +/** + * Returns a string, with spaces added to the end, up to a desired str length + * + * If the string is already longer than the desired length, return the string. + * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. + * + * @param length the desired length of the string to return + * @param str the input string + */ +function padString(length, str) { + while (str.length < length) + str += " "; + return str; +} +exports.padString = padString; +function kebobString(camelCase) { + return camelCase + .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char + .replace(/([A-Z])/g, function ($1) { return "-" + $1.toLowerCase(); }); // replace rest +} +exports.kebobString = kebobString; +function _toJson(obj) { + return JSON.stringify(obj); +} +function _fromJson(json) { + return predicates_1.isString(json) ? JSON.parse(json) : json; +} +function promiseToString(p) { + return "Promise(" + JSON.stringify(p) + ")"; +} +function functionToString(fn) { + var fnStr = fnToString(fn); + var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/); + var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr; + var fnName = fn['name'] || ""; + if (fnName && toStr.match(/function \(/)) { + return 'function ' + fnName + toStr.substr(9); + } + return toStr; +} +exports.functionToString = functionToString; +function fnToString(fn) { + var _fn = predicates_1.isArray(fn) ? fn.slice(-1)[0] : fn; + return _fn && _fn.toString() || "undefined"; +} +exports.fnToString = fnToString; +var stringifyPatternFn = null; +var stringifyPattern = function (value) { + var isRejection = rejectFactory_1.Rejection.isRejectionPromise; + stringifyPatternFn = stringifyPatternFn || hof_1.pattern([ + [hof_1.not(predicates_1.isDefined), hof_1.val("undefined")], + [predicates_1.isNull, hof_1.val("null")], + [predicates_1.isPromise, hof_1.val("[Promise]")], + [isRejection, function (x) { return x._transitionRejection.toString(); }], + [hof_1.is(rejectFactory_1.Rejection), hof_1.invoke("toString")], + [hof_1.is(transition_1.Transition), hof_1.invoke("toString")], + [hof_1.is(resolvable_1.Resolvable), hof_1.invoke("toString")], + [predicates_1.isInjectable, functionToString], + [hof_1.val(true), common_1.identity] + ]); + return stringifyPatternFn(value); +}; +function stringify(o) { + var seen = []; + function format(val) { + if (predicates_1.isObject(val)) { + if (seen.indexOf(val) !== -1) + return '[circular ref]'; + seen.push(val); + } + return stringifyPattern(val); + } + return JSON.stringify(o, function (key, val) { return format(val); }).replace(/\\"/g, '"'); +} +exports.stringify = stringify; +/** Returns a function that splits a string on a character or substring */ +exports.beforeAfterSubstr = function (char) { return function (str) { + if (!str) + return ["", ""]; + var idx = str.indexOf(char); + if (idx === -1) + return [str, ""]; + return [str.substr(0, idx), str.substr(idx + 1)]; +}; }; +exports.hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/'); +exports.stripFile = function (str) { return str.replace(/\/[^/]*$/, ''); }; +exports.splitHash = exports.beforeAfterSubstr("#"); +exports.splitQuery = exports.beforeAfterSubstr("?"); +exports.splitEqual = exports.beforeAfterSubstr("="); +exports.trimHashVal = function (str) { return str ? str.replace(/^#/, "") : ""; }; +/** + * Splits on a delimiter, but returns the delimiters in the array + * + * #### Example: + * ```js + * var splitOnSlashes = splitOnDelim('/'); + * splitOnSlashes("/foo"); // ["/", "foo"] + * splitOnSlashes("/foo/"); // ["/", "foo", "/"] + * ``` + */ +function splitOnDelim(delim) { + var re = new RegExp("(" + delim + ")", "g"); + return function (str) { + return str.split(re).filter(common_1.identity); + }; +} +exports.splitOnDelim = splitOnDelim; +; +/** + * Reduce fn that joins neighboring strings + * + * Given an array of strings, returns a new array + * where all neighboring strings have been joined. + * + * #### Example: + * ```js + * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; + * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] + * ``` + */ +function joinNeighborsR(acc, x) { + if (predicates_1.isString(common_1.tail(acc)) && predicates_1.isString(x)) + return acc.slice(0, -1).concat(common_1.tail(acc) + x); + return common_1.pushR(acc, x); +} +exports.joinNeighborsR = joinNeighborsR; +; +//# sourceMappingURL=strings.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js.map new file mode 100644 index 00000000..82895f9f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/strings.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "strings.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/strings.ts" + ], + "names": [], + "mappings": ";AAAA;;;;;;GAMG,CAAC,MAAM;;AAEV,2CAAuG;AACvG,6DAAwD;AACxD,mCAAmE;AACnE,6BAAsD;AACtD,uDAAsD;AACtD,oDAAmD;AAEnD;;;;;;;;GAQG;AACH,mBAA0B,GAAW,EAAE,GAAW;IAChD,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC;QAAC,MA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AAC,CAAC,CAAC;IAC/C,MAAM,CAAC,cAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACvB,CAAC;AAJD,wCAIC;AAAA,CAAC", + "sourcesContent": [ + "/**\n * Functions that manipulate strings\n *\n * Although these functions are exported, they are subject to change without notice.\n *\n * @module common_strings\n */ /** */\n\nimport { isString, isArray, isDefined, isNull, isPromise, isInjectable, isObject } from \"./predicates\";\nimport { Rejection } from \"../transition/rejectFactory\";\nimport { IInjectable, identity, Obj, tail, pushR } from \"./common\";\nimport { pattern, is, not, val, invoke } from \"./hof\";\nimport { Transition } from \"../transition/transition\";\nimport { Resolvable } from \"../resolve/resolvable\";\n\n/**\n * Returns a string shortened to a maximum length\n *\n * If the string is already less than the `max` length, return the string.\n * Else return the string, shortened to `max - 3` and append three dots (\"...\").\n *\n * @param max the maximum length of the string to return\n * @param str the input string\n */\nexport function maxLength(max: number, str: string) {\n if (str.length <= max) return str;\n return str.substr(0, max - 3) + \"...\";\n}\n\n/**\n * Returns a string, with spaces added to the end, up to a desired str length\n *\n * If the string is already longer than the desired length, return the string.\n * Else returns the string, with extra spaces on the end, such that it reaches `length` characters.\n *\n * @param length the desired length of the string to return\n * @param str the input string\n */\nexport function padString(length: number, str: string) {\n while (str.length < length) str += \" \";\n return str;\n}\n\nexport function kebobString(camelCase: string) {\n return camelCase\n .replace(/^([A-Z])/, $1 => $1.toLowerCase()) // replace first char\n .replace(/([A-Z])/g, $1 => \"-\" + $1.toLowerCase()); // replace rest\n}\n\nfunction _toJson(obj: Obj) {\n return JSON.stringify(obj);\n}\n\nfunction _fromJson(json: string) {\n return isString(json) ? JSON.parse(json) : json;\n}\n\n\nfunction promiseToString(p: Promise) {\n return `Promise(${JSON.stringify(p)})`;\n}\n\nexport function functionToString(fn: Function) {\n let fnStr = fnToString(fn);\n let namedFunctionMatch = fnStr.match(/^(function [^ ]+\\([^)]*\\))/);\n let toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr;\n\n let fnName = fn['name'] || \"\";\n if (fnName && toStr.match(/function \\(/)) {\n return 'function ' + fnName + toStr.substr(9);\n }\n return toStr;\n}\n\nexport function fnToString(fn: IInjectable) {\n let _fn = isArray(fn) ? fn.slice(-1)[0] : fn;\n return _fn && _fn.toString() || \"undefined\";\n}\n\nlet stringifyPatternFn: (val: any) => string = null;\nlet stringifyPattern = function(value: any) {\n let isRejection = Rejection.isRejectionPromise;\n\n stringifyPatternFn = stringifyPatternFn || pattern([\n [not(isDefined), val(\"undefined\")],\n [isNull, val(\"null\")],\n [isPromise, val(\"[Promise]\")],\n [isRejection, (x: any) => x._transitionRejection.toString()],\n [is(Rejection), invoke(\"toString\")],\n [is(Transition), invoke(\"toString\")],\n [is(Resolvable), invoke(\"toString\")],\n [isInjectable, functionToString],\n [val(true), identity]\n ]);\n\n return stringifyPatternFn(value);\n};\n\nexport function stringify(o: any) {\n var seen: any[] = [];\n\n function format(val: any) {\n if (isObject(val)) {\n if (seen.indexOf(val) !== -1) return '[circular ref]';\n seen.push(val);\n }\n return stringifyPattern(val);\n }\n\n return JSON.stringify(o, (key, val) => format(val)).replace(/\\\\\"/g, '\"');\n}\n\n/** Returns a function that splits a string on a character or substring */\nexport const beforeAfterSubstr = (char: string) => (str: string): string[] => {\n if (!str) return [\"\", \"\"];\n let idx = str.indexOf(char);\n if (idx === -1) return [str, \"\"];\n return [str.substr(0, idx), str.substr(idx + 1)];\n};\n\nexport const hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/');\nexport const stripFile = (str: string) => str.replace(/\\/[^/]*$/, '');\nexport const splitHash = beforeAfterSubstr(\"#\");\nexport const splitQuery = beforeAfterSubstr(\"?\");\nexport const splitEqual = beforeAfterSubstr(\"=\");\nexport const trimHashVal = (str: string) => str ? str.replace(/^#/, \"\") : \"\";\n\n/**\n * Splits on a delimiter, but returns the delimiters in the array\n *\n * #### Example:\n * ```js\n * var splitOnSlashes = splitOnDelim('/');\n * splitOnSlashes(\"/foo\"); // [\"/\", \"foo\"]\n * splitOnSlashes(\"/foo/\"); // [\"/\", \"foo\", \"/\"]\n * ```\n */\nexport function splitOnDelim(delim: string) {\n let re = new RegExp(\"(\" + delim + \")\", \"g\");\n return (str: string) =>\n str.split(re).filter(identity);\n};\n\n\n/**\n * Reduce fn that joins neighboring strings\n *\n * Given an array of strings, returns a new array\n * where all neighboring strings have been joined.\n *\n * #### Example:\n * ```js\n * let arr = [\"foo\", \"bar\", 1, \"baz\", \"\", \"qux\" ];\n * arr.reduce(joinNeighborsR, []) // [\"foobar\", 1, \"bazqux\" ]\n * ```\n */\nexport function joinNeighborsR(acc: any[], x: any) {\n if (isString(tail(acc)) && isString(x))\n return acc.slice(0, -1).concat(tail(acc)+ x);\n return pushR(acc, x);\n};\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.d.ts new file mode 100644 index 00000000..dd2d0580 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.d.ts @@ -0,0 +1,112 @@ +import { Transition } from "../transition/transition"; +import { ActiveUIView, ViewConfig, ViewContext } from "../view/interface"; +import { Resolvable } from "../resolve/resolvable"; +import { PathNode } from "../path/pathNode"; +import { PolicyWhen } from "../resolve/interface"; +import { TransitionHook } from "../transition/transitionHook"; +import { HookResult } from "../transition/interface"; +import { StateObject } from "../state/stateObject"; +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ +export declare enum Category { + RESOLVE = 0, + TRANSITION = 1, + HOOK = 2, + UIVIEW = 3, + VIEWCONFIG = 4, +} +/** + * Prints UI-Router Transition trace information to the console. + */ +export declare class Trace { + /** @hidden */ + approximateDigests: number; + /** @hidden */ + constructor(); + /** @hidden */ + private _enabled; + /** @hidden */ + private _set(enabled, categories); + /** + * Enables a trace [[Category]] + * + * ```js + * trace.enable("TRANSITION"); + * ``` + * + * @param categories categories to enable. If `categories` is omitted, all categories are enabled. + * Also takes strings (category name) or ordinal (category position) + */ + enable(...categories: (Category | string | number)[]): any; + /** + * Disables a trace [[Category]] + * + * ```js + * trace.disable("VIEWCONFIG"); + * ``` + * + * @param categories categories to disable. If `categories` is omitted, all categories are disabled. + * Also takes strings (category name) or ordinal (category position) + */ + disable(...categories: (Category | string | number)[]): any; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + enabled(category: (Category | string | number)): boolean; + /** @internalapi called by ui-router code */ + traceTransitionStart(trans: Transition): void; + /** @internalapi called by ui-router code */ + traceTransitionIgnored(trans: Transition): void; + /** @internalapi called by ui-router code */ + traceHookInvocation(step: TransitionHook, trans: Transition, options: any): void; + /** @internalapi called by ui-router code */ + traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any): void; + /** @internalapi called by ui-router code */ + traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition): void; + /** @internalapi called by ui-router code */ + traceResolvableResolved(resolvable: Resolvable, trans?: Transition): void; + /** @internalapi called by ui-router code */ + traceError(reason: any, trans: Transition): void; + /** @internalapi called by ui-router code */ + traceSuccess(finalState: StateObject, trans: Transition): void; + /** @internalapi called by ui-router code */ + traceUIViewEvent(event: string, viewData: ActiveUIView, extra?: string): void; + /** @internalapi called by ui-router code */ + traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext): void; + /** @internalapi called by ui-router code */ + traceUIViewFill(viewData: ActiveUIView, html: string): void; + /** @internalapi called by ui-router code */ + traceViewSync(pairs: any[]): void; + /** @internalapi called by ui-router code */ + traceViewServiceEvent(event: string, viewConfig: ViewConfig): void; + /** @internalapi called by ui-router code */ + traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView): void; +} +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +declare let trace: Trace; +export { trace }; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js new file mode 100644 index 00000000..913316a9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js @@ -0,0 +1,239 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * # Transition tracing (debug) + * + * Enable transition tracing to print transition information to the console, + * in order to help debug your application. + * Tracing logs detailed information about each Transition to your console. + * + * To enable tracing, import the [[Trace]] singleton and enable one or more categories. + * + * ### ES6 + * ```js + * import {trace} from "ui-router-ng2"; // or "angular-ui-router" + * trace.enable(1, 5); // TRANSITION and VIEWCONFIG + * ``` + * + * ### CJS + * ```js + * let trace = require("angular-ui-router").trace; // or "ui-router-ng2" + * trace.enable("TRANSITION", "VIEWCONFIG"); + * ``` + * + * ### Globals + * ```js + * let trace = window["angular-ui-router"].trace; // or "ui-router-ng2" + * trace.enable(); // Trace everything (very verbose) + * ``` + * + * ### Angular 1: + * ```js + * app.run($trace => $trace.enable()); + * ``` + * + * @coreapi + * @module trace + */ /** for typedoc */ +var hof_1 = require("../common/hof"); +var predicates_1 = require("../common/predicates"); +var strings_1 = require("./strings"); +/** @hidden */ +function uiViewString(uiview) { + if (!uiview) + return 'ui-view (defunct)'; + var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)'; + return "[ui-view#" + uiview.id + " " + uiview.$type + ":" + uiview.fqn + " (" + uiview.name + "@" + state + ")]"; +} +/** @hidden */ +var viewConfigString = function (viewConfig) { + var view = viewConfig.viewDecl; + var state = view.$context.name || '(root)'; + return "[View#" + viewConfig.$id + " from '" + state + "' state]: target ui-view: '" + view.$uiViewName + "@" + view.$uiViewContextAnchor + "'"; +}; +/** @hidden */ +function normalizedCat(input) { + return predicates_1.isNumber(input) ? Category[input] : Category[Category[input]]; +} +/** @hidden */ +var consoleLog = Function.prototype.bind.call(console.log, console); +/** @hidden */ +var consoletable = predicates_1.isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console); +/** + * Trace categories Enum + * + * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] + * + * `trace.enable(Category.TRANSITION)` + * + * These can also be provided using a matching string, or position ordinal + * + * `trace.enable("TRANSITION")` + * + * `trace.enable(1)` + */ +var Category; +(function (Category) { + Category[Category["RESOLVE"] = 0] = "RESOLVE"; + Category[Category["TRANSITION"] = 1] = "TRANSITION"; + Category[Category["HOOK"] = 2] = "HOOK"; + Category[Category["UIVIEW"] = 3] = "UIVIEW"; + Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG"; +})(Category = exports.Category || (exports.Category = {})); +/** @hidden */ var _tid = hof_1.parse("$id"); +/** @hidden */ var _rid = hof_1.parse("router.$id"); +/** @hidden */ var transLbl = function (trans) { return "Transition #" + _tid(trans) + "-" + _rid(trans); }; +/** + * Prints UI-Router Transition trace information to the console. + */ +var Trace = /** @class */ (function () { + /** @hidden */ + function Trace() { + /** @hidden */ + this._enabled = {}; + this.approximateDigests = 0; + } + /** @hidden */ + Trace.prototype._set = function (enabled, categories) { + var _this = this; + if (!categories.length) { + categories = Object.keys(Category) + .map(function (k) { return parseInt(k, 10); }) + .filter(function (k) { return !isNaN(k); }) + .map(function (key) { return Category[key]; }); + } + categories.map(normalizedCat).forEach(function (category) { return _this._enabled[category] = enabled; }); + }; + Trace.prototype.enable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(true, categories); + }; + Trace.prototype.disable = function () { + var categories = []; + for (var _i = 0; _i < arguments.length; _i++) { + categories[_i] = arguments[_i]; + } + this._set(false, categories); + }; + /** + * Retrieves the enabled stateus of a [[Category]] + * + * ```js + * trace.enabled("VIEWCONFIG"); // true or false + * ``` + * + * @returns boolean true if the category is enabled + */ + Trace.prototype.enabled = function (category) { + return !!this._enabled[normalizedCat(category)]; + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionStart = function (trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Started -> " + strings_1.stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceTransitionIgnored = function (trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": Ignored <> " + strings_1.stringify(trans)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookInvocation = function (step, trans, options) { + if (!this.enabled(Category.HOOK)) + return; + var event = hof_1.parse("traceData.hookType")(options) || "internal", context = hof_1.parse("traceData.context.state.name")(options) || hof_1.parse("traceData.context")(options) || "unknown", name = strings_1.functionToString(step.registeredHook.callback); + console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + strings_1.maxLength(200, name)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) { + if (!this.enabled(Category.HOOK)) + return; + console.log(transLbl(trans) + ": <- Hook returned: " + strings_1.maxLength(200, strings_1.stringify(hookResult))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvePath = function (path, when, trans) { + if (!this.enabled(Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceResolvableResolved = function (resolvable, trans) { + if (!this.enabled(Category.RESOLVE)) + return; + console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + strings_1.maxLength(200, strings_1.stringify(resolvable.data))); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceError = function (reason, trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Rejected " + strings_1.stringify(trans) + ", reason: " + reason); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceSuccess = function (finalState, trans) { + if (!this.enabled(Category.TRANSITION)) + return; + console.log(transLbl(trans) + ": <- Success " + strings_1.stringify(trans) + ", final state: " + finalState.name); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewEvent = function (event, viewData, extra) { + if (extra === void 0) { extra = ""; } + if (!this.enabled(Category.UIVIEW)) + return; + console.log("ui-view: " + strings_1.padString(30, event) + " " + uiViewString(viewData) + extra); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) { + if (!this.enabled(Category.UIVIEW)) + return; + this.traceUIViewEvent("Updating", viewData, " with ViewConfig from context='" + context + "'"); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceUIViewFill = function (viewData, html) { + if (!this.enabled(Category.UIVIEW)) + return; + this.traceUIViewEvent("Fill", viewData, " with: " + strings_1.maxLength(200, html)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewSync = function (pairs) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + var mapping = pairs.map(function (_a) { + var uiViewData = _a[0], config = _a[1]; + var uiView = uiViewData.$type + ":" + uiViewData.fqn; + var view = config && config.viewDecl.$context.name + ": " + config.viewDecl.$name + " (" + config.viewDecl.$type + ")"; + return { 'ui-view fqn': uiView, 'state: view name': view }; + }).sort(function (a, b) { return a['ui-view fqn'].localeCompare(b['ui-view fqn']); }); + consoletable(mapping); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceEvent = function (event, viewConfig) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig)); + }; + /** @internalapi called by ui-router code */ + Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) { + if (!this.enabled(Category.VIEWCONFIG)) + return; + console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData)); + }; + return Trace; +}()); +exports.Trace = Trace; +/** + * The [[Trace]] singleton + * + * #### Example: + * ```js + * import {trace} from "angular-ui-router"; + * trace.enable(1, 5); + * ``` + */ +var trace = new Trace(); +exports.trace = trace; +//# sourceMappingURL=trace.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js.map new file mode 100644 index 00000000..11d53321 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/common/trace.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "trace.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/common/trace.ts" + ], + "names": [], + "mappings": ";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG,CAAC,kBAAkB;AACtB,qCAAoC;AACpC,mDAA0D;AAG1D,qCAA4E;AAQ5E,cAAc;AACd,sBAAuB,MAAoB;IACvC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC,mBAAmB,CAAC;IACxC,IAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1F,MAAM,CAAC,cAAY,MAAM,CAAC,EAAE,SAAI,MAAM,CAAC,KAAK,SAAI,MAAM,CAAC,GAAG,UAAK,MAAM,CAAC,IAAI,SAAI,KAAK,OAAI,CAAC;AAC5F,CAAC;AAED,cAAc;AACd,IAAM,gBAAgB,GAAG,UAAC,UAAsB;IAC9C,IAAI,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC;IAC/B,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC;IAC7C,MAAM,CAAC,WAAS,UAAU,CAAC,GAAG,eAAU,KAAK,mCAA8B,IAAI,CAAC,WAAW,SAAI,IAAI,CAAC,oBAAoB,MAAG,CAAC;AAC9H,CAAC,CAAC;AAEF,cAAc;AACd,uBAAuB,KAAsB;IAC3C,MAAM,CAAC,qBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CA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UAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,MAAG,CAAC;YAE/G,MAAM,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;QAC7D,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,EAAhD,CAAgD,CAAC,CAAC;QAEpE,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,4CAA4C;IAC5C,qCAAqB,GAArB,UAAsB,KAAa,EAAE,UAAsB;QACzD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAAC,MAAM,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,iBAAe,KAAK,SAAI,gBAAgB,CAAC,UAAU,CAAG,CAAC,CAAC;IACtE,CAAC;IAED,4CAA4C;IAC5C,2CAA2B,GAA3B,UAA4B,KAAa,EAAE,QAAsB;QAC/D,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAAC,MAAM,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,iBAAe,KAAK,SAAI,YAAY,CAAC,QAAQ,CAAG,CAAC,CAAC;IAChE,CAAC;IACH,YAAC;AAAD,CAAC,AA1JD,IA0JC;AA1JY,sBAAK;AA4JlB;;;;;;;;GAQG;AACH,IAAI,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AAChB,sBAAK", + "sourcesContent": [ + "/**\n * # Transition tracing (debug)\n *\n * Enable transition tracing to print transition information to the console,\n * in order to help debug your application.\n * Tracing logs detailed information about each Transition to your console.\n *\n * To enable tracing, import the [[Trace]] singleton and enable one or more categories.\n *\n * ### ES6\n * ```js\n * import {trace} from \"ui-router-ng2\"; // or \"angular-ui-router\"\n * trace.enable(1, 5); // TRANSITION and VIEWCONFIG\n * ```\n *\n * ### CJS\n * ```js\n * let trace = require(\"angular-ui-router\").trace; // or \"ui-router-ng2\"\n * trace.enable(\"TRANSITION\", \"VIEWCONFIG\");\n * ```\n *\n * ### Globals\n * ```js\n * let trace = window[\"angular-ui-router\"].trace; // or \"ui-router-ng2\"\n * trace.enable(); // Trace everything (very verbose)\n * ```\n *\n * ### Angular 1:\n * ```js\n * app.run($trace => $trace.enable());\n * ```\n *\n * @coreapi\n * @module trace\n */ /** for typedoc */\nimport {parse} from \"../common/hof\";\nimport {isFunction, isNumber} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {ActiveUIView, ViewConfig, ViewContext} from \"../view/interface\";\nimport {stringify, functionToString, maxLength, padString} from \"./strings\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {PathNode} from \"../path/pathNode\";\nimport {PolicyWhen} from \"../resolve/interface\";\nimport {TransitionHook} from \"../transition/transitionHook\";\nimport {HookResult} from \"../transition/interface\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @hidden */\nfunction uiViewString (uiview: ActiveUIView) {\n if (!uiview) return 'ui-view (defunct)';\n const state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)';\n return `[ui-view#${uiview.id} ${uiview.$type}:${uiview.fqn} (${uiview.name}@${state})]`;\n}\n\n/** @hidden */\nconst viewConfigString = (viewConfig: ViewConfig) => {\n let view = viewConfig.viewDecl;\n const state = view.$context.name || '(root)';\n return `[View#${viewConfig.$id} from '${state}' state]: target ui-view: '${view.$uiViewName}@${view.$uiViewContextAnchor}'`;\n};\n\n/** @hidden */\nfunction normalizedCat(input: Category|string): string {\n return isNumber(input) ? Category[input] : Category[Category[input]];\n}\n\n/** @hidden */\nconst consoleLog = Function.prototype.bind.call(console.log, console);\n\n/** @hidden */\nconst consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);\n\n\n/**\n * Trace categories Enum\n *\n * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]]\n *\n * `trace.enable(Category.TRANSITION)`\n *\n * These can also be provided using a matching string, or position ordinal\n *\n * `trace.enable(\"TRANSITION\")`\n *\n * `trace.enable(1)`\n */\nexport enum Category {\n RESOLVE, TRANSITION, HOOK, UIVIEW, VIEWCONFIG,\n}\n\n/** @hidden */ const _tid = parse(\"$id\");\n/** @hidden */ const _rid = parse(\"router.$id\");\n/** @hidden */ const transLbl = (trans) => `Transition #${_tid(trans)}-${_rid(trans)}`;\n\n/**\n * Prints UI-Router Transition trace information to the console.\n */\nexport class Trace {\n /** @hidden */\n approximateDigests: number;\n\n /** @hidden */\n constructor() {\n this.approximateDigests = 0;\n }\n\n /** @hidden */\n private _enabled: { [key: string]: boolean } = {};\n\n /** @hidden */\n private _set(enabled: boolean, categories: Category[]) {\n if (!categories.length) {\n categories = Object.keys(Category)\n .map(k => parseInt(k, 10))\n .filter(k => !isNaN(k))\n .map(key => Category[key]);\n }\n categories.map(normalizedCat).forEach(category => this._enabled[category] = enabled);\n }\n\n /**\n * Enables a trace [[Category]]\n *\n * ```js\n * trace.enable(\"TRANSITION\");\n * ```\n *\n * @param categories categories to enable. If `categories` is omitted, all categories are enabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n enable(...categories: (Category|string|number)[]);\n enable(...categories: any[]) { this._set(true, categories); }\n /**\n * Disables a trace [[Category]]\n *\n * ```js\n * trace.disable(\"VIEWCONFIG\");\n * ```\n *\n * @param categories categories to disable. If `categories` is omitted, all categories are disabled.\n * Also takes strings (category name) or ordinal (category position)\n */\n disable(...categories: (Category|string|number)[]);\n disable(...categories: any[]) { this._set(false, categories); }\n\n /**\n * Retrieves the enabled stateus of a [[Category]]\n *\n * ```js\n * trace.enabled(\"VIEWCONFIG\"); // true or false\n * ```\n *\n * @returns boolean true if the category is enabled\n */\n enabled(category: (Category|string|number)): boolean {\n return !!this._enabled[normalizedCat(category)];\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionStart(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Started -> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceTransitionIgnored(trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: Ignored <> ${stringify(trans)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookInvocation(step: TransitionHook, trans: Transition, options: any) {\n if (!this.enabled(Category.HOOK)) return;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = functionToString((step as any).registeredHook.callback);\n console.log(`${transLbl(trans)}: Hook -> ${event} context: ${context}, ${maxLength(200, name)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any) {\n if (!this.enabled(Category.HOOK)) return;\n console.log(`${transLbl(trans)}: <- Hook returned: ${maxLength(200, stringify(hookResult))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: Resolving ${path} (${when})`);\n }\n\n /** @internalapi called by ui-router code */\n traceResolvableResolved(resolvable: Resolvable, trans?: Transition) {\n if (!this.enabled(Category.RESOLVE)) return;\n console.log(`${transLbl(trans)}: <- Resolved ${resolvable} to: ${maxLength(200, stringify(resolvable.data))}`);\n }\n\n /** @internalapi called by ui-router code */\n traceError(reason: any, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Rejected ${stringify(trans)}, reason: ${reason}`);\n }\n\n /** @internalapi called by ui-router code */\n traceSuccess(finalState: StateObject, trans: Transition) {\n if (!this.enabled(Category.TRANSITION)) return;\n console.log(`${transLbl(trans)}: <- Success ${stringify(trans)}, final state: ${finalState.name}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewEvent(event: string, viewData: ActiveUIView, extra = \"\") {\n if (!this.enabled(Category.UIVIEW)) return;\n console.log(`ui-view: ${padString(30, event)} ${uiViewString(viewData)}${extra}`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Updating\", viewData, ` with ViewConfig from context='${context}'`);\n }\n\n /** @internalapi called by ui-router code */\n traceUIViewFill(viewData: ActiveUIView, html: string) {\n if (!this.enabled(Category.UIVIEW)) return;\n this.traceUIViewEvent(\"Fill\", viewData, ` with: ${maxLength(200, html)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewSync(pairs: any[]) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n const mapping = pairs.map(([ uiViewData, config ]) => {\n const uiView = `${uiViewData.$type}:${uiViewData.fqn}`;\n const view = config && `${config.viewDecl.$context.name}: ${config.viewDecl.$name} (${config.viewDecl.$type})`;\n\n return { 'ui-view fqn': uiView, 'state: view name': view };\n }).sort((a, b) => a['ui-view fqn'].localeCompare(b['ui-view fqn']));\n\n consoletable(mapping);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceEvent(event: string, viewConfig: ViewConfig) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${viewConfigString(viewConfig)}`);\n }\n\n /** @internalapi called by ui-router code */\n traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView) {\n if (!this.enabled(Category.VIEWCONFIG)) return;\n console.log(`VIEWCONFIG: ${event} ${uiViewString(viewData)}`);\n }\n}\n\n/**\n * The [[Trace]] singleton\n *\n * #### Example:\n * ```js\n * import {trace} from \"angular-ui-router\";\n * trace.enable(1, 5);\n * ```\n */\nlet trace = new Trace();\nexport {trace};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/globals.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/globals.d.ts new file mode 100644 index 00000000..1a72095b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/globals.d.ts @@ -0,0 +1,49 @@ +/** + * @coreapi + * @module core + */ /** */ +import { StateParams } from "./params/stateParams"; +import { StateDeclaration } from "./state/interface"; +import { StateObject } from "./state/stateObject"; +import { Transition } from "./transition/transition"; +import { Queue } from "./common/queue"; +import { Disposable } from './interface'; +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +export declare class UIRouterGlobals implements Disposable { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + params: StateParams; + /** + * Current state + * + * The to-state from the latest successful transition + */ + current: StateDeclaration; + /** + * Current state (internal object) + * + * The to-state from the latest successful transition + * @internalapi + */ + $current: StateObject; + /** + * The current started/running transition. + * This transition has reached at least the onStart phase, but is not yet complete + */ + transition: Transition; + /** @internalapi */ + lastStartedTransitionId: number; + /** @internalapi */ + transitionHistory: Queue; + /** @internalapi */ + successfulTransitions: Queue; + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/globals.js b/public/app/vendor/node_modules/@uirouter/core/lib/globals.js new file mode 100644 index 00000000..849bad4b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/globals.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module core + */ /** */ +var stateParams_1 = require("./params/stateParams"); +var queue_1 = require("./common/queue"); +/** + * Global router state + * + * This is where we hold the global mutable state such as current state, current + * params, current transition, etc. + */ +var UIRouterGlobals = /** @class */ (function () { + function UIRouterGlobals() { + /** + * Current parameter values + * + * The parameter values from the latest successful transition + */ + this.params = new stateParams_1.StateParams(); + /** @internalapi */ + this.lastStartedTransitionId = -1; + /** @internalapi */ + this.transitionHistory = new queue_1.Queue([], 1); + /** @internalapi */ + this.successfulTransitions = new queue_1.Queue([], 1); + } + UIRouterGlobals.prototype.dispose = function () { + this.transitionHistory.clear(); + this.successfulTransitions.clear(); + this.transition = null; + }; + return UIRouterGlobals; +}()); +exports.UIRouterGlobals = UIRouterGlobals; +//# sourceMappingURL=globals.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/globals.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/globals.js.map new file mode 100644 index 00000000..ee9b9860 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/globals.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "globals.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/globals.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,MAAM;AACV,oDAAiD;AAIjD,wCAAqC;AAGrC;;;;;GAKG;AACH;IAAA;QACE;;;;WAIG;QACH,WAAM,GAAgB,IAAI,yBAAW,EAAE,CAAC;QAuBxC,mBAAmB;QACnB,4BAAuB,GAAW,CAAC,CAAC,CAAC;QAErC,mBAAmB;QACnB,sBAAiB,GAAG,IAAI,aAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;QAEjD,mBAAmB;QACnB,0BAAqB,GAAG,IAAI,aAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IAOvD,CAAC;IALC,iCAAO,GAAP;QACE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AA3CD,IA2CC;AA3CY,0CAAe", + "sourcesContent": [ + "/**\n * @coreapi\n * @module core\n */ /** */\nimport {StateParams} from \"./params/stateParams\";\nimport {StateDeclaration} from \"./state/interface\";\nimport {StateObject} from \"./state/stateObject\";\nimport {Transition} from \"./transition/transition\";\nimport {Queue} from \"./common/queue\";\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internalapi\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internalapi */\n lastStartedTransitionId: number = -1;\n\n /** @internalapi */\n transitionHistory = new Queue([], 1);\n\n /** @internalapi */\n successfulTransitions = new Queue([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.d.ts new file mode 100644 index 00000000..a2bc8e4b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerAddCoreResolvables: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js new file mode 100644 index 00000000..9d6e5206 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module hooks */ /** */ +var transition_1 = require("../transition/transition"); +var router_1 = require("../router"); +function addCoreResolvables(trans) { + trans.addResolvable({ token: router_1.UIRouter, deps: [], resolveFn: function () { return trans.router; }, data: trans.router }, ""); + trans.addResolvable({ token: transition_1.Transition, deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$transition$', deps: [], resolveFn: function () { return trans; }, data: trans }, ""); + trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: function () { return trans.params(); }, data: trans.params() }, ""); + trans.entering().forEach(function (state) { + trans.addResolvable({ token: '$state$', deps: [], resolveFn: function () { return state; }, data: state }, state); + }); +} +exports.registerAddCoreResolvables = function (transitionService) { + return transitionService.onCreate({}, addCoreResolvables); +}; +//# sourceMappingURL=coreResolvables.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js.map new file mode 100644 index 00000000..04d4d3e6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/coreResolvables.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "coreResolvables.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/coreResolvables.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB,CAAC,MAAM;AAC3B,uDAAsD;AACtD,oCAAqC;AAGrC,4BAA4B,KAAiB;IAC3C,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,iBAAQ,EAAQ,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,CAAC,MAAM,EAAZ,CAAY,EAAI,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,EAAI,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,uBAAU,EAAM,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAW,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAW,EAAE,CAAC,CAAC;IACpH,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,CAAC,MAAM,EAAE,EAAd,CAAc,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpH,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAA,KAAK;QAC5B,KAAK,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAK,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK,EAAW,IAAI,EAAE,KAAK,EAAE,EAAQ,KAAK,CAAC,CAAC;IACpH,CAAC,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,0BAA0B,GAAG,UAAC,iBAAoC;IAC3E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,kBAAkB,CAAC;AAAlD,CAAkD,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport { Transition } from \"../transition/transition\";\nimport { UIRouter } from \"../router\";\nimport { TransitionService } from \"../transition/transitionService\";\n\nfunction addCoreResolvables(trans: Transition) {\n trans.addResolvable({ token: UIRouter, deps: [], resolveFn: () => trans.router, data: trans.router }, \"\");\n trans.addResolvable({ token: Transition, deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$transition$', deps: [], resolveFn: () => trans, data: trans }, \"\");\n trans.addResolvable({ token: '$stateParams', deps: [], resolveFn: () => trans.params(), data: trans.params() }, \"\");\n\n trans.entering().forEach(state => {\n trans.addResolvable({ token: '$state$', deps: [], resolveFn: () => state, data: state }, state);\n });\n}\n\nexport const registerAddCoreResolvables = (transitionService: TransitionService) =>\n transitionService.onCreate({}, addCoreResolvables);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.d.ts new file mode 100644 index 00000000..d2725655 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerIgnoredTransitionHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js new file mode 100644 index 00000000..e627f567 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js @@ -0,0 +1,31 @@ +"use strict"; +/** @module hooks */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +var trace_1 = require("../common/trace"); +var rejectFactory_1 = require("../transition/rejectFactory"); +/** + * A [[TransitionHookFn]] that skips a transition if it should be ignored + * + * This hook is invoked at the end of the onBefore phase. + * + * If the transition should be ignored (because no parameter or states changed) + * then the transition is ignored and not processed. + */ +function ignoredHook(trans) { + var ignoredReason = trans._ignoredReason(); + if (!ignoredReason) + return; + trace_1.trace.traceTransitionIgnored(trans); + var pending = trans.router.globals.transition; + // The user clicked a link going back to the *current state* ('A') + // However, there is also a pending transition in flight (to 'B') + // Abort the transition to 'B' because the user now wants to be back at 'A'. + if (ignoredReason === 'SameAsCurrent' && pending) { + pending.abort(); + } + return rejectFactory_1.Rejection.ignored().toPromise(); +} +exports.registerIgnoredTransitionHook = function (transitionService) { + return transitionService.onBefore({}, ignoredHook, { priority: -9999 }); +}; +//# sourceMappingURL=ignoredTransition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js.map new file mode 100644 index 00000000..e11a4b99 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/ignoredTransition.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "ignoredTransition.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/ignoredTransition.ts" + ], + "names": [], + "mappings": ";AAAA,oBAAoB,CAAC,MAAM;;AAE3B,yCAAwC;AACxC,6DAAwD;AAIxD;;;;;;;GAOG;AACH,qBAAqB,KAAiB;IACpC,IAAM,aAAa,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IAC7C,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;QAAC,MAAM,CAAC;IAE3B,aAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAEpC,IAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IAEhD,kEAAkE;IAClE,iEAAiE;IACjE,4EAA4E;IAC5E,EAAE,CAAC,CAAC,aAAa,KAAK,eAAe,IAAI,OAAO,CAAC,CAAC,CAAC;QACjD,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,yBAAS,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,CAAC;AACzC,CAAC;AAEY,QAAA,6BAA6B,GAAG,UAAC,iBAAoC;IAC9E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAAhE,CAAgE,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\n\nimport { trace } from '../common/trace';\nimport { Rejection } from '../transition/rejectFactory';\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\nfunction ignoredHook(trans: Transition) {\n const ignoredReason = trans._ignoredReason();\n if (!ignoredReason) return;\n\n trace.traceTransitionIgnored(trans);\n\n const pending = trans.router.globals.transition;\n\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n\n return Rejection.ignored().toPromise();\n}\n\nexport const registerIgnoredTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.d.ts new file mode 100644 index 00000000..b595083a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.d.ts @@ -0,0 +1,3 @@ +/** @module hooks */ /** */ +import { TransitionService } from '../transition/transitionService'; +export declare const registerInvalidTransitionHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js new file mode 100644 index 00000000..0dec3c47 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js @@ -0,0 +1,19 @@ +"use strict"; +/** @module hooks */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A [[TransitionHookFn]] that rejects the Transition if it is invalid + * + * This hook is invoked at the end of the onBefore phase. + * If the transition is invalid (for example, param values do not validate) + * then the transition is rejected. + */ +function invalidTransitionHook(trans) { + if (!trans.valid()) { + throw new Error(trans.error()); + } +} +exports.registerInvalidTransitionHook = function (transitionService) { + return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 }); +}; +//# sourceMappingURL=invalidTransition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js.map new file mode 100644 index 00000000..4961d792 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/invalidTransition.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "invalidTransition.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/invalidTransition.ts" + ], + "names": [], + "mappings": ";AAAA,oBAAoB,CAAC,MAAM;;AAK3B;;;;;;GAMG;AACH,+BAA+B,KAAiB;IAC9C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAEY,QAAA,6BAA6B,GAAG,UAAC,iBAAoC;IAC9E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,qBAAqB,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC;AAA3E,CAA2E,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\n\nimport { TransitionService } from '../transition/transitionService';\nimport { Transition } from '../transition/transition';\n\n/**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\nfunction invalidTransitionHook(trans: Transition) {\n if (!trans.valid()) {\n throw new Error(trans.error());\n }\n}\n\nexport const registerInvalidTransitionHook = (transitionService: TransitionService) =>\n transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.d.ts new file mode 100644 index 00000000..6a022022 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.d.ts @@ -0,0 +1,13 @@ +/** @module hooks */ /** */ +import { Transition } from "../transition/transition"; +import { TransitionService } from "../transition/transitionService"; +import { StateDeclaration, LazyLoadResult } from "../state/interface"; +export declare const registerLazyLoadHook: (transitionService: TransitionService) => Function; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +export declare function lazyLoadState(transition: Transition, state: StateDeclaration): Promise; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js new file mode 100644 index 00000000..266a8f4f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var coreservices_1 = require("../common/coreservices"); +/** + * A [[TransitionHookFn]] that performs lazy loading + * + * When entering a state "abc" which has a `lazyLoad` function defined: + * - Invoke the `lazyLoad` function (unless it is already in process) + * - Flag the hook function as "in process" + * - The function should return a promise (that resolves when lazy loading is complete) + * - Wait for the promise to settle + * - If the promise resolves to a [[LazyLoadResult]], then register those states + * - Flag the hook function as "not in process" + * - If the hook was successful + * - Remove the `lazyLoad` function from the state declaration + * - If all the hooks were successful + * - Retry the transition (by returning a TargetState) + * + * ``` + * .state('abc', { + * component: 'fooComponent', + * lazyLoad: () => System.import('./fooComponent') + * }); + * ``` + * + * See [[StateDeclaration.lazyLoad]] + */ +var lazyLoadHook = function (transition) { + var router = transition.router; + function retryTransition() { + if (transition.originalTransition().options().source !== 'url') { + // The original transition was not triggered via url sync + // The lazy state should be loaded now, so re-try the original transition + var orig = transition.targetState(); + return router.stateService.target(orig.identifier(), orig.params(), orig.options()); + } + // The original transition was triggered via url sync + // Run the URL rules and find the best match + var $url = router.urlService; + var result = $url.match($url.parts()); + var rule = result && result.rule; + // If the best match is a state, redirect the transition (instead + // of calling sync() which supersedes the current transition) + if (rule && rule.type === "STATE") { + var state = rule.state; + var params = result.match; + return router.stateService.target(state, params, transition.options()); + } + // No matching state found, so let .sync() choose the best non-state match/otherwise + router.urlService.sync(); + } + var promises = transition.entering() + .filter(function (state) { return !!state.$$state().lazyLoad; }) + .map(function (state) { return lazyLoadState(transition, state); }); + return coreservices_1.services.$q.all(promises).then(retryTransition); +}; +exports.registerLazyLoadHook = function (transitionService) { + return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook); +}; +/** + * Invokes a state's lazy load function + * + * @param transition a Transition context + * @param state the state to lazy load + * @returns A promise for the lazy load result + */ +function lazyLoadState(transition, state) { + var lazyLoadFn = state.$$state().lazyLoad; + // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked + var promise = lazyLoadFn['_promise']; + if (!promise) { + var success = function (result) { + delete state.lazyLoad; + delete state.$$state().lazyLoad; + delete lazyLoadFn['_promise']; + return result; + }; + var error = function (err) { + delete lazyLoadFn['_promise']; + return coreservices_1.services.$q.reject(err); + }; + promise = lazyLoadFn['_promise'] = + coreservices_1.services.$q.when(lazyLoadFn(transition, state)) + .then(updateStateRegistry) + .then(success, error); + } + /** Register any lazy loaded state definitions */ + function updateStateRegistry(result) { + if (result && Array.isArray(result.states)) { + result.states.forEach(function (state) { return transition.router.stateRegistry.register(state); }); + } + return result; + } + return promise; +} +exports.lazyLoadState = lazyLoadState; +//# sourceMappingURL=lazyLoad.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js.map new file mode 100644 index 00000000..6a1bd765 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/lazyLoad.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "lazyLoad.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/lazyLoad.ts" + ], + "names": [], + "mappings": ";;AAKA,uDAAgD;AAGhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,IAAM,YAAY,GAAqB,UAAC,UAAsB;IAC5D,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAE/B;QACE,EAAE,CAAC,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,OAAO,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AM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAA/C,CAA+C,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC;AACjB,CAAC;AAjCD,sCAiCC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {Transition} from \"../transition/transition\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {StateDeclaration, LazyLoadResult} from \"../state/interface\";\nimport {services} from \"../common/coreservices\";\nimport { StateRule } from \"../url/interface\";\n\n/**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => System.import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\nconst lazyLoadHook: TransitionHookFn = (transition: Transition) => {\n let router = transition.router;\n\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n let orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n let $url = router.urlService;\n let result = $url.match($url.parts());\n let rule = result && result.rule;\n\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === \"STATE\") {\n let state = (rule as StateRule).state;\n let params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n\n let promises = transition.entering()\n .filter(state => !!state.$$state().lazyLoad)\n .map(state => lazyLoadState(transition, state));\n\n return services.$q.all(promises).then(retryTransition);\n};\n\nexport const registerLazyLoadHook = (transitionService: TransitionService) =>\n transitionService.onBefore({ entering: (state) => !!state.lazyLoad }, lazyLoadHook);\n\n\n/**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\nexport function lazyLoadState(transition: Transition, state: StateDeclaration): Promise {\n let lazyLoadFn = state.$$state().lazyLoad;\n\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n let promise = lazyLoadFn['_promise'];\n if (!promise) {\n const success = (result) => {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n\n const error = (err) => {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n\n promise = lazyLoadFn['_promise'] =\n services.$q.when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result: LazyLoadResult) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(state => transition.router.stateRegistry.register(state));\n }\n return result;\n }\n\n return promise;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.d.ts new file mode 100644 index 00000000..421d2513 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.d.ts @@ -0,0 +1,4 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerOnExitHook: (transitionService: TransitionService) => Function; +export declare const registerOnRetainHook: (transitionService: TransitionService) => Function; +export declare const registerOnEnterHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js new file mode 100644 index 00000000..d78b86cb --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A factory which creates an onEnter, onExit or onRetain transition hook function + * + * The returned function invokes the (for instance) state.onEnter hook when the + * state is being entered. + * + * @hidden + */ +function makeEnterExitRetainHook(hookName) { + return function (transition, state) { + var _state = state.$$state(); + var hookFn = _state[hookName]; + return hookFn(transition, state); + }; +} +/** + * The [[TransitionStateHookFn]] for onExit + * + * When the state is being exited, the state's .onExit function is invoked. + * + * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);` + * + * See: [[IHookRegistry.onExit]] + */ +var onExitHook = makeEnterExitRetainHook('onExit'); +exports.registerOnExitHook = function (transitionService) { + return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook); +}; +/** + * The [[TransitionStateHookFn]] for onRetain + * + * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked. + * + * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);` + * + * See: [[IHookRegistry.onRetain]] + */ +var onRetainHook = makeEnterExitRetainHook('onRetain'); +exports.registerOnRetainHook = function (transitionService) { + return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook); +}; +/** + * The [[TransitionStateHookFn]] for onEnter + * + * When the state is being entered, the state's .onEnter function is invoked. + * + * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);` + * + * See: [[IHookRegistry.onEnter]] + */ +var onEnterHook = makeEnterExitRetainHook('onEnter'); +exports.registerOnEnterHook = function (transitionService) { + return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook); +}; +//# sourceMappingURL=onEnterExitRetain.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js.map new file mode 100644 index 00000000..4fdbd539 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/onEnterExitRetain.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "onEnterExitRetain.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/onEnterExitRetain.ts" + ], + "names": [], + "mappings": ";;AAQA;;;;;;;GAOG;AACH,iCAAiC,QAAgB;IAC/C,MAAM,CAAC,UAAC,UAAsB,EAAE,KAAuB;QACrD,IAAI,MAAM,GAAgB,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1C,IAAI,MAAM,GAA0B,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,IAAM,UAAU,GAA0B,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC/D,QAAA,kBAAkB,GAAG,UAAC,iBAAoC;IACnE,OAAA,iBAAiB,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,MAAM,EAAd,CAAc,EAAC,EAAE,UAAU,CAAC;AAAxE,CAAwE,CAAC;AAE7E;;;;;;;;GAQG;AACH,IAAM,YAAY,GAA0B,uBAAuB,CAAC,UAAU,CAAC,CAAC;AACnE,QAAA,oBAAoB,GAAG,UAAC,iBAAoC;IACrE,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAhB,CAAgB,EAAC,EAAE,YAAY,CAAC;AAA/E,CAA+E,CAAC;AAEpF;;;;;;;;GAQG;AACH,IAAM,WAAW,GAA0B,uBAAuB,CAAC,SAAS,CAAC,CAAC;AACjE,QAAA,mBAAmB,GAAG,UAAC,iBAAoC;IACpE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAC,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC,CAAC,KAAK,CAAC,OAAO,EAAf,CAAe,EAAC,EAAE,WAAW,CAAC;AAA5E,CAA4E,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { TransitionStateHookFn } from '../transition/interface';\nimport { Transition } from '../transition/transition';\nimport { TransitionService } from '../transition/transitionService';\nimport { StateDeclaration } from '../state/interface';\nimport { StateObject } from '../state/stateObject';\n\n/**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n *\n * @hidden\n */\nfunction makeEnterExitRetainHook(hookName: string): TransitionStateHookFn {\n return (transition: Transition, state: StateDeclaration) => {\n let _state: StateObject = state.$$state();\n let hookFn: TransitionStateHookFn = _state[hookName];\n return hookFn(transition, state);\n }\n}\n\n/**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\nconst onExitHook: TransitionStateHookFn = makeEnterExitRetainHook('onExit');\nexport const registerOnExitHook = (transitionService: TransitionService) =>\n transitionService.onExit({exiting: state => !!state.onExit}, onExitHook);\n\n/**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\nconst onRetainHook: TransitionStateHookFn = makeEnterExitRetainHook('onRetain');\nexport const registerOnRetainHook = (transitionService: TransitionService) =>\n transitionService.onRetain({retained: state => !!state.onRetain}, onRetainHook);\n\n/**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\nconst onEnterHook: TransitionStateHookFn = makeEnterExitRetainHook('onEnter');\nexport const registerOnEnterHook = (transitionService: TransitionService) =>\n transitionService.onEnter({entering: state => !!state.onEnter}, onEnterHook);\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.d.ts new file mode 100644 index 00000000..f2be60f3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerRedirectToHook: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js new file mode 100644 index 00000000..e991bef4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module hooks */ /** */ +var predicates_1 = require("../common/predicates"); +var coreservices_1 = require("../common/coreservices"); +var targetState_1 = require("../state/targetState"); +/** + * A [[TransitionHookFn]] that redirects to a different state or params + * + * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);` + * + * See [[StateDeclaration.redirectTo]] + */ +var redirectToHook = function (trans) { + var redirect = trans.to().redirectTo; + if (!redirect) + return; + var $state = trans.router.stateService; + function handleResult(result) { + if (!result) + return; + if (result instanceof targetState_1.TargetState) + return result; + if (predicates_1.isString(result)) + return $state.target(result, trans.params(), trans.options()); + if (result['state'] || result['params']) + return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options()); + } + if (predicates_1.isFunction(redirect)) { + return coreservices_1.services.$q.when(redirect(trans)).then(handleResult); + } + return handleResult(redirect); +}; +exports.registerRedirectToHook = function (transitionService) { + return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook); +}; +//# sourceMappingURL=redirectTo.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js.map new file mode 100644 index 00000000..46eebb8e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/redirectTo.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "redirectTo.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/redirectTo.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB,CAAC,MAAM;AAC3B,mDAAyD;AAEzD,uDAAgD;AAChD,oDAAiD;AAIjD;;;;;;GAMG;AACH,IAAM,cAAc,GAAqB,UAAC,KAAiB;IACzD,IAAI,QAAQ,GAAG,KAAK,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC;IACrC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAAC,MAAM,CAAC;IAEtB,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;IAEvC,sBAAsB,MAAW;QAC/B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;YAAC,MAAM,CAAC;QACpB,EAAE,CAAC,CAAC,MAAM,YAAY,yBAAW,CAAC;YAAC,MAAM,CAAC,MAAM,CAAC;QACjD,EAAE,CAAC,CAAC,qBAAQ,CAAC,MAAM,CAAC,CAAC;YAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAO,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1F,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7G,CAAC;IAED,EAAE,CAAC,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,uBAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC,CAAC;AAEW,QAAA,sBAAsB,GAAG,UAAC,iBAAoC;IACvE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAC,EAAE,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,CAAC,KAAK,CAAC,UAAU,EAAlB,CAAkB,EAAC,EAAE,cAAc,CAAC;AAA9E,CAA8E,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {isString, isFunction} from \"../common/predicates\"\nimport {Transition} from \"../transition/transition\";\nimport {services} from \"../common/coreservices\";\nimport {TargetState} from \"../state/targetState\";\nimport {TransitionService} from \"../transition/transitionService\";\nimport {TransitionHookFn} from \"../transition/interface\";\n\n/**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n * \n * See [[StateDeclaration.redirectTo]]\n */\nconst redirectToHook: TransitionHookFn = (trans: Transition) => {\n let redirect = trans.to().redirectTo;\n if (!redirect) return;\n\n let $state = trans.router.stateService;\n\n function handleResult(result: any) {\n if (!result) return;\n if (result instanceof TargetState) return result;\n if (isString(result)) return $state.target( result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n};\n\nexport const registerRedirectToHook = (transitionService: TransitionService) =>\n transitionService.onStart({to: (state) => !!state.redirectTo}, redirectToHook);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.d.ts new file mode 100644 index 00000000..c0236034 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.d.ts @@ -0,0 +1,3 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerEagerResolvePath: (transitionService: TransitionService) => Function; +export declare const registerLazyResolveState: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js new file mode 100644 index 00000000..43bbc9d6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module hooks */ +/** for typedoc */ +var common_1 = require("../common/common"); +var resolveContext_1 = require("../resolve/resolveContext"); +var hof_1 = require("../common/hof"); +/** + * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path + * + * Registered using `transitionService.onStart({}, eagerResolvePath);` + * + * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var eagerResolvePath = function (trans) { + return new resolveContext_1.ResolveContext(trans.treeChanges().to) + .resolvePath("EAGER", trans) + .then(common_1.noop); +}; +exports.registerEagerResolvePath = function (transitionService) { + return transitionService.onStart({}, eagerResolvePath, { priority: 1000 }); +}; +/** + * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path + * + * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);` + * + * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for. + * + * See [[StateDeclaration.resolve]] + */ +var lazyResolveState = function (trans, state) { + return new resolveContext_1.ResolveContext(trans.treeChanges().to) + .subContext(state.$$state()) + .resolvePath("LAZY", trans) + .then(common_1.noop); +}; +exports.registerLazyResolveState = function (transitionService) { + return transitionService.onEnter({ entering: hof_1.val(true) }, lazyResolveState, { priority: 1000 }); +}; +//# sourceMappingURL=resolve.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js.map new file mode 100644 index 00000000..6b437a59 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/resolve.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolve.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/resolve.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB;AACpB,kBAAkB;AAClB,2CAAwC;AAExC,4DAA2D;AAG3D,qCAAoC;AAGpC;;;;;;;;GAQG;AACH,IAAM,gBAAgB,GAAqB,UAAC,KAAiB;IACzD,OAAA,IAAI,+BAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;SACrC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC;SAC3B,IAAI,CAAC,aAAI,CAAC;AAFf,CAEe,CAAC;AAEP,QAAA,wBAAwB,GAAG,UAAC,iBAAoC;IACzE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,gBAAgB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAAjE,CAAiE,CAAC;AAEtE;;;;;;;;GAQG;AACH,IAAM,gBAAgB,GAA0B,UAAC,KAAiB,EAAE,KAAuB;IACvF,OAAA,IAAI,+BAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;SACrC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SAC3B,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC;SAC1B,IAAI,CAAC,aAAI,CAAC;AAHf,CAGe,CAAC;AAEP,QAAA,wBAAwB,GAAG,UAAC,iBAAoC;IACzE,OAAA,iBAAiB,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAG,CAAC,IAAI,CAAC,EAAE,EAAE,gBAAgB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAAtF,CAAsF,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { noop } from '../common/common';\nimport { Transition } from '../transition/transition';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { TransitionStateHookFn, TransitionHookFn } from '../transition/interface';\nimport { TransitionService } from '../transition/transitionService';\nimport { val } from '../common/hof';\nimport { StateDeclaration } from '../state/interface';\n\n/**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath);`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst eagerResolvePath: TransitionHookFn = (trans: Transition) =>\n new ResolveContext(trans.treeChanges().to)\n .resolvePath(\"EAGER\", trans)\n .then(noop);\n\nexport const registerEagerResolvePath = (transitionService: TransitionService) =>\n transitionService.onStart({}, eagerResolvePath, {priority: 1000});\n\n/**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState);`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\nconst lazyResolveState: TransitionStateHookFn = (trans: Transition, state: StateDeclaration) =>\n new ResolveContext(trans.treeChanges().to)\n .subContext(state.$$state())\n .resolvePath(\"LAZY\", trans)\n .then(noop);\n\nexport const registerLazyResolveState = (transitionService: TransitionService) =>\n transitionService.onEnter({ entering: val(true) }, lazyResolveState, {priority: 1000});\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.d.ts new file mode 100644 index 00000000..128b9a20 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from '../transition/transitionService'; +export declare const registerUpdateGlobalState: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js new file mode 100644 index 00000000..6c4ce7cc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common/common"); +/** + * A [[TransitionHookFn]] which updates global UI-Router state + * + * Registered using `transitionService.onBefore({}, updateGlobalState);` + * + * Before a [[Transition]] starts, updates the global value of "the current transition" ([[Globals.transition]]). + * After a successful [[Transition]], updates the global values of "the current state" + * ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]). + * + * See also the deprecated properties: + * [[StateService.transition]], [[StateService.current]], [[StateService.params]] + */ +var updateGlobalState = function (trans) { + var globals = trans.router.globals; + var transitionSuccessful = function () { + globals.successfulTransitions.enqueue(trans); + globals.$current = trans.$to(); + globals.current = globals.$current.self; + common_1.copy(trans.params(), globals.params); + }; + var clearCurrentTransition = function () { + // Do not clear globals.transition if a different transition has started in the meantime + if (globals.transition === trans) + globals.transition = null; + }; + trans.onSuccess({}, transitionSuccessful, { priority: 10000 }); + trans.promise.then(clearCurrentTransition, clearCurrentTransition); +}; +exports.registerUpdateGlobalState = function (transitionService) { + return transitionService.onCreate({}, updateGlobalState); +}; +//# sourceMappingURL=updateGlobals.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js.map new file mode 100644 index 00000000..8d28ef6d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/updateGlobals.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "updateGlobals.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/updateGlobals.ts" + ], + "names": [], + "mappings": ";;AAGA,2CAAwC;AAGxC;;;;;;;;;;;GAWG;AACH,IAAM,iBAAiB,GAAG,UAAC,KAAiB;IAC1C,IAAI,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnC,IAAM,oBAAoB,GAAG;QAC3B,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QAC/B,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;QAExC,aAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,IAAM,sBAAsB,GAAG;QAC7B,wFAAwF;QACxF,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,KAAK,CAAC;YAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAC9D,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,oBAAoB,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/D,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;AACrE,CAAC,CAAC;AAEW,QAAA,yBAAyB,GAAG,UAAC,iBAAoC;IAC1E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;AAAjD,CAAiD,CAAC", + "sourcesContent": [ + "/** @module hooks */\n/** for typedoc */\nimport { Transition } from '../transition/transition';\nimport { copy } from '../common/common';\nimport { TransitionService } from '../transition/transitionService';\n\n/**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\nconst updateGlobalState = (trans: Transition) => {\n let globals = trans.router.globals;\n\n const transitionSuccessful = () => {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n\n copy(trans.params(), globals.params);\n };\n\n const clearCurrentTransition = () => {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans) globals.transition = null;\n };\n\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n};\n\nexport const registerUpdateGlobalState = (transitionService: TransitionService) =>\n transitionService.onCreate({}, updateGlobalState);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.d.ts new file mode 100644 index 00000000..2c332cd8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.d.ts @@ -0,0 +1,2 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerUpdateUrl: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js new file mode 100644 index 00000000..88eee52a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A [[TransitionHookFn]] which updates the URL after a successful transition + * + * Registered using `transitionService.onSuccess({}, updateUrl);` + */ +var updateUrl = function (transition) { + var options = transition.options(); + var $state = transition.router.stateService; + var $urlRouter = transition.router.urlRouter; + // Dont update the url in these situations: + // The transition was triggered by a URL sync (options.source === 'url') + // The user doesn't want the url to update (options.location === false) + // The destination state, and all parents have no navigable url + if (options.source !== 'url' && options.location && $state.$current.navigable) { + var urlOptions = { replace: options.location === 'replace' }; + $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions); + } + $urlRouter.update(true); +}; +exports.registerUpdateUrl = function (transitionService) { + return transitionService.onSuccess({}, updateUrl, { priority: 9999 }); +}; +//# sourceMappingURL=url.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js.map new file mode 100644 index 00000000..0a8a570a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/url.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "url.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/url.ts" + ], + "names": [], + "mappings": ";;AAOA;;;;GAIG;AACH,IAAM,SAAS,GAAqB,UAAC,UAAsB;IACzD,IAAI,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;IACnC,IAAI,MAAM,GAAiB,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1D,IAAI,UAAU,GAAc,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;IAExD,2CAA2C;IAC3C,wEAAwE;IACxE,uEAAuE;IACvE,+DAA+D;IAC/D,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9E,IAAI,UAAU,GAAG,EAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAC,CAAC;QAC3D,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC5E,CAAC;IAED,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEW,QAAA,iBAAiB,GAAG,UAAC,iBAAoC;IAClE,OAAA,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAA5D,CAA4D,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** */\nimport {UrlRouter} from \"../url/urlRouter\";\nimport {StateService} from \"../state/stateService\";\nimport {Transition} from \"../transition/transition\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n/** \n * A [[TransitionHookFn]] which updates the URL after a successful transition\n * \n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\nconst updateUrl: TransitionHookFn = (transition: Transition) => {\n let options = transition.options();\n let $state: StateService = transition.router.stateService;\n let $urlRouter: UrlRouter = transition.router.urlRouter;\n\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = {replace: options.location === 'replace'};\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n\n $urlRouter.update(true);\n};\n\nexport const registerUpdateUrl = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, updateUrl, {priority: 9999});\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.d.ts new file mode 100644 index 00000000..84e25a19 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.d.ts @@ -0,0 +1,3 @@ +import { TransitionService } from "../transition/transitionService"; +export declare const registerLoadEnteringViews: (transitionService: TransitionService) => Function; +export declare const registerActivateViews: (transitionService: TransitionService) => Function; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js new file mode 100644 index 00000000..df14b1d7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module hooks */ /** for typedoc */ +var common_1 = require("../common/common"); +var coreservices_1 = require("../common/coreservices"); +/** + * A [[TransitionHookFn]] which waits for the views to load + * + * Registered using `transitionService.onStart({}, loadEnteringViews);` + * + * Allows the views to do async work in [[ViewConfig.load]] before the transition continues. + * In angular 1, this includes loading the templates. + */ +var loadEnteringViews = function (transition) { + var $q = coreservices_1.services.$q; + var enteringViews = transition.views("entering"); + if (!enteringViews.length) + return; + return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(common_1.noop); +}; +exports.registerLoadEnteringViews = function (transitionService) { + return transitionService.onFinish({}, loadEnteringViews); +}; +/** + * A [[TransitionHookFn]] which activates the new views when a transition is successful. + * + * Registered using `transitionService.onSuccess({}, activateViews);` + * + * After a transition is complete, this hook deactivates the old views from the previous state, + * and activates the new views from the destination state. + * + * See [[ViewService]] + */ +var activateViews = function (transition) { + var enteringViews = transition.views("entering"); + var exitingViews = transition.views("exiting"); + if (!enteringViews.length && !exitingViews.length) + return; + var $view = transition.router.viewService; + exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); }); + enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); }); + $view.sync(); +}; +exports.registerActivateViews = function (transitionService) { + return transitionService.onSuccess({}, activateViews); +}; +//# sourceMappingURL=views.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js.map new file mode 100644 index 00000000..4f71bc82 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/hooks/views.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "views.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/hooks/views.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB,CAAC,kBAAkB;AACvC,2CAAsC;AACtC,uDAAgD;AAQhD;;;;;;;GAOG;AACH,IAAM,iBAAiB,GAAqB,UAAC,UAAsB;IACjE,IAAI,EAAE,GAAG,uBAAQ,CAAC,EAAE,CAAC;IACrB,IAAI,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjD,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAApB,CAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAI,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEW,QAAA,yBAAyB,GAAG,UAAC,iBAAoC;IAC1E,OAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC;AAAjD,CAAiD,CAAC;AAEtD;;;;;;;;;GASG;AACH,IAAM,aAAa,GAAqB,UAAC,UAAsB;IAC7D,IAAI,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjD,IAAI,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC/C,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;QAAC,MAAM,CAAC;IAE1D,IAAI,KAAK,GAAgB,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC;IAEvD,YAAY,CAAC,OAAO,CAAC,UAAC,EAAc,IAAK,OAAA,KAAK,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAA9B,CAA8B,CAAC,CAAC;IACzE,aAAa,CAAC,OAAO,CAAC,UAAC,EAAc,IAAK,OAAA,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAA5B,CAA4B,CAAC,CAAC;IAExE,KAAK,CAAC,IAAI,EAAE,CAAC;AACf,CAAC,CAAC;AAEW,QAAA,qBAAqB,GAAG,UAAC,iBAAoC;IACtE,OAAA,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,aAAa,CAAC;AAA9C,CAA8C,CAAC", + "sourcesContent": [ + "/** @module hooks */ /** for typedoc */\nimport {noop} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {Transition} from \"../transition/transition\";\nimport {ViewService} from \"../view/view\";\nimport {ViewConfig} from \"../view/interface\";\nimport {TransitionHookFn} from \"../transition/interface\";\nimport {TransitionService} from \"../transition/transitionService\";\n\n\n/**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\nconst loadEnteringViews: TransitionHookFn = (transition: Transition) => {\n let $q = services.$q;\n let enteringViews = transition.views(\"entering\");\n if (!enteringViews.length) return;\n return $q.all(enteringViews.map(view => $q.when(view.load()))).then(noop);\n};\n\nexport const registerLoadEnteringViews = (transitionService: TransitionService) =>\n transitionService.onFinish({}, loadEnteringViews);\n\n/**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\nconst activateViews: TransitionHookFn = (transition: Transition) => {\n let enteringViews = transition.views(\"entering\");\n let exitingViews = transition.views(\"exiting\");\n if (!enteringViews.length && !exitingViews.length) return;\n\n let $view: ViewService = transition.router.viewService;\n\n exitingViews.forEach((vc: ViewConfig) => $view.deactivateViewConfig(vc));\n enteringViews.forEach((vc: ViewConfig) => $view.activateViewConfig(vc));\n\n $view.sync();\n};\n\nexport const registerActivateViews = (transitionService: TransitionService) =>\n transitionService.onSuccess({}, activateViews);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/index.d.ts new file mode 100644 index 00000000..a272ac2c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/index.d.ts @@ -0,0 +1,16 @@ +/** + * @coreapi + * @module common + */ /** */ +export * from "./common/index"; +export * from "./params/index"; +export * from "./path/index"; +export * from "./resolve/index"; +export * from "./state/index"; +export * from "./transition/index"; +export * from "./url/index"; +export * from "./view/index"; +export * from "./globals"; +export * from "./router"; +export * from "./vanilla"; +export * from "./interface"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/index.js new file mode 100644 index 00000000..5908a270 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/index.js @@ -0,0 +1,22 @@ +"use strict"; +/** + * @coreapi + * @module common + */ /** */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./common/index")); +__export(require("./params/index")); +__export(require("./path/index")); +__export(require("./resolve/index")); +__export(require("./state/index")); +__export(require("./transition/index")); +__export(require("./url/index")); +__export(require("./view/index")); +__export(require("./globals")); +__export(require("./router")); +__export(require("./vanilla")); +__export(require("./interface")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/index.js.map new file mode 100644 index 00000000..77579d1d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/index.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,MAAM;;;;;AAEV,oCAA+B;AAC/B,oCAA+B;AAC/B,kCAA6B;AAC7B,qCAAgC;AAChC,mCAA8B;AAC9B,wCAAmC;AACnC,iCAA4B;AAC5B,kCAA6B;AAC7B,+BAA0B;AAE1B,8BAAyB;AACzB,+BAA0B;AAC1B,iCAA4B", + "sourcesContent": [ + "/**\n * @coreapi\n * @module common\n */ /** */\n\nexport * from \"./common/index\";\nexport * from \"./params/index\";\nexport * from \"./path/index\";\nexport * from \"./resolve/index\";\nexport * from \"./state/index\";\nexport * from \"./transition/index\";\nexport * from \"./url/index\";\nexport * from \"./view/index\";\nexport * from \"./globals\";\n\nexport * from \"./router\";\nexport * from \"./vanilla\";\nexport * from \"./interface\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/interface.d.ts new file mode 100644 index 00000000..d974a096 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/interface.d.ts @@ -0,0 +1,105 @@ +import { UIRouter } from "./router"; +/** + * An interface for getting values from dependency injection. + * + * This is primarily used to get resolve values for a given token. + * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]]. + * + * --- + * + * If no resolve is found for a token, then it will delegate to the native injector. + * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill. + * + * In Angular 2, the native injector might be the root Injector, + * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree. + */ +export interface UIInjector { + /** + * Gets a value from the injector. + * + * For a given token, returns the value from the injector that matches the token. + * If the token is for a resolve that has not yet been fetched, this throws an error. + * + * #### Example: + * ```js + * var myResolve = injector.get('myResolve'); + * ``` + * + * #### ng1 Example: + * ```js + * // Fetch StateService + * injector.get('$state').go('home'); + * ``` + * + * #### ng2 Example: + * ```js + * import {StateService} from "ui-router-ng2"; + * // Fetch StateService + * injector.get(StateService).go('home'); + * ``` + * + * #### Typescript Example: + * ```js + * var stringArray = injector.get('myStringArray'); + * ``` + * + * ### `NOWAIT` policy + * + * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result. + * The promise is not automatically unwrapped. + * + * @param token the key for the value to get. May be a string, a class, or any arbitrary object. + * @return the Dependency Injection value that matches the token + */ + get(token: any): any; + /** Gets a value as type `T` (generics parameter) */ + get(token: any): T; + /** + * Asynchronously gets a value from the injector + * + * For a given token, returns a promise for the value from the injector that matches the token. + * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load. + * + * #### Example: + * ```js + * return injector.getAsync('myResolve').then(value => { + * if (value === 'declined') return false; + * }); + * ``` + * + * @param token the key for the value to get. May be a string or arbitrary object. + * @return a Promise for the Dependency Injection value that matches the token + */ + getAsync(token: any): Promise; + /** Asynchronously gets a value as type `T` (generics parameter) */ + getAsync(token: any): Promise; + /** + * Gets a value from the native injector + * + * Returns a value from the native injector, bypassing anything in the [[ResolveContext]]. + * + * Example: + * ```js + * let someThing = injector.getNative(SomeToken); + * ``` + * + * @param token the key for the value to get. May be a string or arbitrary object. + * @return the Dependency Injection value that matches the token + */ + getNative(token: any): any; + getNative(token: any): T; +} +/** @internalapi */ +export interface UIRouterPlugin extends Disposable { + name: string; +} +/** @internalapi */ +export declare abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable { + name: string; + dispose(router: UIRouter): void; +} +/** @internalapi */ +export interface Disposable { + /** Instructs the Disposable to clean up any resources */ + dispose(router?: UIRouter): any; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/interface.js new file mode 100644 index 00000000..02ba4a98 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/interface.js @@ -0,0 +1,21 @@ +"use strict"; +/** + * # Core classes and interfaces + * + * The classes and interfaces that are core to ui-router and do not belong + * to a more specific subsystem (such as resolve). + * + * @coreapi + * @preferred + * @module core + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** @internalapi */ +var UIRouterPluginBase = /** @class */ (function () { + function UIRouterPluginBase() { + } + UIRouterPluginBase.prototype.dispose = function (router) { }; + return UIRouterPluginBase; +}()); +exports.UIRouterPluginBase = UIRouterPluginBase; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/interface.js.map new file mode 100644 index 00000000..4cb38e06 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/interface.ts" + ], + "names": [], + "mappings": ";AAAA;;;;;;;;;GASG,CAAC,kBAAkB;;AAwGtB,mBAAmB;AACnB;IAAA;IAGA,CAAC;IADC,oCAAO,GAAP,UAAQ,MAAgB,IAAI,CAAC;IAC/B,yBAAC;AAAD,CAAC,AAHD,IAGC;AAHqB,gDAAkB", + "sourcesContent": [ + "/**\n * # Core classes and interfaces\n *\n * The classes and interfaces that are core to ui-router and do not belong\n * to a more specific subsystem (such as resolve).\n *\n * @coreapi\n * @preferred\n * @module core\n */ /** for typedoc */\n\n// Need to import or export at least one concrete something\nimport {noop} from \"./common/common\";\nimport {UIRouter} from \"./router\";\n\n/**\n * An interface for getting values from dependency injection.\n *\n * This is primarily used to get resolve values for a given token.\n * An instance of the `UIInjector` can be retrieved from the current transition using [[Transition.injector]].\n *\n * ---\n *\n * If no resolve is found for a token, then it will delegate to the native injector.\n * The native injector may be Angular 1 `$injector`, Angular 2 `Injector`, or a simple polyfill.\n *\n * In Angular 2, the native injector might be the root Injector,\n * or it might be a lazy loaded `NgModule` injector scoped to a lazy load state tree.\n */\nexport interface UIInjector {\n /**\n * Gets a value from the injector.\n *\n * For a given token, returns the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this throws an error.\n *\n * #### Example:\n * ```js\n * var myResolve = injector.get('myResolve');\n * ```\n *\n * #### ng1 Example:\n * ```js\n * // Fetch StateService\n * injector.get('$state').go('home');\n * ```\n *\n * #### ng2 Example:\n * ```js\n * import {StateService} from \"ui-router-ng2\";\n * // Fetch StateService\n * injector.get(StateService).go('home');\n * ```\n *\n * #### Typescript Example:\n * ```js\n * var stringArray = injector.get('myStringArray');\n * ```\n *\n * ### `NOWAIT` policy\n *\n * When using [[ResolvePolicy.async]] === `NOWAIT`, the value returned from `get()` is a promise for the result.\n * The promise is not automatically unwrapped.\n *\n * @param token the key for the value to get. May be a string, a class, or any arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n get(token: any): any;\n /** Gets a value as type `T` (generics parameter) */\n get(token: any): T;\n\n /**\n * Asynchronously gets a value from the injector\n *\n * For a given token, returns a promise for the value from the injector that matches the token.\n * If the token is for a resolve that has not yet been fetched, this triggers the resolve to load.\n *\n * #### Example:\n * ```js\n * return injector.getAsync('myResolve').then(value => {\n * if (value === 'declined') return false;\n * });\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return a Promise for the Dependency Injection value that matches the token\n */\n getAsync(token: any): Promise;\n /** Asynchronously gets a value as type `T` (generics parameter) */\n getAsync(token: any): Promise;\n\n /**\n * Gets a value from the native injector\n *\n * Returns a value from the native injector, bypassing anything in the [[ResolveContext]].\n *\n * Example:\n * ```js\n * let someThing = injector.getNative(SomeToken);\n * ```\n *\n * @param token the key for the value to get. May be a string or arbitrary object.\n * @return the Dependency Injection value that matches the token\n */\n getNative(token: any): any;\n getNative(token: any): T;\n}\n\n/** @internalapi */\nexport interface UIRouterPlugin extends Disposable {\n name: string;\n}\n\n/** @internalapi */\nexport abstract class UIRouterPluginBase implements UIRouterPlugin, Disposable {\n abstract name: string;\n dispose(router: UIRouter) { }\n}\n\n/** @internalapi */\nexport interface Disposable {\n /** Instructs the Disposable to clean up any resources */\n dispose(router?: UIRouter);\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.d.ts new file mode 100644 index 00000000..9045a902 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.d.ts @@ -0,0 +1,14 @@ +/** + * This module contains code for State Parameters. + * + * See [[ParamDeclaration]] + * + * @coreapi + * @preferred + * @module params + */ /** for typedoc */ +export * from "./interface"; +export * from "./param"; +export * from "./paramTypes"; +export * from "./stateParams"; +export * from "./paramType"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js new file mode 100644 index 00000000..f3207b07 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js @@ -0,0 +1,10 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./param")); +__export(require("./paramTypes")); +__export(require("./stateParams")); +__export(require("./paramType")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js.map new file mode 100644 index 00000000..de32f9c9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/index.ts" + ], + "names": [], + "mappings": ";;;;;AAUA,6BAAwB;AACxB,kCAA6B;AAC7B,mCAA8B;AAC9B,iCAA4B", + "sourcesContent": [ + "/**\n * This module contains code for State Parameters.\n *\n * See [[ParamDeclaration]]\n *\n * @coreapi\n * @preferred\n * @module params\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./param\";\nexport * from \"./paramTypes\";\nexport * from \"./stateParams\";\nexport * from \"./paramType\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.d.ts new file mode 100644 index 00000000..904b392f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.d.ts @@ -0,0 +1,596 @@ +/** + * @coreapi + * @module params + */ /** for typedoc */ +import { ParamType } from "./paramType"; +/** + * Parameter values + * + * An object containing state parameter key/value pairs + * + * #### Example: + * ```js + * { + * userId: 353474, + * folderId: 'inbox' + * } + * ``` + * + * @coreapi + */ +export interface RawParams { + [key: string]: any; +} +/** + * Configuration for a single Parameter + * + * In a [[StateDeclaration.params]], each `ParamDeclaration` + * defines how a single State Parameter should work. + * + * #### Example: + * ```js + * var mystate = { + * template: '
    ', + * controller: function() {} + * url: '/mystate/:start?{count:int}', + * params: { + * start: { // <-- ParamDeclaration for `start` + * type: 'date', + * value: new Date(), // <-- Default value + * squash: true, + * }, + * + * nonUrlParam: { // <-- ParamDeclaration for 'nonUrlParam' + * type: "int", + * array: true, + * value: [] + * }, + * + * count: 0, // <-- Default value for 'param1' + * // (shorthand ParamDeclaration.value) + * } + * } + * ``` + * @coreapi + */ +export interface ParamDeclaration { + /** + * The default value for this parameter. + * + * Specifies the default value for this parameter. + * This implicitly sets this parameter as optional. + * + * When UI-Router routes to a state and no value is specified for this parameter in the URL or transition, + * the default value will be used instead. + * If value is a function, it will be injected and invoked, and the return value used. + * + * Note: `value: undefined` is treated as though **no default value was specified**, while `value: null` is treated + * as **"the default value is null"**. + * + * ``` + * // define default values for param1 and param2 + * params: { + * param1: { + * value: "defaultValue" + * }, + * param2: { + * value: "param2Default; + * } + * } + * ``` + * + * ### Shorthand Declaration + * + * If you only want to set the default value of the parameter, you may use a shorthand syntax. + * In the params map, instead mapping the param name to a full parameter configuration object, simply set map it + * to the default parameter value, e.g.: + * ``` + * // Normal (non-shorthand) default value syntax + * params: { + * param1: { + * value: "defaultValue" + * }, + * param2: { + * value: "param2Default" + * } + * } + * + * // Shorthand default value syntax + * params: { + * param1: "defaultValue", + * param2: "param2Default" + * } + * ``` + * + * This defines a default value for the parameter. + * If a parameter value is `undefined`, this default value will be used instead + * + * --- + * + * Default: `undefined` + */ + value?: any; + /** + * The parameter's type + * + * Specifies the [[ParamType]] of the parameter. + * Parameter types can be used to customize the encoding/decoding of parameter values. + * + * Set this property to the name of parameter's type. + * The type may be either one of the built in types, or a custom type that has been registered with the [[UrlMatcherFactory]]. + * + * See [[ParamTypes]] for the list of built in types. + * + * --- + * + * Default: + * - Path parameters (`/:fooParam`): `path` + * - Query parameters (`?queryParam`): `query` + * - Non-url parameters (`param: { foo: null }`): `any` + * + */ + type: (string | ParamType); + /** + * The parameter's `array` mode + * + * Explicitly specifies the array mode of a URL parameter + * + * - If `false`, the parameter value will be treated (encoded/decoded) as a single value + * - If `true`, the parameter value will be treated (encoded/decoded) as an array of values. + * - If `auto` (for query parameters only), if multiple values for a single parameter are present + * in the URL (e.g.: /foo?bar=1&bar=2&bar=3) then the values are mapped to an array (e.g.: + * `{ foo: [ '1', '2', '3' ] }`). However, if only one value is present (e.g.: /foo?bar=1) + * then the value is treated as single value (e.g.: { foo: '1' }). + * + * If you specified a [[type]] for the parameter, the value will be treated as an array + * of the specified [[ParamType]]. + * + * #### Example: + * ```js + * { + * name: 'foo', + * url: '/foo/{arrayParam:int}`, + * params: { + * arrayParam: { array: true } + * } + * } + * + * // After the transition, URL should be '/foo/1-2-3' + * $state.go("foo", { arrayParam: [ 1, 2, 3 ] }); + * ``` + * + * @default `false` for path parameters, such as `url: '/foo/:pathParam'` + * @default `auto` for query parameters, such as `url: '/foo?queryParam'` + * @default `true` if the parameter name ends in `[]`, such as `url: '/foo/{implicitArrayParam:int[]}'` + */ + array: boolean; + /** + * Squash mode: omit default parameter values in URL + * + * Configures how a default parameter value is represented in the URL when the current parameter value + * is the same as the default value. + * + * There are three squash settings: + * + * - `false`: The parameter's default value is not squashed. It is encoded and included in the URL + * - `true`: The parameter's default value is omitted from the URL. + * If the parameter is preceeded and followed by slashes in the state's url declaration, then one of those slashes are omitted. + * This can allow for cleaner looking URLs. + * - `"<arbitrary string>"`: The parameter's default value is replaced with an arbitrary + * placeholder of your choice. + * + * #### Example: + * ```js + * { + * name: 'mystate', + * url: '/mystate/:myparam', + * params: { + * myparam: 'defaultParamValue' + * squash: true + * } + * } + * + * // URL will be `/mystate/` + * $state.go('mystate', { myparam: 'defaultParamValue' }); + * + * // URL will be `/mystate/someOtherValue` + * $state.go('mystate', { myparam: 'someOtherValue' }); + * ``` + * + * #### Example: + * ```js + * { + * name: 'mystate2', + * url: '/mystate2/:myparam2', + * params: { + * myparam2: 'defaultParamValue' + * squash: "~" + * } + * } + * + * // URL will be `/mystate/~` + * $state.go('mystate', { myparam2: 'defaultParamValue' }); + * + * // URL will be `/mystate/someOtherValue` + * $state.go('mystate', { myparam2: 'someOtherValue' }); + * ``` + * + * Default: If squash is not set, it uses the configured default squash policy. (See [[defaultSquashPolicy]]()) + */ + squash: (boolean | string); + /** + * @internalapi + * + * An array of [[Replace]] objects. + * + * When creating a Transition, defines how to handle certain special values, such as `undefined`, `null`, + * or empty string `""`. If the transition is started, and the parameter value is equal to one of the "to" + * values, then the parameter value is replaced with the "from" value. + * + * #### Example: + * ```js + * replace: [ + * { from: undefined, to: null }, + * { from: "", to: null } + * ] + * ``` + */ + replace: Replace[]; + /** + * @hidden + * @internalapi + * + * This is not part of the declaration; it is a calculated value depending on if a default value was specified or not. + */ + isOptional: boolean; + /** + * Dynamic flag + * + * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited. + * The resolves will not be re-fetched, nor will views be reloaded. + * + * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited). + * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter. + * + * This can be useful to build UI where the component updates itself when the param values change. + * A common scenario where this is useful is searching/paging/sorting. + * + * --- + * + * Note: this value overrides the `dynamic` value on a custom parameter type ([[ParamTypeDefinition.dynamic]]). + * + * --- + * + * Default: `false` + */ + dynamic: boolean; + /** + * Disables url-encoding of parameter values + * + * When `true`, parameter values are not url-encoded. + * This is commonly used to allow "slug" urls, with a parameter value including non-semantic slashes. + * + * #### Example: + * ```js + * url: '/product/:slug', + * params: { + * slug: { type: 'string', raw: true } + * } + * ``` + * + * This allows a URL parameter of `{ slug: 'camping/tents/awesome_tent' }` + * to serialize to `/product/camping/tents/awesome_tent` + * instead of `/product/camping%2Ftents%2Fawesome_tent`. + * + * --- + * + * Note: this value overrides the `raw` value on a custom parameter type ([[ParamTypeDefinition.raw]]). + * + * ### Decoding warning + * + * The decoding behavior of raw parameters is not defined. + * For example, given a url template such as `/:raw1/:raw2` + * the url `/foo/bar/baz/qux/`, there is no way to determine which slashes belong to which params. + * + * It's generally safe to use a raw parameter at the end of a path, like '/product/:slug'. + * However, beware of the characters you allow in your raw parameter values. + * Avoid unencoded characters that could disrupt normal URL parsing, such as `?` and `#`. + * + * --- + * + * Default: `false` + */ + raw: boolean; + /** + * Enables/disables inheriting of this parameter's value + * + * When a transition is run with [[TransitionOptions.inherit]] set to + * `true`, the current param values are inherited in the new transition. + * However, parameters values which have `inherit: false` set will *not be inherited*. + * + * #### Example state : + * ```js + * var fooState = { + * name: 'foo', + * url: '/:fooId?mode&refresh', + * params: { + * refresh: { inherit: false } + * } + * } + * + * // Set fooId to 123 + * $state.go('fooState', { fooId: 1234, mode: 'list', refresh: true }); + * ``` + * + * In the component: + * `mode: 'list' is inherited, but refresh: true is not inherited. + * // The param values are thus: `{ fooId: 4567, mode: 'list' }` + * ``` + * 4567 + * ``` + * + * --- + * + * See also [[TransitionOptions.inherit]] and [[ParamTypeDefinition.inherit]] + * + * --- + * + * Default: `true` + */ + inherit: boolean; +} +/** @internalapi */ +export interface Replace { + from: string; + to: string; +} +/** + * Describes a custom [[ParamType]] + * + * See: [[UrlMatcherFactory.type]] + * + * A developer can create a custom parameter type definition to customize the encoding and decoding of parameter values. + * The definition should implement all the methods of this interface. + * + * Parameter values are parsed from the URL as strings. + * However, it is often useful to parse the string into some other form, such as: + * + * - integer + * - date + * - array of + * - custom object + * - some internal string representation + * + * Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL). + * UI-Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])). + * + * For example, if a state has a url of `/foo/{fooId:int}` (the `fooId` parameter is of the `int` ParamType) + * and if the browser is at `/foo/123`, then the 123 is parsed as an integer: + * + * ```js + * var fooId = transition.params().fooId; + * fooId === "123" // false + * fooId === 123 // true + * ``` + * + * + * #### Examples + * + * This example encodes an array of integers as a dash-delimited string to be used in the URL. + * + * If we call `$state.go('foo', { fooIds: [20, 30, 40] });`, the URL changes to `/foo/20-30-40`. + * If we navigate to `/foo/1-2-3`, the `foo` state's onEnter logs `[1, 2, 3]`. + * + * @example + * ``` + * + * $urlMatcherFactoryProvider.type('intarray', { + * // Take an array of ints [1,2,3] and return a string "1-2-3" + * encode: (array) => array.join("-"), + * + * // Take an string "1-2-3" and return an array of ints [1,2,3] + * decode: (str) => str.split("-").map(x => parseInt(x, 10)), + * + * // Match the encoded string in the URL + * pattern: new RegExp("[0-9]+(?:-[0-9]+)*") + * + * // Ensure that the (decoded) object is an array, and that all its elements are numbers + * is: (obj) => Array.isArray(obj) && + * obj.reduce((acc, item) => acc && typeof item === 'number', true), + * + * // Compare two arrays of integers + * equals: (array1, array2) => array1.length === array2.length && + * array1.reduce((acc, item, idx) => acc && item === array2[idx], true); + * }); + * + * $stateProvider.state('foo', { + * url: "/foo/{fooIds:intarray}", + * onEnter: function($transition$) { + * console.log($transition$.fooIds); // Logs "[1, 2, 3]" + * } + * }); + * ``` + * + * + * This example decodes an integer from the URL. + * It uses the integer as an index to look up an item from a static list. + * That item from the list is the decoded parameter value. + * + * @example + * ``` + * + * var list = ['John', 'Paul', 'George', 'Ringo']; + * + * $urlMatcherFactoryProvider.type('listItem', { + * encode: function(item) { + * // Represent the list item in the URL using its corresponding index + * return list.indexOf(item); + * }, + * decode: function(item) { + * // Look up the list item by index + * return list[parseInt(item, 10)]; + * }, + * is: function(item) { + * // Ensure the item is valid by checking to see that it appears + * // in the list + * return list.indexOf(item) > -1; + * } + * }); + * + * $stateProvider.state('list', { + * url: "/list/{item:listItem}", + * controller: function($scope, $stateParams) { + * console.log($stateParams.item); + * } + * }); + * + * // ... + * + * // Changes URL to '/list/3', logs "Ringo" to the console + * $state.go('list', { item: "Ringo" }); + * ``` + * + * See: [[UrlConfigApi.type]] + * @coreapi + */ +export interface ParamTypeDefinition { + /** + * Tests if some object type is compatible with this parameter type + * + * Detects whether some value is of this particular type. + * Accepts a decoded value and determines whether it matches this `ParamType` object. + * + * If your custom type encodes the parameter to a specific type, check for that type here. + * For example, if your custom type decodes the URL parameter value as an array of ints, return true if the + * input is an array of ints: + * + * ``` + * is: (val) => Array.isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true) + * ``` + * + * If your type decodes the URL parameter value to a custom string, check that the string matches + * the pattern (don't use an arrow fn if you need `this`): `function (val) { return !!this.pattern.exec(val) }` + * + * Note: This method is _not used to check if the URL matches_. + * It's used to check if a _decoded value *is* this type_. + * Use [[pattern]] to check the encoded value in the URL. + * + * @param val The value to check. + * @param key If the type check is happening in the context of a specific [[UrlMatcher]] object, + * this is the name of the parameter in which `val` is stored. Can be used for + * meta-programming of `ParamType` objects. + * @returns `true` if the value matches the type, otherwise `false`. + */ + is(val: any, key?: string): boolean; + /** + * Encodes a custom/native type value to a string that can be embedded in a URL. + * + * Note that the return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`). + * It only needs to be a representation of `val` that has been encoded as a string. + * + * For example, if your custom type decodes to an array of ints, then encode the array of ints to a string here: + * + * ```js + * encode: (intarray) => intarray.join("-") + * ``` + * + * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str` + * + * @param val The value to encode. + * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects. + * @returns a string representation of `val` that can be encoded in a URL. + */ + encode(val: any, key?: string): (string | string[]); + /** + * Decodes a parameter value string (from URL string or transition param) to a custom/native value. + * + * For example, if your type decodes to an array of ints, then decode the string as an array of ints here: + * ```js + * decode: (str) => str.split("-").map(str => parseInt(str, 10)) + * ``` + * + * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str` + * + * @param val The URL parameter value to decode. + * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects. + * @returns a custom representation of the URL parameter value. + */ + decode(val: string, key?: string): any; + /** + * Determines whether two decoded values are equivalent. + * + * For example, if your type decodes to an array of ints, then check if the arrays are equal: + * ```js + * equals: (a, b) => a.length === b.length && a.reduce((acc, x, idx) => acc && x === b[idx], true) + * ``` + * + * @param a A value to compare against. + * @param b A value to compare against. + * @returns `true` if the values are equivalent/equal, otherwise `false`. + */ + equals(a: any, b: any): boolean; + /** + * A regular expression that matches the encoded parameter type + * + * This regular expression is used to match an encoded parameter value **in the URL**. + * + * For example, if your type encodes as a dash-separated numbers, match that here: + * `new RegExp("[0-9]+(?:-[0-9]+)*")`. + * + * There are some limitations to these regexps: + * + * - No capturing groups are allowed (use non-capturing groups: `(?: )`) + * - No pattern modifiers like case insensitive + * - No start-of-string or end-of-string: `/^foo$/` + */ + pattern?: RegExp; + /** + * Disables url-encoding of parameter values + * + * If a parameter type is declared `raw`, it will not be url-encoded. + * Custom encoding can still be applied in the [[encode]] function. + * + * ### Decoding warning + * + * The decoding behavior of raw parameters is not defined. + * See: [[ParamDeclaration.raw]] for details + */ + raw?: boolean; + /** + * Enables/disables inheriting of parameter values (of this type) + * + * When a transition is run with [[TransitionOptions.inherit]] set to + * `true`, the current param values are inherited in the new transition. + * However, parameters whose type has `inherit: false` set will *not be inherited*. + * + * The internal parameter type of `hash` has `inherit: false`. + * This is used to disable inheriting of the hash value (`#`) on subsequent transitions. + * + * #### Example: + * ```js + * $state.go('home', { '#': 'inboxAnchor' }); + * ... + * // "#" is not inherited. + * // The value of the "#" parameter will be `null` + * // The url's hash will be cleared. + * $state.go('home.nest'); + * ``` + * + * --- + * + * See also [[TransitionOptions.inherit]] and [[ParamDeclaration.inherit]] + * + */ + inherit?: boolean; + /** + * Dynamic flag + * + * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited. + * + * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited). + * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter. + * + * Default: `false` + */ + dynamic?: boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js new file mode 100644 index 00000000..1f0da4bd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js @@ -0,0 +1,7 @@ +"use strict"; +/** + * @coreapi + * @module params + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js.map new file mode 100644 index 00000000..bc6be116 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/interface.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,kBAAkB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\n\nimport {ParamType} from \"./paramType\";\n\n/**\n * Parameter values\n *\n * An object containing state parameter key/value pairs\n *\n * #### Example:\n * ```js\n * {\n * userId: 353474,\n * folderId: 'inbox'\n * }\n * ```\n *\n * @coreapi\n */\nexport interface RawParams {\n [key: string]: any;\n}\n\n/**\n * Configuration for a single Parameter\n *\n * In a [[StateDeclaration.params]], each `ParamDeclaration`\n * defines how a single State Parameter should work.\n *\n * #### Example:\n * ```js\n * var mystate = {\n * template: '
    ',\n * controller: function() {}\n * url: '/mystate/:start?{count:int}',\n * params: {\n * start: { // <-- ParamDeclaration for `start`\n * type: 'date',\n * value: new Date(), // <-- Default value\n * squash: true,\n * },\n *\n * nonUrlParam: { // <-- ParamDeclaration for 'nonUrlParam'\n * type: \"int\",\n * array: true,\n * value: []\n * },\n *\n * count: 0, // <-- Default value for 'param1'\n * // (shorthand ParamDeclaration.value)\n * }\n * }\n * ```\n * @coreapi\n */\nexport interface ParamDeclaration {\n /**\n * The default value for this parameter.\n *\n * Specifies the default value for this parameter.\n * This implicitly sets this parameter as optional.\n *\n * When UI-Router routes to a state and no value is specified for this parameter in the URL or transition,\n * the default value will be used instead.\n * If value is a function, it will be injected and invoked, and the return value used.\n *\n * Note: `value: undefined` is treated as though **no default value was specified**, while `value: null` is treated\n * as **\"the default value is null\"**.\n *\n * ```\n * // define default values for param1 and param2\n * params: {\n * param1: {\n * value: \"defaultValue\"\n * },\n * param2: {\n * value: \"param2Default;\n * }\n * }\n * ```\n *\n * ### Shorthand Declaration\n *\n * If you only want to set the default value of the parameter, you may use a shorthand syntax.\n * In the params map, instead mapping the param name to a full parameter configuration object, simply set map it\n * to the default parameter value, e.g.:\n * ```\n * // Normal (non-shorthand) default value syntax\n * params: {\n * param1: {\n * value: \"defaultValue\"\n * },\n * param2: {\n * value: \"param2Default\"\n * }\n * }\n *\n * // Shorthand default value syntax\n * params: {\n * param1: \"defaultValue\",\n * param2: \"param2Default\"\n * }\n * ```\n *\n * This defines a default value for the parameter.\n * If a parameter value is `undefined`, this default value will be used instead\n *\n * ---\n *\n * Default: `undefined`\n */\n value?: any;\n\n /**\n * The parameter's type\n *\n * Specifies the [[ParamType]] of the parameter.\n * Parameter types can be used to customize the encoding/decoding of parameter values.\n *\n * Set this property to the name of parameter's type.\n * The type may be either one of the built in types, or a custom type that has been registered with the [[UrlMatcherFactory]].\n *\n * See [[ParamTypes]] for the list of built in types.\n *\n * ---\n *\n * Default:\n * - Path parameters (`/:fooParam`): `path`\n * - Query parameters (`?queryParam`): `query`\n * - Non-url parameters (`param: { foo: null }`): `any`\n *\n */\n type: (string|ParamType);\n\n /**\n * The parameter's `array` mode\n *\n * Explicitly specifies the array mode of a URL parameter\n *\n * - If `false`, the parameter value will be treated (encoded/decoded) as a single value\n * - If `true`, the parameter value will be treated (encoded/decoded) as an array of values.\n * - If `auto` (for query parameters only), if multiple values for a single parameter are present\n * in the URL (e.g.: /foo?bar=1&bar=2&bar=3) then the values are mapped to an array (e.g.:\n * `{ foo: [ '1', '2', '3' ] }`). However, if only one value is present (e.g.: /foo?bar=1)\n * then the value is treated as single value (e.g.: { foo: '1' }).\n *\n * If you specified a [[type]] for the parameter, the value will be treated as an array\n * of the specified [[ParamType]].\n *\n * #### Example:\n * ```js\n * {\n * name: 'foo',\n * url: '/foo/{arrayParam:int}`,\n * params: {\n * arrayParam: { array: true }\n * }\n * }\n *\n * // After the transition, URL should be '/foo/1-2-3'\n * $state.go(\"foo\", { arrayParam: [ 1, 2, 3 ] });\n * ```\n *\n * @default `false` for path parameters, such as `url: '/foo/:pathParam'`\n * @default `auto` for query parameters, such as `url: '/foo?queryParam'`\n * @default `true` if the parameter name ends in `[]`, such as `url: '/foo/{implicitArrayParam:int[]}'`\n */\n array: boolean;\n\n /**\n * Squash mode: omit default parameter values in URL\n *\n * Configures how a default parameter value is represented in the URL when the current parameter value\n * is the same as the default value.\n *\n * There are three squash settings:\n *\n * - `false`: The parameter's default value is not squashed. It is encoded and included in the URL\n * - `true`: The parameter's default value is omitted from the URL.\n * If the parameter is preceeded and followed by slashes in the state's url declaration, then one of those slashes are omitted.\n * This can allow for cleaner looking URLs.\n * - `\"<arbitrary string>\"`: The parameter's default value is replaced with an arbitrary\n * placeholder of your choice.\n *\n * #### Example:\n * ```js\n * {\n * name: 'mystate',\n * url: '/mystate/:myparam',\n * params: {\n * myparam: 'defaultParamValue'\n * squash: true\n * }\n * }\n *\n * // URL will be `/mystate/`\n * $state.go('mystate', { myparam: 'defaultParamValue' });\n *\n * // URL will be `/mystate/someOtherValue`\n * $state.go('mystate', { myparam: 'someOtherValue' });\n * ```\n *\n * #### Example:\n * ```js\n * {\n * name: 'mystate2',\n * url: '/mystate2/:myparam2',\n * params: {\n * myparam2: 'defaultParamValue'\n * squash: \"~\"\n * }\n * }\n *\n * // URL will be `/mystate/~`\n * $state.go('mystate', { myparam2: 'defaultParamValue' });\n *\n * // URL will be `/mystate/someOtherValue`\n * $state.go('mystate', { myparam2: 'someOtherValue' });\n * ```\n *\n * Default: If squash is not set, it uses the configured default squash policy. (See [[defaultSquashPolicy]]())\n */\n squash: (boolean|string);\n\n /**\n * @internalapi\n *\n * An array of [[Replace]] objects.\n *\n * When creating a Transition, defines how to handle certain special values, such as `undefined`, `null`,\n * or empty string `\"\"`. If the transition is started, and the parameter value is equal to one of the \"to\"\n * values, then the parameter value is replaced with the \"from\" value.\n *\n * #### Example:\n * ```js\n * replace: [\n * { from: undefined, to: null },\n * { from: \"\", to: null }\n * ]\n * ```\n */\n replace: Replace[];\n\n /**\n * @hidden\n * @internalapi\n *\n * This is not part of the declaration; it is a calculated value depending on if a default value was specified or not.\n */\n isOptional: boolean;\n\n /**\n * Dynamic flag\n *\n * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.\n * The resolves will not be re-fetched, nor will views be reloaded.\n *\n * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).\n * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.\n *\n * This can be useful to build UI where the component updates itself when the param values change.\n * A common scenario where this is useful is searching/paging/sorting.\n *\n * ---\n *\n * Note: this value overrides the `dynamic` value on a custom parameter type ([[ParamTypeDefinition.dynamic]]).\n *\n * ---\n *\n * Default: `false`\n */\n dynamic: boolean;\n\n /**\n * Disables url-encoding of parameter values\n *\n * When `true`, parameter values are not url-encoded.\n * This is commonly used to allow \"slug\" urls, with a parameter value including non-semantic slashes.\n *\n * #### Example:\n * ```js\n * url: '/product/:slug',\n * params: {\n * slug: { type: 'string', raw: true }\n * }\n * ```\n *\n * This allows a URL parameter of `{ slug: 'camping/tents/awesome_tent' }`\n * to serialize to `/product/camping/tents/awesome_tent`\n * instead of `/product/camping%2Ftents%2Fawesome_tent`.\n *\n * ---\n *\n * Note: this value overrides the `raw` value on a custom parameter type ([[ParamTypeDefinition.raw]]).\n *\n * ### Decoding warning\n *\n * The decoding behavior of raw parameters is not defined.\n * For example, given a url template such as `/:raw1/:raw2`\n * the url `/foo/bar/baz/qux/`, there is no way to determine which slashes belong to which params.\n *\n * It's generally safe to use a raw parameter at the end of a path, like '/product/:slug'.\n * However, beware of the characters you allow in your raw parameter values.\n * Avoid unencoded characters that could disrupt normal URL parsing, such as `?` and `#`.\n *\n * ---\n *\n * Default: `false`\n */\n raw: boolean;\n\n /**\n * Enables/disables inheriting of this parameter's value\n *\n * When a transition is run with [[TransitionOptions.inherit]] set to\n * `true`, the current param values are inherited in the new transition.\n * However, parameters values which have `inherit: false` set will *not be inherited*.\n *\n * #### Example state :\n * ```js\n * var fooState = {\n * name: 'foo',\n * url: '/:fooId?mode&refresh',\n * params: {\n * refresh: { inherit: false }\n * }\n * }\n *\n * // Set fooId to 123\n * $state.go('fooState', { fooId: 1234, mode: 'list', refresh: true });\n * ```\n *\n * In the component:\n * `mode: 'list' is inherited, but refresh: true is not inherited.\n * // The param values are thus: `{ fooId: 4567, mode: 'list' }`\n * ```\n * 4567\n * ```\n *\n * ---\n *\n * See also [[TransitionOptions.inherit]] and [[ParamTypeDefinition.inherit]]\n *\n * ---\n *\n * Default: `true`\n */\n inherit: boolean;\n}\n\n/** @internalapi */\nexport interface Replace {\n from: string;\n to: string;\n}\n\n/**\n * Describes a custom [[ParamType]]\n *\n * See: [[UrlMatcherFactory.type]]\n *\n * A developer can create a custom parameter type definition to customize the encoding and decoding of parameter values.\n * The definition should implement all the methods of this interface.\n *\n * Parameter values are parsed from the URL as strings.\n * However, it is often useful to parse the string into some other form, such as:\n *\n * - integer\n * - date\n * - array of \n * - custom object\n * - some internal string representation\n *\n * Typed parameter definitions control how parameter values are encoded (to the URL) and decoded (from the URL).\n * UI-Router always provides the decoded parameter values to the user (from methods such as [[Transition.params]])).\n *\n * For example, if a state has a url of `/foo/{fooId:int}` (the `fooId` parameter is of the `int` ParamType)\n * and if the browser is at `/foo/123`, then the 123 is parsed as an integer:\n *\n * ```js\n * var fooId = transition.params().fooId;\n * fooId === \"123\" // false\n * fooId === 123 // true\n * ```\n *\n *\n * #### Examples\n *\n * This example encodes an array of integers as a dash-delimited string to be used in the URL.\n *\n * If we call `$state.go('foo', { fooIds: [20, 30, 40] });`, the URL changes to `/foo/20-30-40`.\n * If we navigate to `/foo/1-2-3`, the `foo` state's onEnter logs `[1, 2, 3]`.\n *\n * @example\n * ```\n *\n * $urlMatcherFactoryProvider.type('intarray', {\n * // Take an array of ints [1,2,3] and return a string \"1-2-3\"\n * encode: (array) => array.join(\"-\"),\n *\n * // Take an string \"1-2-3\" and return an array of ints [1,2,3]\n * decode: (str) => str.split(\"-\").map(x => parseInt(x, 10)),\n *\n * // Match the encoded string in the URL\n * pattern: new RegExp(\"[0-9]+(?:-[0-9]+)*\")\n *\n * // Ensure that the (decoded) object is an array, and that all its elements are numbers\n * is: (obj) => Array.isArray(obj) &&\n * obj.reduce((acc, item) => acc && typeof item === 'number', true),\n *\n * // Compare two arrays of integers\n * equals: (array1, array2) => array1.length === array2.length &&\n * array1.reduce((acc, item, idx) => acc && item === array2[idx], true);\n * });\n *\n * $stateProvider.state('foo', {\n * url: \"/foo/{fooIds:intarray}\",\n * onEnter: function($transition$) {\n * console.log($transition$.fooIds); // Logs \"[1, 2, 3]\"\n * }\n * });\n * ```\n *\n *\n * This example decodes an integer from the URL.\n * It uses the integer as an index to look up an item from a static list.\n * That item from the list is the decoded parameter value.\n *\n * @example\n * ```\n *\n * var list = ['John', 'Paul', 'George', 'Ringo'];\n *\n * $urlMatcherFactoryProvider.type('listItem', {\n * encode: function(item) {\n * // Represent the list item in the URL using its corresponding index\n * return list.indexOf(item);\n * },\n * decode: function(item) {\n * // Look up the list item by index\n * return list[parseInt(item, 10)];\n * },\n * is: function(item) {\n * // Ensure the item is valid by checking to see that it appears\n * // in the list\n * return list.indexOf(item) > -1;\n * }\n * });\n *\n * $stateProvider.state('list', {\n * url: \"/list/{item:listItem}\",\n * controller: function($scope, $stateParams) {\n * console.log($stateParams.item);\n * }\n * });\n *\n * // ...\n *\n * // Changes URL to '/list/3', logs \"Ringo\" to the console\n * $state.go('list', { item: \"Ringo\" });\n * ```\n *\n * See: [[UrlConfigApi.type]]\n * @coreapi\n */\nexport interface ParamTypeDefinition {\n /**\n * Tests if some object type is compatible with this parameter type\n *\n * Detects whether some value is of this particular type.\n * Accepts a decoded value and determines whether it matches this `ParamType` object.\n *\n * If your custom type encodes the parameter to a specific type, check for that type here.\n * For example, if your custom type decodes the URL parameter value as an array of ints, return true if the\n * input is an array of ints:\n *\n * ```\n * is: (val) => Array.isArray(val) && array.reduce((acc, x) => acc && parseInt(val, 10) === val, true)\n * ```\n *\n * If your type decodes the URL parameter value to a custom string, check that the string matches\n * the pattern (don't use an arrow fn if you need `this`): `function (val) { return !!this.pattern.exec(val) }`\n *\n * Note: This method is _not used to check if the URL matches_.\n * It's used to check if a _decoded value *is* this type_.\n * Use [[pattern]] to check the encoded value in the URL.\n *\n * @param val The value to check.\n * @param key If the type check is happening in the context of a specific [[UrlMatcher]] object,\n * this is the name of the parameter in which `val` is stored. Can be used for\n * meta-programming of `ParamType` objects.\n * @returns `true` if the value matches the type, otherwise `false`.\n */\n is(val: any, key?: string): boolean;\n\n /**\n * Encodes a custom/native type value to a string that can be embedded in a URL.\n *\n * Note that the return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`).\n * It only needs to be a representation of `val` that has been encoded as a string.\n *\n * For example, if your custom type decodes to an array of ints, then encode the array of ints to a string here:\n *\n * ```js\n * encode: (intarray) => intarray.join(\"-\")\n * ```\n *\n * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str`\n *\n * @param val The value to encode.\n * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects.\n * @returns a string representation of `val` that can be encoded in a URL.\n */\n encode(val: any, key?: string): (string|string[]);\n\n /**\n * Decodes a parameter value string (from URL string or transition param) to a custom/native value.\n *\n * For example, if your type decodes to an array of ints, then decode the string as an array of ints here:\n * ```js\n * decode: (str) => str.split(\"-\").map(str => parseInt(str, 10))\n * ```\n *\n * Note: in general, [[encode]] and [[decode]] should be symmetrical. That is, `encode(decode(str)) === str`\n *\n * @param val The URL parameter value to decode.\n * @param key The name of the parameter in which `val` is stored. Can be used for meta-programming of `ParamType` objects.\n * @returns a custom representation of the URL parameter value.\n */\n decode(val: string, key?: string): any;\n\n /**\n * Determines whether two decoded values are equivalent.\n *\n * For example, if your type decodes to an array of ints, then check if the arrays are equal:\n * ```js\n * equals: (a, b) => a.length === b.length && a.reduce((acc, x, idx) => acc && x === b[idx], true)\n * ```\n *\n * @param a A value to compare against.\n * @param b A value to compare against.\n * @returns `true` if the values are equivalent/equal, otherwise `false`.\n */\n equals(a: any, b: any): boolean;\n\n /**\n * A regular expression that matches the encoded parameter type\n *\n * This regular expression is used to match an encoded parameter value **in the URL**.\n *\n * For example, if your type encodes as a dash-separated numbers, match that here:\n * `new RegExp(\"[0-9]+(?:-[0-9]+)*\")`.\n *\n * There are some limitations to these regexps:\n *\n * - No capturing groups are allowed (use non-capturing groups: `(?: )`)\n * - No pattern modifiers like case insensitive\n * - No start-of-string or end-of-string: `/^foo$/`\n */\n pattern?: RegExp;\n\n\n /**\n * Disables url-encoding of parameter values\n *\n * If a parameter type is declared `raw`, it will not be url-encoded.\n * Custom encoding can still be applied in the [[encode]] function.\n *\n * ### Decoding warning\n *\n * The decoding behavior of raw parameters is not defined.\n * See: [[ParamDeclaration.raw]] for details\n */\n raw?: boolean;\n\n /**\n * Enables/disables inheriting of parameter values (of this type)\n *\n * When a transition is run with [[TransitionOptions.inherit]] set to\n * `true`, the current param values are inherited in the new transition.\n * However, parameters whose type has `inherit: false` set will *not be inherited*.\n *\n * The internal parameter type of `hash` has `inherit: false`.\n * This is used to disable inheriting of the hash value (`#`) on subsequent transitions.\n *\n * #### Example:\n * ```js\n * $state.go('home', { '#': 'inboxAnchor' });\n * ...\n * // \"#\" is not inherited.\n * // The value of the \"#\" parameter will be `null`\n * // The url's hash will be cleared.\n * $state.go('home.nest');\n * ```\n *\n * ---\n *\n * See also [[TransitionOptions.inherit]] and [[ParamDeclaration.inherit]]\n *\n */\n inherit?: boolean;\n\n /**\n * Dynamic flag\n *\n * When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.\n *\n * Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).\n * When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.\n *\n * Default: `false`\n */\n dynamic?: boolean;\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/param.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.d.ts new file mode 100644 index 00000000..3a3a7430 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.d.ts @@ -0,0 +1,65 @@ +import { RawParams, ParamDeclaration } from "../params/interface"; +import { ParamType } from "./paramType"; +import { UrlMatcherFactory } from "../url/urlMatcherFactory"; +/** @internalapi */ +export declare enum DefType { + PATH = 0, + SEARCH = 1, + CONFIG = 2, +} +/** @internalapi */ +export declare class Param { + id: string; + type: ParamType; + location: DefType; + isOptional: boolean; + dynamic: boolean; + raw: boolean; + squash: (boolean | string); + replace: [{ + to: any; + from: any; + }]; + inherit: boolean; + array: boolean; + config: any; + /** Cache the default value if it is a static value */ + _defaultValueCache: { + defaultValue: any; + }; + constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory); + isDefaultValue(value: any): boolean; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + value(value?: any): any; + isSearch(): boolean; + validates(value: any): boolean; + toString(): string; + static values(params: Param[], values?: RawParams): RawParams; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + static changed(params: Param[], values1?: RawParams, values2?: RawParams): Param[]; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + static equals(params: Param[], values1?: {}, values2?: {}): boolean; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + static validates(params: Param[], values?: RawParams): boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js new file mode 100644 index 00000000..96420abd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js @@ -0,0 +1,198 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module params + */ /** for typedoc */ +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var predicates_1 = require("../common/predicates"); +var coreservices_1 = require("../common/coreservices"); +var paramType_1 = require("./paramType"); +/** @hidden */ var hasOwn = Object.prototype.hasOwnProperty; +/** @hidden */ var isShorthand = function (cfg) { + return ["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {})).length === 0; +}; +/** @internalapi */ +var DefType; +(function (DefType) { + DefType[DefType["PATH"] = 0] = "PATH"; + DefType[DefType["SEARCH"] = 1] = "SEARCH"; + DefType[DefType["CONFIG"] = 2] = "CONFIG"; +})(DefType = exports.DefType || (exports.DefType = {})); +/** @hidden */ +function unwrapShorthand(cfg) { + cfg = isShorthand(cfg) && { value: cfg } || cfg; + getStaticDefaultValue['__cacheable'] = true; + function getStaticDefaultValue() { + return cfg.value; + } + return common_1.extend(cfg, { + $$fn: predicates_1.isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue, + }); +} +/** @hidden */ +function getType(cfg, urlType, location, id, paramTypes) { + if (cfg.type && urlType && urlType.name !== 'string') + throw new Error("Param '" + id + "' has two type configurations."); + if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type)) + return paramTypes.type(cfg.type); + if (urlType) + return urlType; + if (!cfg.type) { + var type = location === DefType.CONFIG ? "any" : + location === DefType.PATH ? "path" : + location === DefType.SEARCH ? "query" : "string"; + return paramTypes.type(type); + } + return cfg.type instanceof paramType_1.ParamType ? cfg.type : paramTypes.type(cfg.type); +} +/** + * @internalapi + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ +function getSquashPolicy(config, isOptional, defaultPolicy) { + var squash = config.squash; + if (!isOptional || squash === false) + return false; + if (!predicates_1.isDefined(squash) || squash == null) + return defaultPolicy; + if (squash === true || predicates_1.isString(squash)) + return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); +} +/** @internalapi */ +function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") }, + ]; + replace = predicates_1.isArray(config.replace) ? config.replace : []; + if (predicates_1.isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = common_1.map(replace, hof_1.prop("from")); + return common_1.filter(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace); +} +/** @internalapi */ +var Param = /** @class */ (function () { + function Param(id, type, config, location, urlMatcherFactory) { + config = unwrapShorthand(config); + type = getType(config, type, location, id, urlMatcherFactory.paramTypes); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type; + var isOptional = config.value !== undefined || location === DefType.SEARCH; + var dynamic = predicates_1.isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic; + var raw = predicates_1.isDefined(config.raw) ? !!config.raw : !!type.raw; + var squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy()); + var replace = getReplace(config, arrayMode, isOptional, squash); + var inherit = predicates_1.isDefined(config.inherit) ? !!config.inherit : !!type.inherit; + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === DefType.SEARCH ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return common_1.extend(arrayDefaults, arrayParamNomenclature, config).array; + } + common_1.extend(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config }); + } + Param.prototype.isDefaultValue = function (value) { + return this.isOptional && this.type.equals(this.value(), value); + }; + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + Param.prototype.value = function (value) { + var _this = this; + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + var getDefaultValue = function () { + if (_this._defaultValueCache) + return _this._defaultValueCache.defaultValue; + if (!coreservices_1.services.$injector) + throw new Error("Injectable functions cannot be called at configuration time"); + var defaultValue = coreservices_1.services.$injector.invoke(_this.config.$$fn); + if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue)) + throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")"); + if (_this.config.$$fn['__cacheable']) { + _this._defaultValueCache = { defaultValue: defaultValue }; + } + return defaultValue; + }; + var replaceSpecialValues = function (val) { + for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) { + var tuple = _a[_i]; + if (tuple.from === val) + return tuple.to; + } + return val; + }; + value = replaceSpecialValues(value); + return predicates_1.isUndefined(value) ? getDefaultValue() : this.type.$normalize(value); + }; + Param.prototype.isSearch = function () { + return this.location === DefType.SEARCH; + }; + Param.prototype.validates = function (value) { + // There was no parameter value, but the param is optional + if ((predicates_1.isUndefined(value) || value === null) && this.isOptional) + return true; + // The value was not of the correct ParamType, and could not be decoded to the correct ParamType + var normalized = this.type.$normalize(value); + if (!this.type.is(normalized)) + return false; + // The value was of the correct type, but when encoded, did not match the ParamType's regexp + var encoded = this.type.encode(normalized); + return !(predicates_1.isString(encoded) && !this.type.pattern.exec(encoded)); + }; + Param.prototype.toString = function () { + return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}"; + }; + Param.values = function (params, values) { + if (values === void 0) { values = {}; } + var paramValues = {}; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + paramValues[param.id] = param.value(values[param.id]); + } + return paramValues; + }; + /** + * Finds [[Param]] objects which have different param values + * + * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects + * + * @param params: The list of Param objects to filter + * @param values1: The first set of parameter values + * @param values2: the second set of parameter values + * + * @returns any Param objects whose values were different between values1 and values2 + */ + Param.changed = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); }); + }; + /** + * Checks if two param value objects are equal (for a set of [[Param]] objects) + * + * @param params The list of [[Param]] objects to check + * @param values1 The first set of param values + * @param values2 The second set of param values + * + * @returns true if the param values in values1 and values2 are equal + */ + Param.equals = function (params, values1, values2) { + if (values1 === void 0) { values1 = {}; } + if (values2 === void 0) { values2 = {}; } + return Param.changed(params, values1, values2).length === 0; + }; + /** Returns true if a the parameter values are valid, according to the Param definitions */ + Param.validates = function (params, values) { + if (values === void 0) { values = {}; } + return params.map(function (param) { return param.validates(values[param.id]); }).reduce(common_1.allTrueR, true); + }; + return Param; +}()); +exports.Param = Param; +//# sourceMappingURL=param.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js.map new file mode 100644 index 00000000..9715a257 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/param.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "param.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/param.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,kBAAkB;AACtB,2CAAiE;AACjE,qCAAqC;AACrC,mDAA+F;AAE/F,uDAAkD;AAClD,yCAAwC;AAIxC,cAAc,CAAC,IAAI,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAC5D,cAAc,CAAC,IAAI,WAAW,GAAG,UAAC,GAAqB;IACnD,OAAA,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;AAA3F,CAA2F,CAAC;AAEhG,mBAAmB;AACnB,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,qCAAI,CAAA;IACJ,yCAAM,CAAA;IACN,yCAAM,CAAA;AACR,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB;AAED,cAAc;AACd,yBAAyB,GAAqB;IAC5C,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAS,IAAI,GAAG,CAAC;IAEvD,qBAAqB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAC5C;QACE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,eAAM,CAAC,GAAG,EAAE;QACjB,IAAI,EAAE,yB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E,CAAC,CAAC,CAAC;SACvD;QACD,MAAM,CAAC,WAAW,CAAC;IACrB,CAAC;IAED;;;;;;;;;;OAUG;IACI,aAAO,GAAd,UAAe,MAAe,EAAE,OAAuB,EAAE,OAAuB;QAAhD,wBAAA,EAAA,YAAuB;QAAE,wBAAA,EAAA,YAAuB;QAC9E,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAxD,CAAwD,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;OAQG;IACI,YAAM,GAAb,UAAc,MAAe,EAAE,OAAY,EAAE,OAAY;QAA1B,wBAAA,EAAA,YAAY;QAAE,wBAAA,EAAA,YAAY;QACvD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IAC9D,CAAC;IAED,2FAA2F;IACpF,eAAS,GAAhB,UAAiB,MAAe,EAAE,MAAsB;QAAtB,uBAAA,EAAA,WAAsB;QACtD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAjC,CAAiC,CAAC,CAAC,MAAM,CAAC,iBAAQ,EAAE,IAAI,CAAC,CAAC;IACvF,CAAC;IACH,YAAC;AAAD,CAAC,AA7ID,IA6IC;AA7IY,sBAAK", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */ /** for typedoc */\nimport { extend, filter, map, allTrueR } from \"../common/common\";\nimport { prop } from \"../common/hof\";\nimport { isInjectable, isDefined, isString, isArray, isUndefined } from \"../common/predicates\";\nimport { RawParams, ParamDeclaration } from \"../params/interface\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypes } from \"./paramTypes\";\nimport { UrlMatcherFactory } from \"../url/urlMatcherFactory\";\n\n/** @hidden */ let hasOwn = Object.prototype.hasOwnProperty;\n/** @hidden */ let isShorthand = (cfg: ParamDeclaration) =>\n [\"value\", \"type\", \"squash\", \"array\", \"dynamic\"].filter(hasOwn.bind(cfg || {})).length === 0;\n\n/** @internalapi */\nexport enum DefType {\n PATH,\n SEARCH,\n CONFIG,\n}\n\n/** @hidden */\nfunction unwrapShorthand(cfg: ParamDeclaration): ParamDeclaration {\n cfg = isShorthand(cfg) && { value: cfg } as any || cfg;\n\n getStaticDefaultValue['__cacheable'] = true;\n function getStaticDefaultValue() {\n return cfg.value;\n }\n\n return extend(cfg, {\n $$fn: isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue,\n });\n}\n\n/** @hidden */\nfunction getType(cfg: ParamDeclaration, urlType: ParamType, location: DefType, id: string, paramTypes: ParamTypes) {\n if (cfg.type && urlType && urlType.name !== 'string') throw new Error(`Param '${id}' has two type configurations.`);\n if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type as string)) return paramTypes.type(cfg.type as string);\n if (urlType) return urlType;\n if (!cfg.type) {\n let type = location === DefType.CONFIG ? \"any\" :\n location === DefType.PATH ? \"path\" :\n location === DefType.SEARCH ? \"query\" : \"string\";\n return paramTypes.type(type);\n }\n return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type as string);\n}\n\n/**\n * @internalapi\n * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n */\nfunction getSquashPolicy(config: ParamDeclaration, isOptional: boolean, defaultPolicy: (boolean|string)) {\n let squash = config.squash;\n if (!isOptional || squash === false) return false;\n if (!isDefined(squash) || squash == null) return defaultPolicy;\n if (squash === true || isString(squash)) return squash;\n throw new Error(`Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`);\n}\n\n/** @internalapi */\nfunction getReplace(config: ParamDeclaration, arrayMode: boolean, isOptional: boolean, squash: (string|boolean)) {\n let replace: any, configuredKeys: string[], defaultPolicy = [\n {from: \"\", to: (isOptional || arrayMode ? undefined : \"\")},\n {from: null, to: (isOptional || arrayMode ? undefined : \"\")},\n ];\n replace = isArray(config.replace) ? config.replace : [];\n if (isString(squash)) replace.push({ from: squash, to: undefined });\n configuredKeys = map(replace, prop(\"from\"));\n return filter(defaultPolicy, item => configuredKeys.indexOf(item.from) === -1).concat(replace);\n}\n\n\n/** @internalapi */\nexport class Param {\n id: string;\n type: ParamType;\n location: DefType;\n isOptional: boolean;\n dynamic: boolean;\n raw: boolean;\n squash: (boolean|string);\n replace: [{ to: any, from: any }];\n inherit: boolean;\n array: boolean;\n config: any;\n /** Cache the default value if it is a static value */\n _defaultValueCache: {\n defaultValue: any,\n };\n\n constructor(id: string, type: ParamType, config: ParamDeclaration, location: DefType, urlMatcherFactory: UrlMatcherFactory) {\n config = unwrapShorthand(config);\n type = getType(config, type, location, id, urlMatcherFactory.paramTypes);\n let arrayMode = getArrayMode();\n type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type;\n let isOptional = config.value !== undefined || location === DefType.SEARCH;\n let dynamic = isDefined(config.dynamic) ? !!config.dynamic : !!type.dynamic;\n let raw = isDefined(config.raw) ? !!config.raw : !!type.raw;\n let squash = getSquashPolicy(config, isOptional, urlMatcherFactory.defaultSquashPolicy());\n let replace = getReplace(config, arrayMode, isOptional, squash);\n let inherit = isDefined(config.inherit) ? !!config.inherit : !!type.inherit;\n\n // array config: param name (param[]) overrides default settings. explicit config overrides param name.\n function getArrayMode() {\n let arrayDefaults = { array: (location === DefType.SEARCH ? \"auto\" : false) };\n let arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n return extend(arrayDefaults, arrayParamNomenclature, config).array;\n }\n\n extend(this, {id, type, location, isOptional, dynamic, raw, squash, replace, inherit, array: arrayMode, config });\n }\n\n isDefaultValue(value: any): boolean {\n return this.isOptional && this.type.equals(this.value(), value);\n }\n\n /**\n * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n * default value, which may be the result of an injectable function.\n */\n value(value?: any): any {\n /**\n * [Internal] Get the default value of a parameter, which may be an injectable function.\n */\n const getDefaultValue = () => {\n if (this._defaultValueCache) return this._defaultValueCache.defaultValue;\n\n if (!services.$injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n\n let defaultValue = services.$injector.invoke(this.config.$$fn);\n\n if (defaultValue !== null && defaultValue !== undefined && !this.type.is(defaultValue))\n throw new Error(`Default value (${defaultValue}) for parameter '${this.id}' is not an instance of ParamType (${this.type.name})`);\n\n if (this.config.$$fn['__cacheable']) {\n this._defaultValueCache = { defaultValue };\n }\n\n return defaultValue;\n };\n\n const replaceSpecialValues = (val: any) => {\n for (let tuple of this.replace) {\n if (tuple.from === val) return tuple.to;\n }\n return val;\n };\n\n value = replaceSpecialValues(value);\n\n return isUndefined(value) ? getDefaultValue() : this.type.$normalize(value);\n }\n\n isSearch(): boolean {\n return this.location === DefType.SEARCH;\n }\n\n validates(value: any): boolean {\n // There was no parameter value, but the param is optional\n if ((isUndefined(value) || value === null) && this.isOptional) return true;\n\n // The value was not of the correct ParamType, and could not be decoded to the correct ParamType\n const normalized = this.type.$normalize(value);\n if (!this.type.is(normalized)) return false;\n\n // The value was of the correct type, but when encoded, did not match the ParamType's regexp\n const encoded = this.type.encode(normalized);\n return !(isString(encoded) && !this.type.pattern.exec( encoded));\n }\n\n toString() {\n return `{Param:${this.id} ${this.type} squash: '${this.squash}' optional: ${this.isOptional}}`;\n }\n\n static values(params: Param[], values: RawParams = {}): RawParams {\n const paramValues = {} as RawParams;\n for (let param of params) {\n paramValues[param.id] = param.value(values[param.id]);\n }\n return paramValues;\n }\n\n /**\n * Finds [[Param]] objects which have different param values\n *\n * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects\n *\n * @param params: The list of Param objects to filter\n * @param values1: The first set of parameter values\n * @param values2: the second set of parameter values\n *\n * @returns any Param objects whose values were different between values1 and values2\n */\n static changed(params: Param[], values1: RawParams = {}, values2: RawParams = {}): Param[] {\n return params.filter(param => !param.type.equals(values1[param.id], values2[param.id]));\n }\n\n /**\n * Checks if two param value objects are equal (for a set of [[Param]] objects)\n *\n * @param params The list of [[Param]] objects to check\n * @param values1 The first set of param values\n * @param values2 The second set of param values\n *\n * @returns true if the param values in values1 and values2 are equal\n */\n static equals(params: Param[], values1 = {}, values2 = {}): boolean {\n return Param.changed(params, values1, values2).length === 0;\n }\n\n /** Returns true if a the parameter values are valid, according to the Param definitions */\n static validates(params: Param[], values: RawParams = {}): boolean {\n return params.map(param => param.validates(values[param.id])).reduce(allTrueR, true);\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.d.ts new file mode 100644 index 00000000..7554929c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.d.ts @@ -0,0 +1,66 @@ +import { ParamTypeDefinition } from "./interface"; +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +export declare class ParamType implements ParamTypeDefinition { + /** @inheritdoc */ + pattern: RegExp; + /** The name/id of the parameter type */ + name: string; + /** @inheritdoc */ + raw: boolean; + /** @inheritdoc */ + dynamic: boolean; + /** @inheritdoc */ + inherit: boolean; + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + constructor(def: ParamTypeDefinition); + /** @inheritdoc */ + is(val: any, key?: string): boolean; + /** @inheritdoc */ + encode(val: any, key?: string): (string | string[]); + /** @inheritdoc */ + decode(val: string, key?: string): any; + /** @inheritdoc */ + equals(a: any, b: any): boolean; + $subPattern(): string; + toString(): string; + /** Given an encoded string, or a decoded object, returns a decoded object */ + $normalize(val: any): any; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + $asArray(mode: (boolean | "auto"), isSearch: boolean): any; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js new file mode 100644 index 00000000..0303f9f9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js @@ -0,0 +1,142 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module params + */ +/** */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +/** + * An internal class which implements [[ParamTypeDefinition]]. + * + * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. + * When a param type definition is registered, an instance of this class is created internally. + * + * This class has naive implementations for all the [[ParamTypeDefinition]] methods. + * + * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. + * + * #### Example: + * ```js + * var paramTypeDef = { + * decode: function(val) { return parseInt(val, 10); }, + * encode: function(val) { return val && val.toString(); }, + * equals: function(a, b) { return this.is(a) && a === b; }, + * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, + * pattern: /\d+/ + * } + * + * var paramType = new ParamType(paramTypeDef); + * ``` + * @internalapi + */ +var ParamType = /** @class */ (function () { + /** + * @param def A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `ParamType`'s public interface. + * @returns a new ParamType object + */ + function ParamType(def) { + /** @inheritdoc */ + this.pattern = /.*/; + /** @inheritdoc */ + this.inherit = true; + common_1.extend(this, def); + } + // consider these four methods to be "abstract methods" that should be overridden + /** @inheritdoc */ + ParamType.prototype.is = function (val, key) { return true; }; + /** @inheritdoc */ + ParamType.prototype.encode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.decode = function (val, key) { return val; }; + /** @inheritdoc */ + ParamType.prototype.equals = function (a, b) { return a == b; }; + ParamType.prototype.$subPattern = function () { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); + }; + ParamType.prototype.toString = function () { + return "{ParamType:" + this.name + "}"; + }; + /** Given an encoded string, or a decoded object, returns a decoded object */ + ParamType.prototype.$normalize = function (val) { + return this.is(val) ? val : this.decode(val); + }; + /** + * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ + ParamType.prototype.$asArray = function (mode, isSearch) { + if (!mode) + return this; + if (mode === "auto" && !isSearch) + throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + }; + return ParamType; +}()); +exports.ParamType = ParamType; +/** + * Wraps up a `ParamType` object to handle array values. + * @internalapi + */ +function ArrayType(type, mode) { + var _this = this; + // Wrap non-array value as array + function arrayWrap(val) { + return predicates_1.isArray(val) ? val : (predicates_1.isDefined(val) ? [val] : []); + } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch (val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + if (predicates_1.isArray(val) && val.length === 0) + return val; + var arr = arrayWrap(val); + var result = common_1.map(arr, callback); + return (allTruthyMode === true) ? common_1.filter(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result); + }; + } + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) + return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) + return false; + } + return true; + }; + } + ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) { + var paramTypeFn = type[name].bind(type); + var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler; + _this[name] = wrapperFn(paramTypeFn); + }); + common_1.extend(this, { + dynamic: type.dynamic, + name: type.name, + pattern: type.pattern, + inherit: type.inherit, + is: arrayHandler(type.is.bind(type), true), + $arrayMode: mode + }); +} +//# sourceMappingURL=paramType.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js.map new file mode 100644 index 00000000..41fd3f9d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramType.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "paramType.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/paramType.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,2CAAqD;AACrD,mDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAYE;;;;OAIG;IACH,mBAAY,GAAwB;QAhBpC,kBAAkB;QAClB,YAAO,GAAW,IAAI,CAAC;QAOvB,kBAAkB;QAClB,YAAO,GAAG,IAA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,EAAE,IAAI,CAAC,OAAO;QACrB,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;QAC1C,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;AACL,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, filter, map} from \"../common/common\";\nimport {isArray, isDefined} from \"../common/predicates\";\nimport {ParamTypeDefinition} from \"./interface\";\n\n/**\n * An internal class which implements [[ParamTypeDefinition]].\n *\n * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types.\n * When a param type definition is registered, an instance of this class is created internally.\n *\n * This class has naive implementations for all the [[ParamTypeDefinition]] methods.\n *\n * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values.\n *\n * #### Example:\n * ```js\n * var paramTypeDef = {\n * decode: function(val) { return parseInt(val, 10); },\n * encode: function(val) { return val && val.toString(); },\n * equals: function(a, b) { return this.is(a) && a === b; },\n * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; },\n * pattern: /\\d+/\n * }\n *\n * var paramType = new ParamType(paramTypeDef);\n * ```\n * @internalapi\n */\nexport class ParamType implements ParamTypeDefinition {\n /** @inheritdoc */\n pattern: RegExp = /.*/;\n /** The name/id of the parameter type */\n name: string;\n /** @inheritdoc */\n raw: boolean;\n /** @inheritdoc */\n dynamic: boolean;\n /** @inheritdoc */\n inherit = true;\n\n /**\n * @param def A configuration object which contains the custom type definition. The object's\n * properties will override the default methods and/or pattern in `ParamType`'s public interface.\n * @returns a new ParamType object\n */\n constructor(def: ParamTypeDefinition) {\n extend(this, def);\n }\n\n\n // consider these four methods to be \"abstract methods\" that should be overridden\n /** @inheritdoc */\n is(val: any, key?: string): boolean { return true; }\n /** @inheritdoc */\n encode(val: any, key?: string): (string|string[]) { return val; }\n /** @inheritdoc */\n decode(val: string, key?: string): any { return val; }\n /** @inheritdoc */\n equals(a: any, b: any): boolean { return a == b; }\n\n\n $subPattern() {\n let sub = this.pattern.toString();\n return sub.substr(1, sub.length - 2);\n }\n\n toString() {\n return `{ParamType:${this.name}}`;\n }\n\n /** Given an encoded string, or a decoded object, returns a decoded object */\n $normalize(val: any) {\n return this.is(val) ? val : this.decode(val);\n }\n\n /**\n * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\n $asArray(mode: (boolean|\"auto\"), isSearch: boolean) {\n if (!mode) return this;\n if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n return new ( ArrayType)(this, mode);\n }\n}\n\n/**\n * Wraps up a `ParamType` object to handle array values.\n * @internalapi\n */\nfunction ArrayType(type: ParamType, mode: (boolean|\"auto\")) {\n // Wrap non-array value as array\n function arrayWrap(val: any): any[] {\n return isArray(val) ? val : (isDefined(val) ? [ val ] : []);\n }\n\n // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n function arrayUnwrap(val: any) {\n switch (val.length) {\n case 0: return undefined;\n case 1: return mode === \"auto\" ? val[0] : val;\n default: return val;\n }\n }\n\n // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n function arrayHandler(callback: (x: any) => any, allTruthyMode?: boolean) {\n return function handleArray(val: any) {\n if (isArray(val) && val.length === 0) return val;\n let arr = arrayWrap(val);\n let result = map(arr, callback);\n return (allTruthyMode === true) ? filter(result, x => !x).length === 0 : arrayUnwrap(result);\n };\n }\n\n // Wraps type (.equals) functions to operate on each value of an array\n function arrayEqualsHandler(callback: (l: any, r: any) => boolean) {\n return function handleArray(val1: any, val2: any) {\n let left = arrayWrap(val1), right = arrayWrap(val2);\n if (left.length !== right.length) return false;\n for (let i = 0; i < left.length; i++) {\n if (!callback(left[i], right[i])) return false;\n }\n return true;\n };\n }\n\n ['encode', 'decode', 'equals', '$normalize'].forEach(name => {\n var paramTypeFn = type[name].bind(type);\n var wrapperFn: Function = name === 'equals' ? arrayEqualsHandler : arrayHandler;\n this[name] = wrapperFn(paramTypeFn);\n });\n\n extend(this, {\n dynamic: type.dynamic,\n name: type.name,\n pattern: type.pattern,\n inherit: type.inherit,\n is: arrayHandler(type.is.bind(type), true),\n $arrayMode: mode\n });\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.d.ts new file mode 100644 index 00000000..88324d2a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.d.ts @@ -0,0 +1,192 @@ +import { ParamTypeDefinition } from "./interface"; +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +export declare class ParamTypes { + /** @hidden */ + types: any; + /** @hidden */ + enqueue: boolean; + /** @hidden */ + typeQueue: any[]; + /** + * Built-in parameter type: `string` + * + * This parameter type coerces values to strings. + * It matches anything (`new RegExp(".*")`) in the URL + */ + static string: ParamTypeDefinition; + /** + * Built-in parameter type: `path` + * + * This parameter type is the default type for path parameters. + * A path parameter is any parameter declared in the path portion of a url + * + * - `/foo/:param1/:param2`: two path parameters + * + * This parameter type behaves exactly like the [[string]] type with one exception. + * When matching parameter values in the URL, the `path` type does not match forward slashes `/`. + * + * #### Angular 1 note: + * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`. + * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598 + */ + static path: ParamTypeDefinition; + /** + * Built-in parameter type: `query` + * + * This parameter type is the default type for query/search parameters. + * It behaves the same as the [[string]] parameter type. + * + * A query parameter is any parameter declared in the query/search portion of a url + * + * - `/bar?param2`: a query parameter + */ + static query: ParamTypeDefinition; + /** + * Built-in parameter type: `hash` + * + * This parameter type is used for the `#` parameter (the hash) + * It behaves the same as the [[string]] parameter type. + * @coreapi + */ + static hash: ParamTypeDefinition; + /** + * Built-in parameter type: `int` + * + * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL. + * + * #### Example: + * ```js + * .state({ + * name: 'user', + * url: '/user/{id:int}' + * }); + * ``` + * ```js + * $state.go('user', { id: 1298547 }); + * ``` + * + * The URL will serialize to: `/user/1298547`. + * + * When the parameter value is read, it will be the `number` `1298547`, not the string `"1298547"`. + */ + static int: ParamTypeDefinition; + /** + * Built-in parameter type: `bool` + * + * This parameter type serializes `true`/`false` as `1`/`0` + * + * #### Example: + * ```js + * .state({ + * name: 'inbox', + * url: '/inbox?{unread:bool}' + * }); + * ``` + * ```js + * $state.go('inbox', { unread: true }); + * ``` + * + * The URL will serialize to: `/inbox?unread=1`. + * + * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`. + */ + static bool: ParamTypeDefinition; + /** + * Built-in parameter type: `date` + * + * This parameter type can be used to serialize Javascript dates as parameter values. + * + * #### Example: + * ```js + * .state({ + * name: 'search', + * url: '/search?{start:date}' + * }); + * ``` + * ```js + * $state.go('search', { start: new Date(2000, 0, 1) }); + * ``` + * + * The URL will serialize to: `/search?start=2000-01-01`. + * + * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where: + * + * - `date.getFullYear() === 2016` + * - `date.getMonth() === 11` (month is 0-based) + * - `date.getDate() === 25` + */ + static date: ParamTypeDefinition; + /** + * Built-in parameter type: `json` + * + * This parameter type can be used to serialize javascript objects into the URL using JSON serialization. + * + * #### Example: + * This example serializes an plain javascript object to the URL + * ```js + * .state({ + * name: 'map', + * url: '/map/{coords:json}' + * }); + * ``` + * ```js + * $state.go('map', { coords: { x: 10399.2, y: 49071 }); + * ``` + * + * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D` + */ + static json: ParamTypeDefinition; + /** + * Built-in parameter type: `any` + * + * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL). + * This type does not encode or decode. + * It is compared using a deep `equals` comparison. + * + * #### Example: + * This example defines a non-url parameter on a [[StateDeclaration]]. + * ```js + * .state({ + * name: 'new', + * url: '/new', + * params: { + * inrepyto: null + * } + * }); + * ``` + * ```js + * $state.go('new', { inreplyto: currentMessage }); + * ``` + */ + static any: ParamTypeDefinition; + /** @internalapi */ + private defaultTypes; + /** @internalapi */ + constructor(); + /** @internalapi */ + dispose(): void; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition): any; + /** @internalapi */ + _flushTypeQueue(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js new file mode 100644 index 00000000..92ec0026 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js @@ -0,0 +1,156 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module params + */ +/** */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var hof_1 = require("../common/hof"); +var coreservices_1 = require("../common/coreservices"); +var paramType_1 = require("./paramType"); +/** + * A registry for parameter types. + * + * This registry manages the built-in (and custom) parameter types. + * + * The built-in parameter types are: + * + * - [[string]] + * - [[path]] + * - [[query]] + * - [[hash]] + * - [[int]] + * - [[bool]] + * - [[date]] + * - [[json]] + * - [[any]] + */ +var ParamTypes = /** @class */ (function () { + /** @internalapi */ + function ParamTypes() { + /** @hidden */ + this.enqueue = true; + /** @hidden */ + this.typeQueue = []; + /** @internalapi */ + this.defaultTypes = common_1.pick(ParamTypes.prototype, ["hash", "string", "query", "path", "int", "bool", "date", "json", "any"]); + // Register default types. Store them in the prototype of this.types. + var makeType = function (definition, name) { + return new paramType_1.ParamType(common_1.extend({ name: name }, definition)); + }; + this.types = common_1.inherit(common_1.map(this.defaultTypes, makeType), {}); + } + /** @internalapi */ + ParamTypes.prototype.dispose = function () { + this.types = {}; + }; + /** + * Registers a parameter type + * + * End users should call [[UrlMatcherFactory.type]], which delegates to this method. + */ + ParamTypes.prototype.type = function (name, definition, definitionFn) { + if (!predicates_1.isDefined(definition)) + return this.types[name]; + if (this.types.hasOwnProperty(name)) + throw new Error("A type named '" + name + "' has already been defined."); + this.types[name] = new paramType_1.ParamType(common_1.extend({ name: name }, definition)); + if (definitionFn) { + this.typeQueue.push({ name: name, def: definitionFn }); + if (!this.enqueue) + this._flushTypeQueue(); + } + return this; + }; + /** @internalapi */ + ParamTypes.prototype._flushTypeQueue = function () { + while (this.typeQueue.length) { + var type = this.typeQueue.shift(); + if (type.pattern) + throw new Error("You cannot override a type's .pattern at runtime."); + common_1.extend(this.types[type.name], coreservices_1.services.$injector.invoke(type.def)); + } + }; + return ParamTypes; +}()); +exports.ParamTypes = ParamTypes; +/** @hidden */ +function initDefaultTypes() { + var makeDefaultType = function (def) { + var valToString = function (val) { + return val != null ? val.toString() : val; + }; + var defaultTypeBase = { + encode: valToString, + decode: valToString, + is: hof_1.is(String), + pattern: /.*/, + equals: function (a, b) { return a == b; }, + }; + return common_1.extend({}, defaultTypeBase, def); + }; + // Default Parameter Type Definitions + common_1.extend(ParamTypes.prototype, { + string: makeDefaultType({}), + path: makeDefaultType({ + pattern: /[^/]*/, + }), + query: makeDefaultType({}), + hash: makeDefaultType({ + inherit: false, + }), + int: makeDefaultType({ + decode: function (val) { return parseInt(val, 10); }, + is: function (val) { + return !predicates_1.isNullOrUndefined(val) && this.decode(val.toString()) === val; + }, + pattern: /-?\d+/, + }), + bool: makeDefaultType({ + encode: function (val) { return val && 1 || 0; }, + decode: function (val) { return parseInt(val, 10) !== 0; }, + is: hof_1.is(Boolean), + pattern: /0|1/, + }), + date: makeDefaultType({ + encode: function (val) { + return !this.is(val) ? undefined : [ + val.getFullYear(), + ('0' + (val.getMonth() + 1)).slice(-2), + ('0' + val.getDate()).slice(-2), + ].join("-"); + }, + decode: function (val) { + if (this.is(val)) + return val; + var match = this.capture.exec(val); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); }, + equals: function (l, r) { + return ['getFullYear', 'getMonth', 'getDate'] + .reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true); + }, + 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: makeDefaultType({ + encode: common_1.toJson, + decode: common_1.fromJson, + is: hof_1.is(Object), + equals: common_1.equals, + pattern: /[^/]*/, + }), + // does not encode/decode + any: makeDefaultType({ + encode: common_1.identity, + decode: common_1.identity, + is: function () { return true; }, + equals: common_1.equals, + }), + }); +} +initDefaultTypes(); +//# sourceMappingURL=paramTypes.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js.map new file mode 100644 index 00000000..7fe46609 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/paramTypes.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "paramTypes.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/paramTypes.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,2CAAkG;AAClG,mDAAoE;AACpE,qCAAmC;AACnC,uDAAkD;AAClD,yCAAwC;AAGxC;;;;;;;;;;;;;;;;GAgBG;AACH;IA6KE,mBAAmB;IACnB;QA3KA,cAAc;QACd,YAAO,GA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BAAQ;YAChB,MAAM,EAAE,iBAAQ;YAChB,EAAE,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI;YACd,MAAM,EAAE,eAAM;SACf,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED,gBAAgB,EAAE,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport { fromJson, toJson, identity, equals, inherit, map, extend, pick } from \"../common/common\";\nimport { isDefined, isNullOrUndefined } from \"../common/predicates\";\nimport { is } from \"../common/hof\";\nimport { services } from \"../common/coreservices\";\nimport { ParamType } from \"./paramType\";\nimport { ParamTypeDefinition } from \"./interface\";\n\n/**\n * A registry for parameter types.\n *\n * This registry manages the built-in (and custom) parameter types.\n *\n * The built-in parameter types are:\n *\n * - [[string]]\n * - [[path]]\n * - [[query]]\n * - [[hash]]\n * - [[int]]\n * - [[bool]]\n * - [[date]]\n * - [[json]]\n * - [[any]]\n */\nexport class ParamTypes {\n /** @hidden */\n types: any;\n /** @hidden */\n enqueue: boolean = true;\n /** @hidden */\n typeQueue: any[] = [];\n\n /**\n * Built-in parameter type: `string`\n *\n * This parameter type coerces values to strings.\n * It matches anything (`new RegExp(\".*\")`) in the URL\n */\n static string: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `path`\n *\n * This parameter type is the default type for path parameters.\n * A path parameter is any parameter declared in the path portion of a url\n *\n * - `/foo/:param1/:param2`: two path parameters\n *\n * This parameter type behaves exactly like the [[string]] type with one exception.\n * When matching parameter values in the URL, the `path` type does not match forward slashes `/`.\n *\n * #### Angular 1 note:\n * In ng1, this type is overridden with one that pre-encodes slashes as `~2F` instead of `%2F`.\n * For more details about this angular 1 behavior, see: https://github.com/angular-ui/ui-router/issues/2598\n */\n static path: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `query`\n *\n * This parameter type is the default type for query/search parameters.\n * It behaves the same as the [[string]] parameter type.\n *\n * A query parameter is any parameter declared in the query/search portion of a url\n *\n * - `/bar?param2`: a query parameter\n */\n static query: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `hash`\n *\n * This parameter type is used for the `#` parameter (the hash)\n * It behaves the same as the [[string]] parameter type.\n * @coreapi\n */\n static hash: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `int`\n *\n * This parameter type serializes javascript integers (`number`s which represent an integer) to the URL.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'user',\n * url: '/user/{id:int}'\n * });\n * ```\n * ```js\n * $state.go('user', { id: 1298547 });\n * ```\n *\n * The URL will serialize to: `/user/1298547`.\n *\n * When the parameter value is read, it will be the `number` `1298547`, not the string `\"1298547\"`.\n */\n static int: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `bool`\n *\n * This parameter type serializes `true`/`false` as `1`/`0`\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'inbox',\n * url: '/inbox?{unread:bool}'\n * });\n * ```\n * ```js\n * $state.go('inbox', { unread: true });\n * ```\n *\n * The URL will serialize to: `/inbox?unread=1`.\n *\n * Conversely, if the url is `/inbox?unread=0`, the value of the `unread` parameter will be a `false`.\n */\n static bool: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `date`\n *\n * This parameter type can be used to serialize Javascript dates as parameter values.\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'search',\n * url: '/search?{start:date}'\n * });\n * ```\n * ```js\n * $state.go('search', { start: new Date(2000, 0, 1) });\n * ```\n *\n * The URL will serialize to: `/search?start=2000-01-01`.\n *\n * Conversely, if the url is `/search?start=2016-12-25`, the value of the `start` parameter will be a `Date` object where:\n *\n * - `date.getFullYear() === 2016`\n * - `date.getMonth() === 11` (month is 0-based)\n * - `date.getDate() === 25`\n */\n static date: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `json`\n *\n * This parameter type can be used to serialize javascript objects into the URL using JSON serialization.\n *\n * #### Example:\n * This example serializes an plain javascript object to the URL\n * ```js\n * .state({\n * name: 'map',\n * url: '/map/{coords:json}'\n * });\n * ```\n * ```js\n * $state.go('map', { coords: { x: 10399.2, y: 49071 });\n * ```\n *\n * The URL will serialize to: `/map/%7B%22x%22%3A10399.2%2C%22y%22%3A49071%7D`\n */\n static json: ParamTypeDefinition;\n\n /**\n * Built-in parameter type: `any`\n *\n * This parameter type is used by default for url-less parameters (parameters that do not appear in the URL).\n * This type does not encode or decode.\n * It is compared using a deep `equals` comparison.\n *\n * #### Example:\n * This example defines a non-url parameter on a [[StateDeclaration]].\n * ```js\n * .state({\n * name: 'new',\n * url: '/new',\n * params: {\n * inrepyto: null\n * }\n * });\n * ```\n * ```js\n * $state.go('new', { inreplyto: currentMessage });\n * ```\n */\n static any: ParamTypeDefinition;\n\n\n /** @internalapi */\n private defaultTypes: any = pick(ParamTypes.prototype, [\"hash\", \"string\", \"query\", \"path\", \"int\", \"bool\", \"date\", \"json\", \"any\"]);\n\n /** @internalapi */\n constructor() {\n // Register default types. Store them in the prototype of this.types.\n const makeType = (definition: ParamTypeDefinition, name: string) =>\n new ParamType(extend({ name }, definition));\n this.types = inherit(map(this.defaultTypes, makeType), {});\n }\n\n /** @internalapi */\n dispose() {\n this.types = {};\n }\n\n /**\n * Registers a parameter type\n *\n * End users should call [[UrlMatcherFactory.type]], which delegates to this method.\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n if (!isDefined(definition)) return this.types[name];\n if (this.types.hasOwnProperty(name)) throw new Error(`A type named '${name}' has already been defined.`);\n\n this.types[name] = new ParamType(extend({ name }, definition));\n\n if (definitionFn) {\n this.typeQueue.push({ name, def: definitionFn });\n if (!this.enqueue) this._flushTypeQueue();\n }\n\n return this;\n }\n\n /** @internalapi */\n _flushTypeQueue() {\n while (this.typeQueue.length) {\n let type = this.typeQueue.shift();\n if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n extend(this.types[type.name], services.$injector.invoke(type.def));\n }\n }\n}\n\n/** @hidden */\nfunction initDefaultTypes() {\n\n const makeDefaultType = (def) => {\n const valToString = (val: any) =>\n val != null ? val.toString() : val;\n\n const defaultTypeBase = {\n encode: valToString,\n decode: valToString,\n is: is(String),\n pattern: /.*/,\n equals: (a: any, b: any) => a == b, // allow coersion for null/undefined/\"\"\n };\n\n return extend({}, defaultTypeBase, def) as ParamTypeDefinition;\n };\n\n // Default Parameter Type Definitions\n extend(ParamTypes.prototype, {\n string: makeDefaultType({}),\n\n path: makeDefaultType({\n pattern: /[^/]*/,\n }),\n\n query: makeDefaultType({}),\n\n hash: makeDefaultType({\n inherit: false,\n }),\n\n int: makeDefaultType({\n decode: (val: string) => parseInt(val, 10),\n is: function(val: any) {\n return !isNullOrUndefined(val) && this.decode(val.toString()) === val;\n },\n pattern: /-?\\d+/,\n }),\n\n bool: makeDefaultType({\n encode: (val: any) => val && 1 || 0,\n decode: (val: string) => parseInt(val, 10) !== 0,\n is: is(Boolean),\n pattern: /0|1/,\n }),\n\n date: makeDefaultType({\n encode: function(val: any) {\n return !this.is(val) ? undefined : [\n val.getFullYear(),\n ('0' + (val.getMonth() + 1)).slice(-2),\n ('0' + val.getDate()).slice(-2),\n ].join(\"-\");\n },\n decode: function(val: string) {\n if (this.is(val)) return val as Date;\n let match = this.capture.exec(val);\n return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n },\n is: (val: any) => val instanceof Date && !isNaN(val.valueOf()),\n equals(l: any, r: any) {\n return ['getFullYear', 'getMonth', 'getDate']\n .reduce((acc, fn) => acc && l[fn]() === r[fn](), true);\n },\n pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/,\n }),\n\n json: makeDefaultType({\n encode: toJson,\n decode: fromJson,\n is: is(Object),\n equals: equals,\n pattern: /[^/]*/,\n }),\n\n // does not encode/decode\n any: makeDefaultType({\n encode: identity,\n decode: identity,\n is: () => true,\n equals: equals,\n }),\n });\n}\n\ninitDefaultTypes();\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.d.ts new file mode 100644 index 00000000..ef9c4bde --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.d.ts @@ -0,0 +1,21 @@ +/** + * @coreapi + * @module params + */ +/** */ +import { Obj } from "../common/common"; +import { StateObject } from "../state/stateObject"; +/** @internalapi */ +export declare class StateParams { + [key: string]: any; + constructor(params?: Obj); + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + $inherit(newParams: Obj, $current: StateObject, $to: StateObject): Obj; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js new file mode 100644 index 00000000..e3581553 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module params + */ +/** */ +var common_1 = require("../common/common"); +/** @internalapi */ +var StateParams = /** @class */ (function () { + function StateParams(params) { + if (params === void 0) { params = {}; } + common_1.extend(this, params); + } + /** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ + StateParams.prototype.$inherit = function (newParams, $current, $to) { + var parents = common_1.ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + for (var i in parents) { + if (!parents[i] || !parents[i].params) + continue; + parentParams = Object.keys(parents[i].params); + if (!parentParams.length) + continue; + for (var j in parentParams) { + if (inheritList.indexOf(parentParams[j]) >= 0) + continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = this[parentParams[j]]; + } + } + return common_1.extend({}, inherited, newParams); + }; + ; + return StateParams; +}()); +exports.StateParams = StateParams; +//# sourceMappingURL=stateParams.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js.map new file mode 100644 index 00000000..da6896ce --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/params/stateParams.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateParams.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/params/stateParams.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,2CAAwD;AAGxD,mBAAmB;AACnB;IAGE,qBAAY,MAAgB;QAAhB,uBAAA,EAAA,WAAgB;QAC1B,eAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,8BAAQ,GAAR,UAAS,SAAc,EAAE,QAAqB,EAAE,GAAgB;QAC9D,IAAI,OAAO,GAAG,kBAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,EAClC,YAAsB,EACtB,SAAS,GAAQ,EAAE,EACnB,WAAW,GAAa,EAAE,CAAC;QAE/B,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gBAAC,QAAQ,CAAC;YAChD,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;gBAAC,QAAQ,CAAC;YAEnC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC;gBAC3B,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;oBAAC,QAAQ,CAAC;gBACxD,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,MAAM,CAAC,eAAM,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC;IAAA,CAAC;IACJ,kBAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,kCAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module params\n */\n/** */\nimport {extend, ancestors, Obj} from \"../common/common\";\nimport {StateObject} from \"../state/stateObject\";\n\n/** @internalapi */\nexport class StateParams {\n [key: string]: any;\n\n constructor(params: Obj = {}) {\n extend(this, params);\n }\n\n /**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\n $inherit(newParams: Obj, $current: StateObject, $to: StateObject) {\n let parents = ancestors($current, $to),\n parentParams: string[],\n inherited: Obj = {},\n inheritList: string[] = [];\n\n for (let i in parents) {\n if (!parents[i] || !parents[i].params) continue;\n parentParams = Object.keys(parents[i].params);\n if (!parentParams.length) continue;\n\n for (let j in parentParams) {\n if (inheritList.indexOf(parentParams[j]) >= 0) continue;\n inheritList.push(parentParams[j]);\n inherited[parentParams[j]] = this[parentParams[j]];\n }\n }\n return extend({}, inherited, newParams);\n };\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.d.ts new file mode 100644 index 00000000..9f182f10 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.d.ts @@ -0,0 +1,3 @@ +/** @module path */ /** for typedoc */ +export * from "./pathNode"; +export * from "./pathFactory"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js new file mode 100644 index 00000000..f05e0c75 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module path */ /** for typedoc */ +__export(require("./pathNode")); +__export(require("./pathFactory")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js.map new file mode 100644 index 00000000..4b22e5fd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/index.ts" + ], + "names": [], + "mappings": ";;;;;AAAA,mBAAmB,CAAC,kBAAkB;AACtC,gCAA2B;AAC3B,mCAA8B", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\nexport * from \"./pathNode\";\nexport * from \"./pathFactory\";" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.d.ts new file mode 100644 index 00000000..5b6c77fe --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.d.ts @@ -0,0 +1,81 @@ +/** @module path */ /** for typedoc */ +import { Predicate } from "../common/common"; +import { TreeChanges } from "../transition/interface"; +import { StateObject } from "../state/stateObject"; +import { TargetState } from "../state/targetState"; +import { GetParamsFn, PathNode } from "./pathNode"; +import { ViewService } from "../view/view"; +import { Param } from '../params/param'; +import { StateRegistry } from '../state'; +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +export declare class PathUtils { + constructor(); + /** Given a PathNode[], create an TargetState */ + static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState; + static buildPath(targetState: TargetState): PathNode[]; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[]; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]): void; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys?: string[]): PathNode[]; + static nonDynamicParams: (node: PathNode) => Param[]; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[]; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + static subPath(path: PathNode[], predicate: Predicate): PathNode[]; + /** Gets the raw parameter values from a path */ + static paramValues: (path: PathNode[]) => {}; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js new file mode 100644 index 00000000..d68f309a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js @@ -0,0 +1,173 @@ +"use strict"; +/** @module path */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var targetState_1 = require("../state/targetState"); +var pathNode_1 = require("./pathNode"); +/** + * This class contains functions which convert TargetStates, Nodes and paths from one type to another. + */ +var PathUtils = /** @class */ (function () { + function PathUtils() { + } + /** Given a PathNode[], create an TargetState */ + PathUtils.makeTargetState = function (registry, path) { + var state = common_1.tail(path).state; + return new targetState_1.TargetState(registry, state, path.map(hof_1.prop("paramValues")).reduce(common_1.mergeR, {}), {}); + }; + PathUtils.buildPath = function (targetState) { + var toParams = targetState.params(); + return targetState.$state().path.map(function (state) { return new pathNode_1.PathNode(state).applyRawParams(toParams); }); + }; + /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ + PathUtils.buildToPath = function (fromPath, targetState) { + var toPath = PathUtils.buildPath(targetState); + if (targetState.options().inherit) { + return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params())); + } + return toPath; + }; + /** + * Creates ViewConfig objects and adds to nodes. + * + * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state + */ + PathUtils.applyViewConfigs = function ($view, path, states) { + // Only apply the viewConfigs to the nodes for the given states + path.filter(function (node) { return common_1.inArray(states, node.state); }).forEach(function (node) { + var viewDecls = common_1.values(node.state.views || {}); + var subPath = PathUtils.subPath(path, function (n) { return n === node; }); + var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); }); + node.views = viewConfigs.reduce(common_1.unnestR, []); + }); + }; + /** + * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath + * + * For a parameter in a node to be inherited from the from path: + * - The toPath's node must have a matching node in the fromPath (by state). + * - The parameter name must not be found in the toKeys parameter array. + * + * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some + * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, + * it is not inherited from the fromPath. + */ + PathUtils.inheritParams = function (fromPath, toPath, toKeys) { + if (toKeys === void 0) { toKeys = []; } + function nodeParamVals(path, state) { + var node = common_1.find(path, hof_1.propEq('state', state)); + return common_1.extend({}, node && node.paramValues); + } + var noInherit = fromPath.map(function (node) { return node.paramSchema; }) + .reduce(common_1.unnestR, []) + .filter(function (param) { return !param.inherit; }) + .map(hof_1.prop('id')); + /** + * Given an [[PathNode]] "toNode", return a new [[PathNode]] with param values inherited from the + * matching node in fromPath. Only inherit keys that aren't found in "toKeys" from the node in "fromPath"" + */ + function makeInheritedParamsNode(toNode) { + // All param values for the node (may include default key/vals, when key was not found in toParams) + var toParamVals = common_1.extend({}, toNode && toNode.paramValues); + // limited to only those keys found in toParams + var incomingParamVals = common_1.pick(toParamVals, toKeys); + toParamVals = common_1.omit(toParamVals, toKeys); + var fromParamVals = common_1.omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit); + // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals + var ownParamVals = common_1.extend(toParamVals, fromParamVals, incomingParamVals); + return new pathNode_1.PathNode(toNode.state).applyRawParams(ownParamVals); + } + // The param keys specified by the incoming toParams + return toPath.map(makeInheritedParamsNode); + }; + /** + * Computes the tree changes (entering, exiting) between a fromPath and toPath. + */ + PathUtils.treeChanges = function (fromPath, toPath, reloadState) { + var keep = 0, max = Math.min(fromPath.length, toPath.length); + var nodesMatch = function (node1, node2) { + return node1.equals(node2, PathUtils.nonDynamicParams); + }; + while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) { + keep++; + } + /** Given a retained node, return a new node which uses the to node's param values */ + function applyToParams(retainedNode, idx) { + var cloned = pathNode_1.PathNode.clone(retainedNode); + cloned.paramValues = toPath[idx].paramValues; + return cloned; + } + var from, retained, exiting, entering, to; + from = fromPath; + retained = from.slice(0, keep); + exiting = from.slice(keep); + // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped + var retainedWithToParams = retained.map(applyToParams); + entering = toPath.slice(keep); + to = (retainedWithToParams).concat(entering); + return { from: from, to: to, retained: retained, exiting: exiting, entering: entering }; + }; + /** + * Returns a new path which is: the subpath of the first path which matches the second path. + * + * The new path starts from root and contains any nodes that match the nodes in the second path. + * It stops before the first non-matching node. + * + * Nodes are compared using their state property and their parameter values. + * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. + * + * @param pathA the first path + * @param pathB the second path + * @param paramsFn a function which returns the parameters to consider when comparing + * + * @returns an array of PathNodes from the first path which match the nodes in the second path + */ + PathUtils.matching = function (pathA, pathB, paramsFn) { + var done = false; + var tuples = common_1.arrayTuples(pathA, pathB); + return tuples.reduce(function (matching, _a) { + var nodeA = _a[0], nodeB = _a[1]; + done = done || !nodeA.equals(nodeB, paramsFn); + return done ? matching : matching.concat(nodeA); + }, []); + }; + /** + * Returns true if two paths are identical. + * + * @param pathA + * @param pathB + * @param paramsFn a function which returns the parameters to consider when comparing + * @returns true if the the states and parameter values for both paths are identical + */ + PathUtils.equals = function (pathA, pathB, paramsFn) { + return pathA.length === pathB.length && + PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length; + }; + /** + * Return a subpath of a path, which stops at the first matching node + * + * Given an array of nodes, returns a subset of the array starting from the first node, + * stopping when the first node matches the predicate. + * + * @param path a path of [[PathNode]]s + * @param predicate a [[Predicate]] fn that matches [[PathNode]]s + * @returns a subpath up to the matching node, or undefined if no match is found + */ + PathUtils.subPath = function (path, predicate) { + var node = common_1.find(path, predicate); + var elementIdx = path.indexOf(node); + return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1); + }; + PathUtils.nonDynamicParams = function (node) { + return node.state.parameters({ inherit: false }) + .filter(function (param) { return !param.dynamic; }); + }; + /** Gets the raw parameter values from a path */ + PathUtils.paramValues = function (path) { + return path.reduce(function (acc, node) { return common_1.extend(acc, node.paramValues); }, {}); + }; + return PathUtils; +}()); +exports.PathUtils = PathUtils; +//# sourceMappingURL=pathFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js.map new file mode 100644 index 00000000..019a9510 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pathFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/pathFactory.ts" + ], + "names": [], + "mappings": ";AAAA,mBAAmB,CAAC,kBAAkB;;AAEtC,2CAE0B;AAC1B,qCAAgD;AAQhD,oDAAiD;AACjD,uCAAiD;AAKjD;;GAEG;AACH;IAEE;IAAgB,CAAC;IAEjB,gDAAgD;IACzC,yBAAe,GAAtB,UAAuB,QAAuB,EAAE,IAAgB;QAC9D,IAAI,KAAK,GAAG,aAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,IAAI,yBAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,UAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,eAAM,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChG,CAAC;IAEM,mBAAS,GAAhB,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IAED;;;;;;;;;OASG;IACI,iBAAO,GAAd,UAAe,IAAgB,EAAE,SAA8B;QAC7D,IAAI,IAAI,GAAG,aAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACjC,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;IACvE,CAAC;IAzFM,0BAAgB,GAAG,UAAC,IAAc;QACrC,OAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;aACpC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC,KAAK,CAAC,OAAO,EAAd,CAAc,CAAC;IADpC,CACoC,CAAC;IAyFzC,gDAAgD;IACzC,qBAAW,GAAG,UAAC,IAAgB;QAClC,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,eAAM,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,EAA7B,CAA6B,EAAE,EAAE,CAAC;IAA7D,CAA6D,CAAC;IACpE,gBAAC;CAAA,AA/KD,IA+KC;AA/KY,8BAAS", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\n\nimport {\n extend, find, pick, omit, tail, mergeR, values, unnestR, Predicate, inArray, arrayTuples,\n} from \"../common/common\";\nimport {prop, propEq, not} from \"../common/hof\";\n\nimport {RawParams} from \"../params/interface\";\nimport {TreeChanges} from \"../transition/interface\";\nimport {ViewConfig} from \"../view/interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nimport {StateObject} from \"../state/stateObject\";\nimport {TargetState} from \"../state/targetState\";\nimport {GetParamsFn, PathNode} from \"./pathNode\";\nimport {ViewService} from \"../view/view\";\nimport { Param } from '../params/param';\nimport { StateRegistry } from '../state';\n\n/**\n * This class contains functions which convert TargetStates, Nodes and paths from one type to another.\n */\nexport class PathUtils {\n\n constructor() { }\n\n /** Given a PathNode[], create an TargetState */\n static makeTargetState(registry: StateRegistry, path: PathNode[]): TargetState {\n let state = tail(path).state;\n return new TargetState(registry, state, path.map(prop(\"paramValues\")).reduce(mergeR, {}), {});\n }\n\n static buildPath(targetState: TargetState) {\n let toParams = targetState.params();\n return targetState.$state().path.map(state => new PathNode(state).applyRawParams(toParams));\n }\n\n /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */\n static buildToPath(fromPath: PathNode[], targetState: TargetState): PathNode[] {\n let toPath: PathNode[] = PathUtils.buildPath(targetState);\n if (targetState.options().inherit) {\n return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params()));\n }\n return toPath;\n }\n\n /**\n * Creates ViewConfig objects and adds to nodes.\n *\n * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state\n */\n static applyViewConfigs($view: ViewService, path: PathNode[], states: StateObject[]) {\n // Only apply the viewConfigs to the nodes for the given states\n path.filter(node => inArray(states, node.state)).forEach(node => {\n let viewDecls: _ViewDeclaration[] = values(node.state.views || {});\n let subPath = PathUtils.subPath(path, n => n === node);\n let viewConfigs: ViewConfig[][] = viewDecls.map(view => $view.createViewConfig(subPath, view));\n node.views = viewConfigs.reduce(unnestR, []);\n });\n }\n\n /**\n * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath\n *\n * For a parameter in a node to be inherited from the from path:\n * - The toPath's node must have a matching node in the fromPath (by state).\n * - The parameter name must not be found in the toKeys parameter array.\n *\n * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some\n * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,\n * it is not inherited from the fromPath.\n */\n static inheritParams(fromPath: PathNode[], toPath: PathNode[], toKeys: string[] = []): PathNode[] {\n function nodeParamVals(path: PathNode[], state: StateObject): RawParams {\n let node: PathNode = find(path, propEq('state', state));\n return extend({}, node && node.paramValues);\n }\n\n let noInherit = fromPath.map(node => node.paramSchema)\n .reduce(unnestR, [])\n .filter(param => !param.inherit)\n .map(prop('id'));\n\n /**\n * Given an [[PathNode]] \"toNode\", return a new [[PathNode]] with param values inherited from the\n * matching node in fromPath. Only inherit keys that aren't found in \"toKeys\" from the node in \"fromPath\"\"\n */\n function makeInheritedParamsNode(toNode: PathNode): PathNode {\n // All param values for the node (may include default key/vals, when key was not found in toParams)\n let toParamVals = extend({}, toNode && toNode.paramValues);\n // limited to only those keys found in toParams\n let incomingParamVals = pick(toParamVals, toKeys);\n toParamVals = omit(toParamVals, toKeys);\n let fromParamVals = omit(nodeParamVals(fromPath, toNode.state) || {}, noInherit);\n // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals\n let ownParamVals: RawParams = extend(toParamVals, fromParamVals, incomingParamVals);\n return new PathNode(toNode.state).applyRawParams(ownParamVals);\n }\n\n // The param keys specified by the incoming toParams\n return toPath.map(makeInheritedParamsNode);\n }\n\n static nonDynamicParams = (node: PathNode): Param[] =>\n node.state.parameters({ inherit: false })\n .filter(param => !param.dynamic);\n\n /**\n * Computes the tree changes (entering, exiting) between a fromPath and toPath.\n */\n static treeChanges(fromPath: PathNode[], toPath: PathNode[], reloadState: StateObject): TreeChanges {\n let keep = 0, max = Math.min(fromPath.length, toPath.length);\n\n const nodesMatch = (node1: PathNode, node2: PathNode) =>\n node1.equals(node2, PathUtils.nonDynamicParams);\n\n while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) {\n keep++;\n }\n\n /** Given a retained node, return a new node which uses the to node's param values */\n function applyToParams(retainedNode: PathNode, idx: number): PathNode {\n let cloned = PathNode.clone(retainedNode);\n cloned.paramValues = toPath[idx].paramValues;\n return cloned;\n }\n\n let from: PathNode[], retained: PathNode[], exiting: PathNode[], entering: PathNode[], to: PathNode[];\n\n from = fromPath;\n retained = from.slice(0, keep);\n exiting = from.slice(keep);\n\n // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped\n let retainedWithToParams = retained.map(applyToParams);\n entering = toPath.slice(keep);\n to = (retainedWithToParams).concat(entering);\n\n return { from, to, retained, exiting, entering };\n }\n\n /**\n * Returns a new path which is: the subpath of the first path which matches the second path.\n *\n * The new path starts from root and contains any nodes that match the nodes in the second path.\n * It stops before the first non-matching node.\n *\n * Nodes are compared using their state property and their parameter values.\n * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.\n *\n * @param pathA the first path\n * @param pathB the second path\n * @param paramsFn a function which returns the parameters to consider when comparing\n *\n * @returns an array of PathNodes from the first path which match the nodes in the second path\n */\n static matching(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): PathNode[] {\n let done = false;\n let tuples: PathNode[][] = arrayTuples(pathA, pathB);\n return tuples.reduce((matching, [nodeA, nodeB]) => {\n done = done || !nodeA.equals(nodeB, paramsFn);\n return done ? matching : matching.concat(nodeA);\n }, []);\n }\n\n /**\n * Returns true if two paths are identical.\n *\n * @param pathA\n * @param pathB\n * @param paramsFn a function which returns the parameters to consider when comparing\n * @returns true if the the states and parameter values for both paths are identical\n */\n static equals(pathA: PathNode[], pathB: PathNode[], paramsFn?: GetParamsFn): boolean {\n return pathA.length === pathB.length &&\n PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length;\n }\n\n /**\n * Return a subpath of a path, which stops at the first matching node\n *\n * Given an array of nodes, returns a subset of the array starting from the first node,\n * stopping when the first node matches the predicate.\n *\n * @param path a path of [[PathNode]]s\n * @param predicate a [[Predicate]] fn that matches [[PathNode]]s\n * @returns a subpath up to the matching node, or undefined if no match is found\n */\n static subPath(path: PathNode[], predicate: Predicate): PathNode[] {\n let node = find(path, predicate);\n let elementIdx = path.indexOf(node);\n return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1);\n }\n\n /** Gets the raw parameter values from a path */\n static paramValues = (path: PathNode[]) =>\n path.reduce((acc, node) => extend(acc, node.paramValues), {});\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.d.ts new file mode 100644 index 00000000..910d0a3c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.d.ts @@ -0,0 +1,58 @@ +import { StateObject } from "../state/stateObject"; +import { RawParams } from "../params/interface"; +import { Param } from "../params/param"; +import { Resolvable } from "../resolve/resolvable"; +import { ViewConfig } from "../view/interface"; +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +export declare class PathNode { + /** The state being entered, exited, or retained */ + state: StateObject; + /** The parameters declared on the state */ + paramSchema: Param[]; + /** The parameter values that belong to the state */ + paramValues: { + [key: string]: any; + }; + /** The individual (stateful) resolvable objects that belong to the state */ + resolvables: Resolvable[]; + /** The state's declared view configuration objects */ + views: ViewConfig[]; + /** Creates a copy of a PathNode */ + constructor(node: PathNode); + /** Creates a new (empty) PathNode for a State */ + constructor(state: StateObject); + /** Sets [[paramValues]] for the node, from the values of an object hash */ + applyRawParams(params: RawParams): PathNode; + /** Gets a specific [[Param]] metadata that belongs to the node */ + parameter(name: string): Param; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + equals(node: PathNode, paramsFn?: GetParamsFn): boolean; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false; + /** Returns a clone of the PathNode */ + static clone(node: PathNode): PathNode; +} +/** @hidden */ +export declare type GetParamsFn = (pathNode: PathNode) => Param[]; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js new file mode 100644 index 00000000..500da066 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module path */ /** for typedoc */ +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var param_1 = require("../params/param"); +/** + * @internalapi + * + * A node in a [[TreeChanges]] path + * + * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. + * Each PathNode corresponds to a state being entered, exited, or retained. + * The stateful information includes parameter values and resolve data. + */ +var PathNode = /** @class */ (function () { + function PathNode(stateOrNode) { + if (stateOrNode instanceof PathNode) { + var node = stateOrNode; + this.state = node.state; + this.paramSchema = node.paramSchema.slice(); + this.paramValues = common_1.extend({}, node.paramValues); + this.resolvables = node.resolvables.slice(); + this.views = node.views && node.views.slice(); + } + else { + var state = stateOrNode; + this.state = state; + this.paramSchema = state.parameters({ inherit: false }); + this.paramValues = {}; + this.resolvables = state.resolvables.map(function (res) { return res.clone(); }); + } + } + /** Sets [[paramValues]] for the node, from the values of an object hash */ + PathNode.prototype.applyRawParams = function (params) { + var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; }; + this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return common_1.applyPairs(memo, getParamVal(pDef)); }, {}); + return this; + }; + /** Gets a specific [[Param]] metadata that belongs to the node */ + PathNode.prototype.parameter = function (name) { + return common_1.find(this.paramSchema, hof_1.propEq("id", name)); + }; + /** + * @returns true if the state and parameter values for another PathNode are + * equal to the state and param values for this PathNode + */ + PathNode.prototype.equals = function (node, paramsFn) { + var diff = this.diff(node, paramsFn); + return diff && diff.length === 0; + }; + /** + * Finds Params with different parameter values on another PathNode. + * + * Given another node (of the same state), finds the parameter values which differ. + * Returns the [[Param]] (schema objects) whose parameter values differ. + * + * Given another node for a different state, returns `false` + * + * @param node The node to compare to + * @param paramsFn A function that returns which parameters should be compared. + * @returns The [[Param]]s which differ, or null if the two nodes are for different states + */ + PathNode.prototype.diff = function (node, paramsFn) { + if (this.state !== node.state) + return false; + var params = paramsFn ? paramsFn(this) : this.paramSchema; + return param_1.Param.changed(params, this.paramValues, node.paramValues); + }; + /** Returns a clone of the PathNode */ + PathNode.clone = function (node) { + return new PathNode(node); + }; + return PathNode; +}()); +exports.PathNode = PathNode; +//# sourceMappingURL=pathNode.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js.map new file mode 100644 index 00000000..65fa34e4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/path/pathNode.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pathNode.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/path/pathNode.ts" + ], + "names": [], + "mappings": ";;AAAA,mBAAmB,CAAC,kBAAkB;AACtC,2CAAwF;AACxF,qCAAqC;AAGrC,yCAAsC;AAItC;;;;;;;;GAQG;AACH;IAgBE,kBAAY,WAAgB;QAC1B,EAAE,CAAC,CAAC,WAAW,YAAY,QAAQ,CAAC,CAAC,CAAC;YACpC,IAAI,IAAI,GAAa,WAAW,CAAC;YACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,WAAW,GAAG,eAAM,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QAChD,CA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C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,uBAAI,GAAJ,UAAK,IAAc,EAAE,QAAsB;QACzC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;YAAC,MAAM,CAAC,KAAK,CAAC;QAE5C,IAAM,MAAM,GAAY,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;QACrE,MAAM,CAAC,aAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACnE,CAAC;IAED,sCAAsC;IAC/B,cAAK,GAAZ,UAAa,IAAc;QACzB,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,eAAC;AAAD,CAAC,AA7ED,IA6EC;AA7EY,4BAAQ", + "sourcesContent": [ + "/** @module path */ /** for typedoc */\nimport {extend, applyPairs, find, allTrueR, pairs, arrayTuples} from \"../common/common\";\nimport {propEq} from \"../common/hof\";\nimport {StateObject} from \"../state/stateObject\";\nimport {RawParams} from \"../params/interface\";\nimport {Param} from \"../params/param\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {ViewConfig} from \"../view/interface\";\n\n/**\n * @internalapi\n *\n * A node in a [[TreeChanges]] path\n *\n * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path.\n * Each PathNode corresponds to a state being entered, exited, or retained.\n * The stateful information includes parameter values and resolve data.\n */\nexport class PathNode {\n /** The state being entered, exited, or retained */\n public state: StateObject;\n /** The parameters declared on the state */\n public paramSchema: Param[];\n /** The parameter values that belong to the state */\n public paramValues: { [key: string]: any };\n /** The individual (stateful) resolvable objects that belong to the state */\n public resolvables: Resolvable[];\n /** The state's declared view configuration objects */\n public views: ViewConfig[];\n\n /** Creates a copy of a PathNode */\n constructor(node: PathNode);\n /** Creates a new (empty) PathNode for a State */\n constructor(state: StateObject);\n constructor(stateOrNode: any) {\n if (stateOrNode instanceof PathNode) {\n let node: PathNode = stateOrNode;\n this.state = node.state;\n this.paramSchema = node.paramSchema.slice();\n this.paramValues = extend({}, node.paramValues);\n this.resolvables = node.resolvables.slice();\n this.views = node.views && node.views.slice();\n } else {\n let state: StateObject = stateOrNode;\n this.state = state;\n this.paramSchema = state.parameters({ inherit: false });\n this.paramValues = {};\n this.resolvables = state.resolvables.map(res => res.clone());\n }\n }\n\n /** Sets [[paramValues]] for the node, from the values of an object hash */\n applyRawParams(params: RawParams): PathNode {\n const getParamVal = (paramDef: Param) => [ paramDef.id, paramDef.value(params[paramDef.id]) ];\n this.paramValues = this.paramSchema.reduce((memo, pDef) => applyPairs(memo, getParamVal(pDef)), {});\n return this;\n }\n\n /** Gets a specific [[Param]] metadata that belongs to the node */\n parameter(name: string): Param {\n return find(this.paramSchema, propEq(\"id\", name));\n }\n\n /**\n * @returns true if the state and parameter values for another PathNode are\n * equal to the state and param values for this PathNode\n */\n equals(node: PathNode, paramsFn?: GetParamsFn): boolean {\n const diff = this.diff(node, paramsFn);\n return diff && diff.length === 0;\n }\n\n /**\n * Finds Params with different parameter values on another PathNode.\n *\n * Given another node (of the same state), finds the parameter values which differ.\n * Returns the [[Param]] (schema objects) whose parameter values differ.\n *\n * Given another node for a different state, returns `false`\n *\n * @param node The node to compare to\n * @param paramsFn A function that returns which parameters should be compared.\n * @returns The [[Param]]s which differ, or null if the two nodes are for different states\n */\n diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false {\n if (this.state !== node.state) return false;\n\n const params: Param[] = paramsFn ? paramsFn(this) : this.paramSchema;\n return Param.changed(params, this.paramValues, node.paramValues);\n }\n\n /** Returns a clone of the PathNode */\n static clone(node: PathNode) {\n return new PathNode(node);\n }\n}\n\n/** @hidden */\nexport type GetParamsFn = (pathNode: PathNode) => Param[];" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.d.ts new file mode 100644 index 00000000..803e70db --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.d.ts @@ -0,0 +1,4 @@ +/** @module resolve */ /** for typedoc */ +export * from "./interface"; +export * from "./resolvable"; +export * from "./resolveContext"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js new file mode 100644 index 00000000..08389108 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js @@ -0,0 +1,10 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module resolve */ /** for typedoc */ +__export(require("./interface")); +__export(require("./resolvable")); +__export(require("./resolveContext")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js.map new file mode 100644 index 00000000..7428dc38 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/index.ts" + ], + "names": [], + "mappings": ";;;;;AAAA,sBAAsB,CAAC,kBAAkB;AACzC,iCAA4B;AAC5B,kCAA6B;AAC7B,sCAAiC", + "sourcesContent": [ + "/** @module resolve */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./resolvable\";\nexport * from \"./resolveContext\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.d.ts new file mode 100644 index 00000000..7eb0a0fd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.d.ts @@ -0,0 +1,196 @@ +/** + * An interface which is similar to an Angular 2 `Provider` + */ +export interface ProviderLike { + provide: any; + useClass?: any; + useFactory?: Function; + useValue?: any; + useExisting?: any; + deps?: any[]; +} +/** + * A plain object used to describe a [[Resolvable]] + * + * These objects may be used in the [[StateDeclaration.resolve]] array to declare + * async data that the state or substates require. + * + * #### Example: + * ```js + * + * var state = { + * name: 'main', + * resolve: [ + * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() }, + * ], + * } + * ``` + */ +export interface ResolvableLiteral { + /** + * A Dependency Injection token + * + * This Resolvable's DI token. + * The Resolvable will be injectable elsewhere using the token. + */ + token: any; + /** + * A function which fetches the Resolvable's data + * + * A function which returns one of: + * + * - The resolved value (synchronously) + * - A promise for the resolved value + * - An Observable of the resolved value(s) + * + * This function will be provided the dependencies listed in [[deps]] as its arguments. + * The resolve system will asynchronously fetch the dependencies before invoking this function. + */ + resolveFn: Function; + /** + * Defines the Resolve Policy + * + * A policy that defines when to invoke the resolve, + * and whether to wait for async and unwrap the data + */ + policy?: ResolvePolicy; + /** + * The Dependency Injection tokens + * + * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]]. + * + * The DI tokens are references to other `Resolvables`, or to other + * services from the native DI system. + */ + deps?: any[]; + /** Pre-resolved data. */ + data?: any; +} +/** + * Defines how a resolve is processed during a transition + * + * This object is the [[StateDeclaration.resolvePolicy]] property. + * + * #### Example: + * ```js + * // Fetched when the resolve's state is being entered. + * // Wait for the promise to resolve. + * var policy1 = { when: "LAZY", async: "WAIT" } + * + * // Fetched when the Transition is starting. + * // Do not wait for the returned promise to resolve. + * // Inject the raw promise/value + * var policy2 = { when: "EAGER", async: "NOWAIT" } + * ``` + * + * The policy for a given Resolvable is merged from three sources (highest priority first): + * + * - 1) Individual resolve definition + * - 2) State definition + * - 3) Global default + * + * #### Example: + * ```js + * // Wait for an Observable to emit one item. + * // Since `wait` is not specified, it uses the `wait` + * // policy defined on the state, or the global default + * // if no `wait` policy is defined on the state + * var myResolvablePolicy = { async: "RXWAIT" } + * ``` + */ +export interface ResolvePolicy { + /** + * Defines when a Resolvable is resolved (fetched) during a transition + * + * - `LAZY` (default) + * - Resolved as the resolve's state is being entered + * - `EAGER` + * - Resolved as the transition is starting + * + * #### Example: + * Resolves for `main` and `main.home` are fetched when each state is entered. + * All of `main` resolves are processed before fetching `main.home` resolves. + * ```js + * var state = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { when: 'LAZY' }, // default + * } + * + * var state = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { when: 'LAZY' }, // default + * } + * ``` + * + * #### Example: + * Resolves for `main` and `main.home` are fetched at the same time when the transition starts. + * This happens earlier in the lifecycle than when states are entered. + * All of the `main` and `main.home` resolves are fetched as soon as possible. + * ```js + * var mainState = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { when: 'EAGER' }, + * } + * + * var homeState = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { when: 'EAGER' }, + * } + * ``` + */ + when?: PolicyWhen; + /** + * Determines the unwrapping behavior of asynchronous resolve values. + * + * - `WAIT` (default) + * - If a promise is returned from the resolveFn, wait for the promise before proceeding + * - The unwrapped value from the promise + * - `NOWAIT` + * - If a promise is returned from the resolve, do not wait for the promise. + * - Any other value returned is wrapped in a promise. + * - The promise will not be unwrapped. + * - The promise itself will be provided when the resolve is injected or bound elsewhere. + * - `RXWAIT` + * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item. + * - The Observable item will not be unwrapped. + * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere. + * + * #### Example: + * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing. + * Resolves for `main` will be provided to components wrapped in a `Promise`. + * + * The `Transition` will wait for the `main.home` resolve promises. + * Resolved values will be unwrapped before being provided to components. + * ```js + * var mainState = { + * name: 'main', + * resolve: mainResolves, // defined elsewhere + * resolvePolicy: { async: 'NOWAIT' }, + * } + * var homeState = { + * name: 'main.home', + * resolve: homeResolves, // defined elsewhere + * resolvePolicy: { async: 'WAIT' }, // default + * } + * ``` + */ + async?: PolicyAsync; +} +export declare type PolicyWhen = "LAZY" | "EAGER"; +export declare type PolicyAsync = "WAIT" | "NOWAIT" | "RXWAIT"; +/** @internalapi */ +export declare let resolvePolicies: { + when: { + LAZY: string; + EAGER: string; + }; + async: { + WAIT: string; + NOWAIT: string; + RXWAIT: string; + }; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js new file mode 100644 index 00000000..ed86e576 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @internalapi */ +exports.resolvePolicies = { + when: { + LAZY: "LAZY", + EAGER: "EAGER" + }, + async: { + WAIT: "WAIT", + NOWAIT: "NOWAIT", + RXWAIT: "RXWAIT" + } +}; +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js.map new file mode 100644 index 00000000..bbd7573e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/interface.ts" + ], + "names": [], + "mappings": ";;AA6MA,mBAAmB;AACR,QAAA,eAAe,GAAG;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC", + "sourcesContent": [ + "/**\n * # The Resolve subsystem\n *\n * This subsystem is an asynchronous, hierarchical Dependency Injection system.\n *\n * Typically, resolve is configured on a state using a [[StateDeclaration.resolve]] declaration.\n *\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {Resolvable} from \"./resolvable\";\n\n/**\n * An interface which is similar to an Angular 2 `Provider`\n */\nexport interface ProviderLike {\n provide: any,\n useClass?: any,\n useFactory?: Function,\n useValue?: any,\n useExisting?: any,\n deps?: any[]\n}\n\n/**\n * A plain object used to describe a [[Resolvable]]\n *\n * These objects may be used in the [[StateDeclaration.resolve]] array to declare\n * async data that the state or substates require.\n *\n * #### Example:\n * ```js\n *\n * var state = {\n * name: 'main',\n * resolve: [\n * { token: 'myData', deps: [MyDataApi], resolveFn: (myDataApi) => myDataApi.getData() },\n * ],\n * }\n * ```\n */\nexport interface ResolvableLiteral {\n /**\n * A Dependency Injection token\n *\n * This Resolvable's DI token.\n * The Resolvable will be injectable elsewhere using the token.\n */\n token: any;\n\n /**\n * A function which fetches the Resolvable's data\n *\n * A function which returns one of:\n *\n * - The resolved value (synchronously)\n * - A promise for the resolved value\n * - An Observable of the resolved value(s)\n *\n * This function will be provided the dependencies listed in [[deps]] as its arguments.\n * The resolve system will asynchronously fetch the dependencies before invoking this function.\n */\n resolveFn: Function;\n\n /**\n * Defines the Resolve Policy\n *\n * A policy that defines when to invoke the resolve,\n * and whether to wait for async and unwrap the data\n */\n policy?: ResolvePolicy;\n\n /**\n * The Dependency Injection tokens\n *\n * This is an array of Dependency Injection tokens for the dependencies of the [[resolveFn]].\n *\n * The DI tokens are references to other `Resolvables`, or to other\n * services from the native DI system.\n */\n deps?: any[];\n\n /** Pre-resolved data. */\n data?: any\n}\n\n/**\n * Defines how a resolve is processed during a transition\n *\n * This object is the [[StateDeclaration.resolvePolicy]] property.\n *\n * #### Example:\n * ```js\n * // Fetched when the resolve's state is being entered.\n * // Wait for the promise to resolve.\n * var policy1 = { when: \"LAZY\", async: \"WAIT\" }\n *\n * // Fetched when the Transition is starting.\n * // Do not wait for the returned promise to resolve.\n * // Inject the raw promise/value\n * var policy2 = { when: \"EAGER\", async: \"NOWAIT\" }\n * ```\n *\n * The policy for a given Resolvable is merged from three sources (highest priority first):\n *\n * - 1) Individual resolve definition\n * - 2) State definition\n * - 3) Global default\n *\n * #### Example:\n * ```js\n * // Wait for an Observable to emit one item.\n * // Since `wait` is not specified, it uses the `wait`\n * // policy defined on the state, or the global default\n * // if no `wait` policy is defined on the state\n * var myResolvablePolicy = { async: \"RXWAIT\" }\n * ```\n */\nexport interface ResolvePolicy {\n /**\n * Defines when a Resolvable is resolved (fetched) during a transition\n *\n * - `LAZY` (default)\n * - Resolved as the resolve's state is being entered\n * - `EAGER`\n * - Resolved as the transition is starting\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched when each state is entered.\n * All of `main` resolves are processed before fetching `main.home` resolves.\n * ```js\n * var state = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n *\n * var state = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'LAZY' }, // default\n * }\n * ```\n *\n * #### Example:\n * Resolves for `main` and `main.home` are fetched at the same time when the transition starts.\n * This happens earlier in the lifecycle than when states are entered.\n * All of the `main` and `main.home` resolves are fetched as soon as possible.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n *\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { when: 'EAGER' },\n * }\n * ```\n */\n when?: PolicyWhen;\n\n /**\n * Determines the unwrapping behavior of asynchronous resolve values.\n *\n * - `WAIT` (default)\n * - If a promise is returned from the resolveFn, wait for the promise before proceeding\n * - The unwrapped value from the promise\n * - `NOWAIT`\n * - If a promise is returned from the resolve, do not wait for the promise.\n * - Any other value returned is wrapped in a promise.\n * - The promise will not be unwrapped.\n * - The promise itself will be provided when the resolve is injected or bound elsewhere.\n * - `RXWAIT`\n * - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.\n * - The Observable item will not be unwrapped.\n * - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.\n *\n * #### Example:\n * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.\n * Resolves for `main` will be provided to components wrapped in a `Promise`.\n *\n * The `Transition` will wait for the `main.home` resolve promises.\n * Resolved values will be unwrapped before being provided to components.\n * ```js\n * var mainState = {\n * name: 'main',\n * resolve: mainResolves, // defined elsewhere\n * resolvePolicy: { async: 'NOWAIT' },\n * }\n * var homeState = {\n * name: 'main.home',\n * resolve: homeResolves, // defined elsewhere\n * resolvePolicy: { async: 'WAIT' }, // default\n * }\n * ```\n */\n async?: PolicyAsync;\n}\n\nexport type PolicyWhen = \"LAZY\" | \"EAGER\" ;\nexport type PolicyAsync = \"WAIT\" | \"NOWAIT\" | \"RXWAIT\" ;\n\n/** @internalapi */\nexport let resolvePolicies = {\n when: {\n LAZY: \"LAZY\",\n EAGER: \"EAGER\"\n },\n async: {\n WAIT: \"WAIT\",\n NOWAIT: \"NOWAIT\",\n RXWAIT: \"RXWAIT\"\n }\n};\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.d.ts new file mode 100644 index 00000000..4d86f117 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.d.ts @@ -0,0 +1,69 @@ +import { ResolvePolicy, ResolvableLiteral } from "./interface"; +import { ResolveContext } from "./resolveContext"; +import { Transition } from "../transition/transition"; +import { StateObject } from "../state/stateObject"; +export declare let defaultResolvePolicy: ResolvePolicy; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +export declare class Resolvable implements ResolvableLiteral { + token: any; + policy: ResolvePolicy; + resolveFn: Function; + deps: any[]; + data: any; + resolved: boolean; + promise: Promise; + /** This constructor creates a Resolvable copy */ + constructor(resolvable: Resolvable); + /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */ + constructor(resolvable: ResolvableLiteral); + /** + * This constructor creates a new `Resolvable` + * + * #### Example: + * ```js + * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]); + * + * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]); + * + * var resolvable1Clone = new Resolvable(resolvable1); + * ``` + * + * @param token The new resolvable's injection token, such as `"userList"` (a string) or `UserService` (a class). + * When this token is used during injection, the resolved value will be injected. + * @param resolveFn The function that returns the resolved value, or a promise for the resolved value + * @param deps An array of dependencies, which will be injected into the `resolveFn` + * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed + * @param data Pre-resolved data. If the resolve value is already known, it may be provided here. + */ + constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any); + getPolicy(state: StateObject): ResolvePolicy; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + resolve(resolveContext: ResolveContext, trans?: Transition): Promise; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + get(resolveContext: ResolveContext, trans?: Transition): Promise; + toString(): string; + clone(): Resolvable; + static fromData: (token: any, data: any) => Resolvable; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js new file mode 100644 index 00000000..677d40a4 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js @@ -0,0 +1,134 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module resolve + */ /** for typedoc */ +var common_1 = require("../common/common"); +var coreservices_1 = require("../common/coreservices"); +var trace_1 = require("../common/trace"); +var strings_1 = require("../common/strings"); +var predicates_1 = require("../common/predicates"); +var common_2 = require("../common"); +// TODO: explicitly make this user configurable +exports.defaultResolvePolicy = { + when: "LAZY", + async: "WAIT" +}; +/** + * The basic building block for the resolve system. + * + * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), + * and the unwrapped-when-complete (.data) result of the resolveFn. + * + * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the + * resolveFn) and returns the resulting promise. + * + * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first + * parameter to those fns. + */ +var Resolvable = /** @class */ (function () { + function Resolvable(arg1, resolveFn, deps, policy, data) { + this.resolved = false; + this.promise = undefined; + if (arg1 instanceof Resolvable) { + common_1.extend(this, arg1); + } + else if (predicates_1.isFunction(resolveFn)) { + if (common_2.isNullOrUndefined(arg1)) + throw new Error("new Resolvable(): token argument is required"); + if (!predicates_1.isFunction(resolveFn)) + throw new Error("new Resolvable(): resolveFn argument must be a function"); + this.token = arg1; + this.policy = policy; + this.resolveFn = resolveFn; + this.deps = deps || []; + this.data = data; + this.resolved = data !== undefined; + this.promise = this.resolved ? coreservices_1.services.$q.when(this.data) : undefined; + } + else if (predicates_1.isObject(arg1) && arg1.token && predicates_1.isFunction(arg1.resolveFn)) { + var literal = arg1; + return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data); + } + } + Resolvable.prototype.getPolicy = function (state) { + var thisPolicy = this.policy || {}; + var statePolicy = state && state.resolvePolicy || {}; + return { + when: thisPolicy.when || statePolicy.when || exports.defaultResolvePolicy.when, + async: thisPolicy.async || statePolicy.async || exports.defaultResolvePolicy.async, + }; + }; + /** + * Asynchronously resolve this Resolvable's data + * + * Given a ResolveContext that this Resolvable is found in: + * Wait for this Resolvable's dependencies, then invoke this Resolvable's function + * and update the Resolvable's state + */ + Resolvable.prototype.resolve = function (resolveContext, trans) { + var _this = this; + var $q = coreservices_1.services.$q; + // Gets all dependencies from ResolveContext and wait for them to be resolved + var getResolvableDependencies = function () { + return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { + return resolvable.get(resolveContext, trans); + })); + }; + // Invokes the resolve function passing the resolved dependencies as arguments + var invokeResolveFn = function (resolvedDeps) { + return _this.resolveFn.apply(null, resolvedDeps); + }; + /** + * For RXWAIT policy: + * + * Given an observable returned from a resolve function: + * - enables .cache() mode (this allows multicast subscribers) + * - then calls toPromise() (this triggers subscribe() and thus fetches) + * - Waits for the promise, then return the cached observable (not the first emitted value). + */ + var waitForRx = function (observable$) { + var cached = observable$.cache(1); + return cached.take(1).toPromise().then(function () { return cached; }); + }; + // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through. + var node = resolveContext.findNode(this); + var state = node && node.state; + var maybeWaitForRx = this.getPolicy(state).async === "RXWAIT" ? waitForRx : common_1.identity; + // After the final value has been resolved, update the state of the Resolvable + var applyResolvedValue = function (resolvedValue) { + _this.data = resolvedValue; + _this.resolved = true; + trace_1.trace.traceResolvableResolved(_this, trans); + return _this.data; + }; + // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick. + return this.promise = $q.when() + .then(getResolvableDependencies) + .then(invokeResolveFn) + .then(maybeWaitForRx) + .then(applyResolvedValue); + }; + /** + * Gets a promise for this Resolvable's data. + * + * Fetches the data and returns a promise. + * Returns the existing promise if it has already been fetched once. + */ + Resolvable.prototype.get = function (resolveContext, trans) { + return this.promise || this.resolve(resolveContext, trans); + }; + Resolvable.prototype.toString = function () { + return "Resolvable(token: " + strings_1.stringify(this.token) + ", requires: [" + this.deps.map(strings_1.stringify) + "])"; + }; + Resolvable.prototype.clone = function () { + return new Resolvable(this); + }; + Resolvable.fromData = function (token, data) { + return new Resolvable(token, function () { return data; }, null, null, data); + }; + return Resolvable; +}()); +exports.Resolvable = Resolvable; +//# sourceMappingURL=resolvable.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js.map new file mode 100644 index 00000000..094cd109 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolvable.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolvable.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/resolvable.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,kBAAkB;AACtB,2CAAmE;AACnE,uDAAgD;AAChD,yCAAsC;AAItC,6CAA4C;AAC5C,mDAA0D;AAI1D,oCAA8C;AAG9C,+CAA+C;AACpC,QAAA,oBAAoB,GAAkB;IAC/C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;;;;;;;;;;;GAWG;AACH;IAoCE,oBAAY,IAAS,EAAE,SAAoB,EAAE,IAAY,EAAE,MAAsB,EAAE,IAAU;QA7B7F,aAAQ,GAAY,KAAK,CAAC;QAC1B,YAAO,GAAiB,SAAS,CAAC;QA6BhC,EAAE,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC,CAAC,CAAC;YAC/B,eAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,uBAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,0BAAiB,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAC7F,EAAE,CAAC,CAAC,CAAC,uBAAU,CAAC,SAAS,CAAC,CAAC;gBAAC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAEvG,IAAI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AAE,KAAK,CAAC,CAAC;YAC3C,MAAM,CAAC,KAAI,CAAC,IAAI,CAAC;QACnB,CAAC,CAAC;QAEF,+HAA+H;QAC/H,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE;aAC1B,IAAI,CAAC,yBAAyB,CAAC;aAC/B,IAAI,CAAC,eAAe,CAAC;aACrB,IAAI,CAAC,cAAc,CAAC;aACpB,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,wBAAG,GAAH,UAAI,cAA8B,EAAE,KAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED,6BAAQ,GAAR;QACE,MAAM,CAAC,uBAAqB,mBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAgB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAS,CAAC,OAAI,CAAC;IAChG,CAAC;IAED,0BAAK,GAAL;QACE,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,mBAAQ,GAAG,UAAC,KAAU,EAAE,IAAS;QACpC,OAAA,IAAI,UAAU,CAAC,KAAK,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAAnD,CAAmD,CAAC;IAC1D,iBAAC;CAAA,AA3ID,IA2IC;AA3IY,gCAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module resolve\n */ /** for typedoc */\nimport {extend, equals, inArray, identity} from \"../common/common\";\nimport {services} from \"../common/coreservices\";\nimport {trace} from \"../common/trace\";\nimport {ResolvePolicy, ResolvableLiteral, resolvePolicies} from \"./interface\";\n\nimport {ResolveContext} from \"./resolveContext\";\nimport {stringify} from \"../common/strings\";\nimport {isFunction, isObject} from \"../common/predicates\";\nimport {Transition} from \"../transition/transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport { isNullOrUndefined } from '../common';\n\n\n// TODO: explicitly make this user configurable\nexport let defaultResolvePolicy: ResolvePolicy = {\n when: \"LAZY\",\n async: \"WAIT\"\n};\n\n/**\n * The basic building block for the resolve system.\n *\n * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),\n * and the unwrapped-when-complete (.data) result of the resolveFn.\n *\n * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the\n * resolveFn) and returns the resulting promise.\n *\n * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first\n * parameter to those fns.\n */\nexport class Resolvable implements ResolvableLiteral {\n token: any;\n policy: ResolvePolicy;\n resolveFn: Function;\n deps: any[];\n\n data: any;\n resolved: boolean = false;\n promise: Promise = undefined;\n\n /** This constructor creates a Resolvable copy */\n constructor(resolvable: Resolvable)\n\n /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */\n constructor(resolvable: ResolvableLiteral)\n\n /**\n * This constructor creates a new `Resolvable`\n *\n * #### Example:\n * ```js\n * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);\n *\n * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);\n *\n * var resolvable1Clone = new Resolvable(resolvable1);\n * ```\n *\n * @param token The new resolvable's injection token, such as `\"userList\"` (a string) or `UserService` (a class).\n * When this token is used during injection, the resolved value will be injected.\n * @param resolveFn The function that returns the resolved value, or a promise for the resolved value\n * @param deps An array of dependencies, which will be injected into the `resolveFn`\n * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed\n * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.\n */\n constructor(token: any, resolveFn: Function, deps?: any[], policy?: ResolvePolicy, data?: any)\n constructor(arg1: any, resolveFn?: Function, deps?: any[], policy?: ResolvePolicy, data?: any) {\n if (arg1 instanceof Resolvable) {\n extend(this, arg1);\n } else if (isFunction(resolveFn)) {\n if (isNullOrUndefined(arg1)) throw new Error(\"new Resolvable(): token argument is required\");\n if (!isFunction(resolveFn)) throw new Error(\"new Resolvable(): resolveFn argument must be a function\");\n\n this.token = arg1;\n this.policy = policy;\n this.resolveFn = resolveFn;\n this.deps = deps || [];\n\n this.data = data;\n this.resolved = data !== undefined;\n this.promise = this.resolved ? services.$q.when(this.data) : undefined;\n } else if (isObject(arg1) && arg1.token && isFunction(arg1.resolveFn)) {\n let literal = arg1;\n return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data);\n }\n }\n\n getPolicy(state: StateObject): ResolvePolicy {\n let thisPolicy = this.policy || {};\n let statePolicy = state && state.resolvePolicy || {};\n return {\n when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when,\n async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async,\n };\n }\n\n /**\n * Asynchronously resolve this Resolvable's data\n *\n * Given a ResolveContext that this Resolvable is found in:\n * Wait for this Resolvable's dependencies, then invoke this Resolvable's function\n * and update the Resolvable's state\n */\n resolve(resolveContext: ResolveContext, trans?: Transition) {\n let $q = services.$q;\n\n // Gets all dependencies from ResolveContext and wait for them to be resolved\n const getResolvableDependencies = () =>\n $q.all(resolveContext.getDependencies(this).map(resolvable =>\n resolvable.get(resolveContext, trans))) as Promise;\n\n // Invokes the resolve function passing the resolved dependencies as arguments\n const invokeResolveFn = (resolvedDeps: any[]) =>\n this.resolveFn.apply(null, resolvedDeps);\n\n /**\n * For RXWAIT policy:\n *\n * Given an observable returned from a resolve function:\n * - enables .cache() mode (this allows multicast subscribers)\n * - then calls toPromise() (this triggers subscribe() and thus fetches)\n * - Waits for the promise, then return the cached observable (not the first emitted value).\n */\n const waitForRx = (observable$: any) => {\n let cached = observable$.cache(1);\n return cached.take(1).toPromise().then(() => cached);\n };\n\n // If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.\n let node: PathNode = resolveContext.findNode(this);\n let state: StateObject = node && node.state;\n let maybeWaitForRx = this.getPolicy(state).async === \"RXWAIT\" ? waitForRx : identity;\n\n // After the final value has been resolved, update the state of the Resolvable\n const applyResolvedValue = (resolvedValue: any) => {\n this.data = resolvedValue;\n this.resolved = true;\n trace.traceResolvableResolved(this, trans);\n return this.data;\n };\n\n // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick.\n return this.promise = $q.when()\n .then(getResolvableDependencies)\n .then(invokeResolveFn)\n .then(maybeWaitForRx)\n .then(applyResolvedValue);\n }\n\n /**\n * Gets a promise for this Resolvable's data.\n *\n * Fetches the data and returns a promise.\n * Returns the existing promise if it has already been fetched once.\n */\n get(resolveContext: ResolveContext, trans?: Transition): Promise {\n return this.promise || this.resolve(resolveContext, trans);\n }\n\n toString() {\n return `Resolvable(token: ${stringify(this.token)}, requires: [${this.deps.map(stringify)}])`;\n }\n\n clone(): Resolvable {\n return new Resolvable(this);\n }\n \n static fromData = (token: any, data: any) => \n new Resolvable(token, () => data, null, null, data);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.d.ts new file mode 100644 index 00000000..300b404f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.d.ts @@ -0,0 +1,92 @@ +import { PolicyWhen, ResolvePolicy } from "./interface"; +import { PathNode } from "../path/pathNode"; +import { Resolvable } from "./resolvable"; +import { StateObject } from "../state/stateObject"; +import { Transition } from "../transition/transition"; +import { UIInjector } from "../interface"; +export declare const NATIVE_INJECTOR_TOKEN: string; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +export declare class ResolveContext { + private _path; + _injector: UIInjector; + constructor(_path: PathNode[]); + /** Gets all the tokens found in the resolve context, de-duplicated */ + getTokens(): any[]; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + getResolvable(token: any): Resolvable; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + getPolicy(resolvable: Resolvable): ResolvePolicy; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + subContext(state: StateObject): ResolveContext; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + addResolvables(newResolvables: Resolvable[], state: StateObject): void; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + resolvePath(when?: PolicyWhen, trans?: Transition): Promise<{ + token: any; + value: any; + }[]>; + injector(): UIInjector; + findNode(resolvable: Resolvable): PathNode; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + getDependencies(resolvable: Resolvable): Resolvable[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js new file mode 100644 index 00000000..36dd4cb1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js @@ -0,0 +1,201 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module resolve */ +/** for typedoc */ +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var trace_1 = require("../common/trace"); +var coreservices_1 = require("../common/coreservices"); +var interface_1 = require("./interface"); +var resolvable_1 = require("./resolvable"); +var pathFactory_1 = require("../path/pathFactory"); +var strings_1 = require("../common/strings"); +var common_2 = require("../common"); +var whens = interface_1.resolvePolicies.when; +var ALL_WHENS = [whens.EAGER, whens.LAZY]; +var EAGER_WHENS = [whens.EAGER]; +exports.NATIVE_INJECTOR_TOKEN = "Native Injector"; +/** + * Encapsulates Dependency Injection for a path of nodes + * + * UI-Router states are organized as a tree. + * A nested state has a path of ancestors to the root of the tree. + * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. + * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. + * + * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. + */ +var ResolveContext = /** @class */ (function () { + function ResolveContext(_path) { + this._path = _path; + } + /** Gets all the tokens found in the resolve context, de-duplicated */ + ResolveContext.prototype.getTokens = function () { + return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(common_1.uniqR, []); + }; + /** + * Gets the Resolvable that matches the token + * + * Gets the last Resolvable that matches the token in this context, or undefined. + * Throws an error if it doesn't exist in the ResolveContext + */ + ResolveContext.prototype.getResolvable = function (token) { + var matching = this._path.map(function (node) { return node.resolvables; }) + .reduce(common_1.unnestR, []) + .filter(function (r) { return r.token === token; }); + return common_1.tail(matching); + }; + /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ + ResolveContext.prototype.getPolicy = function (resolvable) { + var node = this.findNode(resolvable); + return resolvable.getPolicy(node.state); + }; + /** + * Returns a ResolveContext that includes a portion of this one + * + * Given a state, this method creates a new ResolveContext from this one. + * The new context starts at the first node (root) and stops at the node for the `state` parameter. + * + * #### Why + * + * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. + * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. + * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). + * This method is used to create a narrower context when injecting ancestor nodes. + * + * @example + * `let ABCD = new ResolveContext([A, B, C, D]);` + * + * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: + * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. + * However, `B` should only be able to access resolvables from `A`, `B`. + * + * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. + * `let AB = ABCD.subcontext(a)` + */ + ResolveContext.prototype.subContext = function (state) { + return new ResolveContext(pathFactory_1.PathUtils.subPath(this._path, function (node) { return node.state === state; })); + }; + /** + * Adds Resolvables to the node that matches the state + * + * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). + * The resolvable is added to the node matching the `state` parameter. + * + * These new resolvables are not automatically fetched. + * The calling code should either fetch them, fetch something that depends on them, + * or rely on [[resolvePath]] being called when some state is being entered. + * + * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. + * + * @param newResolvables the new Resolvables + * @param state Used to find the node to put the resolvable on + */ + ResolveContext.prototype.addResolvables = function (newResolvables, state) { + var node = common_1.find(this._path, hof_1.propEq('state', state)); + var keys = newResolvables.map(function (r) { return r.token; }); + node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables); + }; + /** + * Returns a promise for an array of resolved path Element promises + * + * @param when + * @param trans + * @returns {Promise|any} + */ + ResolveContext.prototype.resolvePath = function (when, trans) { + var _this = this; + if (when === void 0) { when = "LAZY"; } + // This option determines which 'when' policy Resolvables we are about to fetch. + var whenOption = common_1.inArray(ALL_WHENS, when) ? when : "LAZY"; + // If the caller specified EAGER, only the EAGER Resolvables are fetched. + // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.` + var matchedWhens = whenOption === interface_1.resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS; + // get the subpath to the state argument, if provided + trace_1.trace.traceResolvePath(this._path, when, trans); + var matchesPolicy = function (acceptedVals, whenOrAsync) { + return function (resolvable) { + return common_1.inArray(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]); + }; + }; + // Trigger all the (matching) Resolvables in the path + // Reduce all the "WAIT" Resolvables into an array + var promises = this._path.reduce(function (acc, node) { + var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when')); + var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async')); + var wait = nodeResolvables.filter(hof_1.not(matchesPolicy(['NOWAIT'], 'async'))); + // For the matching Resolvables, start their async fetch process. + var subContext = _this.subContext(node.state); + var getResult = function (r) { return r.get(subContext, trans) + .then(function (value) { return ({ token: r.token, value: value }); }); }; + nowait.forEach(getResult); + return acc.concat(wait.map(getResult)); + }, []); + // Wait for all the "WAIT" resolvables + return coreservices_1.services.$q.all(promises); + }; + ResolveContext.prototype.injector = function () { + return this._injector || (this._injector = new UIInjectorImpl(this)); + }; + ResolveContext.prototype.findNode = function (resolvable) { + return common_1.find(this._path, function (node) { return common_1.inArray(node.resolvables, resolvable); }); + }; + /** + * Gets the async dependencies of a Resolvable + * + * Given a Resolvable, returns its dependencies as a Resolvable[] + */ + ResolveContext.prototype.getDependencies = function (resolvable) { + var _this = this; + var node = this.findNode(resolvable); + // Find which other resolvables are "visible" to the `resolvable` argument + // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path) + var subPath = pathFactory_1.PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path; + var availableResolvables = subPath + .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) //all of subpath's resolvables + .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument + var getDependency = function (token) { + var matching = availableResolvables.filter(function (r) { return r.token === token; }); + if (matching.length) + return common_1.tail(matching); + var fromInjector = _this.injector().getNative(token); + if (common_2.isUndefined(fromInjector)) { + throw new Error("Could not find Dependency Injection token: " + strings_1.stringify(token)); + } + return new resolvable_1.Resolvable(token, function () { return fromInjector; }, [], fromInjector); + }; + return resolvable.deps.map(getDependency); + }; + return ResolveContext; +}()); +exports.ResolveContext = ResolveContext; +var UIInjectorImpl = /** @class */ (function () { + function UIInjectorImpl(context) { + this.context = context; + this.native = this.get(exports.NATIVE_INJECTOR_TOKEN) || coreservices_1.services.$injector; + } + UIInjectorImpl.prototype.get = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) { + if (this.context.getPolicy(resolvable).async === 'NOWAIT') { + return resolvable.get(this.context); + } + if (!resolvable.resolved) { + throw new Error("Resolvable async .get() not complete:" + strings_1.stringify(resolvable.token)); + } + return resolvable.data; + } + return this.getNative(token); + }; + UIInjectorImpl.prototype.getAsync = function (token) { + var resolvable = this.context.getResolvable(token); + if (resolvable) + return resolvable.get(this.context); + return coreservices_1.services.$q.when(this.native.get(token)); + }; + UIInjectorImpl.prototype.getNative = function (token) { + return this.native && this.native.get(token); + }; + return UIInjectorImpl; +}()); +//# sourceMappingURL=resolveContext.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js.map new file mode 100644 index 00000000..7babd609 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/resolve/resolveContext.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "resolveContext.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/resolve/resolveContext.ts" + ], + "names": [], + "mappings": ";;AAAA,sBAAsB;AACtB,kBAAkB;AAClB,2CAAuE;AACvE,qCAA4C;AAC5C,yCAAwC;AACxC,uDAAiE;AACjE,yCAAyE;AAEzE,2CAA0C;AAE1C,mDAAgD;AAChD,6CAA8C;AAG9C,oCAAwC;AAExC,IAAM,KAAK,GAAG,2BAAe,CAAC,IAAI,CAAC;AACnC,IAAM,SAAS,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAM,WAAW,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAErB,QAAA,qBAAqB,GAAW,iBAAiB,CAAC;AAE/D;;;;;;;;;GASG;AACH;IAGE,wBAAoB,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAI,CAAC;IAE1C,sEAAsE;IACtE,kCAAS,GAAT;QACE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,EAA9C,CAA8C,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,cAAK,EAAE,EAAE,CAAC,CAAC;IAChH,CAAC;IAED;;;;;OAKG;IACH,sCAAa,GAAb,UAAc,KAAU;QACtB,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,WAAW,EAAhB,CAAgB,CAAC;aAClD,MAAM,CAAC,gBAAO,EAAE,EAAE,CAAC;aACnB,MAAM,CAAC,UAAC,CAAa,I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,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACf,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC1D,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtC,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,mBAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;YACxF,CAAC;YACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;QACzB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,iCAAQ,GAAR,UAAS,KAAU;QACjB,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnD,EAAE,CAAC,CAAC,UAAU,CAAC;YAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,MAAM,CAAC,uBAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,kCAAS,GAAT,UAAU,KAAU;QAClB,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACH,qBAAC;AAAD,CAAC,AAhCD,IAgCC", + "sourcesContent": [ + "/** @module resolve */\n/** for typedoc */\nimport { find, tail, uniqR, unnestR, inArray } from \"../common/common\";\nimport { propEq, not } from \"../common/hof\";\nimport { trace } from \"../common/trace\";\nimport { services, $InjectorLike } from \"../common/coreservices\";\nimport { resolvePolicies, PolicyWhen, ResolvePolicy } from \"./interface\";\nimport { PathNode } from \"../path/pathNode\";\nimport { Resolvable } from \"./resolvable\";\nimport { StateObject } from \"../state/stateObject\";\nimport { PathUtils } from \"../path/pathFactory\";\nimport { stringify } from \"../common/strings\";\nimport { Transition } from \"../transition/transition\";\nimport { UIInjector } from \"../interface\";\nimport { isUndefined } from '../common';\n\nconst whens = resolvePolicies.when;\nconst ALL_WHENS = [whens.EAGER, whens.LAZY];\nconst EAGER_WHENS = [whens.EAGER];\n\nexport const NATIVE_INJECTOR_TOKEN: string = \"Native Injector\";\n\n/**\n * Encapsulates Dependency Injection for a path of nodes\n *\n * UI-Router states are organized as a tree.\n * A nested state has a path of ancestors to the root of the tree.\n * When a state is being activated, each element in the path is wrapped as a [[PathNode]].\n * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.\n *\n * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.\n */\nexport class ResolveContext {\n _injector: UIInjector;\n\n constructor(private _path: PathNode[]) { }\n\n /** Gets all the tokens found in the resolve context, de-duplicated */\n getTokens(): any[] {\n return this._path.reduce((acc, node) => acc.concat(node.resolvables.map(r => r.token)), []).reduce(uniqR, []);\n }\n\n /**\n * Gets the Resolvable that matches the token\n *\n * Gets the last Resolvable that matches the token in this context, or undefined.\n * Throws an error if it doesn't exist in the ResolveContext\n */\n getResolvable(token: any): Resolvable {\n let matching = this._path.map(node => node.resolvables)\n .reduce(unnestR, [])\n .filter((r: Resolvable) => r.token === token);\n return tail(matching);\n }\n\n /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */\n getPolicy(resolvable: Resolvable): ResolvePolicy {\n let node = this.findNode(resolvable);\n return resolvable.getPolicy(node.state);\n }\n\n /**\n * Returns a ResolveContext that includes a portion of this one\n *\n * Given a state, this method creates a new ResolveContext from this one.\n * The new context starts at the first node (root) and stops at the node for the `state` parameter.\n *\n * #### Why\n *\n * When a transition is created, the nodes in the \"To Path\" are injected from a ResolveContext.\n * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.\n * The \"To State\" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).\n * This method is used to create a narrower context when injecting ancestor nodes.\n *\n * @example\n * `let ABCD = new ResolveContext([A, B, C, D]);`\n *\n * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:\n * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.\n * However, `B` should only be able to access resolvables from `A`, `B`.\n *\n * When resolving for the `B` node, first take the full \"To Path\" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.\n * `let AB = ABCD.subcontext(a)`\n */\n subContext(state: StateObject): ResolveContext {\n return new ResolveContext(PathUtils.subPath(this._path, node => node.state === state));\n }\n\n /**\n * Adds Resolvables to the node that matches the state\n *\n * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).\n * The resolvable is added to the node matching the `state` parameter.\n *\n * These new resolvables are not automatically fetched.\n * The calling code should either fetch them, fetch something that depends on them,\n * or rely on [[resolvePath]] being called when some state is being entered.\n *\n * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.\n *\n * @param newResolvables the new Resolvables\n * @param state Used to find the node to put the resolvable on\n */\n addResolvables(newResolvables: Resolvable[], state: StateObject) {\n let node = find(this._path, propEq('state', state));\n let keys = newResolvables.map(r => r.token);\n node.resolvables = node.resolvables.filter(r => keys.indexOf(r.token) === -1).concat(newResolvables);\n }\n\n /**\n * Returns a promise for an array of resolved path Element promises\n *\n * @param when\n * @param trans\n * @returns {Promise|any}\n */\n resolvePath(when: PolicyWhen = \"LAZY\", trans?: Transition): Promise<{ token: any, value: any }[]> {\n // This option determines which 'when' policy Resolvables we are about to fetch.\n let whenOption: string = inArray(ALL_WHENS, when) ? when : \"LAZY\";\n // If the caller specified EAGER, only the EAGER Resolvables are fetched.\n // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.`\n let matchedWhens = whenOption === resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS;\n\n // get the subpath to the state argument, if provided\n trace.traceResolvePath(this._path, when, trans);\n\n const matchesPolicy = (acceptedVals: string[], whenOrAsync: \"when\"|\"async\") =>\n (resolvable: Resolvable) =>\n inArray(acceptedVals, this.getPolicy(resolvable)[whenOrAsync]);\n\n // Trigger all the (matching) Resolvables in the path\n // Reduce all the \"WAIT\" Resolvables into an array\n let promises: Promise[] = this._path.reduce((acc, node) => {\n let nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when'));\n let nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async'));\n let wait = nodeResolvables.filter(not(matchesPolicy(['NOWAIT'], 'async')));\n\n // For the matching Resolvables, start their async fetch process.\n let subContext = this.subContext(node.state);\n let getResult = (r: Resolvable) => r.get(subContext, trans)\n // Return a tuple that includes the Resolvable's token\n .then(value => ({ token: r.token, value: value }));\n nowait.forEach(getResult);\n return acc.concat(wait.map(getResult));\n }, []);\n\n // Wait for all the \"WAIT\" resolvables\n return services.$q.all(promises);\n }\n\n injector(): UIInjector {\n return this._injector || (this._injector = new UIInjectorImpl(this));\n }\n\n findNode(resolvable: Resolvable): PathNode {\n return find(this._path, (node: PathNode) => inArray(node.resolvables, resolvable));\n }\n\n /**\n * Gets the async dependencies of a Resolvable\n *\n * Given a Resolvable, returns its dependencies as a Resolvable[]\n */\n getDependencies(resolvable: Resolvable): Resolvable[] {\n let node = this.findNode(resolvable);\n // Find which other resolvables are \"visible\" to the `resolvable` argument\n // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path)\n let subPath: PathNode[] = PathUtils.subPath(this._path, x => x === node) || this._path;\n let availableResolvables: Resolvable[] = subPath\n .reduce((acc, _node) => acc.concat(_node.resolvables), []) //all of subpath's resolvables\n .filter(res => res !== resolvable); // filter out the `resolvable` argument\n\n const getDependency = (token: any) => {\n let matching = availableResolvables.filter(r => r.token === token);\n if (matching.length) return tail(matching);\n\n let fromInjector = this.injector().getNative(token);\n if (isUndefined(fromInjector)) {\n throw new Error(\"Could not find Dependency Injection token: \" + stringify(token));\n }\n\n return new Resolvable(token, () => fromInjector, [], fromInjector);\n };\n\n return resolvable.deps.map(getDependency);\n }\n}\n\nclass UIInjectorImpl implements UIInjector {\n native: $InjectorLike;\n\n constructor(public context: ResolveContext) {\n this.native = this.get(NATIVE_INJECTOR_TOKEN) || services.$injector;\n }\n\n get(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) {\n if (this.context.getPolicy(resolvable).async === 'NOWAIT') {\n return resolvable.get(this.context);\n }\n\n if (!resolvable.resolved) {\n throw new Error(\"Resolvable async .get() not complete:\" + stringify(resolvable.token))\n }\n return resolvable.data;\n }\n\n return this.getNative(token);\n }\n\n getAsync(token: any) {\n let resolvable = this.context.getResolvable(token);\n if (resolvable) return resolvable.get(this.context);\n return services.$q.when(this.native.get(token));\n }\n\n getNative(token: any) {\n return this.native && this.native.get(token);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/router.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/router.d.ts new file mode 100644 index 00000000..a35810c8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/router.d.ts @@ -0,0 +1,107 @@ +/** + * @coreapi + * @module core + */ /** */ +import { UrlMatcherFactory } from "./url/urlMatcherFactory"; +import { UrlRouter } from "./url/urlRouter"; +import { TransitionService } from "./transition/transitionService"; +import { ViewService } from "./view/view"; +import { StateRegistry } from "./state/stateRegistry"; +import { StateService } from "./state/stateService"; +import { UIRouterGlobals } from "./globals"; +import { UIRouterPlugin, Disposable } from "./interface"; +import { UrlService } from "./url/urlService"; +import { LocationServices, LocationConfig } from "./common/coreservices"; +import { Trace } from "./common/trace"; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +export declare class UIRouter { + locationService: LocationServices; + locationConfig: LocationConfig; + /** @hidden */ $id: number; + /** @hidden */ _disposed: boolean; + /** @hidden */ private _disposables; + /** Provides trace information to the console */ + trace: Trace; + /** Provides services related to ui-view synchronization */ + viewService: ViewService; + /** Provides services related to Transitions */ + transitionService: TransitionService; + /** Global router state */ + globals: UIRouterGlobals; + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + urlMatcherFactory: UrlMatcherFactory; + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + urlRouter: UrlRouter; + /** Provides a registry for states, and related registration services */ + stateRegistry: StateRegistry; + /** Provides services related to states */ + stateService: StateService; + /** Provides services related to the URL */ + urlService: UrlService; + /** Registers an object to be notified when the router is disposed */ + disposable(disposable: Disposable): void; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + dispose(disposable?: any): void; + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + constructor(locationService?: LocationServices, locationConfig?: LocationConfig); + /** @hidden */ + private _plugins; + /** Add plugin (as ES6 class) */ + plugin(plugin: { + new (router: UIRouter, options?: any): T; + }, options?: any): T; + /** Add plugin (as javascript constructor function) */ + plugin(plugin: { + (router: UIRouter, options?: any): void; + }, options?: any): T; + /** Add plugin (as javascript factory function) */ + plugin(plugin: PluginFactory, options?: any): T; + /** + * Returns registered plugins + * + * Returns the registered plugin of the given `pluginName`. + * If no `pluginName` is given, returns all registered plugins + * + * @param pluginName (optional) the name of the plugin to get + * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted) + */ + getPlugin(pluginName: string): UIRouterPlugin; + getPlugin(): UIRouterPlugin[]; +} +/** @internalapi */ +export declare type PluginFactory = (router: UIRouter, options?: any) => T; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/router.js b/public/app/vendor/node_modules/@uirouter/core/lib/router.js new file mode 100644 index 00000000..cb3a4180 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/router.js @@ -0,0 +1,184 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module core + */ /** */ +var urlMatcherFactory_1 = require("./url/urlMatcherFactory"); +var urlRouter_1 = require("./url/urlRouter"); +var transitionService_1 = require("./transition/transitionService"); +var view_1 = require("./view/view"); +var stateRegistry_1 = require("./state/stateRegistry"); +var stateService_1 = require("./state/stateService"); +var globals_1 = require("./globals"); +var common_1 = require("./common/common"); +var predicates_1 = require("./common/predicates"); +var urlService_1 = require("./url/urlService"); +var trace_1 = require("./common/trace"); +/** @hidden */ +var _routerInstance = 0; +/** + * The master class used to instantiate an instance of UI-Router. + * + * UI-Router (for each specific framework) will create an instance of this class during bootstrap. + * This class instantiates and wires the UI-Router services together. + * + * After a new instance of the UIRouter class is created, it should be configured for your app. + * For instance, app states should be registered with the [[UIRouter.stateRegistry]]. + * + * --- + * + * Normally the framework code will bootstrap UI-Router. + * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling + * [[UrlService.listen]] then [[UrlService.sync]]. + */ +var UIRouter = /** @class */ (function () { + /** + * Creates a new `UIRouter` object + * + * @param locationService a [[LocationServices]] implementation + * @param locationConfig a [[LocationConfig]] implementation + * @internalapi + */ + function UIRouter(locationService, locationConfig) { + if (locationService === void 0) { locationService = urlService_1.UrlService.locationServiceStub; } + if (locationConfig === void 0) { locationConfig = urlService_1.UrlService.locationConfigStub; } + this.locationService = locationService; + this.locationConfig = locationConfig; + /** @hidden */ this.$id = _routerInstance++; + /** @hidden */ this._disposed = false; + /** @hidden */ this._disposables = []; + /** Provides trace information to the console */ + this.trace = trace_1.trace; + /** Provides services related to ui-view synchronization */ + this.viewService = new view_1.ViewService(); + /** Provides services related to Transitions */ + this.transitionService = new transitionService_1.TransitionService(this); + /** Global router state */ + this.globals = new globals_1.UIRouterGlobals(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlMatcherFactory = new urlMatcherFactory_1.UrlMatcherFactory(); + /** + * Deprecated for public use. Use [[urlService]] instead. + * @deprecated Use [[urlService]] instead + */ + this.urlRouter = new urlRouter_1.UrlRouter(this); + /** Provides a registry for states, and related registration services */ + this.stateRegistry = new stateRegistry_1.StateRegistry(this); + /** Provides services related to states */ + this.stateService = new stateService_1.StateService(this); + /** Provides services related to the URL */ + this.urlService = new urlService_1.UrlService(this); + /** @hidden */ + 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(locationService); + this.disposable(locationConfig); + } + /** Registers an object to be notified when the router is disposed */ + UIRouter.prototype.disposable = function (disposable) { + this._disposables.push(disposable); + }; + /** + * Disposes this router instance + * + * When called, clears resources retained by the router by calling `dispose(this)` on all + * registered [[disposable]] objects. + * + * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. + * + * @param disposable (optional) the disposable to dispose + */ + UIRouter.prototype.dispose = function (disposable) { + var _this = this; + if (disposable && predicates_1.isFunction(disposable.dispose)) { + disposable.dispose(this); + return undefined; + } + this._disposed = true; + this._disposables.slice().forEach(function (d) { + try { + typeof d.dispose === 'function' && d.dispose(_this); + common_1.removeFrom(_this._disposables, d); + } + catch (ignored) { } + }); + }; + /** + * Adds a plugin to UI-Router + * + * This method adds a UI-Router Plugin. + * A plugin can enhance or change UI-Router behavior using any public API. + * + * #### Example: + * ```js + * import { MyCoolPlugin } from "ui-router-cool-plugin"; + * + * var plugin = router.addPlugin(MyCoolPlugin); + * ``` + * + * ### Plugin authoring + * + * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object. + * + * The plugin can implement its functionality using any of the public APIs of [[UIRouter]]. + * For example, it may configure router options or add a Transition Hook. + * + * The plugin can then be published as a separate module. + * + * #### Example: + * ```js + * export class MyAuthPlugin implements UIRouterPlugin { + * constructor(router: UIRouter, options: any) { + * this.name = "MyAuthPlugin"; + * let $transitions = router.transitionService; + * let $state = router.stateService; + * + * let authCriteria = { + * to: (state) => state.data && state.data.requiresAuth + * }; + * + * function authHook(transition: Transition) { + * let authService = transition.injector().get('AuthService'); + * if (!authService.isAuthenticated()) { + * return $state.target('login'); + * } + * } + * + * $transitions.onStart(authCriteria, authHook); + * } + * } + * ``` + * + * @param plugin one of: + * - a plugin class which implements [[UIRouterPlugin]] + * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance + * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance + * @param options options to pass to the plugin class/factory + * @returns the registered plugin instance + */ + UIRouter.prototype.plugin = function (plugin, options) { + if (options === void 0) { options = {}; } + var pluginInstance = new plugin(this, options); + if (!pluginInstance.name) + throw new Error("Required property `name` missing on plugin: " + pluginInstance); + this._disposables.push(pluginInstance); + return this._plugins[pluginInstance.name] = pluginInstance; + }; + UIRouter.prototype.getPlugin = function (pluginName) { + return pluginName ? this._plugins[pluginName] : common_1.values(this._plugins); + }; + return UIRouter; +}()); +exports.UIRouter = UIRouter; +//# sourceMappingURL=router.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/router.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/router.js.map new file mode 100644 index 00000000..34c8e019 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/router.js.map @@ -0,0 +1,13 @@ +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,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,UAAA,CAAC;YACjC,IAAI,CAAC;gBACH,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,IAAI,CAAC,CAAC,OAAO,CAAC,KAAI,CAAC,CAAC;gBACnD,mBAAU,CAAC,KAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YACnC,CAAC;YAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAoCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;IACH,yBAAM,GAAN,UAAiC,MAAW,EAAE,OAAiB;QAAjB,wBAAA,EAAA,YAAiB;QAC7D,IAAI,cAAc,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/C,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,8CAA8C,GAAG,cAAc,CAAC,CAAC;QAC3G,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC;IAC7D,CAAC;IAaD,4BAAS,GAAT,UAAU,UAAmB;QAC3B,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,eAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxE,CAAC;IACH,eAAC;AAAD,CAAC,AAjLD,IAiLC;AAjLY,4BAAQ", + "sourcesContent": [ + "/**\n * @coreapi\n * @module core\n */ /** */\nimport { UrlMatcherFactory } from \"./url/urlMatcherFactory\";\nimport { UrlRouter } from \"./url/urlRouter\";\nimport { TransitionService } from \"./transition/transitionService\";\nimport { ViewService } from \"./view/view\";\nimport { StateRegistry } from \"./state/stateRegistry\";\nimport { StateService } from \"./state/stateService\";\nimport { UIRouterGlobals } from \"./globals\";\nimport { UIRouterPlugin, Disposable } from \"./interface\";\nimport { values, removeFrom } from \"./common/common\";\nimport { isFunction } from \"./common/predicates\";\nimport { UrlService } from \"./url/urlService\";\nimport { LocationServices, LocationConfig } from \"./common/coreservices\";\nimport { Trace, trace } from \"./common/trace\";\n\n/** @hidden */\nlet _routerInstance = 0;\n\n/**\n * The master class used to instantiate an instance of UI-Router.\n *\n * UI-Router (for each specific framework) will create an instance of this class during bootstrap.\n * This class instantiates and wires the UI-Router services together.\n *\n * After a new instance of the UIRouter class is created, it should be configured for your app.\n * For instance, app states should be registered with the [[UIRouter.stateRegistry]].\n *\n * ---\n *\n * Normally the framework code will bootstrap UI-Router.\n * If you are bootstrapping UIRouter manually, tell it to monitor the URL by calling\n * [[UrlService.listen]] then [[UrlService.sync]].\n */\nexport class UIRouter {\n /** @hidden */ $id = _routerInstance++;\n /** @hidden */ _disposed = false;\n /** @hidden */ private _disposables: Disposable[] = [];\n\n /** Provides trace information to the console */\n trace: Trace = trace;\n\n /** Provides services related to ui-view synchronization */\n viewService = new ViewService();\n\n /** Provides services related to Transitions */\n transitionService: TransitionService = new TransitionService(this);\n\n /** Global router state */\n globals: UIRouterGlobals = new UIRouterGlobals();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlMatcherFactory: UrlMatcherFactory = new UrlMatcherFactory();\n\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n urlRouter: UrlRouter = new UrlRouter(this);\n\n /** Provides a registry for states, and related registration services */\n stateRegistry: StateRegistry = new StateRegistry(this);\n\n /** Provides services related to states */\n stateService = new StateService(this);\n\n /** Provides services related to the URL */\n urlService: UrlService = new UrlService(this);\n\n\n /** Registers an object to be notified when the router is disposed */\n disposable(disposable: Disposable) {\n this._disposables.push(disposable);\n }\n\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @param disposable (optional) the disposable to dispose\n */\n dispose(disposable?: any): void {\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n\n this._disposed = true;\n this._disposables.slice().forEach(d => {\n try {\n typeof d.dispose === 'function' && d.dispose(this);\n removeFrom(this._disposables, d);\n } catch (ignored) {}\n });\n }\n\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internalapi\n */\n constructor(\n public locationService: LocationServices = UrlService.locationServiceStub,\n public locationConfig: LocationConfig = UrlService.locationConfigStub\n ) {\n\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlRouter);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n\n /** @hidden */\n private _plugins: { [key: string]: UIRouterPlugin } = {};\n\n /** Add plugin (as ES6 class) */\n plugin(plugin: { new(router: UIRouter, options?: any): T }, options?: any): T;\n /** Add plugin (as javascript constructor function) */\n plugin(plugin: { (router: UIRouter, options?: any): void }, options?: any): T;\n /** Add plugin (as javascript factory function) */\n plugin(plugin: PluginFactory, options?: any): T;\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n plugin(plugin: any, options: any = {}): T {\n let pluginInstance = new plugin(this, options);\n if (!pluginInstance.name) throw new Error(\"Required property `name` missing on plugin: \" + pluginInstance);\n this._disposables.push(pluginInstance);\n return this._plugins[pluginInstance.name] = pluginInstance;\n }\n\n /**\n * Returns registered plugins\n *\n * Returns the registered plugin of the given `pluginName`.\n * If no `pluginName` is given, returns all registered plugins\n *\n * @param pluginName (optional) the name of the plugin to get\n * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)\n */\n getPlugin(pluginName: string): UIRouterPlugin;\n getPlugin(): UIRouterPlugin[];\n getPlugin(pluginName?: string): UIRouterPlugin|UIRouterPlugin[] {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n }\n}\n\n/** @internalapi */\nexport type PluginFactory = (router: UIRouter, options?: any) => T;\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.d.ts new file mode 100644 index 00000000..5fb2019b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.d.ts @@ -0,0 +1,30 @@ +/** + * # The state subsystem + * + * This subsystem implements the ui-router state tree + * + * - The [[StateService]] has state-related service methods such as: + * - [[StateService.get]]: Get a registered [[StateDeclaration]] object + * - [[StateService.go]]: Transition from the current state to a new state + * - [[StateService.reload]]: Reload the current state + * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook) + * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started + * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors + * - The [[StateDeclaration]] interface defines the shape of a state declaration + * - The [[StateRegistry]] contains all the registered states + * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]] + * - Note: Bootstrap state registration differs by front-end framework. + * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]]. + * + * @coreapi + * @preferred + * @module state + */ /** for typedoc */ +export * from "./interface"; +export * from "./stateBuilder"; +export * from "./stateObject"; +export * from "./stateMatcher"; +export * from "./stateQueueManager"; +export * from "./stateRegistry"; +export * from "./stateService"; +export * from "./targetState"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js new file mode 100644 index 00000000..7844f222 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js @@ -0,0 +1,13 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./stateBuilder")); +__export(require("./stateObject")); +__export(require("./stateMatcher")); +__export(require("./stateQueueManager")); +__export(require("./stateRegistry")); +__export(require("./stateService")); +__export(require("./targetState")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js.map new file mode 100644 index 00000000..ebb3141e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/index.ts" + ], + "names": [], + "mappings": ";;;;;AAuBA,oCAA+B;AAC/B,mCAA8B;AAC9B,oCAA+B;AAC/B,yCAAoC;AACpC,qCAAgC;AAChC,oCAA+B;AAC/B,mCAA8B", + "sourcesContent": [ + "/**\n * # The state subsystem\n *\n * This subsystem implements the ui-router state tree\n *\n * - The [[StateService]] has state-related service methods such as:\n * - [[StateService.get]]: Get a registered [[StateDeclaration]] object\n * - [[StateService.go]]: Transition from the current state to a new state\n * - [[StateService.reload]]: Reload the current state\n * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook)\n * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started\n * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors\n * - The [[StateDeclaration]] interface defines the shape of a state declaration\n * - The [[StateRegistry]] contains all the registered states\n * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]]\n * - Note: Bootstrap state registration differs by front-end framework.\n * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]].\n *\n * @coreapi\n * @preferred\n * @module state\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./stateBuilder\";\nexport * from \"./stateObject\";\nexport * from \"./stateMatcher\";\nexport * from \"./stateQueueManager\";\nexport * from \"./stateRegistry\";\nexport * from \"./stateService\";\nexport * from \"./targetState\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.d.ts new file mode 100644 index 00000000..64946778 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.d.ts @@ -0,0 +1,731 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { ParamDeclaration, RawParams } from "../params/interface"; +import { StateObject } from "./stateObject"; +import { ViewContext } from "../view/interface"; +import { IInjectable } from "../common/common"; +import { Transition } from "../transition/transition"; +import { TransitionStateHookFn, TransitionOptions } from "../transition/interface"; +import { ResolvePolicy, ResolvableLiteral, ProviderLike } from "../resolve/interface"; +import { Resolvable } from "../resolve/resolvable"; +import { TargetState } from "./targetState"; +export declare type StateOrName = (string | StateDeclaration | StateObject); +/** @internalapi */ +export interface TransitionPromise extends Promise { + transition: Transition; +} +export interface TargetStateDef { + state: StateOrName; + params?: RawParams; + options?: TransitionOptions; +} +export declare type ResolveTypes = Resolvable | ResolvableLiteral | ProviderLike; +/** + * Base interface for declaring a view + * + * This interface defines the basic data that a normalized view declaration will have on it. + * Each implementation of UI-Router (for a specific framework) should define its own extension of this interface. + * Add any additional fields that the framework requires to that interface. + * + * @internalapi + */ +export interface _ViewDeclaration { + /** + * The raw name for the view declaration, i.e., the [[StateDeclaration.views]] property name. + * @internalapi + */ + $name?: string; + /** + * The normalized address for the `ui-view` which this ViewConfig targets. + * + * A ViewConfig targets a `ui-view` in the DOM (relative to the `uiViewContextAnchor`) which has + * a specific name. + * @example `header` or `$default` + * + * The `uiViewName` can also target a _nested view_ by providing a dot-notation address + * @example `foo.bar` or `foo.$default.bar` + * @internalapi + */ + $uiViewName?: string; + /** + * The normalized context anchor (state name) for the `uiViewName` + * + * When targeting a `ui-view`, the `uiViewName` address is anchored to a context name (state name). + * @internalapi + */ + $uiViewContextAnchor?: string; + /** + * A type identifier for the View + * + * This is used when loading prerequisites for the view, before it enters the DOM. Different types of views + * may load differently (e.g., templateProvider+controllerProvider vs component class) + * @internalapi + */ + $type?: string; + /** + * The context that this view is declared within. + * @internalapi + */ + $context?: ViewContext; +} +/** + * The return value of a [[redirectTo]] function + * + * - string: a state name + * - TargetState: a target state, parameters, and options + * - object: an object with a state name and parameters + */ +export declare type RedirectToResult = string | TargetState | { + state?: string; + params?: RawParams; +} | void; +/** + * The StateDeclaration object is used to define a state or nested state. + * + * Note: Each implementation of UI-Router (for a specific framework) + * extends this interface as necessary. + * + * #### Example: + * ```js + * // StateDeclaration object + * var foldersState = { + * name: 'folders', + * url: '/folders', + * component: FoldersComponent, + * resolve: { + * allfolders: function(FolderService) { + * return FolderService.list(); + * } + * }, + * } + * + * registry.register(foldersState); + * ``` + * + * A state declaration may also be an ES6 class which implements the StateDeclaration interface + * and has a `@State()` decorator + * + * #### Example: + * ```js + * import { State } from "@uirouter/core" + * import { FolderService } from "../folder.service" + * // StateDeclaration class + * @State() + * export class FoldersState implements StateDeclaration { + * name: 'folders', + * url: '/folders', + * component: FoldersComponent + * + * @Resolve({ deps: [ FolderService ] }) + * allfolders(FolderService) { + * return FolderService.list(); + * }, + * } + * + * registry.register(FoldersState); + * ``` + */ +export interface StateDeclaration { + /** + * The state name (required) + * + * A unique state name, e.g. `"home"`, `"about"`, `"contacts"`. + * To create a parent/child state use a dot, e.g. `"about.sales"`, `"home.newest"`. + * + * Note: [State] objects require unique names. + * The name is used like an id. + */ + name?: string; + /** + * Abstract state indicator + * + * An abstract state can never be directly activated. + * Use an abstract state to provide inherited properties (url, resolve, data, etc) to children states. + */ + abstract?: boolean; + /** + * The parent state + * + * Normally, a state's parent is implied from the state's [[name]], e.g., `"parentstate.childstate"`. + * + * Alternatively, you can explicitly set the parent state using this property. + * This allows shorter state names, e.g., `Child` + * instead of `Child + * + * When using this property, the state's name should not have any dots in it. + * + * #### Example: + * ```js + * var parentstate = { + * name: 'parentstate' + * } + * var childstate = { + * name: 'childstate', + * parent: 'parentstate' + * // or use a JS var which is the parent StateDeclaration, i.e.: + * // parent: parentstate + * } + * ``` + */ + parent?: (string | StateDeclaration); + /** + * Gets the internal State object API + * + * Gets the *internal API* for a registered state. + * + * Note: the internal [[StateObject]] API is subject to change without notice + */ + $$state?: () => StateObject; + /** + * Resolve - a mechanism to asynchronously fetch data, participating in the Transition lifecycle + * + * The `resolve:` property defines data (or other dependencies) to be fetched asynchronously when the state is being entered. + * After the data is fetched, it may be used in views, transition hooks or other resolves that belong to this state. + * The data may also be used in any views or resolves that belong to nested states. + * + * ### As an array + * + * Each array element should be a [[ResolvableLiteral]] object. + * + * #### Example: + * The `user` resolve injects the current `Transition` and the `UserService` (using its token, which is a string). + * The [[ResolvableLiteral.resolvePolicy]] sets how the resolve is processed. + * The `user` data, fetched asynchronously, can then be used in a view. + * ```js + * var state = { + * name: 'user', + * url: '/user/:userId + * resolve: [ + * { + * token: 'user', + * policy: { when: 'EAGER' }, + * deps: ['UserService', Transition], + * resolveFn: (userSvc, trans) => userSvc.fetchUser(trans.params().userId) }, + * } + * ] + * } + * ``` + * + * Note: an Angular 2 style [`useFactory` provider literal](https://angular.io/docs/ts/latest/cookbook/dependency-injection.html#!#provide) + * may also be used. See [[ProviderLike]]. + * #### Example: + * ``` + * resolve: [ + * { provide: 'token', useFactory: (http) => http.get('/'), deps: [ Http ] }, + * ] + * ``` + * + * ### As an object + * + * The `resolve` property may be an object where: + * - Each key (string) is the name of the dependency. + * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency. + * + * This style is based on AngularJS injectable functions, but can be used with any UI-Router implementation. + * If your code will be minified, the function should be ["annotated" in the AngularJS manner](https://docs.angularjs.org/guide/di#dependency-annotation). + * + * #### AngularJS Example: + * ```js + * resolve: { + * // If you inject `myStateDependency` into a controller, you'll get "abc" + * myStateDependency: function() { + * return "abc"; + * }, + * // Dependencies are annotated in "Inline Array Annotation" + * myAsyncData: ['$http', '$transition$' function($http, $transition$) { + * // Return a promise (async) for the data + * return $http.get("/foos/" + $transition$.params().foo); + * }] + * } + * ``` + * + * Note: You cannot specify a policy for each Resolvable, nor can you use non-string + * tokens when using the object style `resolve:` block. + * + * ### Lifecycle + * + * Since a resolve function can return a promise, the router will delay entering the state until the promises are ready. + * If any of the promises are rejected, the Transition is aborted with an Error. + * + * By default, resolves for a state are fetched just before that state is entered. + * Note that only states which are being *entered* during the `Transition` have their resolves fetched. + * States that are "retained" do not have their resolves re-fetched. + * + * If you are currently in a parent state `parent` and are transitioning to a child state `parent.child`, the + * previously resolved data for state `parent` can be injected into `parent.child` without delay. + * + * Any resolved data for `parent.child` is retained until `parent.child` is exited, e.g., by transitioning back to the `parent` state. + * + * Because of this scoping and lifecycle, resolves are a great place to fetch your application's primary data. + * + * ### Injecting resolves into other things + * + * During a transition, Resolve data can be injected into: + * + * - Views (the components which fill a `ui-view` tag) + * - Transition Hooks + * - Other resolves (a resolve may depend on asynchronous data from a different resolve) + * + * ### Injecting other things into resolves + * + * Resolve functions usually have dependencies on some other API(s). + * The dependencies are usually declared and injected into the resolve function. + * A common pattern is to inject a custom service such as `UserService`. + * The resolve then delegates to a service method, such as `UserService.list()`; + * + * #### Special injectable tokens + * + * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services. + * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as + * "to" and "from" State Parameters and transition options. + * - `'$transition$'`: A string alias for the `Transition` injectable + * - `'$state$'`: For `onEnter`/`onExit`/`onRetain`, the state being entered/exited/retained. + * - Other resolve tokens: A resolve can depend on another resolve, either from the same state, or from any parent state. + * + * #### Example: + * ```js + * // Injecting a resolve into another resolve + * resolve: [ + * // Define a resolve 'allusers' which delegates to the UserService.list() + * // which returns a promise (async) for all the users + * { provide: 'allusers', useFactory: (UserService) => UserService.list(), deps: [UserService] }, + * + * // Define a resolve 'user' which depends on the allusers resolve. + * // This resolve function is not called until 'allusers' is ready. + * { provide: 'user', (allusers, trans) => _.find(allusers, trans.params().userId, deps: ['allusers', Transition] } + * } + * ``` + */ + resolve?: (ResolveTypes[] | { + [key: string]: IInjectable; + }); + /** + * Sets the resolve policy defaults for all resolves on this state + * + * This should be an [[ResolvePolicy]] object. + * + * It can contain the following optional keys/values: + * + * - `when`: (optional) defines when the resolve is fetched. Accepted values: "LAZY" or "EAGER" + * - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", "RXWAIT" + * + * See [[ResolvePolicy]] for more details. + */ + resolvePolicy?: ResolvePolicy; + /** + * The url fragment for the state + * + * A URL fragment (with optional parameters) which is used to match the browser location with this state. + * + * This fragment will be appended to the parent state's URL in order to build up the overall URL for this state. + * See [[UrlMatcher]] for details on acceptable patterns. + * + * @examples + * ```js + * + * url: "/home" + * // Define a parameter named 'userid' + * url: "/users/:userid" + * // param 'bookid' has a custom regexp + * url: "/books/{bookid:[a-zA-Z_-]}" + * // param 'categoryid' is of type 'int' + * url: "/books/{categoryid:int}" + * // two parameters for this state + * url: "/books/{publishername:string}/{categoryid:int}" + * // Query parameters + * url: "/messages?before&after" + * // Query parameters of type 'date' + * url: "/messages?{before:date}&{after:date}" + * // Path and query parameters + * url: "/messages/:mailboxid?{before:date}&{after:date}" + * ``` + */ + url?: string; + /** + * Params configuration + * + * An object which optionally configures parameters declared in the url, or defines additional non-url + * parameters. For each parameter being configured, add a [[ParamDeclaration]] keyed to the name of the parameter. + * + * #### Example: + * ```js + * params: { + * param1: { + * type: "int", + * array: true, + * value: [] + * }, + * param2: { + * value: "index" + * } + * } + * ``` + */ + params?: { + [key: string]: (ParamDeclaration | any); + }; + /** + * Named views + * + * An optional object which defines multiple views, or explicitly targets specific named ui-views. + * + * - What is a view config + * - What is a ui-view + * - Shorthand controller/template + * - Incompatible with ^ + * + * Examples: + * + * Targets three named ui-views in the parent state's template + * + * #### Example: + * ```js + * views: { + * header: { + * controller: "headerCtrl", + * templateUrl: "header.html" + * }, body: { + * controller: "bodyCtrl", + * templateUrl: "body.html" + * }, footer: { + * controller: "footCtrl", + * templateUrl: "footer.html" + * } + * } + * ``` + * + * @example + * ```js + * // Targets named ui-view="header" from ancestor state 'top''s template, and + * // named `ui-view="body" from parent state's template. + * views: { + * 'header@top': { + * controller: "msgHeaderCtrl", + * templateUrl: "msgHeader.html" + * }, 'body': { + * controller: "messagesCtrl", + * templateUrl: "messages.html" + * } + * } + * ``` + */ + views?: { + [key: string]: _ViewDeclaration; + }; + /** + * An inherited property to store state data + * + * This is a spot for you to store inherited state metadata. + * Child states' `data` object will prototypally inherit from their parent state. + * + * This is a good spot to put metadata such as `requiresAuth`. + * + * Note: because prototypal inheritance is used, changes to parent `data` objects reflect in the child `data` objects. + * Care should be taken if you are using `hasOwnProperty` on the `data` object. + * Properties from parent objects will return false for `hasOwnProperty`. + */ + data?: any; + /** + * Synchronously or asynchronously redirects Transitions to a different state/params + * + * If this property is defined, a Transition directly to this state will be redirected based on the property's value. + * + * - If the value is a `string`, the Transition is redirected to the state named by the string. + * + * - If the property is an object with a `state` and/or `params` property, + * the Transition is redirected to the named `state` and/or `params`. + * + * - If the value is a [[TargetState]] the Transition is redirected to the `TargetState` + * + * - If the property is a function: + * - The function is called with the current [[Transition]] + * - The return value is processed using the previously mentioned rules. + * - If the return value is a promise, the promise is waited for, then the resolved async value is processed using the same rules. + * + * Note: `redirectTo` is processed as an `onStart` hook, before `LAZY` resolves. + * If your redirect function relies on resolve data, get the [[Transition.injector]] and get a + * promise for the resolve data using [[UIInjector.getAsync]]. + * + * #### Example: + * ```js + * // a string + * .state('A', { + * redirectTo: 'A.B' + * }) + * + * // a {state, params} object + * .state('C', { + * redirectTo: { state: 'C.D', params: { foo: 'index' } } + * }) + * + * // a fn + * .state('E', { + * redirectTo: () => "A" + * }) + * + * // a fn conditionally returning a {state, params} + * .state('F', { + * redirectTo: (trans) => { + * if (trans.params().foo < 10) + * return { state: 'F', params: { foo: 10 } }; + * } + * }) + * + * // a fn returning a promise for a redirect + * .state('G', { + * redirectTo: (trans) => { + * let svc = trans.injector().get('SomeAsyncService') + * let promise = svc.getAsyncRedirectTo(trans.params.foo); + * return promise; + * } + * }) + * + * // a fn that fetches resolve data + * .state('G', { + * redirectTo: (trans) => { + * // getAsync tells the resolve to load + * let resolvePromise = trans.injector().getAsync('SomeResolve') + * return resolvePromise.then(resolveData => resolveData === 'login' ? 'login' : null); + * } + * }) + * ``` + */ + redirectTo?: RedirectToResult | ((transition: Transition) => RedirectToResult) | ((transition: Transition) => Promise); + /** + * A Transition Hook called with the state is being entered. See: [[IHookRegistry.onEnter]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onEnter: function(trans, state) { + * console.log("Entering " + state.name); + * } + * }); + * ``` + * + * Note: The above `onEnter` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onEnter({ entering: 'mystate' }, function(trans, state) { + * console.log("Entering " + state.name); + * }); + * ``` + */ + onEnter?: TransitionStateHookFn; + /** + * A [[TransitionStateHookFn]] called with the state is being retained/kept. See: [[IHookRegistry.onRetain]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onRetain: function(trans, state) { + * console.log(state.name + " is still active!"); + * } + * }); + * ``` + * + * Note: The above `onRetain` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onRetain({ retained: 'mystate' }, function(trans, state) { + * console.log(state.name + " is still active!"); + * }); + * ``` + */ + onRetain?: TransitionStateHookFn; + /** + * A Transition Hook called with the state is being exited. See: [[IHookRegistry.onExit]] + * + * #### Example: + * ```js + * .state({ + * name: 'mystate', + * onExit: function(trans, state) { + * console.log("Leaving " + state.name); + * } + * }); + * ``` + * + * Note: The above `onRetain` on the state declaration is effectively sugar for: + * + * ```js + * transitionService.onExit({ exiting: 'mystate' }, function(trans, state) { + * console.log("Leaving " + state.name); + * }); + * ``` + */ + onExit?: TransitionStateHookFn; + /** + * A function used to lazy load code + * + * The `lazyLoad` function is invoked before the state is activated. + * The transition waits while the code is loading. + * + * The function should load the code that is required to activate the state. + * For example, it may load a component class, or some service code. + * The function must return a promise which resolves when loading is complete. + * + * For example, this code lazy loads a service before the `abc` state is activated: + * + * ``` + * .state('abc', { + * lazyLoad: (transition, state) => System.import('./abcService') + * } + * ``` + * + * The `abcService` file is imported and loaded + * (it is assumed that the `abcService` file knows how to register itself as a service). + * + * #### Lifecycle + * + * - The `lazyLoad` function is invoked if a transition is going to enter the state. + * - The function is invoked before the transition starts (using an `onBefore` transition hook). + * - The function is only invoked once; while the `lazyLoad` function is loading code, it will not be invoked again. + * For example, if the user double clicks a ui-sref, `lazyLoad` is only invoked once even though there were two transition attempts. + * Instead, the existing lazy load promise is re-used. + * - When the promise resolves successfully, the `lazyLoad` property is deleted from the state declaration. + * - If the promise resolves to a [[LazyLoadResult]] which has an array of `states`, those states are registered. + * - The original transition is retried (this time without the `lazyLoad` property present). + * + * - If the `lazyLoad` function fails, then the transition also fails. + * The failed transition (and the `lazyLoad` function) could potentially be retried by the user. + * + * ### Lazy loading state definitions (Future States) + * + * State definitions can also be lazy loaded. + * This might be desirable when building large, multi-module applications. + * + * To lazy load state definitions, a Future State should be registered as a placeholder. + * When the state definitions are lazy loaded, the Future State is deregistered. + * + * A future state can act as a placeholder for a single state, or for an entire module of states and substates. + * A future state should have: + * + * - A `name` which ends in `.**`. + * A future state's `name` property acts as a wildcard [[Glob]]. + * It matches any state name that starts with the `name` (including child states that are not yet loaded). + * - A `url` prefix. + * A future state's `url` property acts as a wildcard. + * UI-Router matches all paths that begin with the `url`. + * It effectively appends `.*` to the internal regular expression. + * When the prefix matches, the future state will begin loading. + * - A `lazyLoad` function. + * This function should should return a Promise to lazy load the code for one or more [[StateDeclaration]] objects. + * It should return a [[LazyLoadResult]]. + * Generally, one of the lazy loaded states should have the same name as the future state. + * The new state will then **replace the future state placeholder** in the registry. + * + * ### Additional resources + * + * For in depth information on lazy loading and Future States, see the [Lazy Loading Guide](https://ui-router.github.io/guides/lazyload). + * + * #### Example: states.js + * ```js + * + * // This child state is a lazy loaded future state + * // The `lazyLoad` function loads the final state definition + * { + * name: 'parent.**', + * url: '/parent', + * lazyLoad: () => System.import('./lazy.states.js') + * } + * ``` + * + * #### Example: lazy.states.js + * + * This file is lazy loaded. It exports an array of states. + * + * ```js + * import {ChildComponent} from "./child.component.js"; + * import {ParentComponent} from "./parent.component.js"; + * + * // This fully defined state replaces the future state + * let parentState = { + * // the name should match the future state + * name: 'parent', + * url: '/parent/:parentId', + * component: ParentComponent, + * resolve: { + * parentData: ($transition$, ParentService) => + * ParentService.get($transition$.params().parentId) + * } + * } + * + * let childState = { + * name: 'parent.child', + * url: '/child/:childId', + * params: { + * childId: "default" + * }, + * resolve: { + * childData: ($transition$, ChildService) => + * ChildService.get($transition$.params().childId) + * } + * }; + * + * // This array of states will be registered by the lazyLoad hook + * let lazyLoadResults = { + * states: [ parentState, childState ] + * }; + * + * export default lazyLoadResults; + * ``` + * + * @param transition the [[Transition]] that is activating the future state + * @param state the [[StateDeclaration]] that the `lazyLoad` function is declared on + * @return a Promise to load the states. + * Optionally, if the promise resolves to a [[LazyLoadResult]], + * the states will be registered with the [[StateRegistry]]. + */ + lazyLoad?: (transition: Transition, state: StateDeclaration) => Promise; + /** + * @deprecated define individual parameters as [[ParamDeclaration.dynamic]] + */ + reloadOnSearch?: boolean; +} +/** + * The return type of a [[StateDeclaration.lazyLoad]] function + * + * If your state has a `lazyLoad` function, it should return a promise. + * If promise resolves to an object matching this interface, then the `states` array + * of [[StateDeclaration]] objects will be automatically registered. + */ +export interface LazyLoadResult { + states?: StateDeclaration[]; +} +/** + * An options object for [[StateService.href]] + */ +export interface HrefOptions { + /** + * Defines what state to be "relative from" + * + * When a relative path is found (e.g `^` or `.bar`), defines which state to be relative from. + */ + relative?: StateOrName; + /** + * If true, and if there is no url associated with the state provided in the + * first parameter, then the constructed href url will be built from the first + * ancestor which has a url. + */ + lossy?: boolean; + /** + * If `true` will inherit parameters from the current parameter values. + */ + inherit?: boolean; + /** + * If true will generate an absolute url, e.g. `http://www.example.com/fullurl`. + */ + absolute?: boolean; +} +/** + * Either a [[StateDeclaration]] or an ES6 class that implements [[StateDeclaration]] + * The ES6 class constructor should have no arguments. + */ +export declare type _StateDeclaration = StateDeclaration | { + new (): StateDeclaration; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js new file mode 100644 index 00000000..d549d1f1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js.map new file mode 100644 index 00000000..2f8a7566 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\nimport { ParamDeclaration, RawParams } from \"../params/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { ViewContext } from \"../view/interface\";\nimport { IInjectable } from \"../common/common\";\nimport { Transition } from \"../transition/transition\";\nimport { TransitionStateHookFn, TransitionOptions } from \"../transition/interface\";\nimport { ResolvePolicy, ResolvableLiteral, ProviderLike } from \"../resolve/interface\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TargetState } from \"./targetState\";\n\nexport type StateOrName = (string|StateDeclaration|StateObject);\n\n/** @internalapi */\nexport interface TransitionPromise extends Promise {\n transition: Transition;\n}\n\nexport interface TargetStateDef {\n state: StateOrName;\n params?: RawParams;\n options?: TransitionOptions;\n}\n\nexport type ResolveTypes = Resolvable | ResolvableLiteral | ProviderLike;\n/**\n * Base interface for declaring a view\n *\n * This interface defines the basic data that a normalized view declaration will have on it.\n * Each implementation of UI-Router (for a specific framework) should define its own extension of this interface.\n * Add any additional fields that the framework requires to that interface.\n *\n * @internalapi\n */\nexport interface _ViewDeclaration {\n /**\n * The raw name for the view declaration, i.e., the [[StateDeclaration.views]] property name.\n * @internalapi\n */\n $name?: string;\n\n /**\n * The normalized address for the `ui-view` which this ViewConfig targets.\n *\n * A ViewConfig targets a `ui-view` in the DOM (relative to the `uiViewContextAnchor`) which has\n * a specific name.\n * @example `header` or `$default`\n *\n * The `uiViewName` can also target a _nested view_ by providing a dot-notation address\n * @example `foo.bar` or `foo.$default.bar`\n * @internalapi\n */\n $uiViewName?: string;\n\n /**\n * The normalized context anchor (state name) for the `uiViewName`\n *\n * When targeting a `ui-view`, the `uiViewName` address is anchored to a context name (state name).\n * @internalapi\n */\n $uiViewContextAnchor?: string;\n\n /**\n * A type identifier for the View\n *\n * This is used when loading prerequisites for the view, before it enters the DOM. Different types of views\n * may load differently (e.g., templateProvider+controllerProvider vs component class)\n * @internalapi\n */\n $type?: string;\n\n /**\n * The context that this view is declared within.\n * @internalapi\n */\n $context?: ViewContext;\n}\n\n/**\n * The return value of a [[redirectTo]] function\n *\n * - string: a state name\n * - TargetState: a target state, parameters, and options\n * - object: an object with a state name and parameters\n */\nexport type RedirectToResult = string | TargetState | { state?: string, params?: RawParams } | void;\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n *\n * Note: Each implementation of UI-Router (for a specific framework)\n * extends this interface as necessary.\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * component: FoldersComponent,\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * }\n *\n * registry.register(foldersState);\n * ```\n *\n * A state declaration may also be an ES6 class which implements the StateDeclaration interface\n * and has a `@State()` decorator\n *\n * #### Example:\n * ```js\n * import { State } from \"@uirouter/core\"\n * import { FolderService } from \"../folder.service\"\n * // StateDeclaration class\n * @State()\n * export class FoldersState implements StateDeclaration {\n * name: 'folders',\n * url: '/folders',\n * component: FoldersComponent\n *\n * @Resolve({ deps: [ FolderService ] })\n * allfolders(FolderService) {\n * return FolderService.list();\n * },\n * }\n *\n * registry.register(FoldersState);\n * ```\n */\nexport interface StateDeclaration {\n /**\n * The state name (required)\n *\n * A unique state name, e.g. `\"home\"`, `\"about\"`, `\"contacts\"`.\n * To create a parent/child state use a dot, e.g. `\"about.sales\"`, `\"home.newest\"`.\n *\n * Note: [State] objects require unique names.\n * The name is used like an id.\n */\n name?: string;\n\n /**\n * Abstract state indicator\n *\n * An abstract state can never be directly activated.\n * Use an abstract state to provide inherited properties (url, resolve, data, etc) to children states.\n */\n abstract?: boolean;\n\n /**\n * The parent state\n *\n * Normally, a state's parent is implied from the state's [[name]], e.g., `\"parentstate.childstate\"`.\n *\n * Alternatively, you can explicitly set the parent state using this property.\n * This allows shorter state names, e.g., `Child`\n * instead of `Child\n *\n * When using this property, the state's name should not have any dots in it.\n *\n * #### Example:\n * ```js\n * var parentstate = {\n * name: 'parentstate'\n * }\n * var childstate = {\n * name: 'childstate',\n * parent: 'parentstate'\n * // or use a JS var which is the parent StateDeclaration, i.e.:\n * // parent: parentstate\n * }\n * ```\n */\n parent?: (string|StateDeclaration);\n\n /**\n * Gets the internal State object API\n *\n * Gets the *internal API* for a registered state.\n *\n * Note: the internal [[StateObject]] API is subject to change without notice\n */\n $$state?: () => StateObject;\n\n /**\n * Resolve - a mechanism to asynchronously fetch data, participating in the Transition lifecycle\n *\n * The `resolve:` property defines data (or other dependencies) to be fetched asynchronously when the state is being entered.\n * After the data is fetched, it may be used in views, transition hooks or other resolves that belong to this state.\n * The data may also be used in any views or resolves that belong to nested states.\n *\n * ### As an array\n *\n * Each array element should be a [[ResolvableLiteral]] object.\n *\n * #### Example:\n * The `user` resolve injects the current `Transition` and the `UserService` (using its token, which is a string).\n * The [[ResolvableLiteral.resolvePolicy]] sets how the resolve is processed.\n * The `user` data, fetched asynchronously, can then be used in a view.\n * ```js\n * var state = {\n * name: 'user',\n * url: '/user/:userId\n * resolve: [\n * {\n * token: 'user',\n * policy: { when: 'EAGER' },\n * deps: ['UserService', Transition],\n * resolveFn: (userSvc, trans) => userSvc.fetchUser(trans.params().userId) },\n * }\n * ]\n * }\n * ```\n *\n * Note: an Angular 2 style [`useFactory` provider literal](https://angular.io/docs/ts/latest/cookbook/dependency-injection.html#!#provide)\n * may also be used. See [[ProviderLike]].\n * #### Example:\n * ```\n * resolve: [\n * { provide: 'token', useFactory: (http) => http.get('/'), deps: [ Http ] },\n * ]\n * ```\n *\n * ### As an object\n *\n * The `resolve` property may be an object where:\n * - Each key (string) is the name of the dependency.\n * - Each value (function) is an injectable function which returns the dependency, or a promise for the dependency.\n *\n * This style is based on AngularJS injectable functions, but can be used with any UI-Router implementation.\n * If your code will be minified, the function should be [\"annotated\" in the AngularJS manner](https://docs.angularjs.org/guide/di#dependency-annotation).\n *\n * #### AngularJS Example:\n * ```js\n * resolve: {\n * // If you inject `myStateDependency` into a controller, you'll get \"abc\"\n * myStateDependency: function() {\n * return \"abc\";\n * },\n * // Dependencies are annotated in \"Inline Array Annotation\"\n * myAsyncData: ['$http', '$transition$' function($http, $transition$) {\n * // Return a promise (async) for the data\n * return $http.get(\"/foos/\" + $transition$.params().foo);\n * }]\n * }\n * ```\n *\n * Note: You cannot specify a policy for each Resolvable, nor can you use non-string\n * tokens when using the object style `resolve:` block.\n *\n * ### Lifecycle\n *\n * Since a resolve function can return a promise, the router will delay entering the state until the promises are ready.\n * If any of the promises are rejected, the Transition is aborted with an Error.\n *\n * By default, resolves for a state are fetched just before that state is entered.\n * Note that only states which are being *entered* during the `Transition` have their resolves fetched.\n * States that are \"retained\" do not have their resolves re-fetched.\n *\n * If you are currently in a parent state `parent` and are transitioning to a child state `parent.child`, the\n * previously resolved data for state `parent` can be injected into `parent.child` without delay.\n *\n * Any resolved data for `parent.child` is retained until `parent.child` is exited, e.g., by transitioning back to the `parent` state.\n *\n * Because of this scoping and lifecycle, resolves are a great place to fetch your application's primary data.\n *\n * ### Injecting resolves into other things\n *\n * During a transition, Resolve data can be injected into:\n *\n * - Views (the components which fill a `ui-view` tag)\n * - Transition Hooks\n * - Other resolves (a resolve may depend on asynchronous data from a different resolve)\n *\n * ### Injecting other things into resolves\n *\n * Resolve functions usually have dependencies on some other API(s).\n * The dependencies are usually declared and injected into the resolve function.\n * A common pattern is to inject a custom service such as `UserService`.\n * The resolve then delegates to a service method, such as `UserService.list()`;\n *\n * #### Special injectable tokens\n *\n * - `UIRouter`: The [[UIRouter]] instance which has references to all the UI-Router services.\n * - `Transition`: The current [[Transition]] object; information and API about the current transition, such as\n * \"to\" and \"from\" State Parameters and transition options.\n * - `'$transition$'`: A string alias for the `Transition` injectable\n * - `'$state$'`: For `onEnter`/`onExit`/`onRetain`, the state being entered/exited/retained.\n * - Other resolve tokens: A resolve can depend on another resolve, either from the same state, or from any parent state.\n *\n * #### Example:\n * ```js\n * // Injecting a resolve into another resolve\n * resolve: [\n * // Define a resolve 'allusers' which delegates to the UserService.list()\n * // which returns a promise (async) for all the users\n * { provide: 'allusers', useFactory: (UserService) => UserService.list(), deps: [UserService] },\n *\n * // Define a resolve 'user' which depends on the allusers resolve.\n * // This resolve function is not called until 'allusers' is ready.\n * { provide: 'user', (allusers, trans) => _.find(allusers, trans.params().userId, deps: ['allusers', Transition] }\n * }\n * ```\n */\n resolve?: (ResolveTypes[] | { [key: string]: IInjectable; });\n\n /**\n * Sets the resolve policy defaults for all resolves on this state\n *\n * This should be an [[ResolvePolicy]] object.\n *\n * It can contain the following optional keys/values:\n *\n * - `when`: (optional) defines when the resolve is fetched. Accepted values: \"LAZY\" or \"EAGER\"\n * - `async`: (optional) if the transition waits for the resolve. Accepted values: \"WAIT\", \"NOWAIT\", \"RXWAIT\"\n *\n * See [[ResolvePolicy]] for more details.\n */\n resolvePolicy?: ResolvePolicy\n\n /**\n * The url fragment for the state\n *\n * A URL fragment (with optional parameters) which is used to match the browser location with this state.\n *\n * This fragment will be appended to the parent state's URL in order to build up the overall URL for this state.\n * See [[UrlMatcher]] for details on acceptable patterns.\n *\n * @examples\n * ```js\n *\n * url: \"/home\"\n * // Define a parameter named 'userid'\n * url: \"/users/:userid\"\n * // param 'bookid' has a custom regexp\n * url: \"/books/{bookid:[a-zA-Z_-]}\"\n * // param 'categoryid' is of type 'int'\n * url: \"/books/{categoryid:int}\"\n * // two parameters for this state\n * url: \"/books/{publishername:string}/{categoryid:int}\"\n * // Query parameters\n * url: \"/messages?before&after\"\n * // Query parameters of type 'date'\n * url: \"/messages?{before:date}&{after:date}\"\n * // Path and query parameters\n * url: \"/messages/:mailboxid?{before:date}&{after:date}\"\n * ```\n */\n url?: string;\n\n /**\n * Params configuration\n *\n * An object which optionally configures parameters declared in the url, or defines additional non-url\n * parameters. For each parameter being configured, add a [[ParamDeclaration]] keyed to the name of the parameter.\n *\n * #### Example:\n * ```js\n * params: {\n * param1: {\n * type: \"int\",\n * array: true,\n * value: []\n * },\n * param2: {\n * value: \"index\"\n * }\n * }\n * ```\n */\n params?: { [key: string]: (ParamDeclaration|any); };\n\n /**\n * Named views\n *\n * An optional object which defines multiple views, or explicitly targets specific named ui-views.\n *\n * - What is a view config\n * - What is a ui-view\n * - Shorthand controller/template\n * - Incompatible with ^\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * }, body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * }, footer: {\n * controller: \"footCtrl\",\n * templateUrl: \"footer.html\"\n * }\n * }\n * ```\n *\n * @example\n * ```js\n * // Targets named ui-view=\"header\" from ancestor state 'top''s template, and\n * // named `ui-view=\"body\" from parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * }, 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n */\n views?: { [key: string]: _ViewDeclaration; };\n\n /**\n * An inherited property to store state data\n *\n * This is a spot for you to store inherited state metadata.\n * Child states' `data` object will prototypally inherit from their parent state.\n *\n * This is a good spot to put metadata such as `requiresAuth`.\n *\n * Note: because prototypal inheritance is used, changes to parent `data` objects reflect in the child `data` objects.\n * Care should be taken if you are using `hasOwnProperty` on the `data` object.\n * Properties from parent objects will return false for `hasOwnProperty`.\n */\n data?: any;\n\n /**\n * Synchronously or asynchronously redirects Transitions to a different state/params\n *\n * If this property is defined, a Transition directly to this state will be redirected based on the property's value.\n *\n * - If the value is a `string`, the Transition is redirected to the state named by the string.\n *\n * - If the property is an object with a `state` and/or `params` property,\n * the Transition is redirected to the named `state` and/or `params`.\n *\n * - If the value is a [[TargetState]] the Transition is redirected to the `TargetState`\n *\n * - If the property is a function:\n * - The function is called with the current [[Transition]]\n * - The return value is processed using the previously mentioned rules.\n * - If the return value is a promise, the promise is waited for, then the resolved async value is processed using the same rules.\n *\n * Note: `redirectTo` is processed as an `onStart` hook, before `LAZY` resolves.\n * If your redirect function relies on resolve data, get the [[Transition.injector]] and get a\n * promise for the resolve data using [[UIInjector.getAsync]].\n *\n * #### Example:\n * ```js\n * // a string\n * .state('A', {\n * redirectTo: 'A.B'\n * })\n *\n * // a {state, params} object\n * .state('C', {\n * redirectTo: { state: 'C.D', params: { foo: 'index' } }\n * })\n *\n * // a fn\n * .state('E', {\n * redirectTo: () => \"A\"\n * })\n *\n * // a fn conditionally returning a {state, params}\n * .state('F', {\n * redirectTo: (trans) => {\n * if (trans.params().foo < 10)\n * return { state: 'F', params: { foo: 10 } };\n * }\n * })\n *\n * // a fn returning a promise for a redirect\n * .state('G', {\n * redirectTo: (trans) => {\n * let svc = trans.injector().get('SomeAsyncService')\n * let promise = svc.getAsyncRedirectTo(trans.params.foo);\n * return promise;\n * }\n * })\n *\n * // a fn that fetches resolve data\n * .state('G', {\n * redirectTo: (trans) => {\n * // getAsync tells the resolve to load\n * let resolvePromise = trans.injector().getAsync('SomeResolve')\n * return resolvePromise.then(resolveData => resolveData === 'login' ? 'login' : null);\n * }\n * })\n * ```\n */\n redirectTo?: RedirectToResult |\n ((transition: Transition) => RedirectToResult) |\n ((transition: Transition) => Promise);\n\n /**\n * A Transition Hook called with the state is being entered. See: [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onEnter: function(trans, state) {\n * console.log(\"Entering \" + state.name);\n * }\n * });\n * ```\n *\n * Note: The above `onEnter` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onEnter({ entering: 'mystate' }, function(trans, state) {\n * console.log(\"Entering \" + state.name);\n * });\n * ```\n */\n onEnter?: TransitionStateHookFn;\n /**\n * A [[TransitionStateHookFn]] called with the state is being retained/kept. See: [[IHookRegistry.onRetain]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onRetain: function(trans, state) {\n * console.log(state.name + \" is still active!\");\n * }\n * });\n * ```\n *\n * Note: The above `onRetain` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onRetain({ retained: 'mystate' }, function(trans, state) {\n * console.log(state.name + \" is still active!\");\n * });\n * ```\n */\n onRetain?: TransitionStateHookFn;\n /**\n * A Transition Hook called with the state is being exited. See: [[IHookRegistry.onExit]]\n *\n * #### Example:\n * ```js\n * .state({\n * name: 'mystate',\n * onExit: function(trans, state) {\n * console.log(\"Leaving \" + state.name);\n * }\n * });\n * ```\n *\n * Note: The above `onRetain` on the state declaration is effectively sugar for:\n *\n * ```js\n * transitionService.onExit({ exiting: 'mystate' }, function(trans, state) {\n * console.log(\"Leaving \" + state.name);\n * });\n * ```\n */\n onExit?: TransitionStateHookFn;\n\n /**\n * A function used to lazy load code\n *\n * The `lazyLoad` function is invoked before the state is activated.\n * The transition waits while the code is loading.\n *\n * The function should load the code that is required to activate the state.\n * For example, it may load a component class, or some service code.\n * The function must return a promise which resolves when loading is complete.\n *\n * For example, this code lazy loads a service before the `abc` state is activated:\n *\n * ```\n * .state('abc', {\n * lazyLoad: (transition, state) => System.import('./abcService')\n * }\n * ```\n *\n * The `abcService` file is imported and loaded\n * (it is assumed that the `abcService` file knows how to register itself as a service).\n *\n * #### Lifecycle\n *\n * - The `lazyLoad` function is invoked if a transition is going to enter the state.\n * - The function is invoked before the transition starts (using an `onBefore` transition hook).\n * - The function is only invoked once; while the `lazyLoad` function is loading code, it will not be invoked again.\n * For example, if the user double clicks a ui-sref, `lazyLoad` is only invoked once even though there were two transition attempts.\n * Instead, the existing lazy load promise is re-used.\n * - When the promise resolves successfully, the `lazyLoad` property is deleted from the state declaration.\n * - If the promise resolves to a [[LazyLoadResult]] which has an array of `states`, those states are registered.\n * - The original transition is retried (this time without the `lazyLoad` property present).\n *\n * - If the `lazyLoad` function fails, then the transition also fails.\n * The failed transition (and the `lazyLoad` function) could potentially be retried by the user.\n *\n * ### Lazy loading state definitions (Future States)\n *\n * State definitions can also be lazy loaded.\n * This might be desirable when building large, multi-module applications.\n *\n * To lazy load state definitions, a Future State should be registered as a placeholder.\n * When the state definitions are lazy loaded, the Future State is deregistered.\n *\n * A future state can act as a placeholder for a single state, or for an entire module of states and substates.\n * A future state should have:\n *\n * - A `name` which ends in `.**`.\n * A future state's `name` property acts as a wildcard [[Glob]].\n * It matches any state name that starts with the `name` (including child states that are not yet loaded).\n * - A `url` prefix.\n * A future state's `url` property acts as a wildcard.\n * UI-Router matches all paths that begin with the `url`.\n * It effectively appends `.*` to the internal regular expression.\n * When the prefix matches, the future state will begin loading.\n * - A `lazyLoad` function.\n * This function should should return a Promise to lazy load the code for one or more [[StateDeclaration]] objects.\n * It should return a [[LazyLoadResult]].\n * Generally, one of the lazy loaded states should have the same name as the future state.\n * The new state will then **replace the future state placeholder** in the registry.\n *\n * ### Additional resources\n *\n * For in depth information on lazy loading and Future States, see the [Lazy Loading Guide](https://ui-router.github.io/guides/lazyload).\n *\n * #### Example: states.js\n * ```js\n *\n * // This child state is a lazy loaded future state\n * // The `lazyLoad` function loads the final state definition\n * {\n * name: 'parent.**',\n * url: '/parent',\n * lazyLoad: () => System.import('./lazy.states.js')\n * }\n * ```\n *\n * #### Example: lazy.states.js\n *\n * This file is lazy loaded. It exports an array of states.\n *\n * ```js\n * import {ChildComponent} from \"./child.component.js\";\n * import {ParentComponent} from \"./parent.component.js\";\n *\n * // This fully defined state replaces the future state\n * let parentState = {\n * // the name should match the future state\n * name: 'parent',\n * url: '/parent/:parentId',\n * component: ParentComponent,\n * resolve: {\n * parentData: ($transition$, ParentService) =>\n * ParentService.get($transition$.params().parentId)\n * }\n * }\n *\n * let childState = {\n * name: 'parent.child',\n * url: '/child/:childId',\n * params: {\n * childId: \"default\"\n * },\n * resolve: {\n * childData: ($transition$, ChildService) =>\n * ChildService.get($transition$.params().childId)\n * }\n * };\n *\n * // This array of states will be registered by the lazyLoad hook\n * let lazyLoadResults = {\n * states: [ parentState, childState ]\n * };\n *\n * export default lazyLoadResults;\n * ```\n *\n * @param transition the [[Transition]] that is activating the future state\n * @param state the [[StateDeclaration]] that the `lazyLoad` function is declared on\n * @return a Promise to load the states.\n * Optionally, if the promise resolves to a [[LazyLoadResult]],\n * the states will be registered with the [[StateRegistry]].\n */\n lazyLoad?: (transition: Transition, state: StateDeclaration) => Promise;\n\n /**\n * @deprecated define individual parameters as [[ParamDeclaration.dynamic]]\n */\n reloadOnSearch?: boolean;\n}\n\n/**\n * The return type of a [[StateDeclaration.lazyLoad]] function\n *\n * If your state has a `lazyLoad` function, it should return a promise.\n * If promise resolves to an object matching this interface, then the `states` array\n * of [[StateDeclaration]] objects will be automatically registered.\n */\nexport interface LazyLoadResult {\n states?: StateDeclaration[];\n}\n\n/**\n * An options object for [[StateService.href]]\n */\nexport interface HrefOptions {\n /**\n * Defines what state to be \"relative from\"\n *\n * When a relative path is found (e.g `^` or `.bar`), defines which state to be relative from.\n */\n relative?: StateOrName;\n\n /**\n * If true, and if there is no url associated with the state provided in the\n * first parameter, then the constructed href url will be built from the first\n * ancestor which has a url.\n */\n lossy?: boolean;\n\n /**\n * If `true` will inherit parameters from the current parameter values.\n */\n inherit?: boolean;\n\n /**\n * If true will generate an absolute url, e.g. `http://www.example.com/fullurl`.\n */\n absolute?: boolean;\n}\n\n/**\n * Either a [[StateDeclaration]] or an ES6 class that implements [[StateDeclaration]]\n * The ES6 class constructor should have no arguments.\n */\nexport type _StateDeclaration = StateDeclaration | { new (): StateDeclaration };\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.d.ts new file mode 100644 index 00000000..bc9d723c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.d.ts @@ -0,0 +1,86 @@ +import { StateObject } from "./stateObject"; +import { StateMatcher } from "./stateMatcher"; +import { UrlMatcherFactory } from "../url/urlMatcherFactory"; +import { Resolvable } from "../resolve/resolvable"; +export declare type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any; +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +export declare function resolvablesBuilder(state: StateObject): Resolvable[]; +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +export declare class StateBuilder { + private matcher; + /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */ + private builders; + constructor(matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory); + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + builder(name: string, fn: BuilderFunction): (BuilderFunction | BuilderFunction[] | Function); + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + build(state: StateObject): StateObject; + parentName(state: StateObject): string; + name(state: StateObject): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js new file mode 100644 index 00000000..6bcb927e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js @@ -0,0 +1,280 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module state */ /** for typedoc */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var strings_1 = require("../common/strings"); +var hof_1 = require("../common/hof"); +var resolvable_1 = require("../resolve/resolvable"); +var coreservices_1 = require("../common/coreservices"); +var parseUrl = function (url) { + if (!predicates_1.isString(url)) + return false; + var root = url.charAt(0) === '^'; + return { val: root ? url.substring(1) : url, root: root }; +}; +function nameBuilder(state) { + return state.name; +} +function selfBuilder(state) { + state.self.$$state = function () { return state; }; + return state.self; +} +function dataBuilder(state) { + if (state.parent && state.parent.data) { + state.data = state.self.data = common_1.inherit(state.parent.data, state.data); + } + return state.data; +} +var getUrlBuilder = function ($urlMatcherFactoryProvider, root) { + return function urlBuilder(state) { + var stateDec = state; + // For future states, i.e., states whose name ends with `.**`, + // match anything that starts with the url prefix + if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\.\*\*$/)) { + stateDec.url += "{remainder:any}"; // match any path (.*) + } + var parsed = parseUrl(stateDec.url), parent = state.parent; + var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { + params: state.params || {}, + paramMap: function (paramConfig, isSearch) { + if (stateDec.reloadOnSearch === false && isSearch) + paramConfig = common_1.extend(paramConfig || {}, { dynamic: true }); + return paramConfig; + } + }); + if (!url) + return null; + if (!$urlMatcherFactoryProvider.isMatcher(url)) + throw new Error("Invalid url '" + url + "' in state '" + state + "'"); + return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append(url); + }; +}; +var getNavigableBuilder = function (isRoot) { + return function navigableBuilder(state) { + return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null); + }; +}; +var getParamsBuilder = function (paramFactory) { + return function paramsBuilder(state) { + var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, config); }; + var urlParams = (state.url && state.url.parameters({ inherit: false })) || []; + var nonUrlParams = common_1.values(common_1.mapObj(common_1.omit(state.params || {}, urlParams.map(hof_1.prop('id'))), makeConfigParam)); + return urlParams.concat(nonUrlParams).map(function (p) { return [p.id, p]; }).reduce(common_1.applyPairs, {}); + }; +}; +function pathBuilder(state) { + return state.parent ? state.parent.path.concat(state) : /*root*/ [state]; +} +function includesBuilder(state) { + var includes = state.parent ? common_1.extend({}, state.parent.includes) : {}; + includes[state.name] = true; + return includes; +} +/** + * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. + * + * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder + * validates the `resolve` property and converts it to a [[Resolvable]] array. + * + * resolve: input value can be: + * + * { + * // analyzed but not injected + * myFooResolve: function() { return "myFooData"; }, + * + * // function.toString() parsed, "DependencyName" dep as string (not min-safe) + * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, + * + * // Array split; "DependencyName" dep as string + * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, + * + * // Array split; DependencyType dep as token (compared using ===) + * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, + * + * // val.$inject used as deps + * // where: + * // corgeResolve.$inject = ["DependencyName"]; + * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } + * // then "DependencyName" dep as string + * myCorgeResolve: corgeResolve, + * + * // inject service by name + * // When a string is found, desugar creating a resolve that injects the named service + * myGraultResolve: "SomeService" + * } + * + * or: + * + * [ + * new Resolvable("myFooResolve", function() { return "myFooData" }), + * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), + * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } + * ] + */ +function resolvablesBuilder(state) { + /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */ + var objects2Tuples = function (resolveObj, resolvePolicies) { + return Object.keys(resolveObj || {}).map(function (token) { return ({ token: token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token] }); }); + }; + /** fetch DI annotations from a function or ng1-style array */ + var annotate = function (fn) { + var $injector = coreservices_1.services.$injector; + // ng1 doesn't have an $injector until runtime. + // If the $injector doesn't exist, use "deferred" literal as a + // marker indicating they should be annotated when runtime starts + return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || "deferred"; + }; + /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */ + var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); }; + /** true if the object looks like a provide literal, or a ng2 Provider */ + var isLikeNg2Provider = function (obj) { return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); }; + /** true if the object looks like a tuple from obj2Tuples */ + var isTupleFromObj = function (obj) { return !!(obj && obj.val && (predicates_1.isString(obj.val) || predicates_1.isArray(obj.val) || predicates_1.isFunction(obj.val))); }; + /** extracts the token from a Provider or provide literal */ + var token = function (p) { return p.provide || p.token; }; + /** Given a literal resolve or provider object, returns a Resolvable */ + var literal2Resolvable = hof_1.pattern([ + [hof_1.prop('resolveFn'), function (p) { return new resolvable_1.Resolvable(token(p), p.resolveFn, p.deps, p.policy); }], + [hof_1.prop('useFactory'), function (p) { return new resolvable_1.Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy); }], + [hof_1.prop('useClass'), function (p) { return new resolvable_1.Resolvable(token(p), function () { return new p.useClass(); }, [], p.policy); }], + [hof_1.prop('useValue'), function (p) { return new resolvable_1.Resolvable(token(p), function () { return p.useValue; }, [], p.policy, p.useValue); }], + [hof_1.prop('useExisting'), function (p) { return new resolvable_1.Resolvable(token(p), common_1.identity, [p.useExisting], p.policy); }], + ]); + var tuple2Resolvable = hof_1.pattern([ + [hof_1.pipe(hof_1.prop("val"), predicates_1.isString), function (tuple) { return new resolvable_1.Resolvable(tuple.token, common_1.identity, [tuple.val], tuple.policy); }], + [hof_1.pipe(hof_1.prop("val"), predicates_1.isArray), function (tuple) { return new resolvable_1.Resolvable(tuple.token, common_1.tail(tuple.val), tuple.val.slice(0, -1), tuple.policy); }], + [hof_1.pipe(hof_1.prop("val"), predicates_1.isFunction), function (tuple) { return new resolvable_1.Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }], + ]); + var item2Resolvable = hof_1.pattern([ + [hof_1.is(resolvable_1.Resolvable), function (r) { return r; }], + [isResolveLiteral, literal2Resolvable], + [isLikeNg2Provider, literal2Resolvable], + [isTupleFromObj, tuple2Resolvable], + [hof_1.val(true), function (obj) { throw new Error("Invalid resolve value: " + strings_1.stringify(obj)); }] + ]); + // If resolveBlock is already an array, use it as-is. + // Otherwise, assume it's an object and convert to an Array of tuples + var decl = state.resolve; + var items = predicates_1.isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {}); + return items.map(item2Resolvable); +} +exports.resolvablesBuilder = resolvablesBuilder; +/** + * @internalapi A internal global service + * + * StateBuilder is a factory for the internal [[StateObject]] objects. + * + * When you register a state with the [[StateRegistry]], you register a plain old javascript object which + * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding + * [[StateObject]] object, which has an API and is used internally. + * + * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function + * using the [[builder]] method. + */ +var StateBuilder = /** @class */ (function () { + function StateBuilder(matcher, urlMatcherFactory) { + this.matcher = matcher; + var self = this; + var root = function () { return matcher.find(""); }; + var isRoot = function (state) { return state.name === ""; }; + function parentBuilder(state) { + if (isRoot(state)) + return null; + return matcher.find(self.parentName(state)) || root(); + } + this.builders = { + name: [nameBuilder], + self: [selfBuilder], + parent: [parentBuilder], + data: [dataBuilder], + // Build a URLMatcher if necessary, either via a relative or absolute URL + url: [getUrlBuilder(urlMatcherFactory, root)], + // Keep track of the closest ancestor state that has a URL (i.e. is navigable) + navigable: [getNavigableBuilder(isRoot)], + params: [getParamsBuilder(urlMatcherFactory.paramFactory)], + // Each framework-specific ui-router implementation should define its own `views` builder + // e.g., src/ng1/statebuilders/views.ts + views: [], + // Keep a full path from the root down to this state as this is needed for state activation. + path: [pathBuilder], + // Speed up $state.includes() as it's used a lot + includes: [includesBuilder], + resolvables: [resolvablesBuilder] + }; + } + /** + * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). + * More than one BuilderFunction can be registered for a given property. + * + * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. + * + * @param name The name of the State property being registered for. + * @param fn The BuilderFunction which will be used to build the State property + * @returns a function which deregisters the BuilderFunction + */ + StateBuilder.prototype.builder = function (name, fn) { + var builders = this.builders; + var array = builders[name] || []; + // Backwards compat: if only one builder exists, return it, else return whole arary. + if (predicates_1.isString(name) && !predicates_1.isDefined(fn)) + return array.length > 1 ? array : array[0]; + if (!predicates_1.isString(name) || !predicates_1.isFunction(fn)) + return; + builders[name] = array; + builders[name].push(fn); + return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; }; + }; + /** + * Builds all of the properties on an essentially blank State object, returning a State object which has all its + * properties and API built. + * + * @param state an uninitialized State object + * @returns the built State object + */ + StateBuilder.prototype.build = function (state) { + var _a = this, matcher = _a.matcher, builders = _a.builders; + var parent = this.parentName(state); + if (parent && !matcher.find(parent, undefined, false)) { + return null; + } + for (var key in builders) { + if (!builders.hasOwnProperty(key)) + continue; + var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, common_1.noop); + state[key] = chain(state); + } + return state; + }; + StateBuilder.prototype.parentName = function (state) { + // name = 'foo.bar.baz.**' + var name = state.name || ""; + // segments = ['foo', 'bar', 'baz', '.**'] + var segments = name.split('.'); + // segments = ['foo', 'bar', 'baz'] + var lastSegment = segments.pop(); + // segments = ['foo', 'bar'] (ignore .** segment for future states) + if (lastSegment === '**') + segments.pop(); + if (segments.length) { + if (state.parent) { + throw new Error("States that specify the 'parent:' property should not have a '.' in their name (" + name + ")"); + } + // 'foo.bar' + return segments.join("."); + } + if (!state.parent) + return ""; + return predicates_1.isString(state.parent) ? state.parent : state.parent.name; + }; + StateBuilder.prototype.name = function (state) { + var name = state.name; + if (name.indexOf('.') !== -1 || !state.parent) + return name; + var parentName = predicates_1.isString(state.parent) ? state.parent : state.parent.name; + return parentName ? parentName + "." + name : name; + }; + return StateBuilder; +}()); +exports.StateBuilder = StateBuilder; +//# sourceMappingURL=stateBuilder.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js.map new file mode 100644 index 00000000..b781ab26 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateBuilder.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateBuilder.js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,KAAkB;QACrB,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACtB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC;QAE3D,IAAI,UAAU,GAAG,qBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3E,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC;IACH,mBAAC;AAAD,CAAC,AA/GD,IA+GC;AA/GY,oCAAY", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport {Obj, omit, noop, extend, inherit, values, applyPairs, tail, mapObj, identity} from \"../common/common\";\nimport {isDefined, isFunction, isString, isArray} from \"../common/predicates\";\nimport {stringify} from \"../common/strings\";\nimport {prop, pattern, is, pipe, val} from \"../common/hof\";\nimport {StateDeclaration} from \"./interface\";\n\nimport {StateObject} from \"./stateObject\";\nimport {StateMatcher} from \"./stateMatcher\";\nimport {Param} from \"../params/param\";\nimport {UrlMatcherFactory} from \"../url/urlMatcherFactory\";\nimport {UrlMatcher} from \"../url/urlMatcher\";\nimport {Resolvable} from \"../resolve/resolvable\";\nimport {services} from \"../common/coreservices\";\nimport {ResolvePolicy} from \"../resolve/interface\";\nimport { ParamFactory } from \"../url/interface\";\n\nconst parseUrl = (url: string): any => {\n if (!isString(url)) return false;\n let root = url.charAt(0) === '^';\n return { val: root ? url.substring(1) : url, root };\n};\n\nexport type BuilderFunction = (state: StateObject, parent?: BuilderFunction) => any;\n\ninterface Builders {\n [key: string]: BuilderFunction[];\n\n name: BuilderFunction[];\n parent: BuilderFunction[];\n data: BuilderFunction[];\n url: BuilderFunction[];\n navigable: BuilderFunction[];\n params: BuilderFunction[];\n views: BuilderFunction[];\n path: BuilderFunction[];\n includes: BuilderFunction[];\n resolvables: BuilderFunction[];\n}\n\n\nfunction nameBuilder(state: StateObject) {\n return state.name;\n}\n\nfunction selfBuilder(state: StateObject) {\n state.self.$$state = () => state;\n return state.self;\n}\n\nfunction dataBuilder(state: StateObject) {\n if (state.parent && state.parent.data) {\n state.data = state.self.data = inherit(state.parent.data, state.data);\n }\n return state.data;\n}\n\nconst getUrlBuilder = ($urlMatcherFactoryProvider: UrlMatcherFactory, root: () => StateObject) =>\nfunction urlBuilder(state: StateObject) {\n let stateDec: StateDeclaration = state;\n\n // For future states, i.e., states whose name ends with `.**`,\n // match anything that starts with the url prefix\n if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\\.\\*\\*$/)) {\n stateDec.url += \"{remainder:any}\"; // match any path (.*)\n }\n\n const parsed = parseUrl(stateDec.url), parent = state.parent;\n const url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, {\n params: state.params || {},\n paramMap: function (paramConfig: any, isSearch: boolean) {\n if (stateDec.reloadOnSearch === false && isSearch) paramConfig = extend(paramConfig || {}, {dynamic: true});\n return paramConfig;\n }\n });\n\n if (!url) return null;\n if (!$urlMatcherFactoryProvider.isMatcher(url)) throw new Error(`Invalid url '${url}' in state '${state}'`);\n return (parsed && parsed.root) ? url : ((parent && parent.navigable) || root()).url.append( url);\n};\n\nconst getNavigableBuilder = (isRoot: (state: StateObject) => boolean) =>\nfunction navigableBuilder(state: StateObject) {\n return !isRoot(state) && state.url ? state : (state.parent ? state.parent.navigable : null);\n};\n\nconst getParamsBuilder = (paramFactory: ParamFactory) =>\nfunction paramsBuilder(state: StateObject): { [key: string]: Param } {\n const makeConfigParam = (config: any, id: string) => paramFactory.fromConfig(id, null, config);\n let urlParams: Param[] = (state.url && state.url.parameters({inherit: false})) || [];\n let nonUrlParams: Param[] = values(mapObj(omit(state.params || {}, urlParams.map(prop('id'))), makeConfigParam));\n return urlParams.concat(nonUrlParams).map(p => [p.id, p]).reduce(applyPairs, {});\n};\n\nfunction pathBuilder(state: StateObject) {\n return state.parent ? state.parent.path.concat(state) : /*root*/ [state];\n}\n\nfunction includesBuilder(state: StateObject) {\n let includes = state.parent ? extend({}, state.parent.includes) : {};\n includes[state.name] = true;\n return includes;\n}\n\n/**\n * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * validates the `resolve` property and converts it to a [[Resolvable]] array.\n *\n * resolve: input value can be:\n *\n * {\n * // analyzed but not injected\n * myFooResolve: function() { return \"myFooData\"; },\n *\n * // function.toString() parsed, \"DependencyName\" dep as string (not min-safe)\n * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },\n *\n * // Array split; \"DependencyName\" dep as string\n * myBazResolve: [ \"DependencyName\", function(dep) { return dep.fetchSomethingAsPromise() },\n *\n * // Array split; DependencyType dep as token (compared using ===)\n * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },\n *\n * // val.$inject used as deps\n * // where:\n * // corgeResolve.$inject = [\"DependencyName\"];\n * // function corgeResolve(dep) { dep.fetchSometingAsPromise() }\n * // then \"DependencyName\" dep as string\n * myCorgeResolve: corgeResolve,\n *\n * // inject service by name\n * // When a string is found, desugar creating a resolve that injects the named service\n * myGraultResolve: \"SomeService\"\n * }\n *\n * or:\n *\n * [\n * new Resolvable(\"myFooResolve\", function() { return \"myFooData\" }),\n * new Resolvable(\"myBarResolve\", function(dep) { return dep.fetchSomethingAsPromise() }, [ \"DependencyName\" ]),\n * { provide: \"myBazResolve\", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ \"DependencyName\" ] }\n * ]\n */\nexport function resolvablesBuilder(state: StateObject): Resolvable[] {\n interface Tuple { token: any, val: any, deps: any[], policy: ResolvePolicy }\n \n /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */\n const objects2Tuples = (resolveObj: Obj, resolvePolicies: { [key: string]: ResolvePolicy }) =>\n Object.keys(resolveObj || {}).map(token => ({token, val: resolveObj[token], deps: undefined, policy: resolvePolicies[token]}));\n\n /** fetch DI annotations from a function or ng1-style array */\n const annotate = (fn: Function) => {\n let $injector = services.$injector;\n // ng1 doesn't have an $injector until runtime.\n // If the $injector doesn't exist, use \"deferred\" literal as a\n // marker indicating they should be annotated when runtime starts\n return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || \"deferred\";\n };\n\n /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */\n const isResolveLiteral = (obj: any) => !!(obj.token && obj.resolveFn);\n\n /** true if the object looks like a provide literal, or a ng2 Provider */\n const isLikeNg2Provider = (obj: any) => !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass));\n\n /** true if the object looks like a tuple from obj2Tuples */\n const isTupleFromObj = (obj: any) => !!(obj && obj.val && (isString(obj.val) || isArray(obj.val) || isFunction(obj.val)));\n\n /** extracts the token from a Provider or provide literal */\n const token = (p: any) => p.provide || p.token;\n\n /** Given a literal resolve or provider object, returns a Resolvable */\n const literal2Resolvable = pattern([\n [prop('resolveFn'), p => new Resolvable(token(p), p.resolveFn, p.deps, p.policy)],\n [prop('useFactory'), p => new Resolvable(token(p), p.useFactory, (p.deps || p.dependencies), p.policy)],\n [prop('useClass'), p => new Resolvable(token(p), () => new (p.useClass)(), [], p.policy)],\n [prop('useValue'), p => new Resolvable(token(p), () => p.useValue, [], p.policy, p.useValue)],\n [prop('useExisting'), p => new Resolvable(token(p), identity, [p.useExisting], p.policy)],\n ]);\n\n const tuple2Resolvable = pattern([\n [pipe(prop(\"val\"), isString), (tuple: Tuple) => new Resolvable(tuple.token, identity, [ tuple.val ], tuple.policy)],\n [pipe(prop(\"val\"), isArray), (tuple: Tuple) => new Resolvable(tuple.token, tail( tuple.val), tuple.val.slice(0, -1), tuple.policy)],\n [pipe(prop(\"val\"), isFunction), (tuple: Tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],\n ]);\n\n const item2Resolvable = <(obj: any) => Resolvable> pattern([\n [is(Resolvable), (r: Resolvable) => r],\n [isResolveLiteral, literal2Resolvable],\n [isLikeNg2Provider, literal2Resolvable],\n [isTupleFromObj, tuple2Resolvable],\n [val(true), (obj: any) => { throw new Error(\"Invalid resolve value: \" + stringify(obj)) }]\n ]);\n\n // If resolveBlock is already an array, use it as-is.\n // Otherwise, assume it's an object and convert to an Array of tuples\n let decl = state.resolve;\n let items: any[] = isArray(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {});\n return items.map(item2Resolvable);\n}\n\n/**\n * @internalapi A internal global service\n *\n * StateBuilder is a factory for the internal [[StateObject]] objects.\n *\n * When you register a state with the [[StateRegistry]], you register a plain old javascript object which\n * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding\n * [[StateObject]] object, which has an API and is used internally.\n *\n * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function\n * using the [[builder]] method.\n */\nexport class StateBuilder {\n /** An object that contains all the BuilderFunctions registered, key'd by the name of the State property they build */\n private builders: Builders;\n\n constructor(private matcher: StateMatcher, urlMatcherFactory: UrlMatcherFactory) {\n let self = this;\n\n const root = () => matcher.find(\"\");\n const isRoot = (state: StateObject) => state.name === \"\";\n\n function parentBuilder(state: StateObject) {\n if (isRoot(state)) return null;\n return matcher.find(self.parentName(state)) || root();\n }\n\n this.builders = {\n name: [ nameBuilder ],\n self: [ selfBuilder ],\n parent: [ parentBuilder ],\n data: [ dataBuilder ],\n // Build a URLMatcher if necessary, either via a relative or absolute URL\n url: [ getUrlBuilder(urlMatcherFactory, root) ],\n // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n navigable: [ getNavigableBuilder(isRoot) ],\n params: [ getParamsBuilder(urlMatcherFactory.paramFactory) ],\n // Each framework-specific ui-router implementation should define its own `views` builder\n // e.g., src/ng1/statebuilders/views.ts\n views: [],\n // Keep a full path from the root down to this state as this is needed for state activation.\n path: [ pathBuilder ],\n // Speed up $state.includes() as it's used a lot\n includes: [ includesBuilder ],\n resolvables: [ resolvablesBuilder ]\n };\n }\n\n /**\n * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).\n * More than one BuilderFunction can be registered for a given property.\n *\n * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.\n *\n * @param name The name of the State property being registered for.\n * @param fn The BuilderFunction which will be used to build the State property\n * @returns a function which deregisters the BuilderFunction\n */\n builder(name: string, fn: BuilderFunction): (BuilderFunction|BuilderFunction[]|Function) {\n let builders = this.builders;\n let array = builders[name] || [];\n // Backwards compat: if only one builder exists, return it, else return whole arary.\n if (isString(name) && !isDefined(fn)) return array.length > 1 ? array : array[0];\n if (!isString(name) || !isFunction(fn)) return;\n\n builders[name] = array;\n builders[name].push(fn);\n return () => builders[name].splice(builders[name].indexOf(fn, 1)) && null;\n }\n\n /**\n * Builds all of the properties on an essentially blank State object, returning a State object which has all its\n * properties and API built.\n *\n * @param state an uninitialized State object\n * @returns the built State object\n */\n build(state: StateObject): StateObject {\n let {matcher, builders} = this;\n let parent = this.parentName(state);\n\n if (parent && !matcher.find(parent, undefined, false)) {\n return null;\n }\n\n for (let key in builders) {\n if (!builders.hasOwnProperty(key)) continue;\n let chain = builders[key].reduce((parentFn: BuilderFunction, step: BuilderFunction) => (_state) => step(_state, parentFn), noop);\n state[key] = chain(state);\n }\n return state;\n }\n\n parentName(state: StateObject) {\n // name = 'foo.bar.baz.**'\n let name = state.name || \"\";\n // segments = ['foo', 'bar', 'baz', '.**']\n let segments = name.split('.');\n // segments = ['foo', 'bar', 'baz']\n let lastSegment = segments.pop();\n // segments = ['foo', 'bar'] (ignore .** segment for future states)\n if (lastSegment === '**') segments.pop();\n\n if (segments.length) {\n if (state.parent) {\n throw new Error(`States that specify the 'parent:' property should not have a '.' in their name (${name})`);\n }\n\n // 'foo.bar'\n return segments.join(\".\");\n }\n\n if (!state.parent) return \"\";\n return isString(state.parent) ? state.parent : state.parent.name;\n }\n\n name(state: StateObject) {\n let name = state.name;\n if (name.indexOf('.') !== -1 || !state.parent) return name;\n\n let parentName = isString(state.parent) ? state.parent : state.parent.name;\n return parentName ? parentName + \".\" + name : name;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.d.ts new file mode 100644 index 00000000..6ddc155d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.d.ts @@ -0,0 +1,11 @@ +import { StateOrName } from "./interface"; +import { StateObject } from "./stateObject"; +export declare class StateMatcher { + private _states; + constructor(_states: { + [key: string]: StateObject; + }); + isRelative(stateName: string): boolean; + find(stateOrName: StateOrName, base?: StateOrName, matchGlob?: boolean): StateObject; + resolvePath(name: string, base: StateOrName): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js new file mode 100644 index 00000000..5ce6519d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module state */ /** for typedoc */ +var predicates_1 = require("../common/predicates"); +var common_1 = require("../common/common"); +var StateMatcher = /** @class */ (function () { + function StateMatcher(_states) { + this._states = _states; + } + StateMatcher.prototype.isRelative = function (stateName) { + stateName = stateName || ""; + return stateName.indexOf(".") === 0 || stateName.indexOf("^") === 0; + }; + StateMatcher.prototype.find = function (stateOrName, base, matchGlob) { + if (matchGlob === void 0) { matchGlob = true; } + if (!stateOrName && stateOrName !== "") + return undefined; + var isStr = predicates_1.isString(stateOrName); + var name = isStr ? stateOrName : stateOrName.name; + if (this.isRelative(name)) + name = this.resolvePath(name, base); + var state = this._states[name]; + if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { + return state; + } + else if (isStr && matchGlob) { + var _states = common_1.values(this._states); + var matches = _states.filter(function (state) { + return state.__stateObjectCache.nameGlob && + state.__stateObjectCache.nameGlob.matches(name); + }); + if (matches.length > 1) { + console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; })); + } + return matches[0]; + } + return undefined; + }; + StateMatcher.prototype.resolvePath = function (name, base) { + if (!base) + throw new Error("No reference point given for path '" + name + "'"); + var baseState = this.find(base); + var splitName = name.split("."), i = 0, pathLength = splitName.length, current = baseState; + for (; i < pathLength; i++) { + if (splitName[i] === "" && i === 0) { + current = baseState; + continue; + } + if (splitName[i] === "^") { + if (!current.parent) + throw new Error("Path '" + name + "' not valid for state '" + baseState.name + "'"); + current = current.parent; + continue; + } + break; + } + var relName = splitName.slice(i).join("."); + return current.name + (current.name && relName ? "." : "") + relName; + }; + return StateMatcher; +}()); +exports.StateMatcher = StateMatcher; +//# sourceMappingURL=stateMatcher.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js.map new file mode 100644 index 00000000..599b30e7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateMatcher.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateMatcher.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateMatcher.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB,CAAC,kBAAkB;AACvC,mDAA8C;AAG9C,2CAAwC;AAExC;IACE,sBAAqB,OAAuC;QAAvC,YAAO,GAAP,OAAO,CAAgC;IAAI,CAAC;IAEjE,iCAAU,GAAV,UAAW,SAAiB;QAC1B,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QAC5B,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,K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AC;QACD,IAAI,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACvE,CAAC;IACH,mBAAC;AAAD,CAAC,AAxDD,IAwDC;AAxDY,oCAAY", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport {isString} from \"../common/predicates\";\nimport {StateOrName} from \"./interface\";\nimport {StateObject} from \"./stateObject\";\nimport {values} from \"../common/common\";\n\nexport class StateMatcher {\n constructor (private _states: { [key: string]: StateObject }) { }\n \n isRelative(stateName: string) {\n stateName = stateName || \"\";\n return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n }\n\n\n find(stateOrName: StateOrName, base?: StateOrName, matchGlob = true): StateObject {\n if (!stateOrName && stateOrName !== \"\") return undefined;\n let isStr = isString(stateOrName);\n let name: string = isStr ? stateOrName : (stateOrName).name;\n\n if (this.isRelative(name)) name = this.resolvePath(name, base);\n let state = this._states[name];\n\n if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n return state;\n } else if (isStr && matchGlob) {\n let _states = values(this._states);\n let matches = _states.filter(state =>\n state.__stateObjectCache.nameGlob &&\n state.__stateObjectCache.nameGlob.matches(name)\n );\n\n if (matches.length > 1) {\n console.log(`stateMatcher.find: Found multiple matches for ${name} using glob: `, matches.map(match => match.name));\n }\n return matches[0];\n }\n return undefined;\n }\n\n resolvePath(name: string, base: StateOrName) {\n if (!base) throw new Error(`No reference point given for path '${name}'`);\n \n let baseState: StateObject = this.find(base);\n\n let splitName = name.split(\".\"), i = 0, pathLength = splitName.length, current = baseState;\n\n for (; i < pathLength; i++) {\n if (splitName[i] === \"\" && i === 0) {\n current = baseState;\n continue;\n }\n if (splitName[i] === \"^\") {\n if (!current.parent) throw new Error(`Path '${name}' not valid for state '${baseState.name}'`);\n current = current.parent;\n continue;\n }\n break;\n }\n let relName = splitName.slice(i).join(\".\");\n return current.name + (current.name && relName ? \".\" : \"\") + relName;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.d.ts new file mode 100644 index 00000000..4400be87 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.d.ts @@ -0,0 +1,158 @@ +/** + * @coreapi + * @module state + */ +/** for typedoc */ +import { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from "./interface"; +import { Param } from "../params/param"; +import { UrlMatcher } from "../url/urlMatcher"; +import { Resolvable } from "../resolve/resolvable"; +import { TransitionStateHookFn } from "../transition/interface"; +import { TargetState } from "./targetState"; +import { Transition } from "../transition/transition"; +import { Glob } from "../common/glob"; +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +export declare class StateObject { + /** The parent [[StateObject]] */ + parent: StateObject; + /** The name used to register the state */ + name: string; + /** Prototypally inherits from [[StateDeclaration.abstract]] */ + abstract: boolean; + /** Prototypally inherits from [[StateDeclaration.resolve]] */ + resolve: ({ + [key: string]: (string | any[] | Function); + } | any[]); + /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */ + resolvables: Resolvable[]; + /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */ + resolvePolicy: any; + /** A compiled URLMatcher which detects when the state's URL is matched */ + url: UrlMatcher; + /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */ + params: { + [key: string]: Param; + }; + /** + * The views for the state. + * Note: `@uirouter/core` does not register a builder for views. + * The framework specific code should register a `views` builder. + */ + views: { + [key: string]: _ViewDeclaration; + }; + /** + * The original [[StateDeclaration]] used to build this [[StateObject]]. + * Note: `this` object also prototypally inherits from the `self` declaration object. + */ + self: StateDeclaration; + /** The nearest parent [[StateObject]] which has a URL */ + navigable: StateObject; + /** The parent [[StateObject]] objects from this state up to the root */ + path: StateObject[]; + /** + * Prototypally inherits from [[StateDeclaration.data]] + * Note: This is the only field on the [[StateDeclaration]] which is mutated. + * The definition object's `data` field is replaced with a new object + * which prototypally inherits from the parent state definition's `data` field. + */ + data: any; + /** + * An object containing the parent States' names as keys and + * true as their values. + */ + includes: { + [name: string]: boolean; + }; + /** Prototypally inherits from [[StateDeclaration.onExit]] */ + onExit: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.onRetain]] */ + onRetain: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.onEnter]] */ + onEnter: TransitionStateHookFn; + /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */ + lazyLoad: (transition: Transition, state: StateDeclaration) => Promise; + /** Prototypally inherits from [[StateDeclaration.redirectTo]] */ + redirectTo: (string | (($transition$: Transition) => TargetState) | { + state: (string | StateDeclaration); + params: { + [key: string]: any; + }; + }); + /** @hidden */ + __stateObjectCache: { + /** Might be null */ + nameGlob?: Glob; + }; + /** @deprecated use State.create() */ + constructor(config?: StateDeclaration); + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + static create(stateDecl: _StateDeclaration): StateObject; + /** Predicate which returns true if the object is an class with @State() decorator */ + static isStateClass: (stateDecl: _StateDeclaration) => stateDecl is new () => StateDeclaration; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + static isState: (obj: any) => obj is StateObject; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + is(ref: StateObject | StateDeclaration | string): boolean; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + fqn(): string; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + root(): StateObject; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + parameters(opts?: { + inherit?: boolean; + matchingKeys?: any; + }): Param[]; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + parameter(id: string, opts?: { + inherit?: boolean; + }): Param; + toString(): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js new file mode 100644 index 00000000..17966aca --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js @@ -0,0 +1,114 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var glob_1 = require("../common/glob"); +var predicates_1 = require("../common/predicates"); +/** + * Internal representation of a UI-Router state. + * + * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. + * + * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. + * + * This class prototypally inherits from the corresponding [[StateDeclaration]]. + * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. + */ +var StateObject = /** @class */ (function () { + /** @deprecated use State.create() */ + function StateObject(config) { + return StateObject.create(config || {}); + } + /** + * Create a state object to put the private/internal implementation details onto. + * The object's prototype chain looks like: + * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) + * + * @param stateDecl the user-supplied State Declaration + * @returns {StateObject} an internal State object + */ + StateObject.create = function (stateDecl) { + stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl; + var state = common_1.inherit(common_1.inherit(stateDecl, StateObject.prototype)); + stateDecl.$$state = function () { return state; }; + state.self = stateDecl; + state.__stateObjectCache = { + nameGlob: glob_1.Glob.fromString(state.name) // might return null + }; + return state; + }; + /** + * Returns true if the provided parameter is the same state. + * + * Compares the identity of the state against the passed value, which is either an object + * reference to the actual `State` instance, the original definition object passed to + * `$stateProvider.state()`, or the fully-qualified name. + * + * @param ref Can be one of (a) a `State` instance, (b) an object that was passed + * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. + * @returns Returns `true` if `ref` matches the current `State` instance. + */ + StateObject.prototype.is = function (ref) { + return this === ref || this.self === ref || this.fqn() === ref; + }; + /** + * @deprecated this does not properly handle dot notation + * @returns Returns a dot-separated name of the state. + */ + StateObject.prototype.fqn = function () { + if (!this.parent || !(this.parent instanceof this.constructor)) + return this.name; + var name = this.parent.fqn(); + return name ? name + "." + this.name : this.name; + }; + /** + * Returns the root node of this state's tree. + * + * @returns The root of this state's tree. + */ + StateObject.prototype.root = function () { + return this.parent && this.parent.root() || this; + }; + /** + * Gets the state's `Param` objects + * + * Gets the list of [[Param]] objects owned by the state. + * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. + * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object + * + * @param opts options + */ + StateObject.prototype.parameters = function (opts) { + opts = common_1.defaults(opts, { inherit: true, matchingKeys: null }); + var inherited = opts.inherit && this.parent && this.parent.parameters() || []; + return inherited.concat(common_1.values(this.params)) + .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); }); + }; + /** + * Returns a single [[Param]] that is owned by the state + * + * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. + * @param id the name of the [[Param]] to return + * @param opts options + */ + StateObject.prototype.parameter = function (id, opts) { + if (opts === void 0) { opts = {}; } + return (this.url && this.url.parameter(id, opts) || + common_1.find(common_1.values(this.params), hof_1.propEq('id', id)) || + opts.inherit && this.parent && this.parent.parameter(id)); + }; + StateObject.prototype.toString = function () { + return this.fqn(); + }; + /** Predicate which returns true if the object is an class with @State() decorator */ + StateObject.isStateClass = function (stateDecl) { + return predicates_1.isFunction(stateDecl) && stateDecl['__uiRouterState'] === true; + }; + /** Predicate which returns true if the object is an internal [[StateObject]] object */ + StateObject.isState = function (obj) { + return predicates_1.isObject(obj['__stateObjectCache']); + }; + return StateObject; +}()); +exports.StateObject = StateObject; +//# sourceMappingURL=stateObject.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js.map new file mode 100644 index 00000000..c40cce22 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateObject.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateObject.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateObject.ts" + ], + "names": [], + "mappings": ";;AAMA,2CAAmE;AACnE,qCAAuC;AAOvC,uCAAsC;AACtC,mDAA4D;AAE5D;;;;;;;;;GASG;AACH;IAkFE,qCAAqC;IACrC,qBAAY,MAAyB;QACnC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACI,kBAAM,GAAb,UAAc,SAA4B;QACxC,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC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AC;IAAnC,CAAmC,CAAC;IAsE1C,kBAAC;CAAA,AAvLD,IAuLC;AAvLY,kCAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */\n/** for typedoc */\nimport { StateDeclaration, _ViewDeclaration, _StateDeclaration, LazyLoadResult } from \"./interface\";\nimport { defaults, values, find, inherit } from \"../common/common\";\nimport { propEq } from \"../common/hof\";\nimport { Param } from \"../params/param\";\nimport { UrlMatcher } from \"../url/urlMatcher\";\nimport { Resolvable } from \"../resolve/resolvable\";\nimport { TransitionStateHookFn } from \"../transition/interface\";\nimport { TargetState } from \"./targetState\";\nimport { Transition } from \"../transition/transition\";\nimport { Glob } from \"../common/glob\";\nimport { isObject, isFunction } from \"../common/predicates\";\n\n/**\n * Internal representation of a UI-Router state.\n *\n * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].\n *\n * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.\n *\n * This class prototypally inherits from the corresponding [[StateDeclaration]].\n * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].\n */\nexport class StateObject {\n /** The parent [[StateObject]] */\n public parent: StateObject;\n\n /** The name used to register the state */\n public name: string;\n\n /** Prototypally inherits from [[StateDeclaration.abstract]] */\n public abstract: boolean;\n\n /** Prototypally inherits from [[StateDeclaration.resolve]] */\n public resolve: ({ [key: string]: (string|any[]|Function) }|any[]);\n\n /** A list of [[Resolvable]] objects. The internal representation of [[resolve]]. */\n public resolvables: Resolvable[];\n\n /** Prototypally inherits from [[StateDeclaration.resolvePolicy]] */\n public resolvePolicy: any;\n\n /** A compiled URLMatcher which detects when the state's URL is matched */\n public url: UrlMatcher;\n\n /** The parameters for the state, built from the URL and [[StateDeclaration.params]] */\n public params: { [key: string]: Param };\n\n /**\n * The views for the state.\n * Note: `@uirouter/core` does not register a builder for views.\n * The framework specific code should register a `views` builder.\n */\n public views: { [key: string]: _ViewDeclaration; };\n\n /**\n * The original [[StateDeclaration]] used to build this [[StateObject]].\n * Note: `this` object also prototypally inherits from the `self` declaration object.\n */\n public self: StateDeclaration;\n\n /** The nearest parent [[StateObject]] which has a URL */\n public navigable: StateObject;\n\n /** The parent [[StateObject]] objects from this state up to the root */\n public path: StateObject[];\n\n /**\n * Prototypally inherits from [[StateDeclaration.data]]\n * Note: This is the only field on the [[StateDeclaration]] which is mutated.\n * The definition object's `data` field is replaced with a new object\n * which prototypally inherits from the parent state definition's `data` field.\n */\n public data: any;\n\n /** \n * An object containing the parent States' names as keys and \n * true as their values.\n */\n public includes: { [name: string]: boolean };\n\n /** Prototypally inherits from [[StateDeclaration.onExit]] */\n public onExit: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onRetain]] */\n public onRetain: TransitionStateHookFn;\n /** Prototypally inherits from [[StateDeclaration.onEnter]] */\n public onEnter: TransitionStateHookFn;\n\n /** Prototypally inherits from [[StateDeclaration.lazyLoad]] */\n public lazyLoad: (transition: Transition, state: StateDeclaration) => Promise;\n\n /** Prototypally inherits from [[StateDeclaration.redirectTo]] */\n redirectTo: (\n string |\n (($transition$: Transition) => TargetState) |\n { state: (string|StateDeclaration), params: { [key: string]: any }}\n );\n\n /** @hidden */\n __stateObjectCache: {\n /** Might be null */\n nameGlob?: Glob\n };\n\n\n /** @deprecated use State.create() */\n constructor(config?: StateDeclaration) {\n return StateObject.create(config || {});\n }\n\n /**\n * Create a state object to put the private/internal implementation details onto.\n * The object's prototype chain looks like:\n * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)\n *\n * @param stateDecl the user-supplied State Declaration\n * @returns {StateObject} an internal State object\n */\n static create(stateDecl: _StateDeclaration): StateObject {\n stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl;\n\n let state = inherit(inherit(stateDecl, StateObject.prototype)) as StateObject;\n stateDecl.$$state = () => state;\n state.self = stateDecl;\n state.__stateObjectCache = {\n nameGlob: Glob.fromString(state.name) // might return null\n };\n return state;\n }\n\n /** Predicate which returns true if the object is an class with @State() decorator */\n static isStateClass = (stateDecl: _StateDeclaration): stateDecl is ({ new (): StateDeclaration }) =>\n isFunction(stateDecl) && stateDecl['__uiRouterState'] === true;\n\n /** Predicate which returns true if the object is an internal [[StateObject]] object */\n static isState = (obj: any): obj is StateObject =>\n isObject(obj['__stateObjectCache']);\n\n /**\n * Returns true if the provided parameter is the same state.\n *\n * Compares the identity of the state against the passed value, which is either an object\n * reference to the actual `State` instance, the original definition object passed to\n * `$stateProvider.state()`, or the fully-qualified name.\n *\n * @param ref Can be one of (a) a `State` instance, (b) an object that was passed\n * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.\n * @returns Returns `true` if `ref` matches the current `State` instance.\n */\n is(ref: StateObject|StateDeclaration|string): boolean {\n return this === ref || this.self === ref || this.fqn() === ref;\n }\n\n /**\n * @deprecated this does not properly handle dot notation\n * @returns Returns a dot-separated name of the state.\n */\n fqn(): string {\n if (!this.parent || !(this.parent instanceof this.constructor)) return this.name;\n let name = this.parent.fqn();\n return name ? name + \".\" + this.name : this.name;\n }\n\n /**\n * Returns the root node of this state's tree.\n *\n * @returns The root of this state's tree.\n */\n root(): StateObject {\n return this.parent && this.parent.root() || this;\n }\n\n /**\n * Gets the state's `Param` objects\n *\n * Gets the list of [[Param]] objects owned by the state.\n * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.\n * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object\n *\n * @param opts options\n */\n parameters(opts?: { inherit?: boolean, matchingKeys?: any }): Param[] {\n opts = defaults(opts, { inherit: true, matchingKeys: null });\n let inherited = opts.inherit && this.parent && this.parent.parameters() || [];\n return inherited.concat(values(this.params))\n .filter(param => !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id));\n }\n\n /**\n * Returns a single [[Param]] that is owned by the state\n *\n * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.\n * @param id the name of the [[Param]] to return\n * @param opts options\n */\n parameter(id: string, opts: { inherit?: boolean } = {}): Param {\n return (\n this.url && this.url.parameter(id, opts) ||\n find(values(this.params), propEq('id', id)) ||\n opts.inherit && this.parent && this.parent.parameter(id)\n );\n }\n\n toString() {\n return this.fqn();\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.d.ts new file mode 100644 index 00000000..cc9ebb05 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.d.ts @@ -0,0 +1,29 @@ +import { _StateDeclaration } from "./interface"; +import { StateObject } from "./stateObject"; +import { StateBuilder } from "./stateBuilder"; +import { StateRegistryListener, StateRegistry } from "./stateRegistry"; +import { Disposable } from "../interface"; +import { UrlRouter } from "../url/urlRouter"; +import { StateMatcher } from "./stateMatcher"; +/** @internalapi */ +export declare class StateQueueManager implements Disposable { + private $registry; + private $urlRouter; + states: { + [key: string]: StateObject; + }; + builder: StateBuilder; + listeners: StateRegistryListener[]; + queue: StateObject[]; + matcher: StateMatcher; + constructor($registry: StateRegistry, $urlRouter: UrlRouter, states: { + [key: string]: StateObject; + }, builder: StateBuilder, listeners: StateRegistryListener[]); + /** @internalapi */ + dispose(): void; + register(stateDecl: _StateDeclaration): StateObject; + flush(): { + [key: string]: StateObject; + }; + attachRoute(state: StateObject): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js new file mode 100644 index 00000000..2f803992 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js @@ -0,0 +1,92 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** @module state */ /** for typedoc */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var stateObject_1 = require("./stateObject"); +var hof_1 = require("../common/hof"); +/** @internalapi */ +var StateQueueManager = /** @class */ (function () { + function StateQueueManager($registry, $urlRouter, states, builder, listeners) { + this.$registry = $registry; + this.$urlRouter = $urlRouter; + this.states = states; + this.builder = builder; + this.listeners = listeners; + this.queue = []; + this.matcher = $registry.matcher; + } + /** @internalapi */ + StateQueueManager.prototype.dispose = function () { + this.queue = []; + }; + StateQueueManager.prototype.register = function (stateDecl) { + var queue = this.queue; + var state = stateObject_1.StateObject.create(stateDecl); + var name = state.name; + if (!predicates_1.isString(name)) + throw new Error("State must have a valid name"); + if (this.states.hasOwnProperty(name) || common_1.inArray(queue.map(hof_1.prop('name')), name)) + throw new Error("State '" + name + "' is already defined"); + queue.push(state); + this.flush(); + return state; + }; + StateQueueManager.prototype.flush = function () { + var _this = this; + var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder; + var registered = [], // states that got registered + orphans = [], // states that don't yet have a parent registered + previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered + var getState = function (name) { + return _this.states.hasOwnProperty(name) && _this.states[name]; + }; + while (queue.length > 0) { + var state = queue.shift(); + var name_1 = state.name; + var result = builder.build(state); + var orphanIdx = orphans.indexOf(state); + if (result) { + var existingState = getState(name_1); + if (existingState && existingState.name === name_1) { + throw new Error("State '" + name_1 + "' is already defined"); + } + var existingFutureState = getState(name_1 + ".**"); + if (existingFutureState) { + // Remove future state of the same name + this.$registry.deregister(existingFutureState); + } + states[name_1] = state; + this.attachRoute(state); + if (orphanIdx >= 0) + orphans.splice(orphanIdx, 1); + registered.push(state); + continue; + } + var prev = previousQueueLength[name_1]; + previousQueueLength[name_1] = queue.length; + if (orphanIdx >= 0 && prev === queue.length) { + // Wait until two consecutive iterations where no additional states were dequeued successfully. + // throw new Error(`Cannot register orphaned state '${name}'`); + queue.push(state); + return states; + } + else if (orphanIdx < 0) { + orphans.push(state); + } + queue.push(state); + } + if (registered.length) { + this.listeners.forEach(function (listener) { return listener("registered", registered.map(function (s) { return s.self; })); }); + } + return states; + }; + StateQueueManager.prototype.attachRoute = function (state) { + if (state.abstract || !state.url) + return; + this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state)); + }; + return StateQueueManager; +}()); +exports.StateQueueManager = StateQueueManager; +//# sourceMappingURL=stateQueueManager.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js.map new file mode 100644 index 00000000..b1ba44ff --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateQueueManager.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateQueueManager.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateQueueManager.ts" + ], + "names": [], + "mappings": ";;AAAA,oBAAoB,CAAC,kBAAkB;AACvC,2CAA2C;AAC3C,mDAAgD;AAEhD,6CAA4C;AAK5C,qCAAqC;AAGrC,mBAAmB;AACnB;IAIE,2BACY,SAAwB,EACxB,UAAqB,EACtB,MAAuC,EACvC,OAAqB,EACrB,SAAkC;QAJjC,cAAS,GAAT,SAAS,CAAe;QACxB,eAAU,GAAV,UAAU,CAAW;QACtB,WAAM,GAAN,MAAM,CAAiC;QACvC,YAAO,GAAP,OAAO,CAAc;QACrB,cAAS,GAAT,SAAS,CAAyB;QAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,mBAAmB;IACnB,mCAAO,GAAP;QACE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,oCAAQ,GAAR,UAAS,SAA4B;QACnC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,KAAK,GAAG,yBAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEtB,EAAE,CAAC,CAAC,CAAC,qBA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MAAM,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC,EAAnD,CAAmD,CAAC,CAAC;QAC1F,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,uCAAW,GAAX,UAAY,KAAkB;QAC5B,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;YAAC,MAAM,CAAC;QAEzC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;IACH,wBAAC;AAAD,CAAC,AA7FD,IA6FC;AA7FY,8CAAiB", + "sourcesContent": [ + "/** @module state */ /** for typedoc */\nimport { inArray } from \"../common/common\";\nimport { isString } from \"../common/predicates\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { StateObject } from \"./stateObject\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateRegistryListener, StateRegistry } from \"./stateRegistry\";\nimport { Disposable } from \"../interface\";\nimport { UrlRouter } from \"../url/urlRouter\";\nimport { prop } from \"../common/hof\";\nimport { StateMatcher } from \"./stateMatcher\";\n\n/** @internalapi */\nexport class StateQueueManager implements Disposable {\n queue: StateObject[];\n matcher: StateMatcher;\n\n constructor(\n private $registry: StateRegistry,\n private $urlRouter: UrlRouter,\n public states: { [key: string]: StateObject; },\n public builder: StateBuilder,\n public listeners: StateRegistryListener[]) {\n this.queue = [];\n this.matcher = $registry.matcher;\n }\n\n /** @internalapi */\n dispose() {\n this.queue = [];\n }\n\n register(stateDecl: _StateDeclaration) {\n let queue = this.queue;\n let state = StateObject.create(stateDecl);\n let name = state.name;\n\n if (!isString(name)) throw new Error(\"State must have a valid name\");\n if (this.states.hasOwnProperty(name) || inArray(queue.map(prop('name')), name))\n throw new Error(`State '${name}' is already defined`);\n\n queue.push(state);\n this.flush();\n\n return state;\n }\n\n flush() {\n let {queue, states, builder} = this;\n let registered: StateObject[] = [], // states that got registered\n orphans: StateObject[] = [], // states that don't yet have a parent registered\n previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered\n const getState = (name) =>\n this.states.hasOwnProperty(name) && this.states[name];\n\n while (queue.length > 0) {\n let state: StateObject = queue.shift();\n let name = state.name;\n let result: StateObject = builder.build(state);\n let orphanIdx: number = orphans.indexOf(state);\n\n if (result) {\n let existingState = getState(name);\n if (existingState && existingState.name === name) {\n throw new Error(`State '${name}' is already defined`);\n }\n\n let existingFutureState = getState(name + \".**\");\n if (existingFutureState) {\n // Remove future state of the same name\n this.$registry.deregister(existingFutureState);\n }\n\n states[name] = state;\n this.attachRoute(state);\n if (orphanIdx >= 0) orphans.splice(orphanIdx, 1);\n registered.push(state);\n continue;\n }\n\n let prev = previousQueueLength[name];\n previousQueueLength[name] = queue.length;\n if (orphanIdx >= 0 && prev === queue.length) {\n // Wait until two consecutive iterations where no additional states were dequeued successfully.\n // throw new Error(`Cannot register orphaned state '${name}'`);\n queue.push(state);\n return states;\n } else if (orphanIdx < 0) {\n orphans.push(state);\n }\n\n queue.push(state);\n }\n\n if (registered.length) {\n this.listeners.forEach(listener => listener(\"registered\", registered.map(s => s.self)));\n }\n\n return states;\n }\n\n attachRoute(state: StateObject) {\n if (state.abstract || !state.url) return;\n\n this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(state));\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.d.ts new file mode 100644 index 00000000..274a14c8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.d.ts @@ -0,0 +1,122 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { StateObject } from "./stateObject"; +import { StateMatcher } from "./stateMatcher"; +import { StateQueueManager } from "./stateQueueManager"; +import { StateDeclaration, _StateDeclaration } from "./interface"; +import { BuilderFunction } from "./stateBuilder"; +import { StateOrName } from "./interface"; +import { UIRouter } from "../router"; +/** + * The signature for the callback function provided to [[StateRegistry.onStatesChanged]]. + * + * This callback receives two parameters: + * + * @param event a string; either "registered" or "deregistered" + * @param states the list of [[StateDeclaration]]s that were registered (or deregistered). + */ +export declare type StateRegistryListener = (event: "registered" | "deregistered", states: StateDeclaration[]) => void; +export declare class StateRegistry { + private _router; + private _root; + private states; + matcher: StateMatcher; + private builder; + stateQueue: StateQueueManager; + listeners: StateRegistryListener[]; + /** @internalapi */ + constructor(_router: UIRouter); + /** @internalapi */ + private _registerRoot(); + /** @internalapi */ + dispose(): void; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + onStatesChanged(listener: StateRegistryListener): () => void; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + root(): StateObject; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + register(stateDefinition: _StateDeclaration): StateObject; + /** @hidden */ + private _deregisterTree(state); + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + deregister(stateOrName: StateOrName): StateObject[]; + /** + * Gets all registered states + * + * Calling this method with no arguments will return a list of all the states that are currently registered. + * Note: this does not return states that are *queued* but not yet registered. + * + * @return a list of [[StateDeclaration]]s + */ + get(): StateDeclaration[]; + /** + * Gets a registered state + * + * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry. + * Note: this does not return states that are *queued* but not yet registered. + * + * @param stateOrName either the name of a state, or a state object. + * @param base the base state to use when stateOrName is relative. + * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered. + */ + get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration; + decorator(name: string, func: BuilderFunction): Function | BuilderFunction | BuilderFunction[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js new file mode 100644 index 00000000..e8924de6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js @@ -0,0 +1,156 @@ +"use strict"; +/** + * @coreapi + * @module state + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var stateMatcher_1 = require("./stateMatcher"); +var stateBuilder_1 = require("./stateBuilder"); +var stateQueueManager_1 = require("./stateQueueManager"); +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var StateRegistry = /** @class */ (function () { + /** @internalapi */ + function StateRegistry(_router) { + this._router = _router; + this.states = {}; + this.listeners = []; + this.matcher = new stateMatcher_1.StateMatcher(this.states); + this.builder = new stateBuilder_1.StateBuilder(this.matcher, _router.urlMatcherFactory); + this.stateQueue = new stateQueueManager_1.StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners); + this._registerRoot(); + } + /** @internalapi */ + StateRegistry.prototype._registerRoot = function () { + var rootStateDef = { + name: '', + url: '^', + views: null, + params: { + '#': { value: null, type: 'hash', dynamic: true } + }, + abstract: true + }; + var _root = this._root = this.stateQueue.register(rootStateDef); + _root.navigable = null; + }; + /** @internalapi */ + StateRegistry.prototype.dispose = function () { + var _this = this; + this.stateQueue.dispose(); + this.listeners = []; + this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); }); + }; + /** + * Listen for a State Registry events + * + * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. + * + * #### Example: + * ```js + * let allStates = registry.get(); + * + * // Later, invoke deregisterFn() to remove the listener + * let deregisterFn = registry.onStatesChanged((event, states) => { + * switch(event) { + * case: 'registered': + * states.forEach(state => allStates.push(state)); + * break; + * case: 'deregistered': + * states.forEach(state => { + * let idx = allStates.indexOf(state); + * if (idx !== -1) allStates.splice(idx, 1); + * }); + * break; + * } + * }); + * ``` + * + * @param listener a callback function invoked when the registered states changes. + * The function receives two parameters, `event` and `state`. + * See [[StateRegistryListener]] + * @return a function that deregisters the listener + */ + StateRegistry.prototype.onStatesChanged = function (listener) { + this.listeners.push(listener); + return function deregisterListener() { + common_1.removeFrom(this.listeners)(listener); + }.bind(this); + }; + /** + * Gets the implicit root state + * + * Gets the root of the state tree. + * The root state is implicitly created by UI-Router. + * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] + * + * @return the root [[StateObject]] + */ + StateRegistry.prototype.root = function () { + return this._root; + }; + /** + * Adds a state to the registry + * + * Registers a [[StateDeclaration]] or queues it for registration. + * + * Note: a state will be queued if the state's parent isn't yet registered. + * + * @param stateDefinition the definition of the state to register. + * @returns the internal [[StateObject]] object. + * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). + * If the state was only queued, then the object is not fully built. + */ + StateRegistry.prototype.register = function (stateDefinition) { + return this.stateQueue.register(stateDefinition); + }; + /** @hidden */ + StateRegistry.prototype._deregisterTree = function (state) { + var _this = this; + var all = this.get().map(function (s) { return s.$$state(); }); + var getChildren = function (states) { + var children = all.filter(function (s) { return states.indexOf(s.parent) !== -1; }); + return children.length === 0 ? children : children.concat(getChildren(children)); + }; + var children = getChildren([state]); + var deregistered = [state].concat(children).reverse(); + deregistered.forEach(function (state) { + var $ur = _this._router.urlRouter; + // Remove URL rule + $ur.rules().filter(hof_1.propEq("state", state)).forEach($ur.removeRule.bind($ur)); + // Remove state from registry + delete _this.states[state.name]; + }); + return deregistered; + }; + /** + * Removes a state from the registry + * + * This removes a state from the registry. + * If the state has children, they are are also removed from the registry. + * + * @param stateOrName the state's name or object representation + * @returns {StateObject[]} a list of removed states + */ + StateRegistry.prototype.deregister = function (stateOrName) { + var _state = this.get(stateOrName); + if (!_state) + throw new Error("Can't deregister state; not found: " + stateOrName); + var deregisteredStates = this._deregisterTree(_state.$$state()); + this.listeners.forEach(function (listener) { return listener("deregistered", deregisteredStates.map(function (s) { return s.self; })); }); + return deregisteredStates; + }; + StateRegistry.prototype.get = function (stateOrName, base) { + var _this = this; + if (arguments.length === 0) + return Object.keys(this.states).map(function (name) { return _this.states[name].self; }); + var found = this.matcher.find(stateOrName, base); + return found && found.self || null; + }; + StateRegistry.prototype.decorator = function (name, func) { + return this.builder.builder(name, func); + }; + return StateRegistry; +}()); +exports.StateRegistry = StateRegistry; +//# sourceMappingURL=stateRegistry.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js.map new file mode 100644 index 00000000..fe822d92 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateRegistry.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateRegistry.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateRegistry.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,kBAAkB;;AAGtB,+CAA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JC,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC;YACzB,MAAM,CAAsB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAtB,CAAsB,CAAC,CAAC;QAC3F,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACjD,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC;IACrC,CAAC;IAED,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IACH,oBAAC;AAAD,CAAC,AAlLD,IAkLC;AAlLY,sCAAa", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateObject } from \"./stateObject\";\nimport { StateMatcher } from \"./stateMatcher\";\nimport { StateBuilder } from \"./stateBuilder\";\nimport { StateQueueManager } from \"./stateQueueManager\";\nimport { StateDeclaration, _StateDeclaration } from \"./interface\";\nimport { BuilderFunction } from \"./stateBuilder\";\nimport { StateOrName } from \"./interface\";\nimport { removeFrom } from \"../common/common\";\nimport { UIRouter } from \"../router\";\nimport { propEq } from \"../common/hof\";\n\n/**\n * The signature for the callback function provided to [[StateRegistry.onStatesChanged]].\n *\n * This callback receives two parameters:\n *\n * @param event a string; either \"registered\" or \"deregistered\"\n * @param states the list of [[StateDeclaration]]s that were registered (or deregistered).\n */\nexport type StateRegistryListener = (event: \"registered\"|\"deregistered\", states: StateDeclaration[]) => void;\n\nexport class StateRegistry {\n private _root: StateObject;\n private states: { [key: string]: StateObject } = {};\n\n matcher: StateMatcher;\n private builder: StateBuilder;\n stateQueue: StateQueueManager;\n\n listeners: StateRegistryListener[] = [];\n\n /** @internalapi */\n constructor(private _router: UIRouter) {\n this.matcher = new StateMatcher(this.states);\n this.builder = new StateBuilder(this.matcher, _router.urlMatcherFactory);\n this.stateQueue = new StateQueueManager(this, _router.urlRouter, this.states, this.builder, this.listeners);\n this._registerRoot();\n }\n\n /** @internalapi */\n private _registerRoot() {\n let rootStateDef: StateDeclaration = {\n name: '',\n url: '^',\n views: null,\n params: {\n '#': { value: null, type: 'hash', dynamic: true }\n },\n abstract: true\n };\n\n let _root = this._root = this.stateQueue.register(rootStateDef);\n _root.navigable = null;\n }\n\n /** @internalapi */\n dispose() {\n this.stateQueue.dispose();\n this.listeners = [];\n this.get().forEach(state => this.get(state) && this.deregister(state));\n }\n\n /**\n * Listen for a State Registry events\n *\n * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.\n *\n * #### Example:\n * ```js\n * let allStates = registry.get();\n *\n * // Later, invoke deregisterFn() to remove the listener\n * let deregisterFn = registry.onStatesChanged((event, states) => {\n * switch(event) {\n * case: 'registered':\n * states.forEach(state => allStates.push(state));\n * break;\n * case: 'deregistered':\n * states.forEach(state => {\n * let idx = allStates.indexOf(state);\n * if (idx !== -1) allStates.splice(idx, 1);\n * });\n * break;\n * }\n * });\n * ```\n *\n * @param listener a callback function invoked when the registered states changes.\n * The function receives two parameters, `event` and `state`.\n * See [[StateRegistryListener]]\n * @return a function that deregisters the listener\n */\n onStatesChanged(listener: StateRegistryListener): () => void {\n this.listeners.push(listener);\n return function deregisterListener() {\n removeFrom(this.listeners)(listener);\n }.bind(this);\n }\n\n /**\n * Gets the implicit root state\n *\n * Gets the root of the state tree.\n * The root state is implicitly created by UI-Router.\n * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]\n *\n * @return the root [[StateObject]]\n */\n root() {\n return this._root;\n }\n\n /**\n * Adds a state to the registry\n *\n * Registers a [[StateDeclaration]] or queues it for registration.\n *\n * Note: a state will be queued if the state's parent isn't yet registered.\n *\n * @param stateDefinition the definition of the state to register.\n * @returns the internal [[StateObject]] object.\n * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).\n * If the state was only queued, then the object is not fully built.\n */\n register(stateDefinition: _StateDeclaration): StateObject {\n return this.stateQueue.register(stateDefinition);\n }\n\n /** @hidden */\n private _deregisterTree(state: StateObject) {\n let all = this.get().map(s => s.$$state());\n const getChildren = (states: StateObject[]) => {\n let children = all.filter(s => states.indexOf(s.parent) !== -1);\n return children.length === 0 ? children : children.concat(getChildren(children));\n };\n\n let children = getChildren([state]);\n let deregistered: StateObject[] = [state].concat(children).reverse();\n\n deregistered.forEach(state => {\n let $ur = this._router.urlRouter;\n // Remove URL rule\n $ur.rules().filter(propEq(\"state\", state)).forEach($ur.removeRule.bind($ur));\n // Remove state from registry\n delete this.states[state.name];\n });\n\n return deregistered;\n }\n\n /**\n * Removes a state from the registry\n *\n * This removes a state from the registry.\n * If the state has children, they are are also removed from the registry.\n *\n * @param stateOrName the state's name or object representation\n * @returns {StateObject[]} a list of removed states\n */\n deregister(stateOrName: StateOrName) {\n let _state = this.get(stateOrName);\n if (!_state) throw new Error(\"Can't deregister state; not found: \" + stateOrName);\n let deregisteredStates = this._deregisterTree(_state.$$state());\n\n this.listeners.forEach(listener => listener(\"deregistered\", deregisteredStates.map(s => s.self)));\n return deregisteredStates;\n }\n\n /**\n * Gets all registered states\n *\n * Calling this method with no arguments will return a list of all the states that are currently registered.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @return a list of [[StateDeclaration]]s\n */\n get(): StateDeclaration[];\n\n /**\n * Gets a registered state\n *\n * Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.\n * Note: this does not return states that are *queued* but not yet registered.\n *\n * @param stateOrName either the name of a state, or a state object.\n * @param base the base state to use when stateOrName is relative.\n * @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.\n */\n get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n if (arguments.length === 0)\n return Object.keys(this.states).map(name => this.states[name].self);\n let found = this.matcher.find(stateOrName, base);\n return found && found.self || null;\n }\n\n decorator(name: string, func: BuilderFunction) {\n return this.builder.builder(name, func);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.d.ts new file mode 100644 index 00000000..9214873a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.d.ts @@ -0,0 +1,349 @@ +import { HookResult, TransitionOptions } from '../transition/interface'; +import { Transition } from '../transition/transition'; +import { HrefOptions, LazyLoadResult, StateDeclaration, StateOrName, TransitionPromise } from './interface'; +import { StateObject } from './stateObject'; +import { TargetState } from './targetState'; +import { RawParams } from '../params/interface'; +import { UIRouter } from '../router'; +import { UIInjector } from '../interface'; +import { StateParams } from '../params/stateParams'; +export declare type OnInvalidCallback = (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult; +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +export declare class StateService { + private router; + /** @internalapi */ + invalidCallbacks: OnInvalidCallback[]; + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + transition: Transition; + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + params: StateParams; + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + current: StateDeclaration; + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + $current: StateObject; + /** @internalapi */ + constructor(router: UIRouter); + /** @internalapi */ + dispose(): void; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + private _handleInvalidTargetState(fromPath, toState); + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + onInvalid(callback: OnInvalidCallback): Function; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + reload(reloadState?: StateOrName): Promise; + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + go(to: StateOrName, params?: RawParams, options?: TransitionOptions): TransitionPromise; + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + target(identifier: StateOrName, params?: RawParams, options?: TransitionOptions): TargetState; + private getCurrentPath(); + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + transitionTo(to: StateOrName, toParams?: RawParams, options?: TransitionOptions): TransitionPromise; + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + is(stateOrName: StateOrName, params?: RawParams, options?: { + relative?: StateOrName; + }): boolean; + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + includes(stateOrName: StateOrName, params?: RawParams, options?: TransitionOptions): boolean; + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + href(stateOrName: StateOrName, params: RawParams, options?: HrefOptions): string; + /** @hidden */ + private _defaultErrorHandler; + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + defaultErrorHandler(handler?: (error: any) => void): (error: any) => void; + /** + * Gets a registered [[StateDeclaration]] object + * + * Returns the state declaration object for any specific state, or for all registered states. + * + * @param stateOrName (absolute or relative) If provided, will only get the declaration object for the requested state. + * If not provided, returns an array of ALL states. + * @param base When `stateOrName` is a relative state reference (such as `.bar.baz`), the state will be retrieved relative to this state. + * + * @returns a [[StateDeclaration]] object (or array of all registered [[StateDeclaration]] objects.) + */ + get(stateOrName: StateOrName, base: StateOrName): StateDeclaration; + get(stateOrName: StateOrName): StateDeclaration; + get(): StateDeclaration[]; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + lazyLoad(stateOrName: StateOrName, transition?: Transition): Promise; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js new file mode 100644 index 00000000..d6afc8e3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js @@ -0,0 +1,572 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module state + */ +/** */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var queue_1 = require("../common/queue"); +var coreservices_1 = require("../common/coreservices"); +var pathFactory_1 = require("../path/pathFactory"); +var pathNode_1 = require("../path/pathNode"); +var transitionService_1 = require("../transition/transitionService"); +var rejectFactory_1 = require("../transition/rejectFactory"); +var targetState_1 = require("./targetState"); +var param_1 = require("../params/param"); +var glob_1 = require("../common/glob"); +var resolveContext_1 = require("../resolve/resolveContext"); +var lazyLoad_1 = require("../hooks/lazyLoad"); +var hof_1 = require("../common/hof"); +/** + * Provides state related service functions + * + * This class provides services related to ui-router states. + * An instance of this class is located on the global [[UIRouter]] object. + */ +var StateService = /** @class */ (function () { + /** @internalapi */ + function StateService(router) { + this.router = router; + /** @internalapi */ + this.invalidCallbacks = []; + /** @hidden */ + this._defaultErrorHandler = function $defaultErrorHandler($error$) { + if ($error$ instanceof Error && $error$.stack) { + console.error($error$); + console.error($error$.stack); + } + else if ($error$ instanceof rejectFactory_1.Rejection) { + console.error($error$.toString()); + if ($error$.detail && $error$.detail.stack) + console.error($error$.detail.stack); + } + else { + console.error($error$); + } + }; + var getters = ['current', '$current', 'params', 'transition']; + var boundFns = Object.keys(StateService.prototype).filter(hof_1.not(common_1.inArray(getters))); + common_1.createProxyFunctions(hof_1.val(StateService.prototype), this, hof_1.val(this), boundFns); + } + Object.defineProperty(StateService.prototype, "transition", { + /** + * The [[Transition]] currently in progress (or null) + * + * This is a passthrough through to [[UIRouterGlobals.transition]] + */ + get: function () { return this.router.globals.transition; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "params", { + /** + * The latest successful state parameters + * + * This is a passthrough through to [[UIRouterGlobals.params]] + */ + get: function () { return this.router.globals.params; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "current", { + /** + * The current [[StateDeclaration]] + * + * This is a passthrough through to [[UIRouterGlobals.current]] + */ + get: function () { return this.router.globals.current; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(StateService.prototype, "$current", { + /** + * The current [[StateObject]] + * + * This is a passthrough through to [[UIRouterGlobals.$current]] + */ + get: function () { return this.router.globals.$current; }, + enumerable: true, + configurable: true + }); + /** @internalapi */ + StateService.prototype.dispose = function () { + this.defaultErrorHandler(common_1.noop); + this.invalidCallbacks = []; + }; + /** + * Handler for when [[transitionTo]] is called with an invalid state. + * + * Invokes the [[onInvalid]] callbacks, in natural order. + * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. + * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. + * + * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. + * + * @internalapi + */ + StateService.prototype._handleInvalidTargetState = function (fromPath, toState) { + var _this = this; + var fromState = pathFactory_1.PathUtils.makeTargetState(this.router.stateRegistry, fromPath); + var globals = this.router.globals; + var latestThing = function () { return globals.transitionHistory.peekTail(); }; + var latest = latestThing(); + var callbackQueue = new queue_1.Queue(this.invalidCallbacks.slice()); + var injector = new resolveContext_1.ResolveContext(fromPath).injector(); + var checkForRedirect = function (result) { + if (!(result instanceof targetState_1.TargetState)) { + return; + } + var target = result; + // Recreate the TargetState, in case the state is now defined. + target = _this.target(target.identifier(), target.params(), target.options()); + if (!target.valid()) { + return rejectFactory_1.Rejection.invalid(target.error()).toPromise(); + } + if (latestThing() !== latest) { + return rejectFactory_1.Rejection.superseded().toPromise(); + } + return _this.transitionTo(target.identifier(), target.params(), target.options()); + }; + function invokeNextCallback() { + var nextCallback = callbackQueue.dequeue(); + if (nextCallback === undefined) + return rejectFactory_1.Rejection.invalid(toState.error()).toPromise(); + var callbackResult = coreservices_1.services.$q.when(nextCallback(toState, fromState, injector)); + return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); }); + } + return invokeNextCallback(); + }; + /** + * Registers an Invalid State handler + * + * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] + * has been called with an invalid state reference parameter + * + * Example: + * ```js + * stateService.onInvalid(function(to, from, injector) { + * if (to.name() === 'foo') { + * let lazyLoader = injector.get('LazyLoadService'); + * return lazyLoader.load('foo') + * .then(() => stateService.target('foo')); + * } + * }); + * ``` + * + * @param {function} callback invoked when the toState is invalid + * This function receives the (invalid) toState, the fromState, and an injector. + * The function may optionally return a [[TargetState]] or a Promise for a TargetState. + * If one is returned, it is treated as a redirect. + * + * @returns a function which deregisters the callback + */ + StateService.prototype.onInvalid = function (callback) { + this.invalidCallbacks.push(callback); + return function deregisterListener() { + common_1.removeFrom(this.invalidCallbacks)(callback); + }.bind(this); + }; + /** + * Reloads the current state + * + * A method that force reloads the current state, or a partial state hierarchy. + * All resolves are re-resolved, and components reinstantiated. + * + * #### Example: + * ```js + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * $state.reload(); + * } + * }); + * ``` + * + * Note: `reload()` is just an alias for: + * + * ```js + * $state.transitionTo($state.current, $state.params, { + * reload: true, inherit: false + * }); + * ``` + * + * @param reloadState A state name or a state object. + * If present, this state and all its children will be reloaded, but ancestors will not reload. + * + * #### Example: + * ```js + * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' + * //and current state is 'contacts.detail.item' + * let app angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.reload = function(){ + * //will reload 'contact.detail' and nested 'contact.detail.item' states + * $state.reload('contact.detail'); + * } + * }); + * ``` + * + * @returns A promise representing the state of the new transition. See [[StateService.go]] + */ + StateService.prototype.reload = function (reloadState) { + return this.transitionTo(this.current, this.params, { + reload: predicates_1.isDefined(reloadState) ? reloadState : true, + inherit: false, + notify: false, + }); + }; + ; + /** + * Transition to a different state and/or parameters + * + * Convenience method for transitioning to a new state. + * + * `$state.go` calls `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. + * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). + * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters + * inherit from the current parameter values (because of `inherit: true`). + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.go('contact.detail'); + * }; + * }); + * ``` + * + * @param to Absolute state name, state object, or relative state path (relative to current state). + * + * Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to the parent state + * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state + * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state + * + * @param params A map of the parameters that will be sent to the state, will populate $stateParams. + * + * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). + * This allows, for example, going to a sibling state that shares parameters defined by a parent state. + * + * @param options Transition options + * + * @returns {promise} A promise representing the state of the new transition. + */ + StateService.prototype.go = function (to, params, options) { + var defautGoOpts = { relative: this.$current, inherit: true }; + var transOpts = common_1.defaults(options, defautGoOpts, transitionService_1.defaultTransOpts); + return this.transitionTo(to, params, transOpts); + }; + ; + /** + * Creates a [[TargetState]] + * + * This is a factory method for creating a TargetState + * + * This may be returned from a Transition Hook to redirect a transition, for example. + */ + StateService.prototype.target = function (identifier, params, options) { + if (options === void 0) { options = {}; } + // If we're reloading, find the state object to reload from + if (predicates_1.isObject(options.reload) && !options.reload.name) + throw new Error('Invalid reload state object'); + var reg = this.router.stateRegistry; + options.reloadState = options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative); + if (options.reload && !options.reloadState) + throw new Error("No such reload state '" + (predicates_1.isString(options.reload) ? options.reload : options.reload.name) + "'"); + return new targetState_1.TargetState(this.router.stateRegistry, identifier, params, options); + }; + ; + StateService.prototype.getCurrentPath = function () { + var _this = this; + var globals = this.router.globals; + var latestSuccess = globals.successfulTransitions.peekTail(); + var rootPath = function () { return [new pathNode_1.PathNode(_this.router.stateRegistry.root())]; }; + return latestSuccess ? latestSuccess.treeChanges().to : rootPath(); + }; + /** + * Low-level method for transitioning to a new state. + * + * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. + * + * #### Example: + * ```js + * let app = angular.module('app', ['ui.router']); + * + * app.controller('ctrl', function ($scope, $state) { + * $scope.changeState = function () { + * $state.transitionTo('contact.detail'); + * }; + * }); + * ``` + * + * @param to State name or state object. + * @param toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param options Transition options + * + * @returns A promise representing the state of the new transition. See [[go]] + */ + StateService.prototype.transitionTo = function (to, toParams, options) { + var _this = this; + if (toParams === void 0) { toParams = {}; } + if (options === void 0) { options = {}; } + var router = this.router; + var globals = router.globals; + options = common_1.defaults(options, transitionService_1.defaultTransOpts); + var getCurrent = function () { + return globals.transition; + }; + options = common_1.extend(options, { current: getCurrent }); + var ref = this.target(to, toParams, options); + var currentPath = this.getCurrentPath(); + if (!ref.exists()) + return this._handleInvalidTargetState(currentPath, ref); + if (!ref.valid()) + return common_1.silentRejection(ref.error()); + /** + * Special handling for Ignored, Aborted, and Redirected transitions + * + * The semantics for the transition.run() promise and the StateService.transitionTo() + * promise differ. For instance, the run() promise may be rejected because it was + * IGNORED, but the transitionTo() promise is resolved because from the user perspective + * no error occurred. Likewise, the transition.run() promise may be rejected because of + * a Redirect, but the transitionTo() promise is chained to the new Transition's promise. + */ + var rejectedTransitionHandler = function (transition) { return function (error) { + if (error instanceof rejectFactory_1.Rejection) { + var isLatest = router.globals.lastStartedTransitionId === transition.$id; + if (error.type === rejectFactory_1.RejectType.IGNORED) { + isLatest && router.urlRouter.update(); + // Consider ignored `Transition.run()` as a successful `transitionTo` + return coreservices_1.services.$q.when(globals.current); + } + var detail = error.detail; + if (error.type === rejectFactory_1.RejectType.SUPERSEDED && error.redirected && detail instanceof targetState_1.TargetState) { + // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully + // by returning the promise for the new (redirect) `Transition.run()`. + var redirect = transition.redirect(detail); + return redirect.run().catch(rejectedTransitionHandler(redirect)); + } + if (error.type === rejectFactory_1.RejectType.ABORTED) { + isLatest && router.urlRouter.update(); + return coreservices_1.services.$q.reject(error); + } + } + var errorHandler = _this.defaultErrorHandler(); + errorHandler(error); + return coreservices_1.services.$q.reject(error); + }; }; + var transition = this.router.transitionService.create(currentPath, ref); + var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition)); + common_1.silenceUncaughtInPromise(transitionToPromise); // issue #2676 + // Return a promise for the transition, which also has the transition object on it. + return common_1.extend(transitionToPromise, { transition: transition }); + }; + ; + /** + * Checks if the current state *is* the provided state + * + * Similar to [[includes]] but only checks for the full state name. + * If params is supplied then it will be tested for strict equality against the current + * active params object, so all params must match with none missing and no extras. + * + * #### Example: + * ```js + * $state.$current.name = 'contacts.details.item'; + * + * // absolute name + * $state.is('contact.details.item'); // returns true + * $state.is(contactDetailItemStateObject); // returns true + * ``` + * + * // relative name (. and ^), typically from a template + * // E.g. from the 'contacts.details' template + * ```html + *
    Item
    + * ``` + * + * @param stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns Returns true if it is the state. + */ + StateService.prototype.is = function (stateOrName, params, options) { + options = common_1.defaults(options, { relative: this.$current }); + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!predicates_1.isDefined(state)) + return undefined; + if (this.$current !== state) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return param_1.Param.equals(schema, param_1.Param.values(schema, params), this.params); + }; + ; + /** + * Checks if the current state *includes* the provided state + * + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * #### Example when `$state.$current.name === 'contacts.details.item'` + * ```js + * // Using partial names + * $state.includes("contacts"); // returns true + * $state.includes("contacts.details"); // returns true + * $state.includes("contacts.details.item"); // returns true + * $state.includes("contacts.list"); // returns false + * $state.includes("about"); // returns false + * ``` + * + * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: + * ```js + * $state.includes("*.details.*.*"); // returns true + * $state.includes("*.details.**"); // returns true + * $state.includes("**.item.**"); // returns true + * $state.includes("*.details.item.url"); // returns true + * $state.includes("*.details.*.url"); // returns true + * $state.includes("*.details.*"); // returns false + * $state.includes("item.**"); // returns false + * ``` + * + * @param stateOrName A partial name, relative name, glob pattern, + * or state object to be searched for within the current state name. + * @param params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param options An options object. The options are: + * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + StateService.prototype.includes = function (stateOrName, params, options) { + options = common_1.defaults(options, { relative: this.$current }); + var glob = predicates_1.isString(stateOrName) && glob_1.Glob.fromString(stateOrName); + if (glob) { + if (!glob.matches(this.$current.name)) + return false; + stateOrName = this.$current.name; + } + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes; + if (!predicates_1.isDefined(state)) + return undefined; + if (!predicates_1.isDefined(include[state.name])) + return false; + if (!params) + return true; + var schema = state.parameters({ inherit: true, matchingKeys: params }); + return param_1.Param.equals(schema, param_1.Param.values(schema, params), this.params); + }; + ; + /** + * Generates a URL for a state and parameters + * + * Returns the url for the given state populated with the given params. + * + * #### Example: + * ```js + * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); + * ``` + * + * @param stateOrName The state name or state object you'd like to generate a url from. + * @param params An object of parameter values to fill the state's required parameters. + * @param options Options object. The options are: + * + * @returns {string} compiled state url + */ + StateService.prototype.href = function (stateOrName, params, options) { + var defaultHrefOpts = { + lossy: true, + inherit: true, + absolute: false, + relative: this.$current, + }; + options = common_1.defaults(options, defaultHrefOpts); + params = params || {}; + var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); + if (!predicates_1.isDefined(state)) + return null; + if (options.inherit) + params = this.params.$inherit(params, this.$current, state); + var nav = (state && options.lossy) ? state.navigable : state; + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return this.router.urlRouter.href(nav.url, params, { + absolute: options.absolute, + }); + }; + ; + /** + * Sets or gets the default [[transitionTo]] error handler. + * + * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. + * This includes errors caused by resolves and transition hooks. + * + * Note: + * This handler does not receive certain Transition rejections. + * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. + * + * The built-in default error handler logs the error to the console. + * + * You can provide your own custom handler. + * + * #### Example: + * ```js + * stateService.defaultErrorHandler(function() { + * // Do not log transitionTo errors + * }); + * ``` + * + * @param handler a global error handler function + * @returns the current global error handler + */ + StateService.prototype.defaultErrorHandler = function (handler) { + return this._defaultErrorHandler = handler || this._defaultErrorHandler; + }; + StateService.prototype.get = function (stateOrName, base) { + var reg = this.router.stateRegistry; + if (arguments.length === 0) + return reg.get(); + return reg.get(stateOrName, base || this.$current); + }; + /** + * Lazy loads a state + * + * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. + * + * @param stateOrName the state that should be lazy loaded + * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) + * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. + * This noop transition is not actually run. + * + * @returns a promise to lazy load + */ + StateService.prototype.lazyLoad = function (stateOrName, transition) { + var state = this.get(stateOrName); + if (!state || !state.lazyLoad) + throw new Error("Can not lazy load " + stateOrName); + var currentPath = this.getCurrentPath(); + var target = pathFactory_1.PathUtils.makeTargetState(this.router.stateRegistry, currentPath); + transition = transition || this.router.transitionService.create(currentPath, target); + return lazyLoad_1.lazyLoadState(transition, state); + }; + return StateService; +}()); +exports.StateService = StateService; +//# sourceMappingURL=stateService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js.map new file mode 100644 index 00000000..1790ff87 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/stateService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "stateService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/stateService.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,2CAAgJ;AAChJ,mDAAqE;AACrE,yCAAwC;AACxC,uDAAkD;AAElD,mDAAgD;AAChD,6CAA4C;AAG5C,qEAAmE;AACnE,6DAAoE;AAKpE,6CAA4C;AAG5C,yCAAwC;AACxC,uCAAsC;AAGtC,4DAA2D;AAC3D,8CAAkD;AAClD,qCAAyC;AAMzC;;;;;GAKG;AACH;IA6BE,mBAAmB;IACnB,sBAAoB,MAAgB;QAAhB,WAAM,GAAN,MAAM,CAAU;QA7BpC,mBAAmB;QACnB,qBAAgB,GAAwB,EAAE,CAAC;QA0d3C,cAAc;QACN,yBAAoB,GAA4B,8BAA8B,OAAO;YAC3F,EAAE,CAAC,CAAC,OAAO,YAAY,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC9C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACvB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,YAAY,yBAAS,CAAC,CAAC,CAAC;gBACxC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAClC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;oBACzC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxC,CAA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nF,IAAI,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACxC,IAAI,MAAM,GAAG,uBAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAC/E,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErF,MAAM,CAAC,wBAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACH,mBAAC;AAAD,CAAC,AAhjBD,IAgjBC;AAhjBY,oCAAY", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */\n/** */\nimport { createProxyFunctions, defaults, extend, inArray, noop, removeFrom, silenceUncaughtInPromise, silentRejection } 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/pathFactory';\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 =\n (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides state related service functions\n *\n * This class provides services related to ui-router states.\n * An instance of this class is located on the global [[UIRouter]] object.\n */\nexport class StateService {\n /** @internalapi */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() { return this.router.globals.transition; }\n /**\n * The latest successful state parameters\n *\n * This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams { return this.router.globals.params; }\n /**\n * The current [[StateDeclaration]]\n *\n * This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() { return this.router.globals.current; }\n /**\n * The current [[StateObject]]\n *\n * This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() { return this.router.globals.$current; }\n\n /** @internalapi */\n constructor(private router: UIRouter) {\n let getters = ['current', '$current', 'params', 'transition'];\n let boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internalapi */\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 * @internalapi\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n let fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n let globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n let latest = latestThing();\n let callbackQueue = new Queue(this.invalidCallbacks.slice());\n let injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = 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 let nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n let 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 /**\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 {\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 let defautGoOpts = { relative: this.$current, inherit: true };\n let 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) && !(options.reload).name)\n throw new Error('Invalid reload state object');\n let reg = this.router.stateRegistry;\n options.reloadState = options.reload === true ? reg.root() : reg.matcher.find( options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (options.reload).name)}'`);\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n\n private getCurrentPath(): PathNode[] {\n let globals = this.router.globals;\n let 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 let router = this.router;\n let globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () =>\n globals.transition;\n options = extend(options, { current: getCurrent });\n\n let ref: TargetState = this.target(to, toParams, options);\n let currentPath = this.getCurrentPath();\n\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid())\n return silentRejection(ref.error());\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 = (transition: Transition) => (error: any): Promise => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId === transition.$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 let redirect: Transition = transition.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 let errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n let transition = this.router.transitionService.create(currentPath, ref);\n let 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 *
    Item
    \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 let 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 let 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 let glob = isString(stateOrName) && Glob.fromString( stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), 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 let schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\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 let 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 let state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = this.params.$inherit(params, this.$current, state);\n\n let nav = (state && options.lossy) ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, {\n absolute: options.absolute,\n });\n };\n\n /** @hidden */\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)\n 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 */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n let 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 {\n let state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error(\"Can not lazy load \" + stateOrName);\n\n let currentPath = this.getCurrentPath();\n let 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" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.d.ts new file mode 100644 index 00000000..c5f37f26 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.d.ts @@ -0,0 +1,104 @@ +/** + * @coreapi + * @module state + */ /** for typedoc */ +import { StateDeclaration, StateOrName, TargetStateDef } from "./interface"; +import { TransitionOptions } from "../transition/interface"; +import { StateObject } from "./stateObject"; +import { StateRegistry } from './stateRegistry'; +import { RawParams } from '../params'; +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +export declare class TargetState { + private _stateRegistry; + private _identifier; + private _definition; + private _params; + private _options; + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + constructor(_stateRegistry: StateRegistry, _identifier: StateOrName, _params?: RawParams, _options?: TransitionOptions); + /** The name of the state this object targets */ + name(): string; + /** The identifier used when creating this TargetState */ + identifier(): StateOrName; + /** The target parameter values */ + params(): RawParams; + /** The internal state object (if it was found) */ + $state(): StateObject; + /** The internal state declaration (if it was found) */ + state(): StateDeclaration; + /** The target options */ + options(): TransitionOptions; + /** True if the target state was found */ + exists(): boolean; + /** True if the object is valid */ + valid(): boolean; + /** If the object is invalid, returns the reason why */ + error(): string; + toString(): string; + /** Returns true if the object has a state property that might be a state or state name */ + static isDef: (obj: any) => obj is TargetStateDef; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + withState(state: StateOrName): TargetState; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + withParams(params: RawParams, replace?: boolean): TargetState; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + withOptions(options: TransitionOptions, replace?: boolean): TargetState; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js new file mode 100644 index 00000000..825cbd11 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js @@ -0,0 +1,149 @@ +"use strict"; +/** + * @coreapi + * @module state + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var predicates_1 = require("../common/predicates"); +var strings_1 = require("../common/strings"); +var common_1 = require("../common"); +/** + * Encapsulate the target (destination) state/params/options of a [[Transition]]. + * + * This class is frequently used to redirect a transition to a new destination. + * + * See: + * + * - [[HookResult]] + * - [[TransitionHookFn]] + * - [[TransitionService.onStart]] + * + * To create a `TargetState`, use [[StateService.target]]. + * + * --- + * + * This class wraps: + * + * 1) an identifier for a state + * 2) a set of parameters + * 3) and transition options + * 4) the registered state object (the [[StateDeclaration]]) + * + * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can + * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). + * The `TargetState` class normalizes those options. + * + * A `TargetState` may be valid (the state being targeted exists in the registry) + * or invalid (the state being targeted is not registered). + */ +var TargetState = /** @class */ (function () { + /** + * The TargetState constructor + * + * Note: Do not construct a `TargetState` manually. + * To create a `TargetState`, use the [[StateService.target]] factory method. + * + * @param _stateRegistry The StateRegistry to use to look up the _definition + * @param _identifier An identifier for a state. + * Either a fully-qualified state name, or the object used to define the state. + * @param _params Parameters for the target state + * @param _options Transition options. + * + * @internalapi + */ + function TargetState(_stateRegistry, _identifier, _params, _options) { + this._stateRegistry = _stateRegistry; + this._identifier = _identifier; + this._identifier = _identifier; + this._params = common_1.extend({}, _params || {}); + this._options = common_1.extend({}, _options || {}); + this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative); + } + /** The name of the state this object targets */ + TargetState.prototype.name = function () { + return this._definition && this._definition.name || this._identifier; + }; + /** The identifier used when creating this TargetState */ + TargetState.prototype.identifier = function () { + return this._identifier; + }; + /** The target parameter values */ + TargetState.prototype.params = function () { + return this._params; + }; + /** The internal state object (if it was found) */ + TargetState.prototype.$state = function () { + return this._definition; + }; + /** The internal state declaration (if it was found) */ + TargetState.prototype.state = function () { + return this._definition && this._definition.self; + }; + /** The target options */ + TargetState.prototype.options = function () { + return this._options; + }; + /** True if the target state was found */ + TargetState.prototype.exists = function () { + return !!(this._definition && this._definition.self); + }; + /** True if the object is valid */ + TargetState.prototype.valid = function () { + return !this.error(); + }; + /** If the object is invalid, returns the reason why */ + TargetState.prototype.error = function () { + var base = this.options().relative; + if (!this._definition && !!base) { + var stateName = base.name ? base.name : base; + return "Could not resolve '" + this.name() + "' from state '" + stateName + "'"; + } + if (!this._definition) + return "No such state '" + this.name() + "'"; + if (!this._definition.self) + return "State '" + this.name() + "' has an invalid definition"; + }; + TargetState.prototype.toString = function () { + return "'" + this.name() + "'" + strings_1.stringify(this.params()); + }; + /** + * Returns a copy of this TargetState which targets a different state. + * The new TargetState has the same parameter values and transition options. + * + * @param state The new state that should be targeted + */ + TargetState.prototype.withState = function (state) { + return new TargetState(this._stateRegistry, state, this._params, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified parameter values. + * + * @param params the new parameter values to use + * @param replace When false (default) the new parameter values will be merged with the current values. + * When true the parameter values will be used instead of the current values. + */ + TargetState.prototype.withParams = function (params, replace) { + if (replace === void 0) { replace = false; } + var newParams = replace ? params : common_1.extend({}, this._params, params); + return new TargetState(this._stateRegistry, this._identifier, newParams, this._options); + }; + /** + * Returns a copy of this TargetState, using the specified Transition Options. + * + * @param options the new options to use + * @param replace When false (default) the new options will be merged with the current options. + * When true the options will be used instead of the current options. + */ + TargetState.prototype.withOptions = function (options, replace) { + if (replace === void 0) { replace = false; } + var newOpts = replace ? options : common_1.extend({}, this._options, options); + return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts); + }; + /** Returns true if the object has a state property that might be a state or state name */ + TargetState.isDef = function (obj) { + return obj && obj.state && (predicates_1.isString(obj.state) || predicates_1.isString(obj.state.name)); + }; + return TargetState; +}()); +exports.TargetState = TargetState; +//# sourceMappingURL=targetState.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js.map new file mode 100644 index 00000000..14697b39 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/state/targetState.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "targetState.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/state/targetState.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,kBAAkB;;AAKtB,mDAAgD;AAChD,6CAA8C;AAC9C,oCAAmC;AAInC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAKE;;;;;;;;;;;;;OAaG;IACH,qBACU,cAA6B,EAC7B,WAAwB,EAChC,OAAmB,EACnB,QAA4B;QAHpB,mBAAc,GAAd,cAAc,CAAe;QAC7B,gBAAW,GAAX,WAAW,CAAa;QAIhC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,eAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,eA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;QACrD,IAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,eAAM,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IApCD,0FAA0F;IACnF,iBAAK,GAAG,UAAC,GAAG;QACf,OAAA,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,qBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,qBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAArE,CAAqE,CAAC;IAmC5E,kBAAC;CAAA,AA7HD,IA6HC;AA7HY,kCAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module state\n */ /** for typedoc */\n\nimport { StateDeclaration, StateOrName, TargetStateDef } from \"./interface\";\nimport { TransitionOptions } from \"../transition/interface\";\nimport { StateObject } from \"./stateObject\";\nimport { isString } from \"../common/predicates\";\nimport { stringify } from '../common/strings';\nimport { extend } from '../common';\nimport { StateRegistry } from './stateRegistry';\nimport { RawParams } from '../params';\n\n/**\n * Encapsulate the target (destination) state/params/options of a [[Transition]].\n *\n * This class is frequently used to redirect a transition to a new destination.\n *\n * See:\n *\n * - [[HookResult]]\n * - [[TransitionHookFn]]\n * - [[TransitionService.onStart]]\n *\n * To create a `TargetState`, use [[StateService.target]].\n *\n * ---\n *\n * This class wraps:\n *\n * 1) an identifier for a state\n * 2) a set of parameters\n * 3) and transition options\n * 4) the registered state object (the [[StateDeclaration]])\n *\n * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can\n * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string).\n * The `TargetState` class normalizes those options.\n *\n * A `TargetState` may be valid (the state being targeted exists in the registry)\n * or invalid (the state being targeted is not registered).\n */\nexport class TargetState {\n private _definition: StateObject;\n private _params: RawParams;\n private _options: TransitionOptions;\n\n /**\n * The TargetState constructor\n *\n * Note: Do not construct a `TargetState` manually.\n * To create a `TargetState`, use the [[StateService.target]] factory method.\n *\n * @param _stateRegistry The StateRegistry to use to look up the _definition\n * @param _identifier An identifier for a state.\n * Either a fully-qualified state name, or the object used to define the state.\n * @param _params Parameters for the target state\n * @param _options Transition options.\n *\n * @internalapi\n */\n constructor(\n private _stateRegistry: StateRegistry,\n private _identifier: StateOrName,\n _params?: RawParams,\n _options?: TransitionOptions,\n ) {\n this._identifier = _identifier;\n this._params = extend({}, _params || {});\n this._options = extend({}, _options || {});\n this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative);\n }\n\n /** The name of the state this object targets */\n name(): string {\n return this._definition && this._definition.name || this._identifier;\n }\n\n /** The identifier used when creating this TargetState */\n identifier(): StateOrName {\n return this._identifier;\n }\n\n /** The target parameter values */\n params(): RawParams {\n return this._params;\n }\n\n /** The internal state object (if it was found) */\n $state(): StateObject {\n return this._definition;\n }\n\n /** The internal state declaration (if it was found) */\n state(): StateDeclaration {\n return this._definition && this._definition.self;\n }\n\n /** The target options */\n options() {\n return this._options;\n }\n\n /** True if the target state was found */\n exists(): boolean {\n return !!(this._definition && this._definition.self);\n }\n\n /** True if the object is valid */\n valid(): boolean {\n return !this.error();\n }\n\n /** If the object is invalid, returns the reason why */\n error(): string {\n let base = this.options().relative;\n if (!this._definition && !!base) {\n let stateName = base.name ? base.name : base;\n return `Could not resolve '${this.name()}' from state '${stateName}'`;\n }\n if (!this._definition)\n return `No such state '${this.name()}'`;\n if (!this._definition.self)\n return `State '${this.name()}' has an invalid definition`;\n }\n\n toString() {\n return `'${this.name()}'${stringify(this.params())}`;\n }\n\n /** Returns true if the object has a state property that might be a state or state name */\n static isDef = (obj): obj is TargetStateDef =>\n obj && obj.state && (isString(obj.state) || isString(obj.state.name));\n\n /**\n * Returns a copy of this TargetState which targets a different state.\n * The new TargetState has the same parameter values and transition options.\n *\n * @param state The new state that should be targeted\n */\n withState(state: StateOrName): TargetState {\n return new TargetState(this._stateRegistry, state, this._params, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified parameter values.\n *\n * @param params the new parameter values to use\n * @param replace When false (default) the new parameter values will be merged with the current values.\n * When true the parameter values will be used instead of the current values.\n */\n withParams(params: RawParams, replace = false): TargetState {\n const newParams: RawParams = replace ? params : extend({}, this._params, params);\n return new TargetState(this._stateRegistry, this._identifier, newParams, this._options);\n }\n\n /**\n * Returns a copy of this TargetState, using the specified Transition Options.\n *\n * @param options the new options to use\n * @param replace When false (default) the new options will be merged with the current options.\n * When true the options will be used instead of the current options.\n */\n withOptions(options: TransitionOptions, replace = false): TargetState {\n const newOpts = replace ? options : extend({}, this._options, options);\n return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.d.ts new file mode 100644 index 00000000..f25d3aab --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.d.ts @@ -0,0 +1,46 @@ +import { TreeChanges, TransitionHookPhase } from "./interface"; +import { Transition } from "./transition"; +import { TransitionHook } from "./transitionHook"; +import { TransitionEventType } from "./transitionEventType"; +import { RegisteredHook } from "./hookRegistry"; +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +export declare class HookBuilder { + private transition; + constructor(transition: Transition); + buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[]; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + buildHooks(hookType: TransitionEventType): TransitionHook[]; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[]; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js new file mode 100644 index 00000000..ca638da9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js @@ -0,0 +1,119 @@ +"use strict"; +/** + * @coreapi + * @module transition + */ /** for typedoc */ +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var interface_1 = require("./interface"); +var transitionHook_1 = require("./transitionHook"); +/** + * This class returns applicable TransitionHooks for a specific Transition instance. + * + * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. + * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is + * determined by the type of hook) + * + * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. + * + * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder + * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private + * in the Transition class, so we must also provide the Transition's _treeChanges) + * + */ +var HookBuilder = /** @class */ (function () { + function HookBuilder(transition) { + this.transition = transition; + } + HookBuilder.prototype.buildHooksForPhase = function (phase) { + var _this = this; + var $transitions = this.transition.router.transitionService; + return $transitions._pluginapi._getEvents(phase) + .map(function (type) { return _this.buildHooks(type); }) + .reduce(common_1.unnestR, []) + .filter(common_1.identity); + }; + /** + * Returns an array of newly built TransitionHook objects. + * + * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. + * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) + * - For each of the [[PathNode]]s, creates a TransitionHook + * + * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. + */ + HookBuilder.prototype.buildHooks = function (hookType) { + var transition = this.transition; + var treeChanges = transition.treeChanges(); + // Find all the matching registered hooks for a given hook type + var matchingHooks = this.getMatchingHooks(hookType, treeChanges); + if (!matchingHooks) + return []; + var baseHookOptions = { + transition: transition, + current: transition.options().current + }; + var makeTransitionHooks = function (hook) { + // Fetch the Nodes that caused this hook to match. + var matches = hook.matches(treeChanges); + // Select the PathNode[] that will be used as TransitionHook context objects + var matchingNodes = matches[hookType.criteriaMatchPath.name]; + // Return an array of HookTuples + return matchingNodes.map(function (node) { + var _options = common_1.extend({ + bind: hook.bind, + traceData: { hookType: hookType.name, context: node } + }, baseHookOptions); + var state = hookType.criteriaMatchPath.scope === interface_1.TransitionHookScope.STATE ? node.state.self : null; + var transitionHook = new transitionHook_1.TransitionHook(transition, state, hook, _options); + return { hook: hook, node: node, transitionHook: transitionHook }; + }); + }; + return matchingHooks.map(makeTransitionHooks) + .reduce(common_1.unnestR, []) + .sort(tupleSort(hookType.reverseSort)) + .map(function (tuple) { return tuple.transitionHook; }); + }; + /** + * Finds all RegisteredHooks from: + * - The Transition object instance hook registry + * - The TransitionService ($transitions) global hook registry + * + * which matched: + * - the eventType + * - the matchCriteria (to, from, exiting, retained, entering) + * + * @returns an array of matched [[RegisteredHook]]s + */ + HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges) { + var isCreate = hookType.hookPhase === interface_1.TransitionHookPhase.CREATE; + // Instance and Global hook registries + var $transitions = this.transition.router.transitionService; + var registries = isCreate ? [$transitions] : [this.transition, $transitions]; + return registries.map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries + .filter(common_1.assertPredicate(predicates_1.isArray, "broken event named: " + hookType.name)) // Sanity check + .reduce(common_1.unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array + .filter(function (hook) { return hook.matches(treeChanges); }); // Only those satisfying matchCriteria + }; + return HookBuilder; +}()); +exports.HookBuilder = HookBuilder; +/** + * A factory for a sort function for HookTuples. + * + * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares + * the EventHook priority. + * + * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth + * @returns a tuple sort function + */ +function tupleSort(reverseDepthSort) { + if (reverseDepthSort === void 0) { reverseDepthSort = false; } + return function nodeDepthThenPriority(l, r) { + var factor = reverseDepthSort ? -1 : 1; + var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor; + return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority; + }; +} +//# sourceMappingURL=hookBuilder.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js.map new file mode 100644 index 00000000..6ef538ad --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookBuilder.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hookBuilder.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/hookBuilder.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,kBAAkB;;AAEtB,2CAAkF;AAClF,mDAA6C;AAE7C,yCAGqB;AAGrB,mDAAgD;AAOhD;;;;;;;;;;;;;GAaG;AACH;IACE,qBAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAI,CA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3B,CAA2B,CAAC,CAAI,kCAAkC;aAC3G,MAAM,CAAC,wBAAe,CAAC,oBAAO,EAAE,yBAAuB,QAAQ,CAAC,IAAM,CAAC,CAAC,CAAC,eAAe;aACxF,MAAM,CAAC,gBAAO,EAAE,EAAE,CAAC,CAAsD,uDAAuD;aAChI,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAA+B,sCAAsC;IACtH,CAAC;IACH,kBAAC;AAAD,CAAC,AAjFD,IAiFC;AAjFY,kCAAW;AAqFxB;;;;;;;;GAQG;AACH,mBAAmB,gBAAwB;IAAxB,iCAAA,EAAA,wBAAwB;IACzC,MAAM,CAAC,+BAA+B,CAAY,EAAE,CAAY;QAC9D,IAAI,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;QAChF,MAAM,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC3E,CAAC,CAAA;AACH,CAAC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\nimport {extend, tail, assertPredicate, unnestR, identity} from \"../common/common\";\nimport {isArray} from \"../common/predicates\";\n\nimport {\n TransitionOptions, TransitionHookOptions, IHookRegistry, TreeChanges, IMatchingNodes,\n TransitionHookPhase, TransitionHookScope\n} from \"./interface\";\n\nimport {Transition} from \"./transition\";\nimport {TransitionHook} from \"./transitionHook\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TransitionService} from \"./transitionService\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * This class returns applicable TransitionHooks for a specific Transition instance.\n *\n * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g.\n * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is\n * determined by the type of hook)\n *\n * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition.\n *\n * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder\n * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private\n * in the Transition class, so we must also provide the Transition's _treeChanges)\n *\n */\nexport class HookBuilder {\n constructor(private transition: Transition) { }\n\n buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[] {\n let $transitions = this.transition.router.transitionService;\n return $transitions._pluginapi._getEvents(phase)\n .map(type => this.buildHooks(type))\n .reduce(unnestR, [])\n .filter(identity);\n }\n\n /**\n * Returns an array of newly built TransitionHook objects.\n *\n * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].\n * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)\n * - For each of the [[PathNode]]s, creates a TransitionHook\n *\n * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.\n */\n buildHooks(hookType: TransitionEventType): TransitionHook[] {\n let transition = this.transition;\n let treeChanges = transition.treeChanges();\n\n // Find all the matching registered hooks for a given hook type\n let matchingHooks = this.getMatchingHooks(hookType, treeChanges);\n if (!matchingHooks) return [];\n\n let baseHookOptions = {\n transition: transition,\n current: transition.options().current\n };\n\n const makeTransitionHooks = (hook: RegisteredHook) => {\n // Fetch the Nodes that caused this hook to match.\n let matches: IMatchingNodes = hook.matches(treeChanges);\n // Select the PathNode[] that will be used as TransitionHook context objects\n let matchingNodes: PathNode[] = matches[hookType.criteriaMatchPath.name];\n\n // Return an array of HookTuples\n return matchingNodes.map(node => {\n let _options = extend({\n bind: hook.bind,\n traceData: { hookType: hookType.name, context: node }\n }, baseHookOptions);\n\n let state = hookType.criteriaMatchPath.scope === TransitionHookScope.STATE ? node.state.self : null;\n let transitionHook = new TransitionHook(transition, state, hook, _options);\n return { hook, node, transitionHook };\n });\n };\n\n return matchingHooks.map(makeTransitionHooks)\n .reduce(unnestR, [])\n .sort(tupleSort(hookType.reverseSort))\n .map(tuple => tuple.transitionHook);\n }\n\n /**\n * Finds all RegisteredHooks from:\n * - The Transition object instance hook registry\n * - The TransitionService ($transitions) global hook registry\n *\n * which matched:\n * - the eventType\n * - the matchCriteria (to, from, exiting, retained, entering)\n *\n * @returns an array of matched [[RegisteredHook]]s\n */\n public getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges): RegisteredHook[] {\n let isCreate = hookType.hookPhase === TransitionHookPhase.CREATE;\n\n // Instance and Global hook registries\n let $transitions = this.transition.router.transitionService;\n let registries = isCreate ? [ $transitions ] : [ this.transition, $transitions ];\n\n return registries.map((reg: IHookRegistry) => reg.getHooks(hookType.name)) // Get named hooks from registries\n .filter(assertPredicate(isArray, `broken event named: ${hookType.name}`)) // Sanity check\n .reduce(unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array\n .filter(hook => hook.matches(treeChanges)); // Only those satisfying matchCriteria\n }\n}\n\ninterface HookTuple { hook: RegisteredHook, node: PathNode, transitionHook: TransitionHook }\n\n/**\n * A factory for a sort function for HookTuples.\n *\n * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares\n * the EventHook priority.\n *\n * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth\n * @returns a tuple sort function\n */\nfunction tupleSort(reverseDepthSort = false) {\n return function nodeDepthThenPriority(l: HookTuple, r: HookTuple): number {\n let factor = reverseDepthSort ? -1 : 1;\n let depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor;\n return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority;\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.d.ts new file mode 100644 index 00000000..1426d33b --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.d.ts @@ -0,0 +1,93 @@ +import { IHookRegistry } from "./interface"; +import { HookRegOptions, HookMatchCriteria, TreeChanges, HookMatchCriterion, IMatchingNodes, HookFn } from "./interface"; +import { StateObject } from "../state/stateObject"; +import { TransitionEventType } from "./transitionEventType"; +import { TransitionService } from "./transitionService"; +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +export declare function matchState(state: StateObject, criterion: HookMatchCriterion): boolean; +/** + * @internalapi + * The registration data for a registered transition hook + */ +export declare class RegisteredHook { + tranSvc: TransitionService; + eventType: TransitionEventType; + callback: HookFn; + matchCriteria: HookMatchCriteria; + removeHookFromRegistry: (hook: RegisteredHook) => void; + priority: number; + bind: any; + invokeCount: number; + invokeLimit: number; + _deregistered: boolean; + constructor(tranSvc: TransitionService, eventType: TransitionEventType, callback: HookFn, matchCriteria: HookMatchCriteria, removeHookFromRegistry: (hook: RegisteredHook) => void, options?: HookRegOptions); + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + private _matchingNodes(nodes, criterion); + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + private _getDefaultMatchCriteria(); + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + private _getMatchingNodes(treeChanges); + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + matches(treeChanges: TreeChanges): IMatchingNodes; + deregister(): void; +} +/** @hidden Return a registration function of the requested type. */ +export declare function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType): (matchObject: any, callback: any, options?: {}) => any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js new file mode 100644 index 00000000..c76e85f8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js @@ -0,0 +1,161 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module transition + */ /** for typedoc */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var interface_1 = require("./interface"); // has or is using +var glob_1 = require("../common/glob"); +/** + * Determines if the given state matches the matchCriteria + * + * @hidden + * + * @param state a State Object to test against + * @param criterion + * - If a string, matchState uses the string as a glob-matcher against the state name + * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name + * and returns a positive match if any of the globs match. + * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. + * @returns {boolean} + */ +function matchState(state, criterion) { + var toMatch = predicates_1.isString(criterion) ? [criterion] : criterion; + function matchGlobs(_state) { + var globStrings = toMatch; + for (var i = 0; i < globStrings.length; i++) { + var glob = new glob_1.Glob(globStrings[i]); + if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) { + return true; + } + } + return false; + } + var matchFn = (predicates_1.isFunction(toMatch) ? toMatch : matchGlobs); + return !!matchFn(state); +} +exports.matchState = matchState; +/** + * @internalapi + * The registration data for a registered transition hook + */ +var RegisteredHook = /** @class */ (function () { + function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) { + if (options === void 0) { options = {}; } + this.tranSvc = tranSvc; + this.eventType = eventType; + this.callback = callback; + this.matchCriteria = matchCriteria; + this.removeHookFromRegistry = removeHookFromRegistry; + this.invokeCount = 0; + this._deregistered = false; + this.priority = options.priority || 0; + this.bind = options.bind || null; + this.invokeLimit = options.invokeLimit; + } + /** + * Gets the matching [[PathNode]]s + * + * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing + * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. + * + * Returning `null` is significant to distinguish between the default + * "match-all criterion value" of `true` compared to a `() => true` function, + * when the nodes is an empty array. + * + * This is useful to allow a transition match criteria of `entering: true` + * to still match a transition, even when `entering === []`. Contrast that + * with `entering: (state) => true` which only matches when a state is actually + * being entered. + */ + RegisteredHook.prototype._matchingNodes = function (nodes, criterion) { + if (criterion === true) + return nodes; + var matching = nodes.filter(function (node) { return matchState(node.state, criterion); }); + return matching.length ? matching : null; + }; + /** + * Gets the default match criteria (all `true`) + * + * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: + * + * ```js + * { + * to: true, + * from: true, + * entering: true, + * exiting: true, + * retained: true, + * } + */ + RegisteredHook.prototype._getDefaultMatchCriteria = function () { + return common_1.map(this.tranSvc._pluginapi._getPathTypes(), function () { return true; }); + }; + /** + * Gets matching nodes as [[IMatchingNodes]] + * + * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: + * + * ```js + * let matches: IMatchingNodes = { + * to: _matchingNodes([tail(treeChanges.to)], mc.to), + * from: _matchingNodes([tail(treeChanges.from)], mc.from), + * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), + * retained: _matchingNodes(treeChanges.retained, mc.retained), + * entering: _matchingNodes(treeChanges.entering, mc.entering), + * }; + * ``` + */ + RegisteredHook.prototype._getMatchingNodes = function (treeChanges) { + var _this = this; + var criteria = common_1.extend(this._getDefaultMatchCriteria(), this.matchCriteria); + var paths = common_1.values(this.tranSvc._pluginapi._getPathTypes()); + return paths.reduce(function (mn, pathtype) { + // STATE scope criteria matches against every node in the path. + // TRANSITION scope criteria matches against only the last node in the path + var isStateHook = pathtype.scope === interface_1.TransitionHookScope.STATE; + var path = treeChanges[pathtype.name] || []; + var nodes = isStateHook ? path : [common_1.tail(path)]; + mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name]); + return mn; + }, {}); + }; + /** + * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] + * + * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values + * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) + */ + RegisteredHook.prototype.matches = function (treeChanges) { + var matches = this._getMatchingNodes(treeChanges); + // Check if all the criteria matched the TreeChanges object + var allMatched = common_1.values(matches).every(common_1.identity); + return allMatched ? matches : null; + }; + RegisteredHook.prototype.deregister = function () { + this.removeHookFromRegistry(this); + this._deregistered = true; + }; + return RegisteredHook; +}()); +exports.RegisteredHook = RegisteredHook; +/** @hidden Return a registration function of the requested type. */ +function makeEvent(registry, transitionService, eventType) { + // Create the object which holds the registered transition hooks. + var _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {}); + var hooks = _registeredHooks[eventType.name] = []; + var removeHookFn = common_1.removeFrom(hooks); + // Create hook registration function on the IHookRegistry for the event + registry[eventType.name] = hookRegistrationFn; + function hookRegistrationFn(matchObject, callback, options) { + if (options === void 0) { options = {}; } + var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options); + hooks.push(registeredHook); + return registeredHook.deregister.bind(registeredHook); + } + return hookRegistrationFn; +} +exports.makeEvent = makeEvent; +//# sourceMappingURL=hookRegistry.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js.map new file mode 100644 index 00000000..058670fb --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/hookRegistry.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hookRegistry.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/hookRegistry.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,kBAAkB;AACtB,2CAAmF;AACnF,mDAA0D;AAE1D,yCAEqB,CAAC,kBAAkB;AAMxC,uCAAoC;AAKpC;;;;;;;;;;;;GAYG;AACH,oBAA2B,KAAkB,EAAE,SAA6B;IAC1E,IAAI,OAAO,GAAG,qBAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5D,oBAAoB,MAAmB;QACrC,IAAI,WAAW,GAAc,OAAO,CAAC;QACrC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,IAAI,IAAI,GAAG,IAAI,WAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAEpC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CA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BAgBC", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport { extend, removeFrom, tail, values, identity, map } from \"../common/common\";\nimport {isString, isFunction} from \"../common/predicates\";\nimport {PathNode} from \"../path/pathNode\";\nimport {\n TransitionStateHookFn, TransitionHookFn, TransitionHookPhase, TransitionHookScope, IHookRegistry, PathType,\n} from \"./interface\"; // has or is using\n\nimport {\n HookRegOptions, HookMatchCriteria, TreeChanges,\n HookMatchCriterion, IMatchingNodes, HookFn,\n} from \"./interface\";\nimport {Glob} from \"../common/glob\";\nimport {StateObject} from \"../state/stateObject\";\nimport {TransitionEventType} from \"./transitionEventType\";\nimport { TransitionService } from \"./transitionService\";\n\n/**\n * Determines if the given state matches the matchCriteria\n *\n * @hidden\n *\n * @param state a State Object to test against\n * @param criterion\n * - If a string, matchState uses the string as a glob-matcher against the state name\n * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name\n * and returns a positive match if any of the globs match.\n * - If a function, matchState calls the function with the state and returns true if the function's result is truthy.\n * @returns {boolean}\n */\nexport function matchState(state: StateObject, criterion: HookMatchCriterion) {\n let toMatch = isString(criterion) ? [criterion] : criterion;\n\n function matchGlobs(_state: StateObject) {\n let globStrings = toMatch;\n for (let i = 0; i < globStrings.length; i++) {\n let glob = new Glob(globStrings[i]);\n\n if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) {\n return true;\n }\n }\n return false;\n }\n\n let matchFn = (isFunction(toMatch) ? toMatch : matchGlobs);\n return !!matchFn(state);\n}\n\n/**\n * @internalapi\n * The registration data for a registered transition hook\n */\nexport class RegisteredHook {\n priority: number;\n bind: any;\n invokeCount = 0;\n invokeLimit: number;\n _deregistered = false;\n\n constructor(public tranSvc: TransitionService,\n public eventType: TransitionEventType,\n public callback: HookFn,\n public matchCriteria: HookMatchCriteria,\n public removeHookFromRegistry: (hook: RegisteredHook) => void,\n options: HookRegOptions = {} as any) {\n this.priority = options.priority || 0;\n this.bind = options.bind || null;\n this.invokeLimit = options.invokeLimit;\n }\n\n /**\n * Gets the matching [[PathNode]]s\n *\n * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing\n * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes.\n *\n * Returning `null` is significant to distinguish between the default\n * \"match-all criterion value\" of `true` compared to a `() => true` function,\n * when the nodes is an empty array.\n *\n * This is useful to allow a transition match criteria of `entering: true`\n * to still match a transition, even when `entering === []`. Contrast that\n * with `entering: (state) => true` which only matches when a state is actually\n * being entered.\n */\n private _matchingNodes(nodes: PathNode[], criterion: HookMatchCriterion): PathNode[] {\n if (criterion === true) return nodes;\n let matching = nodes.filter(node => matchState(node.state, criterion));\n return matching.length ? matching : null;\n }\n\n /**\n * Gets the default match criteria (all `true`)\n *\n * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.:\n *\n * ```js\n * {\n * to: true,\n * from: true,\n * entering: true,\n * exiting: true,\n * retained: true,\n * }\n */\n private _getDefaultMatchCriteria(): HookMatchCriteria {\n return map(this.tranSvc._pluginapi._getPathTypes(), () => true);\n }\n\n /**\n * Gets matching nodes as [[IMatchingNodes]]\n *\n * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to:\n *\n * ```js\n * let matches: IMatchingNodes = {\n * to: _matchingNodes([tail(treeChanges.to)], mc.to),\n * from: _matchingNodes([tail(treeChanges.from)], mc.from),\n * exiting: _matchingNodes(treeChanges.exiting, mc.exiting),\n * retained: _matchingNodes(treeChanges.retained, mc.retained),\n * entering: _matchingNodes(treeChanges.entering, mc.entering),\n * };\n * ```\n */\n private _getMatchingNodes(treeChanges: TreeChanges): IMatchingNodes {\n let criteria = extend(this._getDefaultMatchCriteria(), this.matchCriteria);\n let paths: PathType[] = values(this.tranSvc._pluginapi._getPathTypes());\n\n return paths.reduce((mn: IMatchingNodes, pathtype: PathType) => {\n // STATE scope criteria matches against every node in the path.\n // TRANSITION scope criteria matches against only the last node in the path\n let isStateHook = pathtype.scope === TransitionHookScope.STATE;\n let path = treeChanges[pathtype.name] || [];\n let nodes: PathNode[] = isStateHook ? path : [tail(path)];\n\n mn[pathtype.name] = this._matchingNodes(nodes, criteria[pathtype.name]);\n return mn;\n }, {} as IMatchingNodes);\n }\n\n /**\n * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]]\n *\n * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values\n * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering)\n */\n matches(treeChanges: TreeChanges): IMatchingNodes {\n let matches = this._getMatchingNodes(treeChanges);\n\n // Check if all the criteria matched the TreeChanges object\n let allMatched = values(matches).every(identity);\n return allMatched ? matches : null;\n }\n\n deregister() {\n this.removeHookFromRegistry(this);\n this._deregistered = true;\n }\n}\n\n/** @hidden Return a registration function of the requested type. */\nexport function makeEvent(registry: IHookRegistry, transitionService: TransitionService, eventType: TransitionEventType) {\n // Create the object which holds the registered transition hooks.\n const _registeredHooks = registry._registeredHooks = (registry._registeredHooks || {});\n const hooks = _registeredHooks[eventType.name] = [];\n const removeHookFn: (hook: RegisteredHook) => void = removeFrom(hooks);\n\n // Create hook registration function on the IHookRegistry for the event\n registry[eventType.name] = hookRegistrationFn;\n\n function hookRegistrationFn(matchObject, callback, options = {}) {\n const registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options);\n hooks.push(registeredHook);\n return registeredHook.deregister.bind(registeredHook);\n }\n\n return hookRegistrationFn;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.d.ts new file mode 100644 index 00000000..ebcb8d60 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.d.ts @@ -0,0 +1,22 @@ +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ +export * from "./interface"; +export * from "./hookBuilder"; +export * from "./hookRegistry"; +export * from "./rejectFactory"; +export * from "./transition"; +export * from "./transitionHook"; +export * from "./transitionEventType"; +export * from "./transitionService"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js new file mode 100644 index 00000000..f83d18fc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js @@ -0,0 +1,28 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * # Transition subsystem + * + * This module contains APIs related to a Transition. + * + * See: + * - [[TransitionService]] + * - [[Transition]] + * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] + * + * @coreapi + * @preferred + * @module transition + */ /** for typedoc */ +__export(require("./interface")); +__export(require("./hookBuilder")); +__export(require("./hookRegistry")); +__export(require("./rejectFactory")); +__export(require("./transition")); +__export(require("./transitionHook")); +__export(require("./transitionEventType")); +__export(require("./transitionService")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js.map new file mode 100644 index 00000000..86ad0f2d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/index.ts" + ], + "names": [], + "mappings": ";;;;;AAAA;;;;;;;;;;;;;GAaG,CAAC,kBAAkB;AACtB,iCAA4B;AAC5B,mCAA8B;AAC9B,oCAA+B;AAC/B,qCAAgC;AAChC,kCAA6B;AAC7B,sCAAiC;AACjC,2CAAsC;AACtC,yCAAoC", + "sourcesContent": [ + "/**\n * # Transition subsystem\n *\n * This module contains APIs related to a Transition.\n *\n * See:\n * - [[TransitionService]]\n * - [[Transition]]\n * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]]\n *\n * @coreapi\n * @preferred\n * @module transition\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./hookBuilder\";\nexport * from \"./hookRegistry\";\nexport * from \"./rejectFactory\";\nexport * from \"./transition\";\nexport * from \"./transitionHook\";\nexport * from \"./transitionEventType\";\nexport * from \"./transitionService\";\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.d.ts new file mode 100644 index 00000000..c97f8a77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.d.ts @@ -0,0 +1,794 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +import { StateDeclaration } from "../state/interface"; +import { Predicate } from "../common/common"; +import { Transition } from "./transition"; +import { StateObject } from "../state/stateObject"; +import { PathNode } from "../path/pathNode"; +import { TargetState } from "../state/targetState"; +import { RegisteredHook } from "./hookRegistry"; +/** + * The TransitionOptions object can be used to change the behavior of a transition. + * + * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]]. + * It can also be used with a `uiSref`. + */ +export interface TransitionOptions { + /** + * This option changes how the Transition interacts with the browser's location bar (URL). + * + * - If `true`, it will update the url in the location bar. + * - If `false`, it will not update the url in the location bar. + * - If it is the string `"replace"`, it will update the url and also replace the last history record. + * + * @default `true` + */ + location?: (boolean | string); + /** + * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from. + * @default `$state.current` + */ + relative?: (string | StateDeclaration | StateObject); + /** + * This option sets whether or not the transition's parameter values should be inherited from + * the current parameter values. + * + * - If `true`, it will inherit parameter values from the current parameter values. + * - If `false`, only the parameters which are provided to `transitionTo` will be used. + * + * @default `false` + */ + inherit?: boolean; + /** + * @deprecated + */ + notify?: boolean; + /** + * This option may be used to force states which are currently active to reload. + * + * During a normal transition, a state is "retained" if: + * - It was previously active + * - The state's parameter values have not changed + * - All the parent states' parameter values have not changed + * + * Forcing a reload of a state will cause it to be exited and entered, which will: + * - Refetch that state's resolve data + * - Exit the state (onExit hook) + * - Re-enter the state (onEnter hook) + * - Re-render the views (controllers and templates) + * + * - When `true`, the destination state (and all parent states) will be reloaded. + * - When it is a string and is the name of a state, or when it is a State object, + * that state and any children states will be reloaded. + * + * @default `false` + */ + reload?: (boolean | string | StateDeclaration | StateObject); + /** + * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook + */ + custom?: any; + /** @internalapi */ + reloadState?: (StateObject); + /** @internalapi + * If this transition is a redirect, this property should be the original Transition (which was redirected to this one) + */ + redirectedFrom?: Transition; + /** @internalapi */ + current?: () => Transition; + /** @internalapi */ + source?: "sref" | "url" | "redirect" | "otherwise" | "unknown"; +} +/** @internalapi */ +export interface TransitionHookOptions { + current?: () => Transition; + transition?: Transition; + hookType?: string; + target?: any; + traceData?: any; + bind?: any; + stateHook?: boolean; +} +/** + * TreeChanges encapsulates the various Paths that are involved in a Transition. + * + * Get a TreeChanges object using [[Transition.treeChanges]] + * + * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition, + * this object stores the "to" and "from" paths, as well as subsets of those: the "retained", + * "exiting" and "entering" paths. + * + * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion + * of a nested state. + * + * For example, if you had a nested state named `foo.bar.baz`, it would have three + * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]] + * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`. + * + * --- + * + * @todo show visual state tree + */ +export interface TreeChanges { + /** @nodoc */ + [key: string]: PathNode[]; + /** The path of nodes in the state tree that the transition is coming *from* */ + from: PathNode[]; + /** The path of nodes in the state tree that the transition is going *to* */ + to: PathNode[]; + /** + * The path of active nodes that the transition is retaining. + * + * These nodes are neither exited, nor entered. + * Before and after the transition is successful, these nodes are active. + */ + retained: PathNode[]; + /** + * The path of previously active nodes that the transition is exiting. + * + * After the Transition is successful, these nodes are no longer active. + * + * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the + * `exiting` and `entering` paths. + */ + exiting: PathNode[]; + /** + * The path of nodes that the transition is entering. + * + * After the Transition is successful, these nodes will be active. + * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views + * (component(s) or controller(s)+template(s)) refreshed. + * + * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the + * `exiting` and `entering` paths. + */ + entering: PathNode[]; +} +export declare type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function; +/** + * The signature for Transition Hooks. + * + * Transition hooks are callback functions that hook into the lifecycle of transitions. + * As a transition runs, it reaches certain lifecycle events. + * As each event occurs, the hooks which are registered for the event are called (in priority order). + * + * A transition hook may alter a Transition by returning a [[HookResult]]. + * + * #### See: + * + * - [[IHookRegistry.onBefore]] + * - [[IHookRegistry.onStart]] + * - [[IHookRegistry.onFinish]] + * - [[IHookRegistry.onSuccess]] + * - [[IHookRegistry.onError]] + * + * @param transition the current [[Transition]] + * @param injector (for ng1 or ng2 only) the injector service + * + * @returns a [[HookResult]] which may alter the transition + * + */ +export interface TransitionHookFn { + (transition: Transition): HookResult; +} +/** + * The signature for Transition State Hooks. + * + * A function which hooks into a lifecycle event for a specific state. + * + * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition. + * As a transition runs, it may exit some states, retain (keep) states, and enter states. + * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order). + * + * #### See: + * + * - [[IHookRegistry.onExit]] + * - [[IHookRegistry.onRetain]] + * - [[IHookRegistry.onEnter]] + * + * @param transition the current [[Transition]] + * @param state the [[StateObject]] that the hook is bound to + * @param injector (for ng1 or ng2 only) the injector service + * + * @returns a [[HookResult]] which may alter the transition + */ +export interface TransitionStateHookFn { + (transition: Transition, state: StateDeclaration): HookResult; +} +/** + * The signature for Transition onCreate Hooks. + * + * Transition onCreate Hooks are callbacks that allow customization or preprocessing of + * a Transition before it is returned from [[TransitionService.create]] + * + * @param transition the [[Transition]] that was just created + * @return a [[Transition]] which will then be returned from [[TransitionService.create]] + */ +export interface TransitionCreateHookFn { + (transition: Transition): void; +} +export declare type HookFn = (TransitionHookFn | TransitionStateHookFn | TransitionCreateHookFn); +/** + * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]] + * + * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]: + * + * - `false`: the transition will be cancelled. + * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]]) + * - `Promise`: the transition will wait for the promise to resolve or reject + * - If the promise is rejected (or resolves to `false`), the transition will be cancelled + * - If the promise resolves to a [[TargetState]], the transition will be redirected + * - If the promise resolves to anything else, the transition will resume + * - Anything else: the transition will resume + */ +export declare type HookResult = (boolean | TargetState | void | Promise); +/** + * These options may be provided when registering a Transition Hook (such as `onStart`) + */ +export interface HookRegOptions { + /** + * Sets the priority of the registered hook + * + * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority + * is invoked before a hook with a lower priority. + * + * The default hook priority is 0 + */ + priority?: number; + /** + * Specifies what `this` is bound to during hook invocation. + */ + bind?: any; + /** + * Limits the number of times that the hook will be invoked. + * Once the hook has been invoked this many times, it is automatically deregistered. + */ + invokeLimit?: number; +} +/** + * This interface specifies the api for registering Transition Hooks. Both the + * [[TransitionService]] and also the [[Transition]] object itself implement this interface. + * Note: the Transition object only allows hooks to be registered before the Transition is started. + */ +export interface IHookRegistry { + /** + * Registers a [[TransitionHookFn]], called *before a transition starts*. + * + * Registers a transition lifecycle hook, which is invoked before a transition even begins. + * This hook can be useful to implement logic which prevents a transition from even starting, such + * as authentication, redirection + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onBefore` hooks are invoked *before a Transition starts*. + * No resolves have been fetched yet. + * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]]. + * The registered `onBefore` hooks are invoked in priority order. + * + * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance. + * These "on-the-fly" hooks only affect the currently running transition.. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning + * a [[TargetState]]), the remainder of the hooks are skipped. + * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously. + * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition. + * + * ### Examples + * + * #### Default Substate + * + * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a + * "default substate". + * + * @example + * ```js + * // ng2 + * transitionService.onBefore({ to: 'home' }, (trans: Transition) => + * trans.router.stateService.target("home.dashboard")); + * ``` + * + * #### Data Driven Default Substate + * + * This example provides data-driven default substate functionality. It matches on a transition to any state + * which has `defaultSubstate: "some.sub.state"` defined. See: [[Transition.to]] which returns the "to state" + * definition. + * + * @example + * ```js + * // ng1 + * // state declaration + * { + * name: 'home', + * template: '
    ', + * defaultSubstate: 'home.dashboard' + * } + * + * var criteria = { + * to: function(state) { + * return state.defaultSubstate != null; + * } + * } + * + * $transitions.onBefore(criteria, function(trans: Transition) { + * var substate = trans.to().defaultSubstate; + * return trans.router.stateService.target(substate); + * }); + * ``` + * + * + * #### Require authentication + * + * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated. + * + * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state. + * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`. + * + * #### Example: + * ```js + * // ng1 + * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) { + * var myAuthService = trans.injector().get('MyAuthService'); + * // If isAuthenticated returns false, the transition is cancelled. + * return myAuthService.isAuthenticated(); + * }); + * ``` + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @returns a function which deregisters the hook. + */ + onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called when a transition starts. + * + * Registers a transition lifecycle hook, which is invoked as a transition starts running. + * This hook can be useful to perform some asynchronous action before completing a transition. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onStart` hooks are invoked asynchronously when the Transition starts running. + * This happens after the `onBefore` phase is complete. + * At this point, the Transition has not yet exited nor entered any states. + * The registered `onStart` hooks are invoked in priority order. + * + * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Example + * + * #### Login during transition + * + * This example intercepts any transition to a state which requires authentication, when the user is + * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the + * transition. If the user did not authenticate successfully, it redirects to the "guest" state, which + * does not require authentication. + * + * This example assumes: + * - a state tree where all states which require authentication are children of a parent `'auth'` state. + * - `MyAuthService.isAuthenticated()` synchronously returns a boolean. + * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved + * or rejected, whether or not the login attempt was successful. + * + * #### Example: + * ```js + * // ng1 + * $transitions.onStart( { to: 'auth.**' }, function(trans) { + * var $state = trans.router.stateService; + * var MyAuthService = trans.injector().get('MyAuthService'); + * + * // If the user is not authenticated + * if (!MyAuthService.isAuthenticated()) { + * + * // Then return a promise for a successful login. + * // The transition will wait for this promise to settle + * + * return MyAuthService.authenticate().catch(function() { + * + * // If the authenticate() method failed for whatever reason, + * // redirect to a 'guest' state which doesn't require auth. + * return $state.target("guest"); + * }); + * } + * }); + * ``` + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is entered. + * + * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered. + * + * Since this hook is run only when the specific state is being *entered*, it can be useful for + * performing tasks when entering a submodule/feature area such as initializing a stateful service, + * or for guarding access to a submodule/feature area. + * + * See [[TransitionStateHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onEnter` hooks generally specify `{ entering: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onEnter` hooks are invoked when the Transition is entering a state. + * States are entered after the `onRetain` phase is complete. + * If more than one state is being entered, the parent state is entered first. + * The registered `onEnter` hooks for a state are invoked in priority order. + * + * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook + * directly on a state declaration (see: [[StateDeclaration.onEnter]]). + * + * + * ### Examples + * + * #### Audit Log + * + * This example uses a service to log that a user has entered the admin section of an app. + * This assumes that there are substates of the "admin" state, such as "admin.users", "admin.pages", etc. + * @example + * ``` + * + * $transitions.onEnter({ entering: 'admin' }, function(transition, state) { + * var AuditService = trans.injector().get('AuditService'); + * AuditService.log("Entered " + state.name + " module while transitioning to " + transition.to().name); + * } + * ``` + * + * #### Audit Log (inside a state declaration) + * + * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example. + * ``` + * { + * name: 'admin', + * component: 'admin', + * onEnter: function($transition$, $state$) { + * var AuditService = $transition$.injector().get('AuditService'); + * AuditService.log("Entered " + state.name + " module while transitioning to " + transition.to().name); + * } + * } + * ``` + * + * Note: A state declaration's `onEnter` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept. + * + * Registers a lifecycle hook, which is invoked (during a transition) for + * a specific state that was previously active will remain active (is not being entered nor exited). + * + * This hook is invoked when a state is "retained" or "kept". + * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state. + * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onRetain` hooks generally specify `{ retained: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onRetain` hooks are invoked after any `onExit` hooks have been fired. + * If more than one state is retained, the child states' `onRetain` hooks are invoked first. + * The registered `onRetain` hooks for a state are invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook + * directly on a state declaration (see: [[StateDeclaration.onRetain]]). + * + * Note: A state declaration's `onRetain` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionStateHookFn]], called when a specific state is exited. + * + * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited. + * + * Since this hook is run only when the specific state is being *exited*, it can be useful for + * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service, + * or for preventing the user from leaving a state or submodule until some criteria is satisfied. + * + * See [[TransitionStateHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * `onExit` hooks generally specify `{ exiting: 'somestate' }`. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onExit` hooks are invoked when the Transition is exiting a state. + * States are exited after any `onStart` phase is complete. + * If more than one state is being exited, the child states are exited first. + * The registered `onExit` hooks for a state are invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * ### Inside a state declaration + * + * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook + * directly on a state declaration (see: [[StateDeclaration.onExit]]). + * + * Note: A state declaration's `onExit` function is injected for Angular 1 only. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called *just before a transition finishes*. + * + * Registers a transition lifecycle hook, which is invoked just before a transition finishes. + * This hook is a last chance to cancel or redirect a transition. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onFinish` hooks are invoked after the `onEnter` phase is complete. + * These hooks are invoked just before the transition is "committed". + * Each hook is invoked in priority order. + * + * ### Return value + * + * The hook's return value can be used to pause, cancel, or redirect the current Transition. + * See [[HookResult]] for more information. + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called after a successful transition completed. + * + * Registers a transition lifecycle hook, which is invoked after a transition successfully completes. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]). + * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked. + * Since these hooks are run after the transition is over, their return value is ignored. + * The `onSuccess` hooks are invoked in priority order. + * + * ### Return value + * + * Since the Transition is already completed, the hook's return value is ignored + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Registers a [[TransitionHookFn]], called after a transition has errored. + * + * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason. + * + * See [[TransitionHookFn]] for the signature of the function. + * + * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for. + * To match all Transitions, use an empty criteria object `{}`. + * + * ### Lifecycle + * + * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]). + * If a Transition fails, its promise is rejected and the `onError` hooks are invoked. + * The `onError` hooks are invoked in priority order. + * + * Since these hooks are run after the transition is over, their return value is ignored. + * + * A transition "errors" if it was started, but failed to complete (for any reason). + * A *non-exhaustive list* of reasons a transition can error: + * + * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`) + * - A transition was cancelled by a Transition Hook returning false + * - A transition was redirected by a Transition Hook returning a [[TargetState]] + * - A Transition Hook or resolve function threw an error + * - A Transition Hook returned a rejected promise + * - A resolve function returned a rejected promise + * + * To check the failure reason, inspect the return value of [[Transition.error]]. + * + * Note: `onError` should be used for targeted error handling, or error recovery. + * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]]. + * + * ### Return value + * + * Since the Transition is already completed, the hook's return value is ignored + * + * @param matchCriteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be injected and invoked. + * @returns a function which deregisters the hook. + */ + onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** + * Returns all the registered hooks of a given `hookName` type + * + * #### Example: + * ``` + * $transitions.getHooks("onEnter") + * ``` + */ + getHooks(hookName: string): RegisteredHook[]; + /** @hidden place to store the hooks */ + _registeredHooks: { + [key: string]: RegisteredHook[]; + }; +} +/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */ +export declare type IStateMatch = Predicate; +/** + * This object is used to configure whether or not a Transition Hook is invoked for a particular transition, + * based on the Transition's "to state" and "from state". + * + * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string, + * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]]) + * + * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches. + * To match any transition, use an empty criteria object `{}`. + * + * #### Example: + * ```js + * // This matches a transition coming from the `parent` state and going to the `parent.child` state. + * var match = { + * to: 'parent', + * from: 'parent.child' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state. + * var match = { + * to: 'parent', + * from: 'parent.**' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any state and going to any substate of `mymodule` + * var match = { + * to: 'mymodule.**' + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition coming from any state and going to any state that has `data.authRequired` + * // set to a truthy value. + * var match = { + * to: function(state) { + * return state.data != null && state.data.authRequired === true; + * } + * } + * ``` + * + * #### Example: + * ```js + * // This matches a transition that is exiting `parent.child` + * var match = { + * exiting: 'parent.child' + * } + * ``` + */ +export interface HookMatchCriteria { + [key: string]: HookMatchCriterion | undefined; + /** A [[HookMatchCriterion]] to match the destination state */ + to?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match the original (from) state */ + from?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be exiting */ + exiting?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be retained */ + retained?: HookMatchCriterion; + /** A [[HookMatchCriterion]] to match any state that would be entering */ + entering?: HookMatchCriterion; +} +export interface IMatchingNodes { + [key: string]: PathNode[]; + to: PathNode[]; + from: PathNode[]; + exiting: PathNode[]; + retained: PathNode[]; + entering: PathNode[]; +} +/** @hidden */ +export interface RegisteredHooks { + [key: string]: RegisteredHook[]; +} +/** @hidden */ +export interface PathTypes { + [key: string]: PathType; + to: PathType; + from: PathType; + exiting: PathType; + retained: PathType; + entering: PathType; +} +/** @hidden */ +export interface PathType { + name: string; + scope: TransitionHookScope; +} +/** + * Hook Criterion used to match a transition. + * + * A [[Glob]] string that matches the name of a state. + * + * Or, a function with the signature `function(state) { return matches; }` + * which should return a boolean to indicate if a state matches. + * + * Or, `true` to always match + */ +export declare type HookMatchCriterion = (string | IStateMatch | boolean); +export declare enum TransitionHookPhase { + CREATE = 0, + BEFORE = 1, + RUN = 2, + SUCCESS = 3, + ERROR = 4, +} +export declare enum TransitionHookScope { + TRANSITION = 0, + STATE = 1, +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js new file mode 100644 index 00000000..bdb41343 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var TransitionHookPhase; +(function (TransitionHookPhase) { + TransitionHookPhase[TransitionHookPhase["CREATE"] = 0] = "CREATE"; + TransitionHookPhase[TransitionHookPhase["BEFORE"] = 1] = "BEFORE"; + TransitionHookPhase[TransitionHookPhase["RUN"] = 2] = "RUN"; + TransitionHookPhase[TransitionHookPhase["SUCCESS"] = 3] = "SUCCESS"; + TransitionHookPhase[TransitionHookPhase["ERROR"] = 4] = "ERROR"; +})(TransitionHookPhase = exports.TransitionHookPhase || (exports.TransitionHookPhase = {})); +var TransitionHookScope; +(function (TransitionHookScope) { + TransitionHookScope[TransitionHookScope["TRANSITION"] = 0] = "TRANSITION"; + TransitionHookScope[TransitionHookScope["STATE"] = 1] = "STATE"; +})(TransitionHookScope = exports.TransitionHookScope || (exports.TransitionHookScope = {})); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js.map new file mode 100644 index 00000000..957dada2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/interface.ts" + ], + "names": [], + "mappings": ";;AAwzBA,IAAY,mBAA2D;AAAvE,WAAY,mBAAmB;IAAG,iEAAM,CAAA;IAAE,iEAAM,CAAA;IAAE,2DAAG,CAAA;IAAE,mEAAO,CAAA;IAAE,+DAAK,CAAA;AAAC,CAAC,EAA3D,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAAwC;AACvE,IAAY,mBAAyC;AAArD,WAAY,mBAAmB;IAAG,yEAAU,CAAA;IAAE,+DAAK,CAAA;AAAC,CAAC,EAAzC,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAAsB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\nimport {StateDeclaration} from \"../state/interface\";\nimport {Predicate} from \"../common/common\";\n\nimport {Transition} from \"./transition\";\nimport {StateObject} from \"../state/stateObject\";\nimport {PathNode} from \"../path/pathNode\";\nimport {TargetState} from \"../state/targetState\";\nimport {RegisteredHook} from \"./hookRegistry\";\n\n/**\n * The TransitionOptions object can be used to change the behavior of a transition.\n *\n * It is passed as the third argument to [[StateService.go]], [[StateService.transitionTo]].\n * It can also be used with a `uiSref`.\n */\nexport interface TransitionOptions {\n /**\n * This option changes how the Transition interacts with the browser's location bar (URL).\n *\n * - If `true`, it will update the url in the location bar.\n * - If `false`, it will not update the url in the location bar.\n * - If it is the string `\"replace\"`, it will update the url and also replace the last history record.\n *\n * @default `true`\n */\n location ?: (boolean|string);\n\n /**\n * When transitioning to relative path (e.g '`^`'), this option defines which state to be relative from.\n * @default `$state.current`\n */\n relative ?: (string|StateDeclaration|StateObject);\n\n /**\n * This option sets whether or not the transition's parameter values should be inherited from\n * the current parameter values.\n *\n * - If `true`, it will inherit parameter values from the current parameter values.\n * - If `false`, only the parameters which are provided to `transitionTo` will be used.\n *\n * @default `false`\n */\n inherit ?: boolean;\n\n /**\n * @deprecated\n */\n notify ?: boolean;\n\n /**\n * This option may be used to force states which are currently active to reload.\n *\n * During a normal transition, a state is \"retained\" if:\n * - It was previously active\n * - The state's parameter values have not changed\n * - All the parent states' parameter values have not changed\n *\n * Forcing a reload of a state will cause it to be exited and entered, which will:\n * - Refetch that state's resolve data\n * - Exit the state (onExit hook)\n * - Re-enter the state (onEnter hook)\n * - Re-render the views (controllers and templates)\n *\n * - When `true`, the destination state (and all parent states) will be reloaded.\n * - When it is a string and is the name of a state, or when it is a State object,\n * that state and any children states will be reloaded.\n *\n * @default `false`\n */\n reload ?: (boolean|string|StateDeclaration|StateObject);\n /**\n * You can define your own Transition Options inside this property and use them, e.g., from a Transition Hook\n */\n custom ?: any;\n /** @internalapi */\n reloadState ?: (StateObject);\n /** @internalapi\n * If this transition is a redirect, this property should be the original Transition (which was redirected to this one)\n */\n redirectedFrom?: Transition;\n /** @internalapi */\n current ?: () => Transition;\n /** @internalapi */\n source ?: \"sref\" | \"url\" | \"redirect\" | \"otherwise\" | \"unknown\";\n}\n\n/** @internalapi */\nexport interface TransitionHookOptions {\n current ?: () => Transition; //path?\n transition ?: Transition;\n hookType ?: string;\n target ?: any;\n traceData ?: any;\n bind ?: any;\n stateHook ?: boolean;\n}\n\n/**\n * TreeChanges encapsulates the various Paths that are involved in a Transition.\n *\n * Get a TreeChanges object using [[Transition.treeChanges]]\n *\n * A UI-Router Transition is from one Path in a State Tree to another Path. For a given Transition,\n * this object stores the \"to\" and \"from\" paths, as well as subsets of those: the \"retained\",\n * \"exiting\" and \"entering\" paths.\n *\n * Each path in TreeChanges is an array of [[PathNode]] objects. Each PathNode in the array corresponds to a portion\n * of a nested state.\n *\n * For example, if you had a nested state named `foo.bar.baz`, it would have three\n * portions, `foo, bar, baz`. If you transitioned **to** `foo.bar.baz` and inspected the [[TreeChanges.to]]\n * Path, you would find a node in the array for each portion: `foo`, `bar`, and `baz`.\n *\n * ---\n *\n * @todo show visual state tree\n */\nexport interface TreeChanges {\n /** @nodoc */\n [key: string]: PathNode[];\n\n /** The path of nodes in the state tree that the transition is coming *from* */\n from: PathNode[];\n\n /** The path of nodes in the state tree that the transition is going *to* */\n to: PathNode[];\n\n /**\n * The path of active nodes that the transition is retaining.\n *\n * These nodes are neither exited, nor entered.\n * Before and after the transition is successful, these nodes are active.\n */\n retained: PathNode[];\n\n /**\n * The path of previously active nodes that the transition is exiting.\n *\n * After the Transition is successful, these nodes are no longer active.\n *\n * Note that a state that is being reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n exiting: PathNode[];\n\n /**\n * The path of nodes that the transition is entering.\n *\n * After the Transition is successful, these nodes will be active.\n * Because they are entering, they have their resolves fetched, `onEnter` hooks run, and their views\n * (component(s) or controller(s)+template(s)) refreshed.\n *\n * Note that a state that is reloaded (due to parameter values changing, or `reload: true`) may be in both the\n * `exiting` and `entering` paths.\n */\n entering: PathNode[];\n}\n\nexport type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: HookFn, options?: HookRegOptions) => Function;\n\n/**\n * The signature for Transition Hooks.\n *\n * Transition hooks are callback functions that hook into the lifecycle of transitions.\n * As a transition runs, it reaches certain lifecycle events.\n * As each event occurs, the hooks which are registered for the event are called (in priority order).\n *\n * A transition hook may alter a Transition by returning a [[HookResult]].\n *\n * #### See:\n *\n * - [[IHookRegistry.onBefore]]\n * - [[IHookRegistry.onStart]]\n * - [[IHookRegistry.onFinish]]\n * - [[IHookRegistry.onSuccess]]\n * - [[IHookRegistry.onError]]\n *\n * @param transition the current [[Transition]]\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n *\n */\nexport interface TransitionHookFn {\n (transition: Transition) : HookResult;\n}\n\n/**\n * The signature for Transition State Hooks.\n *\n * A function which hooks into a lifecycle event for a specific state.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * @param transition the current [[Transition]]\n * @param state the [[StateObject]] that the hook is bound to\n * @param injector (for ng1 or ng2 only) the injector service\n *\n * @returns a [[HookResult]] which may alter the transition\n */\nexport interface TransitionStateHookFn {\n (transition: Transition, state: StateDeclaration) : HookResult;\n}\n\n/**\n * The signature for Transition onCreate Hooks.\n *\n * Transition onCreate Hooks are callbacks that allow customization or preprocessing of\n * a Transition before it is returned from [[TransitionService.create]]\n *\n * @param transition the [[Transition]] that was just created\n * @return a [[Transition]] which will then be returned from [[TransitionService.create]]\n */\nexport interface TransitionCreateHookFn {\n (transition: Transition): void;\n}\n\nexport type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);\n\n/**\n * The return value of a [[TransitionHookFn]] or [[TransitionStateHookFn]]\n *\n * When returned from a [[TransitionHookFn]] or [[TransitionStateHookFn]], these values alter the running [[Transition]]:\n *\n * - `false`: the transition will be cancelled.\n * - [[TargetState]]: the transition will be redirected to the new target state (see: [[StateService.target]])\n * - `Promise`: the transition will wait for the promise to resolve or reject\n * - If the promise is rejected (or resolves to `false`), the transition will be cancelled\n * - If the promise resolves to a [[TargetState]], the transition will be redirected\n * - If the promise resolves to anything else, the transition will resume\n * - Anything else: the transition will resume\n */\nexport type HookResult = (boolean | TargetState | void | Promise);\n\n/**\n * These options may be provided when registering a Transition Hook (such as `onStart`)\n */\nexport interface HookRegOptions {\n /**\n * Sets the priority of the registered hook\n *\n * Hooks of the same type (onBefore, onStart, etc) are invoked in priority order. A hook with a higher priority\n * is invoked before a hook with a lower priority.\n *\n * The default hook priority is 0\n */\n priority?: number;\n\n /**\n * Specifies what `this` is bound to during hook invocation.\n */\n bind?: any;\n\n /**\n * Limits the number of times that the hook will be invoked.\n * Once the hook has been invoked this many times, it is automatically deregistered.\n */\n invokeLimit?: number;\n}\n\n/**\n * This interface specifies the api for registering Transition Hooks. Both the\n * [[TransitionService]] and also the [[Transition]] object itself implement this interface.\n * Note: the Transition object only allows hooks to be registered before the Transition is started.\n */\nexport interface IHookRegistry {\n /**\n * Registers a [[TransitionHookFn]], called *before a transition starts*.\n *\n * Registers a transition lifecycle hook, which is invoked before a transition even begins.\n * This hook can be useful to implement logic which prevents a transition from even starting, such\n * as authentication, redirection\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onBefore` hooks are invoked *before a Transition starts*.\n * No resolves have been fetched yet.\n * Each `onBefore` hook is invoked synchronously, in the same call stack as [[StateService.transitionTo]].\n * The registered `onBefore` hooks are invoked in priority order.\n *\n * Note: during the `onBefore` phase, additional hooks can be added to the specific [[Transition]] instance.\n * These \"on-the-fly\" hooks only affect the currently running transition..\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * If any hook modifies the transition *synchronously* (by throwing, returning `false`, or returning\n * a [[TargetState]]), the remainder of the hooks are skipped.\n * If a hook returns a promise, the remainder of the `onBefore` hooks are still invoked synchronously.\n * All promises are resolved, and processed asynchronously before the `onStart` phase of the Transition.\n *\n * ### Examples\n *\n * #### Default Substate\n *\n * This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a\n * \"default substate\".\n *\n * @example\n * ```js\n * // ng2\n * transitionService.onBefore({ to: 'home' }, (trans: Transition) =>\n * trans.router.stateService.target(\"home.dashboard\"));\n * ```\n *\n * #### Data Driven Default Substate\n *\n * This example provides data-driven default substate functionality. It matches on a transition to any state\n * which has `defaultSubstate: \"some.sub.state\"` defined. See: [[Transition.to]] which returns the \"to state\"\n * definition.\n *\n * @example\n * ```js\n * // ng1\n * // state declaration\n * {\n * name: 'home',\n * template: '
    ',\n * defaultSubstate: 'home.dashboard'\n * }\n *\n * var criteria = {\n * to: function(state) {\n * return state.defaultSubstate != null;\n * }\n * }\n *\n * $transitions.onBefore(criteria, function(trans: Transition) {\n * var substate = trans.to().defaultSubstate;\n * return trans.router.stateService.target(substate);\n * });\n * ```\n *\n *\n * #### Require authentication\n *\n * This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.\n *\n * This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.\n * This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {\n * var myAuthService = trans.injector().get('MyAuthService');\n * // If isAuthenticated returns false, the transition is cancelled.\n * return myAuthService.isAuthenticated();\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @returns a function which deregisters the hook.\n */\n onBefore(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called when a transition starts.\n *\n * Registers a transition lifecycle hook, which is invoked as a transition starts running.\n * This hook can be useful to perform some asynchronous action before completing a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onStart` hooks are invoked asynchronously when the Transition starts running.\n * This happens after the `onBefore` phase is complete.\n * At this point, the Transition has not yet exited nor entered any states.\n * The registered `onStart` hooks are invoked in priority order.\n *\n * Note: A built-in `onStart` hook with high priority is used to fetch any eager resolve data.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Example\n *\n * #### Login during transition\n *\n * This example intercepts any transition to a state which requires authentication, when the user is\n * not currently authenticated. It allows the user to authenticate asynchronously, then resumes the\n * transition. If the user did not authenticate successfully, it redirects to the \"guest\" state, which\n * does not require authentication.\n *\n * This example assumes:\n * - a state tree where all states which require authentication are children of a parent `'auth'` state.\n * - `MyAuthService.isAuthenticated()` synchronously returns a boolean.\n * - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved\n * or rejected, whether or not the login attempt was successful.\n *\n * #### Example:\n * ```js\n * // ng1\n * $transitions.onStart( { to: 'auth.**' }, function(trans) {\n * var $state = trans.router.stateService;\n * var MyAuthService = trans.injector().get('MyAuthService');\n *\n * // If the user is not authenticated\n * if (!MyAuthService.isAuthenticated()) {\n *\n * // Then return a promise for a successful login.\n * // The transition will wait for this promise to settle\n *\n * return MyAuthService.authenticate().catch(function() {\n *\n * // If the authenticate() method failed for whatever reason,\n * // redirect to a 'guest' state which doesn't require auth.\n * return $state.target(\"guest\");\n * });\n * }\n * });\n * ```\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onStart(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is entered.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.\n *\n * Since this hook is run only when the specific state is being *entered*, it can be useful for\n * performing tasks when entering a submodule/feature area such as initializing a stateful service,\n * or for guarding access to a submodule/feature area.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onEnter` hooks generally specify `{ entering: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onEnter` hooks are invoked when the Transition is entering a state.\n * States are entered after the `onRetain` phase is complete.\n * If more than one state is being entered, the parent state is entered first.\n * The registered `onEnter` hooks for a state are invoked in priority order.\n *\n * Note: A built-in `onEnter` hook with high priority is used to fetch lazy resolve data for states being entered.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onEnter` hooks using the [[TransitionService]], you may define an `onEnter` hook\n * directly on a state declaration (see: [[StateDeclaration.onEnter]]).\n *\n *\n * ### Examples\n *\n * #### Audit Log\n *\n * This example uses a service to log that a user has entered the admin section of an app.\n * This assumes that there are substates of the \"admin\" state, such as \"admin.users\", \"admin.pages\", etc.\n * @example\n * ```\n *\n * $transitions.onEnter({ entering: 'admin' }, function(transition, state) {\n * var AuditService = trans.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * ```\n *\n * #### Audit Log (inside a state declaration)\n *\n * The `onEnter` inside this state declaration is syntactic sugar for the previous Audit Log example.\n * ```\n * {\n * name: 'admin',\n * component: 'admin',\n * onEnter: function($transition$, $state$) {\n * var AuditService = $transition$.injector().get('AuditService');\n * AuditService.log(\"Entered \" + state.name + \" module while transitioning to \" + transition.to().name);\n * }\n * }\n * ```\n *\n * Note: A state declaration's `onEnter` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onEnter(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is retained/kept.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) for\n * a specific state that was previously active will remain active (is not being entered nor exited).\n *\n * This hook is invoked when a state is \"retained\" or \"kept\".\n * It means the transition is coming *from* a substate of the retained state *to* a substate of the retained state.\n * This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onRetain` hooks generally specify `{ retained: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onRetain` hooks are invoked after any `onExit` hooks have been fired.\n * If more than one state is retained, the child states' `onRetain` hooks are invoked first.\n * The registered `onRetain` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onRetain` hooks using the [[TransitionService]], you may define an `onRetain` hook\n * directly on a state declaration (see: [[StateDeclaration.onRetain]]).\n *\n * Note: A state declaration's `onRetain` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onRetain(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionStateHookFn]], called when a specific state is exited.\n *\n * Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.\n *\n * Since this hook is run only when the specific state is being *exited*, it can be useful for\n * performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,\n * or for preventing the user from leaving a state or submodule until some criteria is satisfied.\n *\n * See [[TransitionStateHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * `onExit` hooks generally specify `{ exiting: 'somestate' }`.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onExit` hooks are invoked when the Transition is exiting a state.\n * States are exited after any `onStart` phase is complete.\n * If more than one state is being exited, the child states are exited first.\n * The registered `onExit` hooks for a state are invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * ### Inside a state declaration\n *\n * Instead of registering `onExit` hooks using the [[TransitionService]], you may define an `onExit` hook\n * directly on a state declaration (see: [[StateDeclaration.onExit]]).\n *\n * Note: A state declaration's `onExit` function is injected for Angular 1 only.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onExit(matchCriteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called *just before a transition finishes*.\n *\n * Registers a transition lifecycle hook, which is invoked just before a transition finishes.\n * This hook is a last chance to cancel or redirect a transition.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onFinish` hooks are invoked after the `onEnter` phase is complete.\n * These hooks are invoked just before the transition is \"committed\".\n * Each hook is invoked in priority order.\n *\n * ### Return value\n *\n * The hook's return value can be used to pause, cancel, or redirect the current Transition.\n * See [[HookResult]] for more information.\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onFinish(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a successful transition completed.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition successfully completes.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * `onSuccess` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If the Transition is successful and its promise is resolved, then the `onSuccess` hooks are invoked.\n * Since these hooks are run after the transition is over, their return value is ignored.\n * The `onSuccess` hooks are invoked in priority order.\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onSuccess(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Registers a [[TransitionHookFn]], called after a transition has errored.\n *\n * Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.\n *\n * See [[TransitionHookFn]] for the signature of the function.\n *\n * The [[HookMatchCriteria]] is used to determine which Transitions the hook should be invoked for.\n * To match all Transitions, use an empty criteria object `{}`.\n *\n * ### Lifecycle\n *\n * The `onError` hooks are chained off the Transition's promise (see [[Transition.promise]]).\n * If a Transition fails, its promise is rejected and the `onError` hooks are invoked.\n * The `onError` hooks are invoked in priority order.\n *\n * Since these hooks are run after the transition is over, their return value is ignored.\n *\n * A transition \"errors\" if it was started, but failed to complete (for any reason).\n * A *non-exhaustive list* of reasons a transition can error:\n *\n * - A transition was cancelled because a new transition started while it was still running (`Transition superseded`)\n * - A transition was cancelled by a Transition Hook returning false\n * - A transition was redirected by a Transition Hook returning a [[TargetState]]\n * - A Transition Hook or resolve function threw an error\n * - A Transition Hook returned a rejected promise\n * - A resolve function returned a rejected promise\n *\n * To check the failure reason, inspect the return value of [[Transition.error]].\n *\n * Note: `onError` should be used for targeted error handling, or error recovery.\n * For simple catch-all error reporting, use [[StateService.defaultErrorHandler]].\n *\n * ### Return value\n *\n * Since the Transition is already completed, the hook's return value is ignored\n *\n * @param matchCriteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be injected and invoked.\n * @returns a function which deregisters the hook.\n */\n onError(matchCriteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function;\n\n /**\n * Returns all the registered hooks of a given `hookName` type\n *\n * #### Example:\n * ```\n * $transitions.getHooks(\"onEnter\")\n * ```\n */\n getHooks(hookName: string): RegisteredHook[];\n\n /** @hidden place to store the hooks */\n _registeredHooks: { [key: string]: RegisteredHook[] };\n}\n\n/** A predicate type which tests if a [[StateObject]] passes some test. Returns a boolean. */\nexport type IStateMatch = Predicate;\n\n/**\n * This object is used to configure whether or not a Transition Hook is invoked for a particular transition,\n * based on the Transition's \"to state\" and \"from state\".\n *\n * Each property (`to`, `from`, `exiting`, `retained`, and `entering`) can be a state [[Glob]] string,\n * a boolean, or a function that takes a state and returns a boolean (see [[HookMatchCriterion]])\n *\n * All properties are optional. If any property is omitted, it is replaced with the value `true`, and always matches.\n * To match any transition, use an empty criteria object `{}`.\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from the `parent` state and going to the `parent.child` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.child'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any substate of `parent` and going directly to the `parent` state.\n * var match = {\n * to: 'parent',\n * from: 'parent.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any substate of `mymodule`\n * var match = {\n * to: 'mymodule.**'\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition coming from any state and going to any state that has `data.authRequired`\n * // set to a truthy value.\n * var match = {\n * to: function(state) {\n * return state.data != null && state.data.authRequired === true;\n * }\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // This matches a transition that is exiting `parent.child`\n * var match = {\n * exiting: 'parent.child'\n * }\n * ```\n */\nexport interface HookMatchCriteria {\n [key: string]: HookMatchCriterion | undefined;\n\n /** A [[HookMatchCriterion]] to match the destination state */\n to?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match the original (from) state */\n from?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be exiting */\n exiting?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be retained */\n retained?: HookMatchCriterion;\n /** A [[HookMatchCriterion]] to match any state that would be entering */\n entering?: HookMatchCriterion;\n}\n\nexport interface IMatchingNodes {\n [key: string]: PathNode[];\n\n to: PathNode[];\n from: PathNode[];\n exiting: PathNode[];\n retained: PathNode[];\n entering: PathNode[];\n}\n\n/** @hidden */\nexport interface RegisteredHooks {\n [key: string]: RegisteredHook[];\n}\n\n/** @hidden */\nexport interface PathTypes {\n [key: string]: PathType;\n\n to: PathType;\n from: PathType;\n exiting: PathType;\n retained: PathType;\n entering: PathType;\n}\n\n/** @hidden */\nexport interface PathType {\n name: string;\n scope: TransitionHookScope;\n}\n\n/**\n * Hook Criterion used to match a transition.\n *\n * A [[Glob]] string that matches the name of a state.\n *\n * Or, a function with the signature `function(state) { return matches; }`\n * which should return a boolean to indicate if a state matches.\n *\n * Or, `true` to always match\n */\nexport type HookMatchCriterion = (string|IStateMatch|boolean)\n\nexport enum TransitionHookPhase { CREATE, BEFORE, RUN, SUCCESS, ERROR }\nexport enum TransitionHookScope { TRANSITION, STATE }\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.d.ts new file mode 100644 index 00000000..d3d915f3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.d.ts @@ -0,0 +1,41 @@ +export declare enum RejectType { + SUPERSEDED = 2, + ABORTED = 3, + INVALID = 4, + IGNORED = 5, + ERROR = 6, +} +export declare class Rejection { + $id: number; + type: number; + message: string; + detail: any; + redirected: boolean; + constructor(type: number, message?: string, detail?: any); + toString(): string; + toPromise(): Promise; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + static isRejectionPromise(obj: any): boolean; + /** Returns a Rejection due to transition superseded */ + static superseded(detail?: any, options?: any): Rejection; + /** Returns a Rejection due to redirected transition */ + static redirected(detail?: any): Rejection; + /** Returns a Rejection due to invalid transition */ + static invalid(detail?: any): Rejection; + /** Returns a Rejection due to ignored transition */ + static ignored(detail?: any): Rejection; + /** Returns a Rejection due to aborted transition */ + static aborted(detail?: any): Rejection; + /** Returns a Rejection due to aborted transition */ + static errored(detail?: any): Rejection; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + static normalize(detail?: Rejection | Error | any): Rejection; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js new file mode 100644 index 00000000..21b55010 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js @@ -0,0 +1,89 @@ +/** + * @coreapi + * @module transition + */ /** for typedoc */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common/common"); +var strings_1 = require("../common/strings"); +var hof_1 = require("../common/hof"); +var RejectType; +(function (RejectType) { + RejectType[RejectType["SUPERSEDED"] = 2] = "SUPERSEDED"; + RejectType[RejectType["ABORTED"] = 3] = "ABORTED"; + RejectType[RejectType["INVALID"] = 4] = "INVALID"; + RejectType[RejectType["IGNORED"] = 5] = "IGNORED"; + RejectType[RejectType["ERROR"] = 6] = "ERROR"; +})(RejectType = exports.RejectType || (exports.RejectType = {})); +/** @hidden */ var id = 0; +var Rejection = /** @class */ (function () { + function Rejection(type, message, detail) { + this.$id = id++; + this.type = type; + this.message = message; + this.detail = detail; + } + Rejection.prototype.toString = function () { + var detailString = function (d) { + return d && d.toString !== Object.prototype.toString ? d.toString() : strings_1.stringify(d); + }; + var detail = detailString(this.detail); + var _a = this, $id = _a.$id, type = _a.type, message = _a.message; + return "Transition Rejection($id: " + $id + " type: " + type + ", message: " + message + ", detail: " + detail + ")"; + }; + Rejection.prototype.toPromise = function () { + return common_1.extend(common_1.silentRejection(this), { _transitionRejection: this }); + }; + /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ + Rejection.isRejectionPromise = function (obj) { + return obj && (typeof obj.then === 'function') && hof_1.is(Rejection)(obj._transitionRejection); + }; + /** Returns a Rejection due to transition superseded */ + Rejection.superseded = function (detail, options) { + var message = "The transition has been superseded by a different transition"; + var rejection = new Rejection(RejectType.SUPERSEDED, message, detail); + if (options && options.redirected) { + rejection.redirected = true; + } + return rejection; + }; + /** Returns a Rejection due to redirected transition */ + Rejection.redirected = function (detail) { + return Rejection.superseded(detail, { redirected: true }); + }; + /** Returns a Rejection due to invalid transition */ + Rejection.invalid = function (detail) { + var message = "This transition is invalid"; + return new Rejection(RejectType.INVALID, message, detail); + }; + /** Returns a Rejection due to ignored transition */ + Rejection.ignored = function (detail) { + var message = "The transition was ignored"; + return new Rejection(RejectType.IGNORED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.aborted = function (detail) { + var message = "The transition has been aborted"; + return new Rejection(RejectType.ABORTED, message, detail); + }; + /** Returns a Rejection due to aborted transition */ + Rejection.errored = function (detail) { + var message = "The transition errored"; + return new Rejection(RejectType.ERROR, message, detail); + }; + /** + * Returns a Rejection + * + * Normalizes a value as a Rejection. + * If the value is already a Rejection, returns it. + * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). + * + * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. + */ + Rejection.normalize = function (detail) { + return hof_1.is(Rejection)(detail) ? detail : Rejection.errored(detail); + }; + return Rejection; +}()); +exports.Rejection = Rejection; +//# sourceMappingURL=rejectFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js.map new file mode 100644 index 00000000..46b92efd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/rejectFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "rejectFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/rejectFactory.ts" + ], + "names": [], + "mappings": "AAAA;;;GAGG,CAAC,kBAAkB;AACtB,YAAY,CAAC;;AACb,2CAAyD;AACzD,6CAA4C;AAC5C,qCAAmC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,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACI,mBAAS,GAAhB,UAAiB,MAAgC;QAC/C,MAAM,CAAC,QAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IACH,gBAAC;AAAD,CAAC,AAjFD,IAiFC;AAjFY,8BAAS", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */ /** for typedoc */\n\"use strict\";\nimport {extend, silentRejection} from \"../common/common\";\nimport {stringify} from \"../common/strings\";\nimport { is } from '../common/hof';\n\nexport enum RejectType {\n SUPERSEDED = 2, ABORTED = 3, INVALID = 4, IGNORED = 5, ERROR = 6\n}\n\n/** @hidden */ let id = 0;\n\nexport class Rejection {\n $id = id++;\n type: number;\n message: string;\n detail: any;\n redirected: boolean;\n\n constructor(type: number, message?: string, detail?: any) {\n this.type = type;\n this.message = message;\n this.detail = detail;\n }\n\n toString() {\n const detailString = (d: any) => \n d && d.toString !== Object.prototype.toString ? d.toString() : stringify(d);\n let detail = detailString(this.detail);\n let { $id, type, message } = this;\n return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;\n }\n\n toPromise(): Promise {\n return extend(silentRejection(this), { _transitionRejection: this });\n }\n\n /** Returns true if the obj is a rejected promise created from the `asPromise` factory */\n static isRejectionPromise(obj: any): boolean {\n return obj && (typeof obj.then === 'function') && is(Rejection)(obj._transitionRejection);\n }\n\n /** Returns a Rejection due to transition superseded */\n static superseded(detail?: any, options?: any): Rejection {\n let message = \"The transition has been superseded by a different transition\";\n let rejection = new Rejection(RejectType.SUPERSEDED, message, detail);\n if (options && options.redirected) {\n rejection.redirected = true;\n }\n return rejection;\n }\n\n /** Returns a Rejection due to redirected transition */\n static redirected(detail?: any): Rejection {\n return Rejection.superseded(detail, { redirected: true });\n }\n\n /** Returns a Rejection due to invalid transition */\n static invalid(detail?: any): Rejection {\n let message = \"This transition is invalid\";\n return new Rejection(RejectType.INVALID, message, detail);\n }\n\n /** Returns a Rejection due to ignored transition */\n static ignored(detail?: any): Rejection {\n let message = \"The transition was ignored\";\n return new Rejection(RejectType.IGNORED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static aborted(detail?: any): Rejection {\n let message = \"The transition has been aborted\";\n return new Rejection(RejectType.ABORTED, message, detail);\n }\n\n /** Returns a Rejection due to aborted transition */\n static errored(detail?: any): Rejection {\n let message = \"The transition errored\";\n return new Rejection(RejectType.ERROR, message, detail);\n }\n \n /**\n * Returns a Rejection\n *\n * Normalizes a value as a Rejection.\n * If the value is already a Rejection, returns it.\n * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).\n *\n * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.\n */\n static normalize(detail?: Rejection | Error | any): Rejection {\n return is(Rejection)(detail) ? detail : Rejection.errored(detail);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.d.ts new file mode 100644 index 00000000..409efc0c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.d.ts @@ -0,0 +1,450 @@ +import { StateDeclaration, StateOrName } from '../state/interface'; +import { TransitionOptions, TreeChanges, IHookRegistry, RegisteredHooks, HookRegOptions, HookMatchCriteria, TransitionStateHookFn, TransitionHookFn } from './interface'; +import { RegisteredHook } from './hookRegistry'; +import { PathNode } from '../path/pathNode'; +import { StateObject } from '../state/stateObject'; +import { TargetState } from '../state/targetState'; +import { Resolvable } from '../resolve/resolvable'; +import { ViewConfig } from '../view/interface'; +import { UIRouter } from '../router'; +import { UIInjector } from '../interface'; +import { ResolvableLiteral } from '../resolve/interface'; +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +export declare class Transition implements IHookRegistry { + /** @hidden */ + static diToken: typeof Transition; + /** + * A unique identifier for the transition. + * + * This is an auto incrementing integer, starting from `0`. + */ + $id: number; + /** + * A reference to the [[UIRouter]] instance + * + * This reference can be used to access the router services, such as the [[StateService]] + */ + router: UIRouter; + /** @hidden */ + private _deferred; + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + promise: Promise; + /** + * A boolean which indicates if the transition was successful + * + * After a successful transition, this value is set to true. + * After an unsuccessful transition, this value is set to false. + * + * The value will be undefined if the transition is not complete + */ + success: boolean; + /** @hidden */ + _aborted: boolean; + /** @hidden */ + private _error; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + _registeredHooks: RegisteredHooks; + /** @hidden */ + private _options; + /** @hidden */ + private _treeChanges; + /** @hidden */ + private _targetState; + /** @hidden */ + private _hookBuilder; + /** @hidden */ + onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + private createTransitionHookRegFns(); + /** @internalapi */ + getHooks(hookName: string): RegisteredHook[]; + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter); + private applyViewConfigs(router); + /** + * @internalapi + * + * @returns the internal from [State] object + */ + $from(): StateObject; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + $to(): StateObject; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + from(): StateDeclaration; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + to(): StateDeclaration; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + targetState(): TargetState; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + is(compare: (Transition | { + to?: any; + from?: any; + })): boolean; + /** + * Gets transition parameter values + * + * Returns the parameter values for a transition as key/value pairs. + * This object is immutable. + * + * By default, returns the new parameter values (for the "to state"). + * + * #### Example: + * ```js + * var toParams = transition.params(); + * ``` + * + * To return the previous parameter values, supply `'from'` as the `pathname` argument. + * + * #### Example: + * ```js + * var fromParams = transition.params('from'); + * ``` + * + * @param pathname the name of the treeChanges path to get parameter values for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * + * @returns transition parameter values for the desired path. + */ + params(pathname?: string): any; + params(pathname?: string): T; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + injector(state?: StateOrName, pathName?: string): UIInjector; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + getResolveTokens(pathname?: string): any[]; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + addResolvable(resolvable: Resolvable | ResolvableLiteral, state?: StateOrName): void; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + redirectedFrom(): Transition; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + originalTransition(): Transition; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + options(): TransitionOptions; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + entering(): StateDeclaration[]; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + exiting(): StateDeclaration[]; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + retained(): StateDeclaration[]; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + views(pathname?: string, state?: StateObject): ViewConfig[]; + /** + * Return the transition's tree changes + * + * A transition goes from one state/parameters to another state/parameters. + * During a transition, states are entered and/or exited. + * + * This function returns various branches (paths) which represent the changes to the + * active state tree that are caused by the transition. + * + * @param pathname The name of the tree changes path to get: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + */ + treeChanges(pathname: string): PathNode[]; + treeChanges(): TreeChanges; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + redirect(targetState: TargetState): Transition; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + private _changedParams(); + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + dynamic(): boolean; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + ignored(): boolean; + /** @hidden */ + _ignoredReason(): "SameAsCurrent" | "SameAsPending" | undefined; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + run(): Promise; + /** Checks if this transition is currently active/running. */ + isActive: () => boolean; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + valid(): boolean; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + abort(): void; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + error(): any; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + toString(): string; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js new file mode 100644 index 00000000..01334eb2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js @@ -0,0 +1,630 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +var trace_1 = require("../common/trace"); +var coreservices_1 = require("../common/coreservices"); +var strings_1 = require("../common/strings"); +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var hof_1 = require("../common/hof"); +var interface_1 = require("./interface"); // has or is using +var transitionHook_1 = require("./transitionHook"); +var hookRegistry_1 = require("./hookRegistry"); +var hookBuilder_1 = require("./hookBuilder"); +var pathFactory_1 = require("../path/pathFactory"); +var param_1 = require("../params/param"); +var resolvable_1 = require("../resolve/resolvable"); +var resolveContext_1 = require("../resolve/resolveContext"); +/** @hidden */ +var stateSelf = hof_1.prop("self"); +/** + * Represents a transition between two states. + * + * When navigating to a state, we are transitioning **from** the current state **to** the new state. + * + * This object contains all contextual information about the to/from states, parameters, resolves. + * It has information about all states being entered and exited as a result of the transition. + */ +var Transition = /** @class */ (function () { + /** + * Creates a new Transition object. + * + * If the target state is not valid, an error is thrown. + * + * @internalapi + * + * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` + * encapsulates the "from state". + * @param targetState The target state and parameters being transitioned to (also, the transition options) + * @param router The [[UIRouter]] instance + */ + function Transition(fromPath, targetState, router) { + var _this = this; + /** @hidden */ + this._deferred = coreservices_1.services.$q.defer(); + /** + * This promise is resolved or rejected based on the outcome of the Transition. + * + * When the transition is successful, the promise is resolved + * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error + */ + this.promise = this._deferred.promise; + /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */ + this._registeredHooks = {}; + /** @hidden */ + this._hookBuilder = new hookBuilder_1.HookBuilder(this); + /** Checks if this transition is currently active/running. */ + this.isActive = function () { + return _this.router.globals.transition === _this; + }; + this.router = router; + this._targetState = targetState; + if (!targetState.valid()) { + throw new Error(targetState.error()); + } + // current() is assumed to come from targetState.options, but provide a naive implementation otherwise. + this._options = common_1.extend({ current: hof_1.val(this) }, targetState.options()); + this.$id = router.transitionService._transitionCount++; + var toPath = pathFactory_1.PathUtils.buildToPath(fromPath, targetState); + this._treeChanges = pathFactory_1.PathUtils.treeChanges(fromPath, toPath, this._options.reloadState); + this.createTransitionHookRegFns(); + var onCreateHooks = this._hookBuilder.buildHooksForPhase(interface_1.TransitionHookPhase.CREATE); + transitionHook_1.TransitionHook.invokeHooks(onCreateHooks, function () { return null; }); + this.applyViewConfigs(router); + } + /** @hidden */ + Transition.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + Transition.prototype.onError = function (criteria, callback, options) { return; }; + /** @hidden + * Creates the transition-level hook registration functions + * (which can then be used to register hooks) + */ + Transition.prototype.createTransitionHookRegFns = function () { + var _this = this; + this.router.transitionService._pluginapi._getEvents() + .filter(function (type) { return type.hookPhase !== interface_1.TransitionHookPhase.CREATE; }) + .forEach(function (type) { return hookRegistry_1.makeEvent(_this, _this.router.transitionService, type); }); + }; + /** @internalapi */ + Transition.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + Transition.prototype.applyViewConfigs = function (router) { + var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; }); + pathFactory_1.PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates); + }; + /** + * @internalapi + * + * @returns the internal from [State] object + */ + Transition.prototype.$from = function () { + return common_1.tail(this._treeChanges.from).state; + }; + /** + * @internalapi + * + * @returns the internal to [State] object + */ + Transition.prototype.$to = function () { + return common_1.tail(this._treeChanges.to).state; + }; + /** + * Returns the "from state" + * + * Returns the state that the transition is coming *from*. + * + * @returns The state declaration object for the Transition's ("from state"). + */ + Transition.prototype.from = function () { + return this.$from().self; + }; + /** + * Returns the "to state" + * + * Returns the state that the transition is going *to*. + * + * @returns The state declaration object for the Transition's target state ("to state"). + */ + Transition.prototype.to = function () { + return this.$to().self; + }; + /** + * Gets the Target State + * + * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. + * + * @returns the [[TargetState]] of this Transition + */ + Transition.prototype.targetState = function () { + return this._targetState; + }; + /** + * Determines whether two transitions are equivalent. + * @deprecated + */ + Transition.prototype.is = function (compare) { + if (compare instanceof Transition) { + // TODO: Also compare parameters + return this.is({ to: compare.$to().name, from: compare.$from().name }); + } + return !((compare.to && !hookRegistry_1.matchState(this.$to(), compare.to)) || + (compare.from && !hookRegistry_1.matchState(this.$from(), compare.from))); + }; + Transition.prototype.params = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return Object.freeze(this._treeChanges[pathname].map(hof_1.prop("paramValues")).reduce(common_1.mergeR, {})); + }; + /** + * Creates a [[UIInjector]] Dependency Injector + * + * Returns a Dependency Injector for the Transition's target state (to state). + * The injector provides resolve values which the target state has access to. + * + * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). + * + * #### Example: + * ```js + * .onEnter({ entering: 'myState' }, trans => { + * var myResolveValue = trans.injector().get('myResolve'); + * // Inject a global service from the global/native injector (if it exists) + * var MyService = trans.injector().get('MyService'); + * }) + * ``` + * + * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. + * You can use [[UIInjector.getAsync]] to get a promise for the data. + * #### Example: + * ```js + * .onBefore({}, trans => { + * return trans.injector().getAsync('myResolve').then(myResolveValue => + * return myResolveValue !== 'ABORT'; + * }); + * }); + * ``` + * + * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. + * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. + * #### Example: + * ```js + * .onEnter({ to: 'foo.bar' }, trans => { + * // returns result of `foo` state's `data` resolve + * // even though `foo.bar` also has a `data` resolve + * var fooData = trans.injector('foo').get('data'); + * }); + * ``` + * + * If you need resolve data from the exiting states, pass `'from'` as `pathName`. + * The resolve data from the `from` path will be returned. + * #### Example: + * ```js + * .onExit({ exiting: 'foo.bar' }, trans => { + * // Gets the resolve value of `data` from the exiting state. + * var fooData = trans.injector(null, 'foo.bar').get('data'); + * }); + * ``` + * + * + * @param state Limits the resolves provided to only the resolves the provided state has access to. + * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. + * + * @returns a [[UIInjector]] + */ + Transition.prototype.injector = function (state, pathName) { + if (pathName === void 0) { pathName = "to"; } + var path = this._treeChanges[pathName]; + if (state) + path = pathFactory_1.PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; }); + return new resolveContext_1.ResolveContext(path).injector(); + }; + /** + * Gets all available resolve tokens (keys) + * + * This method can be used in conjunction with [[injector]] to inspect the resolve values + * available to the Transition. + * + * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states + * in the Transition's [[TreeChanges.to]] path. + * + * #### Example: + * This example logs all resolve values + * ```js + * let tokens = trans.getResolveTokens(); + * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); + * ``` + * + * #### Example: + * This example creates promises for each resolve value. + * This triggers fetches of resolves (if any have not yet been fetched). + * When all promises have all settled, it logs the resolve values. + * ```js + * let tokens = trans.getResolveTokens(); + * let promise = tokens.map(token => trans.injector().getAsync(token)); + * Promise.all(promises).then(values => console.log("Resolved values: " + values)); + * ``` + * + * Note: Angular 1 users whould use `$q.all()` + * + * @param pathname resolve context's path name (e.g., `to` or `from`) + * + * @returns an array of resolve tokens (keys) + */ + Transition.prototype.getResolveTokens = function (pathname) { + if (pathname === void 0) { pathname = "to"; } + return new resolveContext_1.ResolveContext(this._treeChanges[pathname]).getTokens(); + }; + /** + * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. + * + * #### Example: + * ```js + * transitionService.onBefore({}, transition => { + * transition.addResolvable({ + * token: 'myResolve', + * deps: ['MyService'], + * resolveFn: myService => myService.getData() + * }); + * }); + * ``` + * + * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) + * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) + */ + Transition.prototype.addResolvable = function (resolvable, state) { + if (state === void 0) { state = ""; } + resolvable = hof_1.is(resolvable_1.Resolvable)(resolvable) ? resolvable : new resolvable_1.Resolvable(resolvable); + var stateName = (typeof state === "string") ? state : state.name; + var topath = this._treeChanges.to; + var targetNode = common_1.find(topath, function (node) { return node.state.name === stateName; }); + var resolveContext = new resolveContext_1.ResolveContext(topath); + resolveContext.addResolvables([resolvable], targetNode.state); + }; + /** + * Gets the transition from which this transition was redirected. + * + * If the current transition is a redirect, this method returns the transition that was redirected. + * + * #### Example: + * ```js + * let transitionA = $state.go('A').transition + * transitionA.onStart({}, () => $state.target('B')); + * $transitions.onSuccess({ to: 'B' }, (trans) => { + * trans.to().name === 'B'; // true + * trans.redirectedFrom() === transitionA; // true + * }); + * ``` + * + * @returns The previous Transition, or null if this Transition is not the result of a redirection + */ + Transition.prototype.redirectedFrom = function () { + return this._options.redirectedFrom || null; + }; + /** + * Gets the original transition in a redirect chain + * + * A transition might belong to a long chain of multiple redirects. + * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. + * + * #### Example: + * ```js + * // states + * registry.register({ name: 'A', redirectTo: 'B' }); + * registry.register({ name: 'B', redirectTo: 'C' }); + * registry.register({ name: 'C', redirectTo: 'D' }); + * registry.register({ name: 'D' }); + * + * let transitionA = $state.go('A').transition + * + * $transitions.onSuccess({ to: 'D' }, (trans) => { + * trans.to().name === 'D'; // true + * trans.redirectedFrom().to().name === 'C'; // true + * trans.originalTransition() === transitionA; // true + * trans.originalTransition().to().name === 'A'; // true + * }); + * ``` + * + * @returns The original Transition that started a redirect chain + */ + Transition.prototype.originalTransition = function () { + var rf = this.redirectedFrom(); + return (rf && rf.originalTransition()) || this; + }; + /** + * Get the transition options + * + * @returns the options for this Transition. + */ + Transition.prototype.options = function () { + return this._options; + }; + /** + * Gets the states being entered. + * + * @returns an array of states that will be entered during this transition. + */ + Transition.prototype.entering = function () { + return common_1.map(this._treeChanges.entering, hof_1.prop('state')).map(stateSelf); + }; + /** + * Gets the states being exited. + * + * @returns an array of states that will be exited during this transition. + */ + Transition.prototype.exiting = function () { + return common_1.map(this._treeChanges.exiting, hof_1.prop('state')).map(stateSelf).reverse(); + }; + /** + * Gets the states being retained. + * + * @returns an array of states that are already entered from a previous Transition, that will not be + * exited during this Transition + */ + Transition.prototype.retained = function () { + return common_1.map(this._treeChanges.retained, hof_1.prop('state')).map(stateSelf); + }; + /** + * Get the [[ViewConfig]]s associated with this Transition + * + * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. + * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). + * + * @param pathname the name of the path to fetch views for: + * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) + * @param state If provided, only returns the `ViewConfig`s for a single state in the path + * + * @returns a list of ViewConfig objects for the given path. + */ + Transition.prototype.views = function (pathname, state) { + if (pathname === void 0) { pathname = "entering"; } + var path = this._treeChanges[pathname]; + path = !state ? path : path.filter(hof_1.propEq('state', state)); + return path.map(hof_1.prop("views")).filter(common_1.identity).reduce(common_1.unnestR, []); + }; + Transition.prototype.treeChanges = function (pathname) { + return pathname ? this._treeChanges[pathname] : this._treeChanges; + }; + /** + * Creates a new transition that is a redirection of the current one. + * + * This transition can be returned from a [[TransitionService]] hook to + * redirect a transition to a new state and/or set of parameters. + * + * @internalapi + * + * @returns Returns a new [[Transition]] instance. + */ + Transition.prototype.redirect = function (targetState) { + var redirects = 1, trans = this; + while ((trans = trans.redirectedFrom()) != null) { + if (++redirects > 20) + throw new Error("Too many consecutive Transition redirects (20+)"); + } + var redirectOpts = { redirectedFrom: this, source: "redirect" }; + // If the original transition was caused by URL sync, then use { location: 'replace' } + // on the new transition (unless the target state explicitly specifies location: false). + // This causes the original url to be replaced with the url for the redirect target + // so the original url disappears from the browser history. + if (this.options().source === 'url' && targetState.options().location !== false) { + redirectOpts.location = 'replace'; + } + var newOptions = common_1.extend({}, this.options(), targetState.options(), redirectOpts); + targetState = targetState.withOptions(newOptions, true); + var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState); + var originalEnteringNodes = this._treeChanges.entering; + var redirectEnteringNodes = newTransition._treeChanges.entering; + // --- Re-use resolve data from original transition --- + // When redirecting from a parent state to a child state where the parent parameter values haven't changed + // (because of the redirect), the resolves fetched by the original transition are still valid in the + // redirected transition. + // + // This allows you to define a redirect on a parent state which depends on an async resolve value. + // You can wait for the resolve, then redirect to a child state based on the result. + // The redirected transition does not have to re-fetch the resolve. + // --------------------------------------------------------- + var nodeIsReloading = function (reloadState) { return function (node) { + return reloadState && node.state.includes[reloadState.name]; + }; }; + // Find any "entering" nodes in the redirect path that match the original path and aren't being reloaded + var matchingEnteringNodes = pathFactory_1.PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, pathFactory_1.PathUtils.nonDynamicParams) + .filter(hof_1.not(nodeIsReloading(targetState.options().reloadState))); + // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes. + matchingEnteringNodes.forEach(function (node, idx) { + node.resolvables = originalEnteringNodes[idx].resolvables; + }); + return newTransition; + }; + /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ + Transition.prototype._changedParams = function () { + var tc = this._treeChanges; + /** Return undefined if it's not a "dynamic" transition, for the following reasons */ + // If user explicitly wants a reload + if (this._options.reload) + return undefined; + // If any states are exiting or entering + if (tc.exiting.length || tc.entering.length) + return undefined; + // If to/from path lengths differ + if (tc.to.length !== tc.from.length) + return undefined; + // If the to/from paths are different + var pathsDiffer = common_1.arrayTuples(tc.to, tc.from) + .map(function (tuple) { return tuple[0].state !== tuple[1].state; }) + .reduce(common_1.anyTrueR, false); + if (pathsDiffer) + return undefined; + // Find any parameter values that differ + var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; }); + var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1]; + var tuples = common_1.arrayTuples(nodeSchemas, toValues, fromValues); + return tuples.map(function (_a) { + var schema = _a[0], toVals = _a[1], fromVals = _a[2]; + return param_1.Param.changed(schema, toVals, fromVals); + }).reduce(common_1.unnestR, []); + }; + /** + * Returns true if the transition is dynamic. + * + * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. + * + * @returns true if the Transition is dynamic + */ + Transition.prototype.dynamic = function () { + var changes = this._changedParams(); + return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(common_1.anyTrueR, false); + }; + /** + * Returns true if the transition is ignored. + * + * A transition is ignored if no states are entered nor exited, and no parameter values have changed. + * + * @returns true if the Transition is ignored. + */ + Transition.prototype.ignored = function () { + return !!this._ignoredReason(); + }; + /** @hidden */ + Transition.prototype._ignoredReason = function () { + var pending = this.router.globals.transition; + var reloadState = this._options.reloadState; + var same = function (pathA, pathB) { + if (pathA.length !== pathB.length) + return false; + var matching = pathFactory_1.PathUtils.matching(pathA, pathB); + return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length; + }; + var newTC = this.treeChanges(); + var pendTC = pending && pending.treeChanges(); + if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) + return "SameAsPending"; + if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) + return "SameAsCurrent"; + }; + /** + * Runs the transition + * + * This method is generally called from the [[StateService.transitionTo]] + * + * @internalapi + * + * @returns a promise for a successful transition. + */ + Transition.prototype.run = function () { + var _this = this; + var runAllHooks = transitionHook_1.TransitionHook.runAllHooks; + // Gets transition hooks array for the given phase + var getHooksFor = function (phase) { + return _this._hookBuilder.buildHooksForPhase(phase); + }; + // When the chain is complete, then resolve or reject the deferred + var transitionSuccess = function () { + trace_1.trace.traceSuccess(_this.$to(), _this); + _this.success = true; + _this._deferred.resolve(_this.to()); + runAllHooks(getHooksFor(interface_1.TransitionHookPhase.SUCCESS)); + }; + var transitionError = function (reason) { + trace_1.trace.traceError(reason, _this); + _this.success = false; + _this._deferred.reject(reason); + _this._error = reason; + runAllHooks(getHooksFor(interface_1.TransitionHookPhase.ERROR)); + }; + var runTransition = function () { + // Wait to build the RUN hook chain until the BEFORE hooks are done + // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object. + var allRunHooks = getHooksFor(interface_1.TransitionHookPhase.RUN); + var done = function () { return coreservices_1.services.$q.when(undefined); }; + return transitionHook_1.TransitionHook.invokeHooks(allRunHooks, done); + }; + var startTransition = function () { + var globals = _this.router.globals; + globals.lastStartedTransitionId = _this.$id; + globals.transition = _this; + globals.transitionHistory.enqueue(_this); + trace_1.trace.traceTransitionStart(_this); + return coreservices_1.services.$q.when(undefined); + }; + var allBeforeHooks = getHooksFor(interface_1.TransitionHookPhase.BEFORE); + transitionHook_1.TransitionHook.invokeHooks(allBeforeHooks, startTransition) + .then(runTransition) + .then(transitionSuccess, transitionError); + return this.promise; + }; + /** + * Checks if the Transition is valid + * + * @returns true if the Transition is valid + */ + Transition.prototype.valid = function () { + return !this.error() || this.success !== undefined; + }; + /** + * Aborts this transition + * + * Imperative API to abort a Transition. + * This only applies to Transitions that are not yet complete. + */ + Transition.prototype.abort = function () { + // Do not set flag if the transition is already complete + if (predicates_1.isUndefined(this.success)) { + this._aborted = true; + } + }; + /** + * The Transition error reason. + * + * If the transition is invalid (and could not be run), returns the reason the transition is invalid. + * If the transition was valid and ran, but was not successful, returns the reason the transition failed. + * + * @returns an error message explaining why the transition is invalid, or the reason the transition failed. + */ + Transition.prototype.error = function () { + var state = this.$to(); + if (state.self.abstract) + return "Cannot transition to abstract state '" + state.name + "'"; + var paramDefs = state.parameters(), values = this.params(); + var invalidParams = paramDefs.filter(function (param) { return !param.validates(values[param.id]); }); + if (invalidParams.length) { + return "Param values not valid for state '" + state.name + "'. Invalid params: [ " + invalidParams.map(function (param) { return param.id; }).join(', ') + " ]"; + } + if (this.success === false) + return this._error; + }; + /** + * A string representation of the Transition + * + * @returns A string representation of the Transition + */ + Transition.prototype.toString = function () { + var fromStateOrName = this.from(); + var toStateOrName = this.to(); + var avoidEmptyHash = function (params) { + return (params["#"] !== null && params["#"] !== undefined) ? params : common_1.omit(params, ["#"]); + }; + // (X) means the to state is invalid. + var id = this.$id, from = predicates_1.isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = strings_1.stringify(avoidEmptyHash(this._treeChanges.from.map(hof_1.prop('paramValues')).reduce(common_1.mergeR, {}))), toValid = this.valid() ? "" : "(X) ", to = predicates_1.isObject(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = strings_1.stringify(avoidEmptyHash(this.params())); + return "Transition#" + id + "( '" + from + "'" + fromParams + " -> " + toValid + "'" + to + "'" + toParams + " )"; + }; + /** @hidden */ + Transition.diToken = Transition; + return Transition; +}()); +exports.Transition = Transition; +//# sourceMappingURL=transition.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js.map new file mode 100644 index 00000000..ab92ecb6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transition.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transition.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transition.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,kBAAkB;AAClB,yCAAwC;AACxC,uDAAkD;AAClD,6CAA8C;AAC9C,2CAAmH;AACnH,mDAA2D;AAC3D,qCAA2D;AAE3D,yCAGqB,CAAC,kBAAkB;AACxC,mDAAkD;AAClD,+CAAuE;AACvE,6CAA4C;AAE5C,mDAAgD;AAGhD,yCAAwC;AACxC,oDAAmD;AAEnD,4DAA2D;AAM3D,cAAc;AACd,IAAM,SAAS,GAA8C,UAAI,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;;;;GAOG;AACH;IAuFE;;;;;;;;;;;OAWG;IACH,oBAAY,QAAoB,EAAE,WAAwB,EAAE,MAAgB;QAA5E,iBAmBC;QAnGD,cAAc;QACN,cAAS,GAAG,uBAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;QACxC;;;;;WAKG;QACH,YAAO,GAAiB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAe/C,iGAAiG;QACjG,qBAAgB,GAAoB,EAAG,CAAC;QAQxC,cAAc;QACN,iBAAY,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,CAAC;QA4lB7C,6DAA6D;QAC7D,aAAQ,GAAG;YACP,OAAA,KAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,KAAK,KAAI;QAAvC,CAAuC,CAAC;QA9iB1C,IAAI,CAAC,MA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AAc,EAAE,WAAM,IAAI,SAAI,UAAU,YAAO,OAAO,SAAI,EAAE,SAAI,QAAQ,OAAI,CAAC;IACtF,CAAC;IArtBD,cAAc;IACP,kBAAO,GAAG,UAAU,CAAC;IAqtB9B,iBAAC;CAAA,AAxtBD,IAwtBC;AAxtBY,gCAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { stringify } from '../common/strings';\nimport { map, find, extend, mergeR, tail, omit, arrayTuples, unnestR, identity, anyTrueR } from '../common/common';\nimport {isObject, isUndefined} from '../common/predicates';\nimport { prop, propEq, val, not, is } from '../common/hof';\nimport { StateDeclaration, StateOrName } from '../state/interface';\nimport {\n TransitionOptions, TreeChanges, IHookRegistry, TransitionHookPhase, RegisteredHooks, HookRegOptions,\n HookMatchCriteria, TransitionStateHookFn, TransitionHookFn,\n} from './interface'; // has or is using\nimport { TransitionHook } from './transitionHook';\nimport { matchState, makeEvent, RegisteredHook } from './hookRegistry';\nimport { HookBuilder } from './hookBuilder';\nimport { PathNode } from '../path/pathNode';\nimport { PathUtils } from '../path/pathFactory';\nimport { StateObject } from '../state/stateObject';\nimport { TargetState } from '../state/targetState';\nimport { Param } from '../params/param';\nimport { Resolvable } from '../resolve/resolvable';\nimport { ViewConfig } from '../view/interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { RawParams } from '../params/interface';\nimport { ResolvableLiteral } from '../resolve/interface';\n\n/** @hidden */\nconst stateSelf: (_state: StateObject) => StateDeclaration = prop(\"self\");\n\n/**\n * Represents a transition between two states.\n *\n * When navigating to a state, we are transitioning **from** the current state **to** the new state.\n *\n * This object contains all contextual information about the to/from states, parameters, resolves.\n * It has information about all states being entered and exited as a result of the transition.\n */\nexport class Transition implements IHookRegistry {\n\n /** @hidden */\n static diToken = Transition;\n\n /**\n * A unique identifier for the transition.\n *\n * This is an auto incrementing integer, starting from `0`.\n */\n $id: number;\n\n /**\n * A reference to the [[UIRouter]] instance\n *\n * This reference can be used to access the router services, such as the [[StateService]]\n */\n router: UIRouter;\n\n /** @hidden */\n private _deferred = services.$q.defer();\n /**\n * This promise is resolved or rejected based on the outcome of the Transition.\n *\n * When the transition is successful, the promise is resolved\n * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error\n */\n promise: Promise = this._deferred.promise;\n /**\n * A boolean which indicates if the transition was successful\n *\n * After a successful transition, this value is set to true.\n * After an unsuccessful transition, this value is set to false.\n *\n * The value will be undefined if the transition is not complete\n */\n success: boolean;\n /** @hidden */\n _aborted: boolean;\n /** @hidden */\n private _error: any;\n\n /** @hidden Holds the hook registration functions such as those passed to Transition.onStart() */\n _registeredHooks: RegisteredHooks = { };\n\n /** @hidden */\n private _options: TransitionOptions;\n /** @hidden */\n private _treeChanges: TreeChanges;\n /** @hidden */\n private _targetState: TargetState;\n /** @hidden */\n private _hookBuilder = new HookBuilder(this);\n\n\n /** @hidden */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return; }\n\n /** @hidden\n * Creates the transition-level hook registration functions\n * (which can then be used to register hooks)\n */\n private createTransitionHookRegFns() {\n this.router.transitionService._pluginapi._getEvents()\n .filter(type => type.hookPhase !== TransitionHookPhase.CREATE)\n .forEach(type => makeEvent(this, this.router.transitionService, type));\n }\n\n /** @internalapi */\n getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /**\n * Creates a new Transition object.\n *\n * If the target state is not valid, an error is thrown.\n *\n * @internalapi\n *\n * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`\n * encapsulates the \"from state\".\n * @param targetState The target state and parameters being transitioned to (also, the transition options)\n * @param router The [[UIRouter]] instance\n */\n constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter) {\n this.router = router;\n this._targetState = targetState;\n\n if (!targetState.valid()) {\n throw new Error(targetState.error());\n }\n\n // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.\n this._options = extend({ current: val(this) }, targetState.options());\n this.$id = router.transitionService._transitionCount++;\n let toPath = PathUtils.buildToPath(fromPath, targetState);\n this._treeChanges = PathUtils.treeChanges(fromPath, toPath, this._options.reloadState);\n this.createTransitionHookRegFns();\n\n let onCreateHooks = this._hookBuilder.buildHooksForPhase(TransitionHookPhase.CREATE);\n TransitionHook.invokeHooks(onCreateHooks, () => null);\n\n this.applyViewConfigs(router);\n }\n\n private applyViewConfigs(router: UIRouter) {\n let enteringStates = this._treeChanges.entering.map(node => node.state);\n PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates);\n }\n\n /**\n * @internalapi\n *\n * @returns the internal from [State] object\n */\n $from() {\n return tail(this._treeChanges.from).state;\n }\n\n /**\n * @internalapi\n *\n * @returns the internal to [State] object\n */\n $to() {\n return tail(this._treeChanges.to).state;\n }\n\n /**\n * Returns the \"from state\"\n *\n * Returns the state that the transition is coming *from*.\n *\n * @returns The state declaration object for the Transition's (\"from state\").\n */\n from(): StateDeclaration {\n return this.$from().self;\n }\n\n /**\n * Returns the \"to state\"\n *\n * Returns the state that the transition is going *to*.\n *\n * @returns The state declaration object for the Transition's target state (\"to state\").\n */\n to(): StateDeclaration {\n return this.$to().self;\n }\n\n /**\n * Gets the Target State\n *\n * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.\n *\n * @returns the [[TargetState]] of this Transition\n */\n targetState() {\n return this._targetState;\n }\n\n /**\n * Determines whether two transitions are equivalent.\n * @deprecated\n */\n is(compare: (Transition|{to?: any, from?: any})): boolean {\n if (compare instanceof Transition) {\n // TODO: Also compare parameters\n return this.is({ to: compare.$to().name, from: compare.$from().name });\n }\n return !(\n (compare.to && !matchState(this.$to(), compare.to)) ||\n (compare.from && !matchState(this.$from(), compare.from))\n );\n }\n\n /**\n * Gets transition parameter values\n *\n * Returns the parameter values for a transition as key/value pairs.\n * This object is immutable.\n *\n * By default, returns the new parameter values (for the \"to state\").\n *\n * #### Example:\n * ```js\n * var toParams = transition.params();\n * ```\n *\n * To return the previous parameter values, supply `'from'` as the `pathname` argument.\n *\n * #### Example:\n * ```js\n * var fromParams = transition.params('from');\n * ```\n *\n * @param pathname the name of the treeChanges path to get parameter values for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n *\n * @returns transition parameter values for the desired path.\n */\n params(pathname?: string): any;\n params(pathname?: string): T;\n params(pathname: string = \"to\") {\n return Object.freeze(this._treeChanges[pathname].map(prop(\"paramValues\")).reduce(mergeR, {}));\n }\n\n\n /**\n * Creates a [[UIInjector]] Dependency Injector\n *\n * Returns a Dependency Injector for the Transition's target state (to state).\n * The injector provides resolve values which the target state has access to.\n *\n * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).\n *\n * #### Example:\n * ```js\n * .onEnter({ entering: 'myState' }, trans => {\n * var myResolveValue = trans.injector().get('myResolve');\n * // Inject a global service from the global/native injector (if it exists)\n * var MyService = trans.injector().get('MyService');\n * })\n * ```\n *\n * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.\n * You can use [[UIInjector.getAsync]] to get a promise for the data.\n * #### Example:\n * ```js\n * .onBefore({}, trans => {\n * return trans.injector().getAsync('myResolve').then(myResolveValue =>\n * return myResolveValue !== 'ABORT';\n * });\n * });\n * ```\n *\n * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.\n * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.\n * #### Example:\n * ```js\n * .onEnter({ to: 'foo.bar' }, trans => {\n * // returns result of `foo` state's `data` resolve\n * // even though `foo.bar` also has a `data` resolve\n * var fooData = trans.injector('foo').get('data');\n * });\n * ```\n *\n * If you need resolve data from the exiting states, pass `'from'` as `pathName`.\n * The resolve data from the `from` path will be returned.\n * #### Example:\n * ```js\n * .onExit({ exiting: 'foo.bar' }, trans => {\n * // Gets the resolve value of `data` from the exiting state.\n * var fooData = trans.injector(null, 'foo.bar').get('data');\n * });\n * ```\n *\n *\n * @param state Limits the resolves provided to only the resolves the provided state has access to.\n * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.\n *\n * @returns a [[UIInjector]]\n */\n injector(state?: StateOrName, pathName = \"to\"): UIInjector {\n let path: PathNode[] = this._treeChanges[pathName];\n if (state) path = PathUtils.subPath(path, node => node.state === state || node.state.name === state);\n return new ResolveContext(path).injector();\n }\n\n /**\n * Gets all available resolve tokens (keys)\n *\n * This method can be used in conjunction with [[injector]] to inspect the resolve values\n * available to the Transition.\n *\n * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states\n * in the Transition's [[TreeChanges.to]] path.\n *\n * #### Example:\n * This example logs all resolve values\n * ```js\n * let tokens = trans.getResolveTokens();\n * tokens.forEach(token => console.log(token + \" = \" + trans.injector().get(token)));\n * ```\n *\n * #### Example:\n * This example creates promises for each resolve value.\n * This triggers fetches of resolves (if any have not yet been fetched).\n * When all promises have all settled, it logs the resolve values.\n * ```js\n * let tokens = trans.getResolveTokens();\n * let promise = tokens.map(token => trans.injector().getAsync(token));\n * Promise.all(promises).then(values => console.log(\"Resolved values: \" + values));\n * ```\n *\n * Note: Angular 1 users whould use `$q.all()`\n *\n * @param pathname resolve context's path name (e.g., `to` or `from`)\n *\n * @returns an array of resolve tokens (keys)\n */\n getResolveTokens(pathname: string = \"to\"): any[] {\n return new ResolveContext(this._treeChanges[pathname]).getTokens();\n }\n\n /**\n * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition.\n *\n * #### Example:\n * ```js\n * transitionService.onBefore({}, transition => {\n * transition.addResolvable({\n * token: 'myResolve',\n * deps: ['MyService'],\n * resolveFn: myService => myService.getData()\n * });\n * });\n * ```\n *\n * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])\n * @param state the state in the \"to path\" which should receive the new resolve (otherwise, the root state)\n */\n addResolvable(resolvable: Resolvable|ResolvableLiteral, state: StateOrName = \"\"): void {\n resolvable = is(Resolvable)(resolvable) ? resolvable : new Resolvable(resolvable);\n\n let stateName: string = (typeof state === \"string\") ? state : state.name;\n let topath = this._treeChanges.to;\n let targetNode = find(topath, node => node.state.name === stateName);\n let resolveContext: ResolveContext = new ResolveContext(topath);\n resolveContext.addResolvables([resolvable as Resolvable], targetNode.state);\n }\n\n /**\n * Gets the transition from which this transition was redirected.\n *\n * If the current transition is a redirect, this method returns the transition that was redirected.\n *\n * #### Example:\n * ```js\n * let transitionA = $state.go('A').transition\n * transitionA.onStart({}, () => $state.target('B'));\n * $transitions.onSuccess({ to: 'B' }, (trans) => {\n * trans.to().name === 'B'; // true\n * trans.redirectedFrom() === transitionA; // true\n * });\n * ```\n *\n * @returns The previous Transition, or null if this Transition is not the result of a redirection\n */\n redirectedFrom(): Transition {\n return this._options.redirectedFrom || null;\n }\n\n /**\n * Gets the original transition in a redirect chain\n *\n * A transition might belong to a long chain of multiple redirects.\n * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain.\n *\n * #### Example:\n * ```js\n * // states\n * registry.register({ name: 'A', redirectTo: 'B' });\n * registry.register({ name: 'B', redirectTo: 'C' });\n * registry.register({ name: 'C', redirectTo: 'D' });\n * registry.register({ name: 'D' });\n *\n * let transitionA = $state.go('A').transition\n *\n * $transitions.onSuccess({ to: 'D' }, (trans) => {\n * trans.to().name === 'D'; // true\n * trans.redirectedFrom().to().name === 'C'; // true\n * trans.originalTransition() === transitionA; // true\n * trans.originalTransition().to().name === 'A'; // true\n * });\n * ```\n *\n * @returns The original Transition that started a redirect chain\n */\n originalTransition(): Transition {\n let rf = this.redirectedFrom();\n return (rf && rf.originalTransition()) || this;\n }\n\n /**\n * Get the transition options\n *\n * @returns the options for this Transition.\n */\n options(): TransitionOptions {\n return this._options;\n }\n\n /**\n * Gets the states being entered.\n *\n * @returns an array of states that will be entered during this transition.\n */\n entering(): StateDeclaration[] {\n return map(this._treeChanges.entering, prop('state')).map(stateSelf);\n }\n\n /**\n * Gets the states being exited.\n *\n * @returns an array of states that will be exited during this transition.\n */\n exiting(): StateDeclaration[] {\n return map(this._treeChanges.exiting, prop('state')).map(stateSelf).reverse();\n }\n\n /**\n * Gets the states being retained.\n *\n * @returns an array of states that are already entered from a previous Transition, that will not be\n * exited during this Transition\n */\n retained(): StateDeclaration[] {\n return map(this._treeChanges.retained, prop('state')).map(stateSelf);\n }\n\n /**\n * Get the [[ViewConfig]]s associated with this Transition\n *\n * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects.\n * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., \"to\" or \"entering\").\n *\n * @param pathname the name of the path to fetch views for:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n * @param state If provided, only returns the `ViewConfig`s for a single state in the path\n *\n * @returns a list of ViewConfig objects for the given path.\n */\n views(pathname: string = \"entering\", state?: StateObject): ViewConfig[] {\n let path = this._treeChanges[pathname];\n path = !state ? path : path.filter(propEq('state', state));\n return path.map(prop(\"views\")).filter(identity).reduce(unnestR, []);\n }\n\n /**\n * Return the transition's tree changes\n *\n * A transition goes from one state/parameters to another state/parameters.\n * During a transition, states are entered and/or exited.\n *\n * This function returns various branches (paths) which represent the changes to the\n * active state tree that are caused by the transition.\n *\n * @param pathname The name of the tree changes path to get:\n * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)\n */\n treeChanges(pathname: string): PathNode[];\n treeChanges(): TreeChanges;\n treeChanges(pathname?: string) {\n return pathname ? this._treeChanges[pathname] : this._treeChanges;\n }\n\n /**\n * Creates a new transition that is a redirection of the current one.\n *\n * This transition can be returned from a [[TransitionService]] hook to\n * redirect a transition to a new state and/or set of parameters.\n *\n * @internalapi\n *\n * @returns Returns a new [[Transition]] instance.\n */\n redirect(targetState: TargetState): Transition {\n let redirects = 1, trans: Transition = this;\n while ((trans = trans.redirectedFrom()) != null) {\n if (++redirects > 20) throw new Error(`Too many consecutive Transition redirects (20+)`);\n }\n\n let redirectOpts: TransitionOptions = { redirectedFrom: this, source: \"redirect\" };\n // If the original transition was caused by URL sync, then use { location: 'replace' }\n // on the new transition (unless the target state explicitly specifies location: false).\n // This causes the original url to be replaced with the url for the redirect target\n // so the original url disappears from the browser history.\n if (this.options().source === 'url' && targetState.options().location !== false) {\n redirectOpts.location = 'replace';\n }\n\n let newOptions = extend({}, this.options(), targetState.options(), redirectOpts);\n targetState = targetState.withOptions(newOptions, true);\n\n let newTransition = this.router.transitionService.create(this._treeChanges.from, targetState);\n let originalEnteringNodes = this._treeChanges.entering;\n let redirectEnteringNodes = newTransition._treeChanges.entering;\n\n // --- Re-use resolve data from original transition ---\n // When redirecting from a parent state to a child state where the parent parameter values haven't changed\n // (because of the redirect), the resolves fetched by the original transition are still valid in the\n // redirected transition.\n //\n // This allows you to define a redirect on a parent state which depends on an async resolve value.\n // You can wait for the resolve, then redirect to a child state based on the result.\n // The redirected transition does not have to re-fetch the resolve.\n // ---------------------------------------------------------\n\n const nodeIsReloading = (reloadState: StateObject) => (node: PathNode) => {\n return reloadState && node.state.includes[reloadState.name];\n };\n\n // Find any \"entering\" nodes in the redirect path that match the original path and aren't being reloaded\n let matchingEnteringNodes: PathNode[] = PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, PathUtils.nonDynamicParams)\n .filter(not(nodeIsReloading(targetState.options().reloadState)));\n\n // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes.\n matchingEnteringNodes.forEach((node, idx) => {\n node.resolvables = originalEnteringNodes[idx].resolvables;\n });\n\n return newTransition;\n }\n\n /** @hidden If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */\n private _changedParams(): Param[] {\n let tc = this._treeChanges;\n\n /** Return undefined if it's not a \"dynamic\" transition, for the following reasons */\n // If user explicitly wants a reload\n if (this._options.reload) return undefined;\n // If any states are exiting or entering\n if (tc.exiting.length || tc.entering.length) return undefined;\n // If to/from path lengths differ\n if (tc.to.length !== tc.from.length) return undefined;\n // If the to/from paths are different\n let pathsDiffer: boolean = arrayTuples(tc.to, tc.from)\n .map(tuple => tuple[0].state !== tuple[1].state)\n .reduce(anyTrueR, false);\n if (pathsDiffer) return undefined;\n\n // Find any parameter values that differ\n let nodeSchemas: Param[][] = tc.to.map((node: PathNode) => node.paramSchema);\n let [toValues, fromValues] = [tc.to, tc.from].map(path => path.map(x => x.paramValues));\n let tuples = arrayTuples(nodeSchemas, toValues, fromValues);\n\n return tuples.map(([schema, toVals, fromVals]) => Param.changed(schema, toVals, fromVals)).reduce(unnestR, []);\n }\n\n /**\n * Returns true if the transition is dynamic.\n *\n * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.\n *\n * @returns true if the Transition is dynamic\n */\n dynamic(): boolean {\n let changes = this._changedParams();\n return !changes ? false : changes.map(x => x.dynamic).reduce(anyTrueR, false);\n }\n\n /**\n * Returns true if the transition is ignored.\n *\n * A transition is ignored if no states are entered nor exited, and no parameter values have changed.\n *\n * @returns true if the Transition is ignored.\n */\n ignored(): boolean {\n return !!this._ignoredReason();\n }\n\n /** @hidden */\n _ignoredReason(): \"SameAsCurrent\"|\"SameAsPending\"|undefined {\n const pending = this.router.globals.transition;\n const reloadState = this._options.reloadState;\n\n const same = (pathA, pathB) => {\n if (pathA.length !== pathB.length) return false;\n const matching = PathUtils.matching(pathA, pathB);\n return pathA.length === matching.filter(node => !reloadState || !node.state.includes[reloadState.name]).length;\n };\n\n let newTC = this.treeChanges();\n let pendTC = pending && pending.treeChanges();\n\n if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) return \"SameAsPending\";\n if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) return \"SameAsCurrent\";\n }\n\n /**\n * Runs the transition\n *\n * This method is generally called from the [[StateService.transitionTo]]\n *\n * @internalapi\n *\n * @returns a promise for a successful transition.\n */\n run(): Promise {\n let runAllHooks = TransitionHook.runAllHooks;\n\n // Gets transition hooks array for the given phase\n const getHooksFor = (phase: TransitionHookPhase) =>\n this._hookBuilder.buildHooksForPhase(phase);\n\n // When the chain is complete, then resolve or reject the deferred\n const transitionSuccess = () => {\n trace.traceSuccess(this.$to(), this);\n this.success = true;\n this._deferred.resolve(this.to());\n runAllHooks(getHooksFor(TransitionHookPhase.SUCCESS));\n };\n\n const transitionError = (reason: any) => {\n trace.traceError(reason, this);\n this.success = false;\n this._deferred.reject(reason);\n this._error = reason;\n runAllHooks(getHooksFor(TransitionHookPhase.ERROR));\n };\n\n const runTransition = () => {\n // Wait to build the RUN hook chain until the BEFORE hooks are done\n // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object.\n let allRunHooks = getHooksFor(TransitionHookPhase.RUN);\n let done = () => services.$q.when(undefined);\n return TransitionHook.invokeHooks(allRunHooks, done);\n };\n\n const startTransition = () => {\n let globals = this.router.globals;\n\n globals.lastStartedTransitionId = this.$id;\n globals.transition = this;\n globals.transitionHistory.enqueue(this);\n\n trace.traceTransitionStart(this);\n\n return services.$q.when(undefined);\n };\n\n let allBeforeHooks = getHooksFor(TransitionHookPhase.BEFORE);\n TransitionHook.invokeHooks(allBeforeHooks, startTransition)\n .then(runTransition)\n .then(transitionSuccess, transitionError);\n\n return this.promise;\n }\n\n /** Checks if this transition is currently active/running. */\n isActive = () =>\n this.router.globals.transition === this;\n\n /**\n * Checks if the Transition is valid\n *\n * @returns true if the Transition is valid\n */\n valid() {\n return !this.error() || this.success !== undefined;\n }\n\n /**\n * Aborts this transition\n *\n * Imperative API to abort a Transition.\n * This only applies to Transitions that are not yet complete.\n */\n abort() {\n // Do not set flag if the transition is already complete\n if (isUndefined(this.success)) {\n this._aborted = true;\n }\n }\n\n /**\n * The Transition error reason.\n *\n * If the transition is invalid (and could not be run), returns the reason the transition is invalid.\n * If the transition was valid and ran, but was not successful, returns the reason the transition failed.\n *\n * @returns an error message explaining why the transition is invalid, or the reason the transition failed.\n */\n error() {\n let state: StateObject = this.$to();\n\n if (state.self.abstract)\n return `Cannot transition to abstract state '${state.name}'`;\n\n const paramDefs = state.parameters(), values = this.params();\n const invalidParams = paramDefs.filter(param => !param.validates(values[param.id]));\n if (invalidParams.length) {\n return `Param values not valid for state '${state.name}'. Invalid params: [ ${invalidParams.map(param => param.id).join(', ')} ]`;\n }\n\n if (this.success === false)\n return this._error;\n }\n\n /**\n * A string representation of the Transition\n *\n * @returns A string representation of the Transition\n */\n toString () {\n let fromStateOrName = this.from();\n let toStateOrName = this.to();\n\n const avoidEmptyHash = (params: RawParams) =>\n (params[\"#\"] !== null && params[\"#\"] !== undefined) ? params : omit(params, [\"#\"]);\n\n // (X) means the to state is invalid.\n let id = this.$id,\n from = isObject(fromStateOrName) ? fromStateOrName.name : fromStateOrName,\n fromParams = stringify(avoidEmptyHash(this._treeChanges.from.map(prop('paramValues')).reduce(mergeR, {}))),\n toValid = this.valid() ? \"\" : \"(X) \",\n to = isObject(toStateOrName) ? toStateOrName.name : toStateOrName,\n toParams = stringify(avoidEmptyHash(this.params()));\n\n return `Transition#${id}( '${from}'${fromParams} -> ${toValid}'${to}'${toParams} )`;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.d.ts new file mode 100644 index 00000000..7af6e74a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.d.ts @@ -0,0 +1,20 @@ +/** @module transition */ /** */ +import { TransitionHookPhase, PathType } from "./interface"; +import { GetErrorHandler, GetResultHandler } from "./transitionHook"; +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +export declare class TransitionEventType { + name: string; + hookPhase: TransitionHookPhase; + hookOrder: number; + criteriaMatchPath: PathType; + reverseSort: boolean; + getResultHandler: GetResultHandler; + getErrorHandler: GetErrorHandler; + synchronous: boolean; + constructor(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, synchronous?: boolean); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js new file mode 100644 index 00000000..22a2cc28 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var transitionHook_1 = require("./transitionHook"); +/** + * This class defines a type of hook, such as `onBefore` or `onEnter`. + * Plugins can define custom hook types, such as sticky states does for `onInactive`. + * + * @interalapi + */ +var TransitionEventType = /** @class */ (function () { + function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = transitionHook_1.TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = transitionHook_1.TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + this.name = name; + this.hookPhase = hookPhase; + this.hookOrder = hookOrder; + this.criteriaMatchPath = criteriaMatchPath; + this.reverseSort = reverseSort; + this.getResultHandler = getResultHandler; + this.getErrorHandler = getErrorHandler; + this.synchronous = synchronous; + } + return TransitionEventType; +}()); +exports.TransitionEventType = TransitionEventType; +//# sourceMappingURL=transitionEventType.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js.map new file mode 100644 index 00000000..b09e62ee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionEventType.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionEventType.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionEventType.ts" + ], + "names": [], + "mappings": ";;AAEA,mDAAqF;AACrF;;;;;GAKG;AACH;IAEE,6BAAmB,IAA0B,EAC1B,SAAuC,EACvC,SAA0B,EAC1B,iBAA4B,EAC5B,WAAmC,EACnC,gBAAmE,EACnE,eAAiE,EACjE,WAAmC;QAHnC,4BAAA,EAAA,mBAAmC;QACnC,iCAAA,EAAA,mBAAuC,+BAAc,CAAC,aAAa;QACnE,gCAAA,EAAA,kBAAsC,+BAAc,CAAC,YAAY;QACjE,4BAAA,EAAA,mBAAmC;QAPnC,SAAI,GAAJ,IAAI,CAAsB;QAC1B,cAAS,GAAT,SAAS,CAA8B;QACvC,cAAS,GAAT,SAAS,CAAiB;QAC1B,sBAAiB,GAAjB,iBAAiB,CAAW;QAC5B,gBAAW,GAAX,WAAW,CAAwB;QACnC,qBAAgB,GAAhB,gBAAgB,CAAmD;QACnE,oBAAe,GAAf,eAAe,CAAkD;QACjE,gBAAW,GAAX,WAAW,CAAwB;IAClD,CAAC;IACP,0BAAC;AAAD,CAAC,AAXD,IAWC;AAXY,kDAAmB", + "sourcesContent": [ + "/** @module transition */ /** */\nimport { TransitionHookPhase, PathType } from \"./interface\";\nimport { GetErrorHandler, GetResultHandler, TransitionHook } from \"./transitionHook\";\n/**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n *\n * @interalapi\n */\nexport class TransitionEventType {\n\n constructor(public name: string,\n public hookPhase: TransitionHookPhase,\n public hookOrder: number,\n public criteriaMatchPath: PathType,\n public reverseSort: boolean = false,\n public getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n public getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n public synchronous: boolean = false,\n ) { }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.d.ts new file mode 100644 index 00000000..bc067b04 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.d.ts @@ -0,0 +1,94 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { TransitionHookOptions, HookResult } from './interface'; +import { Transition } from './transition'; +import { TransitionEventType } from './transitionEventType'; +import { RegisteredHook } from './hookRegistry'; +import { StateDeclaration } from '../state/interface'; +export declare type GetResultHandler = (hook: TransitionHook) => ResultHandler; +export declare type GetErrorHandler = (hook: TransitionHook) => ErrorHandler; +export declare type ResultHandler = (result: HookResult) => Promise; +export declare type ErrorHandler = (error: any) => Promise; +/** @hidden */ +export declare class TransitionHook { + private transition; + private stateContext; + private registeredHook; + private options; + type: TransitionEventType; + constructor(transition: Transition, stateContext: StateDeclaration, registeredHook: RegisteredHook, options: TransitionHookOptions); + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + static HANDLE_RESULT: GetResultHandler; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + static LOG_REJECTED_RESULT: GetResultHandler; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + static LOG_ERROR: GetErrorHandler; + static REJECT_ERROR: GetErrorHandler; + static THROW_ERROR: GetErrorHandler; + private isSuperseded; + logError(err: any): any; + invokeHook(): Promise | void; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + handleHookResult(result: HookResult): Promise; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + private getNotCurrentRejection(); + toString(): string; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + static chain(hooks: TransitionHook[], waitFor?: Promise): Promise; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T; + /** + * Run all TransitionHooks, ignoring their return value. + */ + static runAllHooks(hooks: TransitionHook[]): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js new file mode 100644 index 00000000..c49d2827 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js @@ -0,0 +1,225 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +var interface_1 = require("./interface"); +var common_1 = require("../common/common"); +var strings_1 = require("../common/strings"); +var predicates_1 = require("../common/predicates"); +var hof_1 = require("../common/hof"); +var trace_1 = require("../common/trace"); +var coreservices_1 = require("../common/coreservices"); +var rejectFactory_1 = require("./rejectFactory"); +var targetState_1 = require("../state/targetState"); +var defaultOptions = { + current: common_1.noop, + transition: null, + traceData: {}, + bind: null, +}; +/** @hidden */ +var TransitionHook = /** @class */ (function () { + function TransitionHook(transition, stateContext, registeredHook, options) { + var _this = this; + this.transition = transition; + this.stateContext = stateContext; + this.registeredHook = registeredHook; + this.options = options; + this.isSuperseded = function () { + return _this.type.hookPhase === interface_1.TransitionHookPhase.RUN && !_this.options.transition.isActive(); + }; + this.options = common_1.defaults(options, defaultOptions); + this.type = registeredHook.eventType; + } + TransitionHook.prototype.logError = function (err) { + this.transition.router.stateService.defaultErrorHandler()(err); + }; + TransitionHook.prototype.invokeHook = function () { + var _this = this; + var hook = this.registeredHook; + if (hook._deregistered) + return; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + var options = this.options; + trace_1.trace.traceHookInvocation(this, this.transition, options); + var invokeCallback = function () { + return hook.callback.call(options.bind, _this.transition, _this.stateContext); + }; + var normalizeErr = function (err) { + return rejectFactory_1.Rejection.normalize(err).toPromise(); + }; + var handleError = function (err) { + return hook.eventType.getErrorHandler(_this)(err); + }; + var handleResult = function (result) { + return hook.eventType.getResultHandler(_this)(result); + }; + try { + var result = invokeCallback(); + if (!this.type.synchronous && predicates_1.isPromise(result)) { + return result.catch(normalizeErr) + .then(handleResult, handleError); + } + else { + return handleResult(result); + } + } + catch (err) { + // If callback throws (synchronously) + return handleError(rejectFactory_1.Rejection.normalize(err)); + } + finally { + if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) { + hook.deregister(); + } + } + }; + /** + * This method handles the return value of a Transition Hook. + * + * A hook can return false (cancel), a TargetState (redirect), + * or a promise (which may later resolve to false or a redirect) + * + * This also handles "transition superseded" -- when a new transition + * was started while the hook was still running + */ + TransitionHook.prototype.handleHookResult = function (result) { + var _this = this; + var notCurrent = this.getNotCurrentRejection(); + if (notCurrent) + return notCurrent; + // Hook returned a promise + if (predicates_1.isPromise(result)) { + // Wait for the promise, then reprocess with the resulting value + return result.then(function (val) { return _this.handleHookResult(val); }); + } + trace_1.trace.traceHookResult(result, this.transition, this.options); + // Hook returned false + if (result === false) { + // Abort this Transition + return rejectFactory_1.Rejection.aborted("Hook aborted transition").toPromise(); + } + var isTargetState = hof_1.is(targetState_1.TargetState); + // hook returned a TargetState + if (isTargetState(result)) { + // Halt the current Transition and redirect (a new Transition) to the TargetState. + return rejectFactory_1.Rejection.redirected(result).toPromise(); + } + }; + /** + * Return a Rejection promise if the transition is no longer current due + * to a stopped router (disposed), or a new transition has started and superseded this one. + */ + TransitionHook.prototype.getNotCurrentRejection = function () { + var router = this.transition.router; + // The router is stopped + if (router._disposed) { + return rejectFactory_1.Rejection.aborted("UIRouter instance #" + router.$id + " has been stopped (disposed)").toPromise(); + } + if (this.transition._aborted) { + return rejectFactory_1.Rejection.aborted().toPromise(); + } + // This transition is no longer current. + // Another transition started while this hook was still running. + if (this.isSuperseded()) { + // Abort this transition + return rejectFactory_1.Rejection.superseded(this.options.current()).toPromise(); + } + }; + TransitionHook.prototype.toString = function () { + var _a = this, options = _a.options, registeredHook = _a.registeredHook; + var event = hof_1.parse("traceData.hookType")(options) || "internal", context = hof_1.parse("traceData.context.state.name")(options) || hof_1.parse("traceData.context")(options) || "unknown", name = strings_1.fnToString(registeredHook.callback); + return event + " context: " + context + ", " + strings_1.maxLength(200, name); + }; + /** + * Chains together an array of TransitionHooks. + * + * Given a list of [[TransitionHook]] objects, chains them together. + * Each hook is invoked after the previous one completes. + * + * #### Example: + * ```js + * var hooks: TransitionHook[] = getHooks(); + * let promise: Promise = TransitionHook.chain(hooks); + * + * promise.then(handleSuccess, handleError); + * ``` + * + * @param hooks the list of hooks to chain together + * @param waitFor if provided, the chain is `.then()`'ed off this promise + * @returns a `Promise` for sequentially invoking the hooks (in order) + */ + TransitionHook.chain = function (hooks, waitFor) { + // Chain the next hook off the previous + var createHookChainR = function (prev, nextHook) { + return prev.then(function () { return nextHook.invokeHook(); }); + }; + return hooks.reduce(createHookChainR, waitFor || coreservices_1.services.$q.when()); + }; + /** + * Invokes all the provided TransitionHooks, in order. + * Each hook's return value is checked. + * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. + * If no hook returns a promise, then all hooks are processed synchronously. + * + * @param hooks the list of TransitionHooks to invoke + * @param doneCallback a callback that is invoked after all the hooks have successfully completed + * + * @returns a promise for the async result, or the result of the callback + */ + TransitionHook.invokeHooks = function (hooks, doneCallback) { + for (var idx = 0; idx < hooks.length; idx++) { + var hookResult = hooks[idx].invokeHook(); + if (predicates_1.isPromise(hookResult)) { + var remainingHooks = hooks.slice(idx + 1); + return TransitionHook.chain(remainingHooks, hookResult) + .then(doneCallback); + } + } + return doneCallback(); + }; + /** + * Run all TransitionHooks, ignoring their return value. + */ + TransitionHook.runAllHooks = function (hooks) { + hooks.forEach(function (hook) { return hook.invokeHook(); }); + }; + /** + * These GetResultHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.HANDLE_RESULT = function (hook) { return function (result) { + return hook.handleHookResult(result); + }; }; + /** + * If the result is a promise rejection, log it. + * Otherwise, ignore the result. + */ + TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) { + predicates_1.isPromise(result) && result.catch(function (err) { + return hook.logError(rejectFactory_1.Rejection.normalize(err)); + }); + return undefined; + }; }; + /** + * These GetErrorHandler(s) are used by [[invokeHook]] below + * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) + */ + TransitionHook.LOG_ERROR = function (hook) { return function (error) { + return hook.logError(error); + }; }; + TransitionHook.REJECT_ERROR = function (hook) { return function (error) { + return common_1.silentRejection(error); + }; }; + TransitionHook.THROW_ERROR = function (hook) { return function (error) { + throw error; + }; }; + return TransitionHook; +}()); +exports.TransitionHook = TransitionHook; +//# sourceMappingURL=transitionHook.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js.map new file mode 100644 index 00000000..b11b2da2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionHook.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionHook.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionHook.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,kBAAkB;AAClB,yCAAqF;AACrF,2CAAmE;AACnE,6CAA0D;AAC1D,mDAAiD;AACjD,qCAA0C;AAC1C,yCAAwC;AACxC,uDAAkD;AAClD,iDAA4C;AAC5C,oDAAmD;AAMnD,IAAI,cAAc,GAA0B;IAC1C,OAAO,EAAE,aAAI;IACb,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,EAAE;IACb,IAAI,EAAE,IAAI;CACX,CAAC;AAQF,cAAc;AACd;IAEE,wBAAoB,UAAsB,EACtB,YAA8B,EAC9B,cAA8B,EAC9B,OAA8B;QAHlD,iBAMC;QANmB,eAAU,GAAV,UAAU,CAAY;QACtB,iBAAY,GAAZ,YAAY,CAAkB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QAC9B,YAAO,GAAP,OAAO,CAAuB;QAoC1C,iBAAY,GAAG;YACrB,OAAA,KAAI,CAAC,IAAI,CAAC,SAAS,KAAK,+BAAmB,CAAC,GAAG,IAAI,CAAC,KAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;QAAtF,CAAsF,CAAC;QApCvF,IAAI,CAAC,OAAO,GAAG,iBAAQ,CAAC,OAAO,EAAE,cAAc,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B,CAAC;QACH,CAAC;QAED,MAAM,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,0BAAW,GAAlB,UAAmB,KAAuB;QACxC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,UAAU,EAAE,EAAjB,CAAiB,CAAC,CAAC;IAC3C,CAAC;IA5MD;;;OAGG;IACI,4BAAa,GAAqB,UAAC,IAAoB,IAAK,OAAA,UAAC,MAAkB;QAClF,OAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAA7B,CAA6B,EADkC,CAClC,CAAC;IAElC;;;OAGG;IACI,kCAAmB,GAAqB,UAAC,IAAoB,IAAK,OAAA,UAAC,MAAkB;QAC1F,sBAAS,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,UAAA,GAAG;YACjC,OAAA,IAAI,CAAC,QAAQ,CAAC,yBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAAvC,CAAuC,CAAC,CAAC;QAC7C,MAAM,CAAC,SAAS,CAAC;IACnB,CAAC,EAJwE,CAIxE,CAAA;IAED;;;OAGG;IACI,wBAAS,GAAoB,UAAC,IAAoB,IAAK,OAAA,UAAC,KAAU;QACrE,OAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAApB,CAAoB,EADsC,CACtC,CAAC;IAElB,2BAAY,GAAoB,UAAC,IAAoB,IAAK,OAAA,UAAC,KAAU;QACxE,OAAA,wBAAe,CAAC,KAAK,CAAC;IAAtB,CAAsB,EADuC,CACvC,CAAC;IAEpB,0BAAW,GAAoB,UAAC,IAAoB,IAAK,OAAA,UAAC,KAAU;QACzE,MAAM,KAAK,CAAC;IACd,CAAC,EAF+D,CAE/D,CAAA;IAiLH,qBAAC;CAAA,AAxND,IAwNC;AAxNY,wCAAc", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport { TransitionHookOptions, HookResult, TransitionHookPhase } from './interface';\nimport { defaults, noop, silentRejection } from '../common/common';\nimport { fnToString, maxLength } from '../common/strings';\nimport { isPromise } from '../common/predicates';\nimport { is, parse } from '../common/hof';\nimport { trace } from '../common/trace';\nimport { services } from '../common/coreservices';\nimport { Rejection } from './rejectFactory';\nimport { TargetState } from '../state/targetState';\nimport { Transition } from './transition';\nimport { TransitionEventType } from './transitionEventType';\nimport { RegisteredHook } from './hookRegistry';\nimport { StateDeclaration } from '../state/interface';\n\nlet defaultOptions: TransitionHookOptions = {\n current: noop,\n transition: null,\n traceData: {},\n bind: null,\n};\n\nexport type GetResultHandler = (hook: TransitionHook) => ResultHandler;\nexport type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;\n\nexport type ResultHandler = (result: HookResult) => Promise;\nexport type ErrorHandler = (error: any) => Promise;\n\n/** @hidden */\nexport class TransitionHook {\n type: TransitionEventType;\n constructor(private transition: Transition,\n private stateContext: StateDeclaration,\n private registeredHook: RegisteredHook,\n private options: TransitionHookOptions) {\n this.options = defaults(options, defaultOptions);\n this.type = registeredHook.eventType;\n }\n\n /**\n * These GetResultHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static HANDLE_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) =>\n hook.handleHookResult(result);\n\n /**\n * If the result is a promise rejection, log it.\n * Otherwise, ignore the result.\n */\n static LOG_REJECTED_RESULT: GetResultHandler = (hook: TransitionHook) => (result: HookResult) => {\n isPromise(result) && result.catch(err =>\n hook.logError(Rejection.normalize(err)));\n return undefined;\n }\n\n /**\n * These GetErrorHandler(s) are used by [[invokeHook]] below\n * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])\n */\n static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n hook.logError(error);\n\n static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>\n silentRejection(error);\n\n static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {\n throw error;\n }\n\n private isSuperseded = () =>\n this.type.hookPhase === TransitionHookPhase.RUN && !this.options.transition.isActive();\n\n logError(err): any {\n this.transition.router.stateService.defaultErrorHandler()(err);\n }\n\n invokeHook(): Promise | void {\n let hook = this.registeredHook;\n if (hook._deregistered) return;\n\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n let options = this.options;\n trace.traceHookInvocation(this, this.transition, options);\n\n const invokeCallback = () =>\n hook.callback.call(options.bind, this.transition, this.stateContext);\n\n const normalizeErr = err =>\n Rejection.normalize(err).toPromise();\n\n const handleError = err =>\n hook.eventType.getErrorHandler(this)(err);\n\n const handleResult = result =>\n hook.eventType.getResultHandler(this)(result);\n\n try {\n let result = invokeCallback();\n\n if (!this.type.synchronous && isPromise(result)) {\n return result.catch(normalizeErr)\n .then(handleResult, handleError);\n } else {\n return handleResult(result);\n }\n } catch (err) {\n // If callback throws (synchronously)\n return handleError(Rejection.normalize(err));\n } finally {\n if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) {\n hook.deregister();\n }\n }\n }\n\n /**\n * This method handles the return value of a Transition Hook.\n *\n * A hook can return false (cancel), a TargetState (redirect),\n * or a promise (which may later resolve to false or a redirect)\n *\n * This also handles \"transition superseded\" -- when a new transition\n * was started while the hook was still running\n */\n handleHookResult(result: HookResult): Promise {\n let notCurrent = this.getNotCurrentRejection();\n if (notCurrent) return notCurrent;\n\n // Hook returned a promise\n if (isPromise(result)) {\n // Wait for the promise, then reprocess with the resulting value\n return result.then(val => this.handleHookResult(val));\n }\n\n trace.traceHookResult(result, this.transition, this.options);\n\n // Hook returned false\n if (result === false) {\n // Abort this Transition\n return Rejection.aborted(\"Hook aborted transition\").toPromise();\n }\n\n const isTargetState = is(TargetState);\n // hook returned a TargetState\n if (isTargetState(result)) {\n // Halt the current Transition and redirect (a new Transition) to the TargetState.\n return Rejection.redirected(result).toPromise();\n }\n }\n\n\n /**\n * Return a Rejection promise if the transition is no longer current due\n * to a stopped router (disposed), or a new transition has started and superseded this one.\n */\n private getNotCurrentRejection() {\n let router = this.transition.router;\n\n // The router is stopped\n if (router._disposed) {\n return Rejection.aborted(`UIRouter instance #${router.$id} has been stopped (disposed)`).toPromise();\n }\n\n if (this.transition._aborted) {\n return Rejection.aborted().toPromise();\n }\n\n // This transition is no longer current.\n // Another transition started while this hook was still running.\n if (this.isSuperseded()) {\n // Abort this transition\n return Rejection.superseded(this.options.current()).toPromise();\n }\n }\n\n toString() {\n let { options, registeredHook } = this;\n let event = parse(\"traceData.hookType\")(options) || \"internal\",\n context = parse(\"traceData.context.state.name\")(options) || parse(\"traceData.context\")(options) || \"unknown\",\n name = fnToString(registeredHook.callback);\n return `${event} context: ${context}, ${maxLength(200, name)}`;\n }\n\n /**\n * Chains together an array of TransitionHooks.\n *\n * Given a list of [[TransitionHook]] objects, chains them together.\n * Each hook is invoked after the previous one completes.\n *\n * #### Example:\n * ```js\n * var hooks: TransitionHook[] = getHooks();\n * let promise: Promise = TransitionHook.chain(hooks);\n *\n * promise.then(handleSuccess, handleError);\n * ```\n *\n * @param hooks the list of hooks to chain together\n * @param waitFor if provided, the chain is `.then()`'ed off this promise\n * @returns a `Promise` for sequentially invoking the hooks (in order)\n */\n static chain(hooks: TransitionHook[], waitFor?: Promise): Promise {\n // Chain the next hook off the previous\n const createHookChainR = (prev: Promise, nextHook: TransitionHook) =>\n prev.then(() => nextHook.invokeHook());\n return hooks.reduce(createHookChainR, waitFor || services.$q.when());\n }\n\n\n /**\n * Invokes all the provided TransitionHooks, in order.\n * Each hook's return value is checked.\n * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned.\n * If no hook returns a promise, then all hooks are processed synchronously.\n *\n * @param hooks the list of TransitionHooks to invoke\n * @param doneCallback a callback that is invoked after all the hooks have successfully completed\n *\n * @returns a promise for the async result, or the result of the callback\n */\n static invokeHooks(hooks: TransitionHook[], doneCallback: (result?: HookResult) => T): Promise | T {\n for (let idx = 0; idx < hooks.length; idx++) {\n let hookResult = hooks[idx].invokeHook();\n\n if (isPromise(hookResult)) {\n let remainingHooks = hooks.slice(idx + 1);\n\n return TransitionHook.chain(remainingHooks, hookResult)\n .then(doneCallback);\n }\n }\n\n return doneCallback();\n }\n\n /**\n * Run all TransitionHooks, ignoring their return value.\n */\n static runAllHooks(hooks: TransitionHook[]): void {\n hooks.forEach(hook => hook.invokeHook());\n }\n\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.d.ts new file mode 100644 index 00000000..8c99b6f5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.d.ts @@ -0,0 +1,190 @@ +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +import { IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria, HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn } from "./interface"; +import { Transition } from "./transition"; +import { RegisteredHook } from "./hookRegistry"; +import { TargetState } from "../state/targetState"; +import { PathNode } from "../path/pathNode"; +import { ViewService } from "../view/view"; +import { UIRouter } from "../router"; +import { TransitionEventType } from "./transitionEventType"; +import { GetResultHandler, GetErrorHandler } from "./transitionHook"; +import { Disposable } from "../interface"; +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +export declare let defaultTransOpts: TransitionOptions; +/** + * Plugin API for Transition Service + * @internalapi + */ +export interface TransitionServicePluginAPI { + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + */ + _definePathType(name: string, hookScope: TransitionHookScope): any; + /** + * Gets a Path definition used as a criterion against a TreeChanges path + */ + _getPathTypes(): PathTypes; + /** + * Defines a transition hook type and returns a transition hook registration + * function (which can then be used to register hooks of this type). + */ + _defineEvent(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, rejectIfSuperseded?: boolean): any; + /** + * Returns the known event types, such as `onBefore` + * If a phase argument is provided, returns only events for the given phase. + */ + _getEvents(phase?: TransitionHookPhase): TransitionEventType[]; + /** Returns the hooks registered for the given hook name */ + getHooks(hookName: string): RegisteredHook[]; +} +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +export declare class TransitionService implements IHookRegistry, Disposable { + /** @hidden */ + _transitionCount: number; + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @inheritdoc */ + onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function; + /** @hidden */ + $view: ViewService; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + private _eventTypes; + /** @hidden The registered transition hooks */ + _registeredHooks: RegisteredHooks; + /** @hidden The paths on a criteria object */ + private _criteriaPaths; + /** @hidden */ + private _router; + /** @internalapi */ + _pluginapi: TransitionServicePluginAPI; + /** + * This object has hook de-registration functions for the built-in hooks. + * This can be used by third parties libraries that wish to customize the behaviors + * + * @hidden + */ + _deregisterHookFns: { + addCoreResolves: Function; + ignored: Function; + invalid: Function; + redirectTo: Function; + onExit: Function; + onRetain: Function; + onEnter: Function; + eagerResolve: Function; + lazyResolve: Function; + loadViews: Function; + activateViews: Function; + updateGlobals: Function; + updateUrl: Function; + lazyLoad: Function; + }; + /** @hidden */ + constructor(_router: UIRouter); + /** + * dispose + * @internalapi + */ + dispose(router: UIRouter): void; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + create(fromPath: PathNode[], targetState: TargetState): Transition; + /** @hidden */ + private _defineCoreEvents(); + /** @hidden */ + private _defineCorePaths(); + /** @hidden */ + _defineEvent(name: string, hookPhase: TransitionHookPhase, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, synchronous?: boolean): void; + /** @hidden */ + private _getEvents(phase?); + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + private _definePathType(name, hookScope); + /** * @hidden */ + private _getPathTypes(); + /** @hidden */ + getHooks(hookName: string): RegisteredHook[]; + /** @hidden */ + private _registerCoreTransitionHooks(); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js new file mode 100644 index 00000000..d5d8e93d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js @@ -0,0 +1,239 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module transition + */ +/** for typedoc */ +var interface_1 = require("./interface"); +var transition_1 = require("./transition"); +var hookRegistry_1 = require("./hookRegistry"); +var coreResolvables_1 = require("../hooks/coreResolvables"); +var redirectTo_1 = require("../hooks/redirectTo"); +var onEnterExitRetain_1 = require("../hooks/onEnterExitRetain"); +var resolve_1 = require("../hooks/resolve"); +var views_1 = require("../hooks/views"); +var updateGlobals_1 = require("../hooks/updateGlobals"); +var url_1 = require("../hooks/url"); +var lazyLoad_1 = require("../hooks/lazyLoad"); +var transitionEventType_1 = require("./transitionEventType"); +var transitionHook_1 = require("./transitionHook"); +var predicates_1 = require("../common/predicates"); +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var ignoredTransition_1 = require("../hooks/ignoredTransition"); +var invalidTransition_1 = require("../hooks/invalidTransition"); +/** + * The default [[Transition]] options. + * + * Include this object when applying custom defaults: + * let reloadOpts = { reload: true, notify: true } + * let options = defaults(theirOpts, customDefaults, defaultOptions); + */ +exports.defaultTransOpts = { + location: true, + relative: null, + inherit: false, + notify: true, + reload: false, + custom: {}, + current: function () { return null; }, + source: "unknown" +}; +/** + * This class provides services related to Transitions. + * + * - Most importantly, it allows global Transition Hooks to be registered. + * - It allows the default transition error handler to be set. + * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). + * + * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. + */ +var TransitionService = /** @class */ (function () { + /** @hidden */ + function TransitionService(_router) { + /** @hidden */ + this._transitionCount = 0; + /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */ + this._eventTypes = []; + /** @hidden The registered transition hooks */ + this._registeredHooks = {}; + /** @hidden The paths on a criteria object */ + this._criteriaPaths = {}; + this._router = _router; + this.$view = _router.viewService; + this._deregisterHookFns = {}; + this._pluginapi = common_1.createProxyFunctions(hof_1.val(this), {}, hof_1.val(this), [ + '_definePathType', + '_defineEvent', + '_getPathTypes', + '_getEvents', + 'getHooks', + ]); + this._defineCorePaths(); + this._defineCoreEvents(); + this._registerCoreTransitionHooks(); + } + /** + * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. + * + * Registers a transition lifecycle hook, which is invoked during transition construction. + * + * This low level hook should only be used by plugins. + * This can be a useful time for plugins to add resolves or mutate the transition as needed. + * The Sticky States plugin uses this hook to modify the treechanges. + * + * ### Lifecycle + * + * `onCreate` hooks are invoked *while a transition is being constructed*. + * + * ### Return value + * + * The hook's return value is ignored + * + * @internalapi + * @param criteria defines which Transitions the Hook should be invoked for. + * @param callback the hook function which will be invoked. + * @param options the registration options + * @returns a function which deregisters the hook. + */ + TransitionService.prototype.onCreate = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onBefore = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onStart = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onExit = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onRetain = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onEnter = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onFinish = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onSuccess = function (criteria, callback, options) { return; }; + /** @inheritdoc */ + TransitionService.prototype.onError = function (criteria, callback, options) { return; }; + /** + * dispose + * @internalapi + */ + TransitionService.prototype.dispose = function (router) { + common_1.values(this._registeredHooks).forEach(function (hooksArray) { return hooksArray.forEach(function (hook) { + hook._deregistered = true; + common_1.removeFrom(hooksArray, hook); + }); }); + }; + /** + * Creates a new [[Transition]] object + * + * This is a factory function for creating new Transition objects. + * It is used internally by the [[StateService]] and should generally not be called by application code. + * + * @param fromPath the path to the current state (the from state) + * @param targetState the target state (destination) + * @returns a Transition + */ + TransitionService.prototype.create = function (fromPath, targetState) { + return new transition_1.Transition(fromPath, targetState, this._router); + }; + /** @hidden */ + TransitionService.prototype._defineCoreEvents = function () { + var Phase = interface_1.TransitionHookPhase; + var TH = transitionHook_1.TransitionHook; + var paths = this._criteriaPaths; + var NORMAL_SORT = false, REVERSE_SORT = true; + var ASYNCHRONOUS = false, SYNCHRONOUS = true; + this._defineEvent("onCreate", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS); + this._defineEvent("onBefore", Phase.BEFORE, 0, paths.to); + this._defineEvent("onStart", Phase.RUN, 0, paths.to); + this._defineEvent("onExit", Phase.RUN, 100, paths.exiting, REVERSE_SORT); + this._defineEvent("onRetain", Phase.RUN, 200, paths.retained); + this._defineEvent("onEnter", Phase.RUN, 300, paths.entering); + this._defineEvent("onFinish", Phase.RUN, 400, paths.to); + this._defineEvent("onSuccess", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + this._defineEvent("onError", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); + }; + /** @hidden */ + TransitionService.prototype._defineCorePaths = function () { + var STATE = interface_1.TransitionHookScope.STATE, TRANSITION = interface_1.TransitionHookScope.TRANSITION; + this._definePathType("to", TRANSITION); + this._definePathType("from", TRANSITION); + this._definePathType("exiting", STATE); + this._definePathType("retained", STATE); + this._definePathType("entering", STATE); + }; + /** @hidden */ + TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { + if (reverseSort === void 0) { reverseSort = false; } + if (getResultHandler === void 0) { getResultHandler = transitionHook_1.TransitionHook.HANDLE_RESULT; } + if (getErrorHandler === void 0) { getErrorHandler = transitionHook_1.TransitionHook.REJECT_ERROR; } + if (synchronous === void 0) { synchronous = false; } + var eventType = new transitionEventType_1.TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous); + this._eventTypes.push(eventType); + hookRegistry_1.makeEvent(this, this, eventType); + }; + ; + /** @hidden */ + TransitionService.prototype._getEvents = function (phase) { + var transitionHookTypes = predicates_1.isDefined(phase) ? + this._eventTypes.filter(function (type) { return type.hookPhase === phase; }) : + this._eventTypes.slice(); + return transitionHookTypes.sort(function (l, r) { + var cmpByPhase = l.hookPhase - r.hookPhase; + return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase; + }); + }; + /** + * Adds a Path to be used as a criterion against a TreeChanges path + * + * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. + * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` + * Each state in the exiting path is checked against the criteria and returned as part of the match. + * + * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. + * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` + * Only the tail of the `to` path is checked against the criteria and returned as part of the match. + * + * @hidden + */ + TransitionService.prototype._definePathType = function (name, hookScope) { + this._criteriaPaths[name] = { name: name, scope: hookScope }; + }; + /** * @hidden */ + TransitionService.prototype._getPathTypes = function () { + return this._criteriaPaths; + }; + /** @hidden */ + TransitionService.prototype.getHooks = function (hookName) { + return this._registeredHooks[hookName]; + }; + /** @hidden */ + TransitionService.prototype._registerCoreTransitionHooks = function () { + var fns = this._deregisterHookFns; + fns.addCoreResolves = coreResolvables_1.registerAddCoreResolvables(this); + fns.ignored = ignoredTransition_1.registerIgnoredTransitionHook(this); + fns.invalid = invalidTransition_1.registerInvalidTransitionHook(this); + // Wire up redirectTo hook + fns.redirectTo = redirectTo_1.registerRedirectToHook(this); + // Wire up onExit/Retain/Enter state hooks + fns.onExit = onEnterExitRetain_1.registerOnExitHook(this); + fns.onRetain = onEnterExitRetain_1.registerOnRetainHook(this); + fns.onEnter = onEnterExitRetain_1.registerOnEnterHook(this); + // Wire up Resolve hooks + fns.eagerResolve = resolve_1.registerEagerResolvePath(this); + fns.lazyResolve = resolve_1.registerLazyResolveState(this); + // Wire up the View management hooks + fns.loadViews = views_1.registerLoadEnteringViews(this); + fns.activateViews = views_1.registerActivateViews(this); + // Updates global state after a transition + fns.updateGlobals = updateGlobals_1.registerUpdateGlobalState(this); + // After globals.current is updated at priority: 10000 + fns.updateUrl = url_1.registerUpdateUrl(this); + // Lazy load state trees + fns.lazyLoad = lazyLoad_1.registerLazyLoadHook(this); + }; + return TransitionService; +}()); +exports.TransitionService = TransitionService; +//# sourceMappingURL=transitionService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js.map new file mode 100644 index 00000000..dc46e280 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/transition/transitionService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "transitionService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/transition/transitionService.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,kBAAkB;AAClB,yCAGqB;AACrB,2CAA0C;AAC1C,+CAA2D;AAK3D,4DAAsE;AACtE,kDAA6D;AAC7D,gEAA2G;AAC3G,4CAAsF;AACtF,wCAAkF;AAClF,wDAAmE;AACnE,oCAAiD;AACjD,8CAAyD;AACzD,6DAA4D;AAC5D,mDAAqF;AACrF,mDAAiD;AACjD,2CAA4E;AAE5E,qCAAoC;AACpC,gEAA2E;AAC3E,gEAA2E;AAE3E;;;;;;GAMG;AACQ,QAAA,gBAAgB,GAAsB;IAC/C,QAAQ,EAAM,IAAI;IAClB,QAAQ,EAAM,IAAI;IAClB,OAAO,EAAO,KAAK;IACnB,MAAM,EAAQ,IAAI;IAClB,MAAM,EAAQ,KAAK;IACnB,MAAM,EAAQ,EAAE;IAChB,OAAO,EAAO,cAAM,OAAA,IAAI,EAAJ,CAAI;IACxB,MAAM,EAAQ,SAAS;CACxB,CAAC;AAiDF;;;;;;;;GAQG;AACH;IAmFE,cAAc;IACd,2BAAY,OAAiB;QAnF7B,cAAc;QACd,qBAAgB,GAAG,CAAC,CAAC;QA8CrB,2EAA2E;QACnE,gBAAW,GAA0B,EAAE,CAAC;QAChD,8CAA8C;QAC9C,qBAAgB,GAAG,EAAsB,CAAC;QAC1C,8CAA8C;QACtC,mBAAc,GAAG,EAAgB,CAAC;QAgCxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC;QACjC,IAAI,CAAC,kBAAkB,GAAS,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAgC,6BAAoB,CAAC,SAAG,CAAC,IAAI,CAAC,EAAE,EAAE,E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,CAAC;QAE9C,wBAAwB;QACxB,GAAG,CAAC,QAAQ,GAAU,+BAAoB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IACH,wBAAC;AAAD,CAAC,AAvPD,IAuPC;AAvPY,8CAAiB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module transition\n */\n/** for typedoc */\nimport {\n IHookRegistry, TransitionOptions, TransitionHookScope, TransitionHookPhase, TransitionCreateHookFn, HookMatchCriteria,\n HookRegOptions, PathTypes, PathType, RegisteredHooks, TransitionHookFn, TransitionStateHookFn\n} from \"./interface\";\nimport { Transition } from \"./transition\";\nimport { makeEvent, RegisteredHook } from \"./hookRegistry\";\nimport { TargetState } from \"../state/targetState\";\nimport { PathNode } from \"../path/pathNode\";\nimport { ViewService } from \"../view/view\";\nimport { UIRouter } from \"../router\";\nimport { registerAddCoreResolvables } from \"../hooks/coreResolvables\";\nimport { registerRedirectToHook } from \"../hooks/redirectTo\";\nimport { registerOnExitHook, registerOnRetainHook, registerOnEnterHook } from \"../hooks/onEnterExitRetain\";\nimport { registerEagerResolvePath, registerLazyResolveState } from \"../hooks/resolve\";\nimport { registerLoadEnteringViews, registerActivateViews } from \"../hooks/views\";\nimport { registerUpdateGlobalState } from \"../hooks/updateGlobals\";\nimport { registerUpdateUrl } from \"../hooks/url\";\nimport { registerLazyLoadHook } from \"../hooks/lazyLoad\";\nimport { TransitionEventType } from \"./transitionEventType\";\nimport { TransitionHook, GetResultHandler, GetErrorHandler } from \"./transitionHook\";\nimport { isDefined } from \"../common/predicates\";\nimport { removeFrom, values, createProxyFunctions } from \"../common/common\";\nimport { Disposable } from \"../interface\"; // has or is using\nimport { val } from \"../common/hof\";\nimport { registerIgnoredTransitionHook } from '../hooks/ignoredTransition';\nimport { registerInvalidTransitionHook } from '../hooks/invalidTransition';\n\n/**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\nexport let defaultTransOpts: TransitionOptions = {\n location : true,\n relative : null,\n inherit : false,\n notify : true,\n reload : false,\n custom : {},\n current : () => null,\n source : \"unknown\"\n};\n\n\n/**\n * Plugin API for Transition Service\n * @internalapi\n */\nexport interface TransitionServicePluginAPI {\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n */\n _definePathType(name: string, hookScope: TransitionHookScope);\n\n /**\n * Gets a Path definition used as a criterion against a TreeChanges path\n */\n _getPathTypes(): PathTypes;\n\n /**\n * Defines a transition hook type and returns a transition hook registration\n * function (which can then be used to register hooks of this type).\n */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort?: boolean,\n getResultHandler?: GetResultHandler,\n getErrorHandler?: GetErrorHandler,\n rejectIfSuperseded?: boolean);\n\n /**\n * Returns the known event types, such as `onBefore`\n * If a phase argument is provided, returns only events for the given phase.\n */\n _getEvents(phase?: TransitionHookPhase): TransitionEventType[];\n\n /** Returns the hooks registered for the given hook name */\n getHooks(hookName: string): RegisteredHook[];\n}\n\n/**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n */\nexport class TransitionService implements IHookRegistry, Disposable {\n /** @hidden */\n _transitionCount = 0;\n\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internalapi\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n onCreate(criteria: HookMatchCriteria, callback: TransitionCreateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onBefore(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onStart(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onExit(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onRetain(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onEnter(criteria: HookMatchCriteria, callback: TransitionStateHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onFinish(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onSuccess(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n /** @inheritdoc */\n onError(criteria: HookMatchCriteria, callback: TransitionHookFn, options?: HookRegOptions): Function { return }\n\n /** @hidden */\n public $view: ViewService;\n\n /** @hidden The transition hook types, such as `onEnter`, `onStart`, etc */\n private _eventTypes: TransitionEventType[] = [];\n /** @hidden The registered transition hooks */\n _registeredHooks = { } as RegisteredHooks;\n /** @hidden The paths on a criteria object */\n private _criteriaPaths = { } as PathTypes;\n /** @hidden */\n private _router: UIRouter;\n\n /** @internalapi */\n _pluginapi: TransitionServicePluginAPI;\n\n /**\n * This object has hook de-registration functions for the built-in hooks.\n * This can be used by third parties libraries that wish to customize the behaviors\n *\n * @hidden\n */\n _deregisterHookFns: {\n addCoreResolves: Function;\n ignored: Function;\n invalid: Function;\n redirectTo: Function;\n onExit: Function;\n onRetain: Function;\n onEnter: Function;\n eagerResolve: Function;\n lazyResolve: Function;\n loadViews: Function;\n activateViews: Function;\n updateGlobals: Function;\n updateUrl: Function;\n lazyLoad: Function;\n };\n\n /** @hidden */\n constructor(_router: UIRouter) {\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]);\n\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n }\n\n /**\n * dispose\n * @internalapi\n */\n dispose(router: UIRouter) {\n values(this._registeredHooks).forEach((hooksArray: RegisteredHook[]) => hooksArray.forEach(hook => {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n }));\n }\n\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n create(fromPath: PathNode[], targetState: TargetState): Transition {\n return new Transition(fromPath, targetState, this._router);\n }\n\n /** @hidden */\n private _defineCoreEvents() {\n const Phase = TransitionHookPhase;\n const TH = TransitionHook;\n const paths = this._criteriaPaths;\n const NORMAL_SORT = false, REVERSE_SORT = true;\n const ASYNCHRONOUS = false, SYNCHRONOUS = true;\n\n this._defineEvent(\"onCreate\", Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n\n this._defineEvent(\"onBefore\", Phase.BEFORE, 0, paths.to);\n\n this._defineEvent(\"onStart\", Phase.RUN, 0, paths.to);\n this._defineEvent(\"onExit\", Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent(\"onRetain\", Phase.RUN, 200, paths.retained);\n this._defineEvent(\"onEnter\", Phase.RUN, 300, paths.entering);\n this._defineEvent(\"onFinish\", Phase.RUN, 400, paths.to);\n\n this._defineEvent(\"onSuccess\", Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent(\"onError\", Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n }\n\n /** @hidden */\n private _defineCorePaths() {\n const { STATE, TRANSITION } = TransitionHookScope;\n\n this._definePathType(\"to\", TRANSITION);\n this._definePathType(\"from\", TRANSITION);\n this._definePathType(\"exiting\", STATE);\n this._definePathType(\"retained\", STATE);\n this._definePathType(\"entering\", STATE);\n }\n\n /** @hidden */\n _defineEvent(name: string,\n hookPhase: TransitionHookPhase,\n hookOrder: number,\n criteriaMatchPath: PathType,\n reverseSort: boolean = false,\n getResultHandler: GetResultHandler = TransitionHook.HANDLE_RESULT,\n getErrorHandler: GetErrorHandler = TransitionHook.REJECT_ERROR,\n synchronous: boolean = false)\n {\n let eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n\n /** @hidden */\n private _getEvents(phase?: TransitionHookPhase): TransitionEventType[] {\n let transitionHookTypes = isDefined(phase) ?\n this._eventTypes.filter(type => type.hookPhase === phase) :\n this._eventTypes.slice();\n\n return transitionHookTypes.sort((l, r) => {\n let cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n })\n }\n\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @hidden\n */\n private _definePathType(name: string, hookScope: TransitionHookScope) {\n this._criteriaPaths[name] = { name, scope: hookScope };\n }\n\n /** * @hidden */\n private _getPathTypes(): PathTypes {\n return this._criteriaPaths;\n }\n\n /** @hidden */\n public getHooks(hookName: string): RegisteredHook[] {\n return this._registeredHooks[hookName];\n }\n\n /** @hidden */\n private _registerCoreTransitionHooks() {\n let fns = this._deregisterHookFns;\n\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n \n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n \n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.d.ts new file mode 100644 index 00000000..5806ad4d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.d.ts @@ -0,0 +1,10 @@ +/** + * @coreapi + * @module url + */ /** for typedoc */ +export * from "./interface"; +export * from "./urlMatcher"; +export * from "./urlMatcherFactory"; +export * from "./urlRouter"; +export * from "./urlRule"; +export * from "./urlService"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js new file mode 100644 index 00000000..4331c248 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js @@ -0,0 +1,11 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./urlMatcher")); +__export(require("./urlMatcherFactory")); +__export(require("./urlRouter")); +__export(require("./urlRule")); +__export(require("./urlService")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js.map new file mode 100644 index 00000000..28e849e3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/index.ts" + ], + "names": [], + "mappings": ";;;;;AAKA,kCAA6B;AAC7B,yCAAoC;AACpC,iCAA4B;AAC5B,+BAA0B;AAC1B,kCAA6B", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./urlMatcher\";\nexport * from \"./urlMatcherFactory\";\nexport * from \"./urlRouter\";\nexport * from \"./urlRule\";\nexport * from \"./urlService\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.d.ts new file mode 100644 index 00000000..1855aad3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.d.ts @@ -0,0 +1,513 @@ +/** + * # URL subsystem + * + * Contains code related to managing the URL + * + * The primary API is found in [[UrlService]], [[UrlService.config]], and [[UrlService.rules]]. + * + * @preferred + * @coreapi + * @module url + */ /** */ +import { LocationConfig } from "../common/coreservices"; +import { ParamType } from "../params/paramType"; +import { Param } from "../params/param"; +import { UIRouter } from "../router"; +import { TargetState } from "../state/targetState"; +import { TargetStateDef } from "../state/interface"; +import { UrlMatcher } from "./urlMatcher"; +import { StateObject } from "../state/stateObject"; +import { ParamTypeDefinition } from "../params/interface"; +/** @internalapi */ +export interface ParamFactory { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig(id: string, type: ParamType, config: any): Param; + /** Creates a new [[Param]] from a url PATH */ + fromPath(id: string, type: ParamType, config: any): Param; + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch(id: string, type: ParamType, config: any): Param; +} +/** + * An API to customize the URL behavior and retrieve URL configuration + * + * + * This API can customize the behavior of the URL. + * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]), + * and custom parameter encoding (custom [[type]]). + * + * It also has information about the location (url) configuration such as [[port]] and [[baseHref]]. + * This information can be used to build absolute URLs, such as + * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`; + * + * This API is found on [[UrlService.config]]. + */ +export interface UrlConfigApi extends LocationConfig, UrlMatcherConfig { +} +export interface UrlMatcherConfig { + /** + * Defines whether URL matching should be case sensitive (the default behavior), or not. + * + * #### Example: + * ```js + * // Allow case insensitive url matches + * urlService.config.caseInsensitive(true); + * ``` + * + * @param value `false` to match URL in a case sensitive manner; otherwise `true`; + * @returns the current value of caseInsensitive + */ + caseInsensitive(value?: boolean): boolean; + /** + * Defines whether URLs should match trailing slashes, or not (the default behavior). + * + * #### Example: + * ```js + * // Allow optional trailing slashes + * urlService.config.strictMode(false); + * ``` + * + * @param value `false` to match trailing slashes in URLs, otherwise `true`. + * @returns the current value of strictMode + */ + strictMode(value?: boolean): boolean; + /** + * Sets the default behavior when generating or matching URLs with default parameter values. + * + * #### Example: + * ```js + * // Remove default parameter values from the url + * urlService.config.defaultSquashPolicy(true); + * ``` + * + * @param value A string that defines the default parameter URL squashing behavior. + * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL + * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the + * parameter is surrounded by slashes, squash (remove) one slash from the URL + * - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) + * the parameter value from the URL and replace it with this string. + * @returns the current value of defaultSquashPolicy + */ + defaultSquashPolicy(value?: (boolean | string)): (boolean | string); + /** + * Creates and registers a custom [[ParamTypeDefinition]] object + * + * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding. + * + * #### Note: Register custom types *before using them* in a state definition. + * + * #### Example: + * ```js + * // Encode object parameter as JSON string + * urlService.config.type('myjson', { + * encode: (obj) => JSON.stringify(obj), + * decode: (str) => JSON.parse(str), + * is: (val) => typeof(val) === 'object', + * pattern: /[^/]+/, + * equals: (a, b) => _.isEqual(a, b), + * }); + * ``` + * + * @param name The type name. + * @param type The type definition. See [[ParamTypeDefinition]] for examples and information. + * + * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + */ + type(name: string, type?: ParamTypeDefinition): ParamType; +} +/** @internalapi */ +export interface UrlSyncApi { + /** + * Checks the URL for a matching [[UrlRule]] + * + * Checks the current URL for a matching url rule, then invokes that rule's handler. + * This method is called internally any time the URL has changed. + * + * This effectively activates the state which matches the current URL. + * + * #### Example: + * ```js + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * urlService.listen(); + * // Find the matching URL and invoke the handler. + * urlService.sync(); + * }); + * ``` + */ + sync(evt?: any): void; + /** + * Starts or stops listening for URL changes + * + * Call this sometime after calling [[deferIntercept]] to start monitoring the url. + * This causes [[UrlRouter]] to start listening for changes to the URL, if it wasn't already listening. + * + * If called with `false`, will stop listening. Call listen() again to start listening + * + * #### Example: + * ```js + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * // Start responding to URL changes + * urlService.listen(); + * urlService.sync(); + * }); + * ``` + */ + listen(enabled?: boolean): Function; + /** + * Disables monitoring of the URL. + * + * Call this method before UI-Router has bootstrapped. + * It will stop UI-Router from performing the initial url sync. + * + * This can be useful to perform some asynchronous initialization before the router starts. + * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. + * + * #### Example: + * ```js + * // Prevent $urlRouter from automatically intercepting URL changes when it starts; + * urlService.deferIntercept(); + * + * $http.get('/states.json').then(function(resp) { + * resp.data.forEach(state => $stateRegistry.register(state)); + * urlService.listen(); + * urlService.sync(); + * }); + * ``` + * + * @param defer Indicates whether to defer location change interception. + * Passing no parameter is equivalent to `true`. + */ + deferIntercept(defer?: boolean): any; +} +/** + * API for managing URL rules + * + * This API can be used to create and manage URL rules. + * URL rules are a mechanism to respond to specific URL patterns. + * + * The most commonly used methods are [[otherwise]] and [[when]]. + */ +export interface UrlRulesApi { + /** + * Defines URL Rule priorities + * + * More than one rule ([[UrlRule]]) might match a given URL. + * This `compareFn` is used to sort the rules by priority. + * Higher priority rules should sort earlier. + * + * The [[defaultRuleSortFn]] is used by default. + * + * You only need to call this function once. + * The `compareFn` will be used to sort the rules as each is registered. + * + * If called without any parameter, it will re-sort the rules. + * + * --- + * + * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]]. + * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]] + * The `$id` is is the order in which the rule was registered. + * + * The sort function should use these data, or data found on a specific type + * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired. + * + * #### Example: + * This compare function prioritizes rules by the order in which the rules were registered. + * A rule registered earlier has higher priority. + * + * ```js + * function compareFn(a, b) { + * return a.$id - b.$id; + * } + * ``` + * + * @param compareFn a function that compares to [[UrlRule]] objects. + * The `compareFn` should abide by the `Array.sort` compare function rules. + * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority. + * Return a positive number if `b` should be higher priority. + * Return `0` if the rules are identical. + * + * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description) + * for details. + */ + sort(compareFn?: (a: UrlRule, b: UrlRule) => number): any; + /** + * Registers a `matcher` and `handler` for custom URLs handling. + * + * The `matcher` can be: + * + * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]] + * - a `string`: The string is compiled to a [[UrlMatcher]] + * - a `RegExp`: The regexp is used to match the url. + * + * The `handler` can be: + * + * - a string: The url is redirected to the value of the string. + * - a function: The url is redirected to the return value of the function. + * + * --- + * + * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect + * string is interpolated with parameter values. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when("/foo/:param1", "/bar/:param1") + * ``` + * + * --- + * + * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is + * interpolated with capture groups from the RegExp. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when(new RegExp("^/foo/(.*)$"), "/bar/$1"); + * ``` + * + * --- + * + * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]). + * The "matched value" differs based on the `matcher`. + * For [[UrlMatcher]]s, it will be the matched state params. + * For `RegExp`, it will be the match array from `regexp.exec()`. + * + * If the handler returns a string, the URL is redirected to the string. + * + * #### Example: + * When the URL is `/foo/123` the rule will redirect to `/bar/123`. + * ```js + * .when(new RegExp("^/foo/(.*)$"), match => "/bar/" + match[1]); + * ``` + * + * Note: the `handler` may also invoke arbitrary code, such as `$state.go()` + * + * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`. + * @param handler The path to redirect to, or a function that returns the path. + * @param options `{ priority: number }` + * + * @return the registered [[UrlRule]] + */ + when(matcher: (RegExp | UrlMatcher | string), handler: string | UrlRuleHandlerFn, options?: { + priority: number; + }): UrlRule; + /** + * Defines the state, url, or behavior to use when no other rule matches the URL. + * + * This rule is matched when *no other rule* matches. + * It is generally used to handle unknown URLs (similar to "404" behavior, but on the client side). + * + * - If `handler` a string, it is treated as a url redirect + * + * #### Example: + * When no other url rule matches, redirect to `/index` + * ```js + * .otherwise('/index'); + * ``` + * + * - If `handler` is an object with a `state` property, the state is activated. + * + * #### Example: + * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value. + * ```js + * .otherwise({ state: 'home', params: { dashboard: 'default' } }); + * ``` + * + * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object. + * The function can perform actions, and/or return a value. + * + * #### Example: + * When no other url rule matches, manually trigger a transition to the `home` state + * ```js + * .otherwise((matchValue, urlParts, router) => { + * router.stateService.go('home'); + * }); + * ``` + * + * #### Example: + * When no other url rule matches, go to `home` state + * ```js + * .otherwise((matchValue, urlParts, router) => { + * return { state: 'home' }; + * }); + * ``` + * + * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic). + */ + otherwise(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** + * Defines the initial state, path, or behavior to use when the app starts. + * + * This rule defines the initial/starting state for the application. + * + * This rule is triggered the first time the URL is checked (when the app initially loads). + * The rule is triggered only when the url matches either `""` or `"/"`. + * + * Note: The rule is intended to be used when the root of the application is directly linked to. + * When the URL is *not* `""` or `"/"` and doesn't match other rules, the [[otherwise]] rule is triggered. + * This allows 404-like behavior when an unknown URL is deep-linked. + * + * #### Example: + * Start app at `home` state. + * ```js + * .initial({ state: 'home' }); + * ``` + * + * #### Example: + * Start app at `/home` (by url) + * ```js + * .initial('/home'); + * ``` + * + * #### Example: + * When no other url rule matches, go to `home` state + * ```js + * .initial((matchValue, url, router) => { + * console.log('initial state'); + * return { state: 'home' }; + * }) + * ``` + * + * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic). + */ + initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef, options?: { + priority: number; + }): void; + /** + * Gets all registered rules + * + * @returns an array of all the registered rules + */ + rules(): UrlRule[]; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * @return a function that deregisters the rule + */ + rule(rule: UrlRule): Function; + /** + * Remove a rule previously registered + * + * @param rule the matcher rule that was previously registered using [[rule]] + */ + removeRule(rule: UrlRule): void; +} +/** + * An object containing the three parts of a URL + */ +export interface UrlParts { + path: string; + search?: { + [key: string]: any; + }; + hash?: string; +} +/** + * A UrlRule match result + * + * The result of UrlRouter.match() + */ +export interface MatchResult { + /** The matched value from a [[UrlRule]] */ + match: any; + /** The rule that matched */ + rule: UrlRule; + /** The match result weight */ + weight: number; +} +/** + * A function that matches the URL for a [[UrlRule]] + * + * Implementations should match against the provided [[UrlParts]] and return the matched value (truthy) if the rule matches. + * If this rule is selected, the matched value is passed to the [[UrlRuleHandlerFn]]. + * + * @return the matched value, either truthy or falsey + */ +export interface UrlRuleMatchFn { + (url?: UrlParts, router?: UIRouter): any; +} +/** + * Handler invoked when a rule is matched + * + * The matched value from the rule's [[UrlRuleMatchFn]] is passed as the first argument + * The handler should return a string (to redirect), a [[TargetState]]/[[TargetStateDef]], or void + * + * If the handler returns a string, the url is replaced with the string. + * If the handler returns a [[TargetState]], the target state is activated. + */ +export interface UrlRuleHandlerFn { + (matchValue?: any, url?: UrlParts, router?: UIRouter): (string | TargetState | TargetStateDef | void); +} +/** @internalapi */ +export declare type UrlRuleType = "STATE" | "URLMATCHER" | "REGEXP" | "RAW" | "OTHER"; +/** + * The interface for a URL Rule + * + * If you are creating a rule for use with [[UrlRulesApi.rule]], it should implement this interface. + */ +export interface UrlRule { + /** + * The rule's ID. + * + * IDs are auto-assigned when the rule is registered, in increasing order. + */ + $id: number; + /** + * The rule's priority (defaults to 0). + * + * This can be used to explicitly modify the rule's priority. + * Higher numbers are higher priority. + */ + priority: number; + /** + * The priority of a given match. + * + * Sometimes more than one UrlRule might have matched. + * This method is used to choose the best match. + * + * If multiple rules matched, each rule's `matchPriority` is called with the value from [[match]]. + * The rule with the highest `matchPriority` has its [[handler]] called. + */ + matchPriority(match: any): number; + /** The type of the rule */ + type: UrlRuleType; + /** + * This function should match the url and return the match details + * + * See [[UrlRuleMatchFn]] for details + */ + match: UrlRuleMatchFn; + /** + * This function is called if the rule matched, and was selected as the "best match". + * This function handles the rule match event. + * + * See [[UrlRuleHandlerFn]] for details + */ + handler: UrlRuleHandlerFn; +} +/** @internalapi */ +export interface MatcherUrlRule extends UrlRule { + type: "URLMATCHER" | "STATE"; + urlMatcher: UrlMatcher; +} +/** @internalapi */ +export interface StateRule extends MatcherUrlRule { + type: "STATE"; + state: StateObject; +} +/** @internalapi */ +export interface RegExpRule extends UrlRule { + type: "REGEXP"; + regexp: RegExp; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js new file mode 100644 index 00000000..d549d1f1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js.map new file mode 100644 index 00000000..ce4e8631 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * # URL subsystem\n *\n * Contains code related to managing the URL\n *\n * The primary API is found in [[UrlService]], [[UrlService.config]], and [[UrlService.rules]].\n *\n * @preferred\n * @coreapi\n * @module url\n */ /** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { ParamType } from \"../params/paramType\";\nimport { Param } from \"../params/param\";\nimport { UIRouter } from \"../router\";\nimport { TargetState } from \"../state/targetState\";\nimport { TargetStateDef } from \"../state/interface\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { StateObject } from \"../state/stateObject\";\nimport { ParamTypeDefinition } from \"../params/interface\";\n\n/** @internalapi */\nexport interface ParamFactory {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig(id: string, type: ParamType, config: any): Param;\n /** Creates a new [[Param]] from a url PATH */\n fromPath(id: string, type: ParamType, config: any): Param;\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch(id: string, type: ParamType, config: any): Param;\n}\n\n/**\n * An API to customize the URL behavior and retrieve URL configuration\n *\n *\n * This API can customize the behavior of the URL.\n * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]),\n * and custom parameter encoding (custom [[type]]).\n *\n * It also has information about the location (url) configuration such as [[port]] and [[baseHref]].\n * This information can be used to build absolute URLs, such as\n * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;\n *\n * This API is found on [[UrlService.config]].\n */\nexport interface UrlConfigApi extends LocationConfig, UrlMatcherConfig {}\n\nexport interface UrlMatcherConfig {\n /**\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * #### Example:\n * ```js\n * // Allow case insensitive url matches\n * urlService.config.caseInsensitive(true);\n * ```\n *\n * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns the current value of caseInsensitive\n */\n caseInsensitive(value?: boolean): boolean;\n\n /**\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * #### Example:\n * ```js\n * // Allow optional trailing slashes\n * urlService.config.strictMode(false);\n * ```\n *\n * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns the current value of strictMode\n */\n strictMode(value?: boolean): boolean;\n\n /**\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * #### Example:\n * ```js\n * // Remove default parameter values from the url\n * urlService.config.defaultSquashPolicy(true);\n * ```\n *\n * @param value A string that defines the default parameter URL squashing behavior.\n * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n * @returns the current value of defaultSquashPolicy\n */\n defaultSquashPolicy(value?: (boolean|string)): (boolean|string);\n\n /**\n * Creates and registers a custom [[ParamTypeDefinition]] object\n *\n * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.\n *\n * #### Note: Register custom types *before using them* in a state definition.\n *\n * #### Example:\n * ```js\n * // Encode object parameter as JSON string\n * urlService.config.type('myjson', {\n * encode: (obj) => JSON.stringify(obj),\n * decode: (str) => JSON.parse(str),\n * is: (val) => typeof(val) === 'object',\n * pattern: /[^/]+/,\n * equals: (a, b) => _.isEqual(a, b),\n * });\n * ```\n *\n * @param name The type name.\n * @param type The type definition. See [[ParamTypeDefinition]] for examples and information.\n *\n * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n */\n type(name: string, type?: ParamTypeDefinition): ParamType;\n}\n\n/** @internalapi */\nexport interface UrlSyncApi {\n /**\n * Checks the URL for a matching [[UrlRule]]\n *\n * Checks the current URL for a matching url rule, then invokes that rule's handler.\n * This method is called internally any time the URL has changed.\n *\n * This effectively activates the state which matches the current URL.\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * // Find the matching URL and invoke the handler.\n * urlService.sync();\n * });\n * ```\n */\n sync(evt?): void;\n\n /**\n * Starts or stops listening for URL changes\n *\n * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n * This causes [[UrlRouter]] to start listening for changes to the URL, if it wasn't already listening.\n *\n * If called with `false`, will stop listening. Call listen() again to start listening\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * // Start responding to URL changes\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n */\n listen(enabled?: boolean): Function\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * // Prevent $urlRouter from automatically intercepting URL changes when it starts;\n * urlService.deferIntercept();\n *\n * $http.get('/states.json').then(function(resp) {\n * resp.data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean)\n}\n\n/**\n * API for managing URL rules\n *\n * This API can be used to create and manage URL rules.\n * URL rules are a mechanism to respond to specific URL patterns.\n *\n * The most commonly used methods are [[otherwise]] and [[when]].\n */\nexport interface UrlRulesApi {\n /**\n * Defines URL Rule priorities\n *\n * More than one rule ([[UrlRule]]) might match a given URL.\n * This `compareFn` is used to sort the rules by priority.\n * Higher priority rules should sort earlier.\n *\n * The [[defaultRuleSortFn]] is used by default.\n *\n * You only need to call this function once.\n * The `compareFn` will be used to sort the rules as each is registered.\n *\n * If called without any parameter, it will re-sort the rules.\n *\n * ---\n *\n * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]].\n * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]]\n * The `$id` is is the order in which the rule was registered.\n *\n * The sort function should use these data, or data found on a specific type\n * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired.\n *\n * #### Example:\n * This compare function prioritizes rules by the order in which the rules were registered.\n * A rule registered earlier has higher priority.\n *\n * ```js\n * function compareFn(a, b) {\n * return a.$id - b.$id;\n * }\n * ```\n *\n * @param compareFn a function that compares to [[UrlRule]] objects.\n * The `compareFn` should abide by the `Array.sort` compare function rules.\n * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority.\n * Return a positive number if `b` should be higher priority.\n * Return `0` if the rules are identical.\n *\n * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description)\n * for details.\n */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number);\n\n /**\n * Registers a `matcher` and `handler` for custom URLs handling.\n *\n * The `matcher` can be:\n *\n * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]]\n * - a `string`: The string is compiled to a [[UrlMatcher]]\n * - a `RegExp`: The regexp is used to match the url.\n *\n * The `handler` can be:\n *\n * - a string: The url is redirected to the value of the string.\n * - a function: The url is redirected to the return value of the function.\n *\n * ---\n *\n * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect\n * string is interpolated with parameter values.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(\"/foo/:param1\", \"/bar/:param1\")\n * ```\n *\n * ---\n *\n * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is\n * interpolated with capture groups from the RegExp.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), \"/bar/$1\");\n * ```\n *\n * ---\n *\n * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).\n * The \"matched value\" differs based on the `matcher`.\n * For [[UrlMatcher]]s, it will be the matched state params.\n * For `RegExp`, it will be the match array from `regexp.exec()`.\n *\n * If the handler returns a string, the URL is redirected to the string.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), match => \"/bar/\" + match[1]);\n * ```\n *\n * Note: the `handler` may also invoke arbitrary code, such as `$state.go()`\n *\n * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`.\n * @param handler The path to redirect to, or a function that returns the path.\n * @param options `{ priority: number }`\n *\n * @return the registered [[UrlRule]]\n */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule;\n\n /**\n * Defines the state, url, or behavior to use when no other rule matches the URL.\n *\n * This rule is matched when *no other rule* matches.\n * It is generally used to handle unknown URLs (similar to \"404\" behavior, but on the client side).\n *\n * - If `handler` a string, it is treated as a url redirect\n *\n * #### Example:\n * When no other url rule matches, redirect to `/index`\n * ```js\n * .otherwise('/index');\n * ```\n *\n * - If `handler` is an object with a `state` property, the state is activated.\n *\n * #### Example:\n * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.\n * ```js\n * .otherwise({ state: 'home', params: { dashboard: 'default' } });\n * ```\n *\n * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.\n * The function can perform actions, and/or return a value.\n *\n * #### Example:\n * When no other url rule matches, manually trigger a transition to the `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * router.stateService.go('home');\n * });\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * return { state: 'home' };\n * });\n * ```\n *\n * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).\n */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): void;\n\n /**\n * Defines the initial state, path, or behavior to use when the app starts.\n *\n * This rule defines the initial/starting state for the application.\n *\n * This rule is triggered the first time the URL is checked (when the app initially loads).\n * The rule is triggered only when the url matches either `\"\"` or `\"/\"`.\n *\n * Note: The rule is intended to be used when the root of the application is directly linked to.\n * When the URL is *not* `\"\"` or `\"/\"` and doesn't match other rules, the [[otherwise]] rule is triggered.\n * This allows 404-like behavior when an unknown URL is deep-linked.\n *\n * #### Example:\n * Start app at `home` state.\n * ```js\n * .initial({ state: 'home' });\n * ```\n *\n * #### Example:\n * Start app at `/home` (by url)\n * ```js\n * .initial('/home');\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .initial((matchValue, url, router) => {\n * console.log('initial state');\n * return { state: 'home' };\n * })\n * ```\n *\n * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).\n */\n initial(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef, options?: { priority: number }): void;\n\n /**\n * Gets all registered rules\n *\n * @returns an array of all the registered rules\n */\n rules(): UrlRule[];\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function;\n\n /**\n * Remove a rule previously registered\n *\n * @param rule the matcher rule that was previously registered using [[rule]]\n */\n removeRule(rule: UrlRule): void;\n}\n\n/**\n * An object containing the three parts of a URL\n */\nexport interface UrlParts {\n path: string;\n search?: { [key: string]: any };\n hash?: string;\n}\n\n/**\n * A UrlRule match result\n *\n * The result of UrlRouter.match()\n */\nexport interface MatchResult {\n /** The matched value from a [[UrlRule]] */\n match: any;\n /** The rule that matched */\n rule: UrlRule;\n /** The match result weight */\n weight: number;\n}\n/**\n * A function that matches the URL for a [[UrlRule]]\n *\n * Implementations should match against the provided [[UrlParts]] and return the matched value (truthy) if the rule matches.\n * If this rule is selected, the matched value is passed to the [[UrlRuleHandlerFn]].\n *\n * @return the matched value, either truthy or falsey\n */\nexport interface UrlRuleMatchFn {\n (url?: UrlParts, router?: UIRouter): any;\n}\n\n/**\n * Handler invoked when a rule is matched\n *\n * The matched value from the rule's [[UrlRuleMatchFn]] is passed as the first argument\n * The handler should return a string (to redirect), a [[TargetState]]/[[TargetStateDef]], or void\n *\n * If the handler returns a string, the url is replaced with the string.\n * If the handler returns a [[TargetState]], the target state is activated.\n */\nexport interface UrlRuleHandlerFn {\n (matchValue?: any, url?: UrlParts, router?: UIRouter): (string|TargetState|TargetStateDef|void);\n}\n\n/** @internalapi */\nexport type UrlRuleType = \"STATE\" | \"URLMATCHER\" | \"REGEXP\" | \"RAW\" | \"OTHER\";\n\n/**\n * The interface for a URL Rule\n *\n * If you are creating a rule for use with [[UrlRulesApi.rule]], it should implement this interface.\n */\nexport interface UrlRule {\n /**\n * The rule's ID.\n *\n * IDs are auto-assigned when the rule is registered, in increasing order.\n */\n $id: number;\n\n /**\n * The rule's priority (defaults to 0).\n *\n * This can be used to explicitly modify the rule's priority.\n * Higher numbers are higher priority.\n */\n priority: number;\n\n /**\n * The priority of a given match.\n *\n * Sometimes more than one UrlRule might have matched.\n * This method is used to choose the best match.\n *\n * If multiple rules matched, each rule's `matchPriority` is called with the value from [[match]].\n * The rule with the highest `matchPriority` has its [[handler]] called.\n */\n matchPriority(match: any): number;\n\n /** The type of the rule */\n type: UrlRuleType;\n\n /**\n * This function should match the url and return the match details\n *\n * See [[UrlRuleMatchFn]] for details\n */\n match: UrlRuleMatchFn;\n\n /**\n * This function is called if the rule matched, and was selected as the \"best match\".\n * This function handles the rule match event.\n *\n * See [[UrlRuleHandlerFn]] for details\n */\n handler: UrlRuleHandlerFn;\n}\n\n/** @internalapi */\nexport interface MatcherUrlRule extends UrlRule {\n type: \"URLMATCHER\"|\"STATE\";\n urlMatcher: UrlMatcher;\n}\n\n/** @internalapi */\nexport interface StateRule extends MatcherUrlRule {\n type: \"STATE\";\n state: StateObject;\n}\n\n/** @internalapi */\nexport interface RegExpRule extends UrlRule {\n type: \"REGEXP\";\n regexp: RegExp;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.d.ts new file mode 100644 index 00000000..410d9d02 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.d.ts @@ -0,0 +1,178 @@ +import { Param } from "../params/param"; +import { ParamTypes } from "../params/paramTypes"; +import { RawParams } from "../params/interface"; +import { ParamFactory } from "./interface"; +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +export declare class UrlMatcher { + config: any; + /** @hidden */ + static nameValidator: RegExp; + /** @hidden */ + private _cache; + /** @hidden */ + private _children; + /** @hidden */ + private _params; + /** @hidden */ + private _segments; + /** @hidden */ + private _compiled; + /** The pattern that was passed into the constructor */ + pattern: string; + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, config?: any); + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + append(url: UrlMatcher): UrlMatcher; + /** @hidden */ + isRoot(): boolean; + /** Returns the input pattern string */ + toString(): string; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + exec(path: string, search?: any, hash?: string, options?: any): RawParams; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + parameters(opts?: any): Param[]; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + parameter(id: string, opts?: any): Param; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + validates(params: RawParams): boolean; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + format(values?: RawParams): string; + /** @hidden */ + static encodeDashes(str: string): string; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + static pathSegmentsAndParams(matcher: UrlMatcher): any; + /** @hidden Given a matcher, return an array with the matcher's query params */ + static queryParams(matcher: UrlMatcher): Param[]; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + static compare(a: UrlMatcher, b: UrlMatcher): number; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js new file mode 100644 index 00000000..b21283d8 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js @@ -0,0 +1,515 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module url + */ +/** for typedoc */ +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var predicates_1 = require("../common/predicates"); +var param_1 = require("../params/param"); +var strings_1 = require("../common/strings"); +/** @hidden */ +function quoteRegExp(string, param) { + var surroundPattern = ['', ''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!param) + return result; + switch (param.squash) { + case false: + surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; + break; + case true: + result = result.replace(/\/$/, ''); + surroundPattern = ['(?:\/(', ')|\/)?']; + break; + default: + surroundPattern = ["(" + param.squash + "|", ')?']; + break; + } + return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1]; +} +/** @hidden */ +var memoizeTo = function (obj, prop, fn) { + return obj[prop] = obj[prop] || fn(); +}; +/** @hidden */ +var splitOnSlash = strings_1.splitOnDelim('/'); +/** + * Matches URLs against patterns. + * + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. + * + * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) + * parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by [[UrlMatcher.exec]]. + * + * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) + * or colon placeholders (`/somePath/:param`). + * + * - *A parameter RegExp* may be defined for a param after a colon + * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. + * The regexp must match for the url to be matched. + * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. + * + * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. + * See [[UrlMatcherFactory.type]] for more information. + * + * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). + * A catch-all * parameter value will contain the remainder of the URL. + * + * --- + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). + * A path parameter matches any number of characters other than '/'. For catch-all + * placeholders the path parameter matches any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start + * + */ +var UrlMatcher = /** @class */ (function () { + /** + * @param pattern The pattern to compile into a matcher. + * @param paramTypes The [[ParamTypes]] registry + * @param config A configuration object + * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + */ + function UrlMatcher(pattern, paramTypes, paramFactory, config) { + var _this = this; + this.config = config; + /** @hidden */ + this._cache = { path: [this] }; + /** @hidden */ + this._children = []; + /** @hidden */ + this._params = []; + /** @hidden */ + this._segments = []; + /** @hidden */ + this._compiled = []; + this.pattern = pattern; + this.config = common_1.defaults(this.config, { + params: {}, + strict: true, + caseInsensitive: false, + paramMap: common_1.identity + }); + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, last = 0, m, patterns = []; + var checkParamErrors = function (id) { + if (!UrlMatcher.nameValidator.test(id)) + throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); + if (common_1.find(_this._params, hof_1.propEq('id', id))) + throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); + }; + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + var matchDetails = function (m, isSearch) { + // IE[78] returns '' for unmatched groups instead of null + var id = m[2] || m[3]; + var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\s\\S]*' : null); + var makeRegexpType = function (regexp) { return common_1.inherit(paramTypes.type(isSearch ? "query" : "path"), { + pattern: new RegExp(regexp, _this.config.caseInsensitive ? 'i' : undefined) + }); }; + return { + id: id, + regexp: regexp, + cfg: _this.config.params[id], + segment: pattern.substring(last, m.index), + type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp) + }; + }; + var p, segment; + while ((m = placeholder.exec(pattern))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) + break; // we're into the search part + checkParamErrors(p.id); + this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false))); + this._segments.push(p.segment); + patterns.push([p.segment, common_1.tail(this._params)]); + last = placeholder.lastIndex; + } + segment = pattern.substring(last); + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + if (i >= 0) { + var search = segment.substring(i); + segment = segment.substring(0, i); + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + checkParamErrors(p.id); + this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true))); + last = placeholder.lastIndex; + // check if ?& + } + } + } + this._segments.push(segment); + this._compiled = patterns.map(function (pattern) { return quoteRegExp.apply(null, pattern); }).concat(quoteRegExp(segment)); + } + /** + * Creates a new concatenated UrlMatcher + * + * Builds a new UrlMatcher by appending another UrlMatcher to this one. + * + * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. + */ + UrlMatcher.prototype.append = function (url) { + this._children.push(url); + url._cache = { + path: this._cache.path.concat(url), + parent: this, + pattern: null, + }; + return url; + }; + /** @hidden */ + UrlMatcher.prototype.isRoot = function () { + return this._cache.path[0] === this; + }; + /** Returns the input pattern string */ + UrlMatcher.prototype.toString = function () { + return this.pattern; + }; + /** + * Tests the specified url/path against this matcher. + * + * Tests if the given url matches this matcher's pattern, and returns an object containing the captured + * parameter values. Returns null if the path does not match. + * + * The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `search`. This means that search parameters are always treated + * as optional. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { + * x: '1', q: 'hello' + * }); + * // returns { id: 'bob', q: 'hello', r: null } + * ``` + * + * @param path The URL path to match, e.g. `$location.path()`. + * @param search URL search parameters, e.g. `$location.search()`. + * @param hash URL hash e.g. `$location.hash()`. + * @param options + * + * @returns The captured parameter values. + */ + UrlMatcher.prototype.exec = function (path, search, hash, options) { + var _this = this; + if (search === void 0) { search = {}; } + if (options === void 0) { options = {}; } + var match = memoizeTo(this._cache, 'pattern', function () { + return new RegExp([ + '^', + common_1.unnest(_this._cache.path.map(hof_1.prop('_compiled'))).join(''), + _this.config.strict === false ? '\/?' : '', + '$' + ].join(''), _this.config.caseInsensitive ? 'i' : undefined); + }).exec(path); + if (!match) + return null; + //options = defaults(options, { isolate: false }); + var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {}; + if (nPathSegments !== match.length - 1) + throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); + function decodePathArray(string) { + var reverseString = function (str) { return str.split("").reverse().join(""); }; + var unquoteDashes = function (str) { return str.replace(/\\-/g, "-"); }; + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = common_1.map(split, reverseString); + return common_1.map(allReversed, unquoteDashes).reverse(); + } + for (var i = 0; i < nPathSegments; i++) { + var param = pathParams[i]; + var value = match[i + 1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (value && param.array === true) + value = decodePathArray(value); + if (predicates_1.isDefined(value)) + value = param.type.decode(value); + values[param.id] = param.value(value); + } + searchParams.forEach(function (param) { + var value = search[param.id]; + for (var j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === value) + value = param.replace[j].to; + } + if (predicates_1.isDefined(value)) + value = param.type.decode(value); + values[param.id] = param.value(value); + }); + if (hash) + values["#"] = hash; + return values; + }; + /** + * @hidden + * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. + * + * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ + UrlMatcher.prototype.parameters = function (opts) { + if (opts === void 0) { opts = {}; } + if (opts.inherit === false) + return this._params; + return common_1.unnest(this._cache.path.map(function (matcher) { return matcher._params; })); + }; + /** + * @hidden + * Returns a single parameter from this UrlMatcher by id + * + * @param id + * @param opts + * @returns {T|Param|any|boolean|UrlMatcher|null} + */ + UrlMatcher.prototype.parameter = function (id, opts) { + var _this = this; + if (opts === void 0) { opts = {}; } + var findParam = function () { + for (var _i = 0, _a = _this._params; _i < _a.length; _i++) { + var param = _a[_i]; + if (param.id === id) + return param; + } + }; + var parent = this._cache.parent; + return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null; + }; + /** + * Validates the input parameter values against this UrlMatcher + * + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param params The object hash of parameters to validate. + * @returns Returns `true` if `params` validates, otherwise `false`. + */ + UrlMatcher.prototype.validates = function (params) { + var validParamVal = function (param, val) { + return !param || param.validates(val); + }; + params = params || {}; + // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher + var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); }); + return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(common_1.allTrueR, true); + }; + /** + * Given a set of parameter values, creates a URL from this UrlMatcher. + * + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. + * + * #### Example: + * ```js + * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); + * // returns '/user/bob?q=yes' + * ``` + * + * @param values the values to substitute for the parameters in this pattern. + * @returns the formatted URL (path and optionally search part). + */ + UrlMatcher.prototype.format = function (values) { + if (values === void 0) { values = {}; } + // Build the full path of UrlMatchers (including all parent UrlMatchers) + var urlMatchers = this._cache.path; + // Extract all the static segments and Params (processed as ParamDetails) + // into an ordered array + var pathSegmentsAndParams = urlMatchers.map(UrlMatcher.pathSegmentsAndParams) + .reduce(common_1.unnestR, []) + .map(function (x) { return predicates_1.isString(x) ? x : getDetails(x); }); + // Extract the query params into a separate array + var queryParams = urlMatchers.map(UrlMatcher.queryParams) + .reduce(common_1.unnestR, []) + .map(getDetails); + var isInvalid = function (param) { return param.isValid === false; }; + if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) { + return null; + } + /** + * Given a Param, applies the parameter value, then returns detailed information about it + */ + function getDetails(param) { + // Normalize to typed value + var value = param.value(values[param.id]); + var isValid = param.validates(value); + var isDefaultValue = param.isDefaultValue(value); + // Check if we're in squash mode for the parameter + var squash = isDefaultValue ? param.squash : false; + // Allow the Parameter's Type to encode the value + var encoded = param.type.encode(value); + return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded }; + } + // Build up the path-portion from the list of static segments and parameters + var pathString = pathSegmentsAndParams.reduce(function (acc, x) { + // The element is a static segment (a raw string); just append it + if (predicates_1.isString(x)) + return acc + x; + // Otherwise, it's a ParamDetails. + var squash = x.squash, encoded = x.encoded, param = x.param; + // If squash is === true, try to remove a slash from the path + if (squash === true) + return (acc.match(/\/$/)) ? acc.slice(0, -1) : acc; + // If squash is a string, use the string for the param value + if (predicates_1.isString(squash)) + return acc + squash; + if (squash !== false) + return acc; // ? + if (encoded == null) + return acc; + // If this parameter value is an array, encode the value using encodeDashes + if (predicates_1.isArray(encoded)) + return acc + common_1.map(encoded, UrlMatcher.encodeDashes).join("-"); + // If the parameter type is "raw", then do not encodeURIComponent + if (param.raw) + return acc + encoded; + // Encode the value + return acc + encodeURIComponent(encoded); + }, ""); + // Build the query string by applying parameter values (array or regular) + // then mapping to key=value, then flattening and joining using "&" + var queryString = queryParams.map(function (paramDetails) { + var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue; + if (encoded == null || (isDefaultValue && squash !== false)) + return; + if (!predicates_1.isArray(encoded)) + encoded = [encoded]; + if (encoded.length === 0) + return; + if (!param.raw) + encoded = common_1.map(encoded, encodeURIComponent); + return encoded.map(function (val) { return param.id + "=" + val; }); + }).filter(common_1.identity).reduce(common_1.unnestR, []).join("&"); + // Concat the pathstring with the queryString (if exists) and the hashString (if exists) + return pathString + (queryString ? "?" + queryString : "") + (values["#"] ? "#" + values["#"] : ""); + }; + /** @hidden */ + UrlMatcher.encodeDashes = function (str) { + return encodeURIComponent(str).replace(/-/g, function (c) { return "%5C%" + c.charCodeAt(0).toString(16).toUpperCase(); }); + }; + /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */ + UrlMatcher.pathSegmentsAndParams = function (matcher) { + var staticSegments = matcher._segments; + var pathParams = matcher._params.filter(function (p) { return p.location === param_1.DefType.PATH; }); + return common_1.arrayTuples(staticSegments, pathParams.concat(undefined)) + .reduce(common_1.unnestR, []) + .filter(function (x) { return x !== "" && predicates_1.isDefined(x); }); + }; + /** @hidden Given a matcher, return an array with the matcher's query params */ + UrlMatcher.queryParams = function (matcher) { + return matcher._params.filter(function (p) { return p.location === param_1.DefType.SEARCH; }); + }; + /** + * Compare two UrlMatchers + * + * This comparison function converts a UrlMatcher into static and dynamic path segments. + * Each static path segment is a static string between a path separator (slash character). + * Each dynamic segment is a path parameter. + * + * The comparison function sorts static segments before dynamic ones. + */ + UrlMatcher.compare = function (a, b) { + /** + * Turn a UrlMatcher and all its parent matchers into an array + * of slash literals '/', string literals, and Param objects + * + * This example matcher matches strings like "/foo/:param/tail": + * var matcher = $umf.compile("/foo").append($umf.compile("/:param")).append($umf.compile("/")).append($umf.compile("tail")); + * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ] + * + * Caches the result as `matcher._cache.segments` + */ + var segments = function (matcher) { + return matcher._cache.segments = matcher._cache.segments || + matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams) + .reduce(common_1.unnestR, []) + .reduce(strings_1.joinNeighborsR, []) + .map(function (x) { return predicates_1.isString(x) ? splitOnSlash(x) : x; }) + .reduce(common_1.unnestR, []); + }; + /** + * Gets the sort weight for each segment of a UrlMatcher + * + * Caches the result as `matcher._cache.weights` + */ + var weights = function (matcher) { + return matcher._cache.weights = matcher._cache.weights || + segments(matcher).map(function (segment) { + // Sort slashes first, then static strings, the Params + if (segment === '/') + return 1; + if (predicates_1.isString(segment)) + return 2; + if (segment instanceof param_1.Param) + return 3; + }); + }; + /** + * Pads shorter array in-place (mutates) + */ + var padArrays = function (l, r, padVal) { + var len = Math.max(l.length, r.length); + while (l.length < len) + l.push(padVal); + while (r.length < len) + r.push(padVal); + }; + var weightsA = weights(a), weightsB = weights(b); + padArrays(weightsA, weightsB, 0); + var cmp, i, pairs = common_1.arrayTuples(weightsA, weightsB); + for (i = 0; i < pairs.length; i++) { + cmp = pairs[i][0] - pairs[i][1]; + if (cmp !== 0) + return cmp; + } + return 0; + }; + /** @hidden */ + UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/; + return UrlMatcher; +}()); +exports.UrlMatcher = UrlMatcher; +//# sourceMappingURL=urlMatcher.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js.map new file mode 100644 index 00000000..6cfcf8a3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcher.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlMatcher.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlMatcher.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,kBAAkB;AAClB,2CAE0B;AAC1B,qCAA6C;AAC7C,mDAAoE;AACpE,yCAAiD;AAIjD,6CAAiE;AAEjE,cAAc;AACd,qBAAqB,MAAW,EAAE,KAAW;IAC3C,IAAI,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IACzF,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAAC,MAAM,CAAC,MAAM,CAAC;IAE1B,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QACrB,KAAK,KAAK;YACR,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAA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MAAM,CAAC,CAAC;YACtC,OAAO,CAAC,CAAC,MAAM,GAAG,GAAG;gBAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC;QAEF,IAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACjC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,GAAG,oBAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEpD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;gBAAC,MAAM,CAAC,GAAG,CAAC;QAC5B,CAAC;QAED,MAAM,CAAC,CAAC,CAAC;IACX,CAAC;IA5bD,cAAc;IACP,wBAAa,GAAW,2BAA2B,CAAC;IA4b7D,iBAAC;CAAA,AA9bD,IA8bC;AA9bY,gCAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */\n/** for typedoc */\nimport {\n map, defaults, inherit, identity, unnest, tail, find, Obj, pairs, allTrueR, unnestR, arrayTuples\n} from \"../common/common\";\nimport { prop, propEq } from \"../common/hof\";\nimport { isArray, isString, isDefined } from \"../common/predicates\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { RawParams } from \"../params/interface\";\nimport { ParamFactory } from \"./interface\";\nimport { joinNeighborsR, splitOnDelim } from \"../common/strings\";\n\n/** @hidden */\nfunction quoteRegExp(string: any, param?: any) {\n let surroundPattern = ['', ''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n if (!param) return result;\n\n switch (param.squash) {\n case false:\n surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; break;\n case true:\n result = result.replace(/\\/$/, '');\n surroundPattern = ['(?:\\/(', ')|\\/)?'];\n break;\n default:\n surroundPattern = [`(${param.squash}|`, ')?']; break;\n }\n return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1];\n}\n\n/** @hidden */\nconst memoizeTo = (obj: Obj, prop: string, fn: Function) =>\n obj[prop] = obj[prop] || fn();\n\n/** @hidden */\nconst splitOnSlash = splitOnDelim('/');\n\n/** @hidden */\ninterface UrlMatcherCache {\n segments?: any[];\n weights?: number[];\n path?: UrlMatcher[];\n parent?: UrlMatcher;\n pattern?: RegExp;\n}\n\n/**\n * Matches URLs against patterns.\n *\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL.\n *\n * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query)\n * parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by [[UrlMatcher.exec]].\n *\n * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`)\n * or colon placeholders (`/somePath/:param`).\n *\n * - *A parameter RegExp* may be defined for a param after a colon\n * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.\n * The regexp must match for the url to be matched.\n * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]].\n *\n * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters.\n * See [[UrlMatcherFactory.type]] for more information.\n *\n * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`).\n * A catch-all * parameter value will contain the remainder of the URL.\n *\n * ---\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters).\n * A path parameter matches any number of characters other than '/'. For catch-all\n * placeholders the path parameter matches any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n * trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n * parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n * path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n */\nexport class UrlMatcher {\n /** @hidden */\n static nameValidator: RegExp = /^\\w+([-.]+\\w+)*(?:\\[\\])?$/;\n\n /** @hidden */\n private _cache: UrlMatcherCache = { path: [this] };\n /** @hidden */\n private _children: UrlMatcher[] = [];\n /** @hidden */\n private _params: Param[] = [];\n /** @hidden */\n private _segments: string[] = [];\n /** @hidden */\n private _compiled: string[] = [];\n\n /** The pattern that was passed into the constructor */\n public pattern: string;\n\n /**\n * @param pattern The pattern to compile into a matcher.\n * @param paramTypes The [[ParamTypes]] registry\n * @param config A configuration object\n * - `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * - `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n */\n constructor(pattern: string, paramTypes: ParamTypes, paramFactory: ParamFactory, public config?: any) {\n this.pattern = pattern;\n this.config = defaults(this.config, {\n params: {},\n strict: true,\n caseInsensitive: false,\n paramMap: identity\n });\n\n // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n // '*' name\n // ':' name\n // '{' name '}'\n // '{' name ':' regexp '}'\n // The regular expression is somewhat complicated due to the need to allow curly braces\n // inside the regular expression. The placeholder regexp breaks down as follows:\n // ([:*])([\\w\\[\\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case)\n // \\{([\\w\\[\\]]+)(?:\\:\\s*( ... ))?\\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either\n // [^{}\\\\]+ - anything other than curly braces or backslash\n // \\\\. - a backslash escape\n // \\{(?:[^{}\\\\]+|\\\\.)*\\} - a matched set of curly braces containing other atoms\n let placeholder = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n searchPlaceholder = /([:]?)([\\w\\[\\].-]+)|\\{([\\w\\[\\].-]+)(?:\\:\\s*((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n last = 0, m: RegExpExecArray, patterns: any[][] = [];\n\n const checkParamErrors = (id: string) => {\n if (!UrlMatcher.nameValidator.test(id)) throw new Error(`Invalid parameter name '${id}' in pattern '${pattern}'`);\n if (find(this._params, propEq('id', id))) throw new Error(`Duplicate parameter name '${id}' in pattern '${pattern}'`);\n };\n\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n const matchDetails = (m: RegExpExecArray, isSearch: boolean) => {\n // IE[78] returns '' for unmatched groups instead of null\n let id = m[2] || m[3];\n let regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\\\s\\\\S]*' : null);\n\n const makeRegexpType = (regexp) => inherit(paramTypes.type(isSearch ? \"query\" : \"path\"), {\n pattern: new RegExp(regexp, this.config.caseInsensitive ? 'i' : undefined)\n });\n\n return {\n id,\n regexp,\n cfg: this.config.params[id],\n segment: pattern.substring(last, m.index),\n type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp)\n };\n };\n\n let p: any, segment: string;\n\n while ((m = placeholder.exec(pattern))) {\n p = matchDetails(m, false);\n if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromPath(p.id, p.type, this.config.paramMap(p.cfg, false)));\n this._segments.push(p.segment);\n patterns.push([p.segment, tail(this._params)]);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n\n // Find any search parameter names and remove them from the last segment\n let i = segment.indexOf('?');\n\n if (i >= 0) {\n let search = segment.substring(i);\n segment = segment.substring(0, i);\n\n if (search.length > 0) {\n last = 0;\n\n while ((m = searchPlaceholder.exec(search))) {\n p = matchDetails(m, true);\n checkParamErrors(p.id);\n this._params.push(paramFactory.fromSearch(p.id, p.type, this.config.paramMap(p.cfg, true)));\n last = placeholder.lastIndex;\n // check if ?&\n }\n }\n }\n\n this._segments.push(segment);\n this._compiled = patterns.map(pattern => quoteRegExp.apply(null, pattern)).concat(quoteRegExp(segment));\n }\n\n /**\n * Creates a new concatenated UrlMatcher\n *\n * Builds a new UrlMatcher by appending another UrlMatcher to this one.\n *\n * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`.\n */\n append(url: UrlMatcher): UrlMatcher {\n this._children.push(url);\n url._cache = {\n path: this._cache.path.concat(url),\n parent: this,\n pattern: null,\n };\n return url;\n }\n\n /** @hidden */\n isRoot(): boolean {\n return this._cache.path[0] === this;\n }\n\n /** Returns the input pattern string */\n toString(): string {\n return this.pattern;\n }\n\n /**\n * Tests the specified url/path against this matcher.\n *\n * Tests if the given url matches this matcher's pattern, and returns an object containing the captured\n * parameter values. Returns null if the path does not match.\n *\n * The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `search`. This means that search parameters are always treated\n * as optional.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n * x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * ```\n *\n * @param path The URL path to match, e.g. `$location.path()`.\n * @param search URL search parameters, e.g. `$location.search()`.\n * @param hash URL hash e.g. `$location.hash()`.\n * @param options\n *\n * @returns The captured parameter values.\n */\n exec(path: string, search: any = {}, hash?: string, options: any = {}): RawParams {\n let match = memoizeTo(this._cache, 'pattern', () => {\n return new RegExp([\n '^',\n unnest(this._cache.path.map(prop('_compiled'))).join(''),\n this.config.strict === false ? '\\/?' : '',\n '$'\n ].join(''), this.config.caseInsensitive ? 'i' : undefined);\n }).exec(path);\n\n if (!match) return null;\n\n //options = defaults(options, { isolate: false });\n\n let allParams: Param[] = this.parameters(),\n pathParams: Param[] = allParams.filter(param => !param.isSearch()),\n searchParams: Param[] = allParams.filter(param => param.isSearch()),\n nPathSegments = this._cache.path.map(urlm => urlm._segments.length - 1).reduce((a, x) => a + x),\n values: RawParams = {};\n\n if (nPathSegments !== match.length - 1)\n throw new Error(`Unbalanced capture group in route '${this.pattern}'`);\n\n function decodePathArray(string: string) {\n const reverseString = (str: string) => str.split(\"\").reverse().join(\"\");\n const unquoteDashes = (str: string) => str.replace(/\\\\-/g, \"-\");\n\n let split = reverseString(string).split(/-(?!\\\\)/);\n let allReversed = map(split, reverseString);\n return map(allReversed, unquoteDashes).reverse();\n }\n\n for (let i = 0; i < nPathSegments; i++) {\n let param: Param = pathParams[i];\n let value: (any|any[]) = match[i + 1];\n\n // if the param value matches a pre-replace pair, replace the value before decoding.\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (value && param.array === true) value = decodePathArray(value);\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n }\n searchParams.forEach(param => {\n let value = search[param.id];\n for (let j = 0; j < param.replace.length; j++) {\n if (param.replace[j].from === value) value = param.replace[j].to;\n }\n if (isDefined(value)) value = param.type.decode(value);\n values[param.id] = param.value(value);\n });\n\n if (hash) values[\"#\"] = hash;\n\n return values;\n }\n\n /**\n * @hidden\n * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance.\n *\n * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the\n * pattern has no parameters, an empty array is returned.\n */\n parameters(opts: any = {}): Param[] {\n if (opts.inherit === false) return this._params;\n return unnest(this._cache.path.map(matcher => matcher._params));\n }\n\n /**\n * @hidden\n * Returns a single parameter from this UrlMatcher by id\n *\n * @param id\n * @param opts\n * @returns {T|Param|any|boolean|UrlMatcher|null}\n */\n parameter(id: string, opts: any = {}): Param {\n const findParam = () => {\n for (let param of this._params) {\n if (param.id === id) return param;\n }\n };\n\n let parent = this._cache.parent;\n return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null;\n }\n\n /**\n * Validates the input parameter values against this UrlMatcher\n *\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param params The object hash of parameters to validate.\n * @returns Returns `true` if `params` validates, otherwise `false`.\n */\n validates(params: RawParams): boolean {\n const validParamVal = (param: Param, val: any) =>\n !param || param.validates(val);\n\n params = params || {};\n\n // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher\n let paramSchema = this.parameters().filter(paramDef => params.hasOwnProperty(paramDef.id));\n return paramSchema.map(paramDef => validParamVal(paramDef, params[paramDef.id])).reduce(allTrueR, true);\n }\n\n /**\n * Given a set of parameter values, creates a URL from this UrlMatcher.\n *\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters.\n *\n * #### Example:\n * ```js\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * ```\n *\n * @param values the values to substitute for the parameters in this pattern.\n * @returns the formatted URL (path and optionally search part).\n */\n format(values: RawParams = {}) {\n // Build the full path of UrlMatchers (including all parent UrlMatchers)\n let urlMatchers = this._cache.path;\n\n // Extract all the static segments and Params (processed as ParamDetails)\n // into an ordered array\n let pathSegmentsAndParams: Array = urlMatchers.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .map(x => isString(x) ? x : getDetails(x));\n\n // Extract the query params into a separate array\n let queryParams: Array = urlMatchers.map(UrlMatcher.queryParams)\n .reduce(unnestR, [])\n .map(getDetails);\n\n const isInvalid = (param: ParamDetails) => param.isValid === false;\n if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) {\n return null;\n }\n\n /**\n * Given a Param, applies the parameter value, then returns detailed information about it\n */\n function getDetails(param: Param): ParamDetails {\n // Normalize to typed value\n let value = param.value(values[param.id]);\n let isValid = param.validates(value);\n let isDefaultValue = param.isDefaultValue(value);\n // Check if we're in squash mode for the parameter\n let squash = isDefaultValue ? param.squash : false;\n // Allow the Parameter's Type to encode the value\n let encoded = param.type.encode(value);\n\n return { param, value, isValid, isDefaultValue, squash, encoded };\n }\n\n // Build up the path-portion from the list of static segments and parameters\n let pathString = pathSegmentsAndParams.reduce((acc: string, x: string|ParamDetails) => {\n // The element is a static segment (a raw string); just append it\n if (isString(x)) return acc + x;\n\n // Otherwise, it's a ParamDetails.\n let { squash, encoded, param } = x;\n\n // If squash is === true, try to remove a slash from the path\n if (squash === true) return (acc.match(/\\/$/)) ? acc.slice(0, -1) : acc;\n // If squash is a string, use the string for the param value\n if (isString(squash)) return acc + squash;\n if (squash !== false) return acc; // ?\n if (encoded == null) return acc;\n // If this parameter value is an array, encode the value using encodeDashes\n if (isArray(encoded)) return acc + map( encoded, UrlMatcher.encodeDashes).join(\"-\");\n // If the parameter type is \"raw\", then do not encodeURIComponent\n if (param.raw) return acc + encoded;\n // Encode the value\n return acc + encodeURIComponent( encoded);\n }, \"\");\n\n // Build the query string by applying parameter values (array or regular)\n // then mapping to key=value, then flattening and joining using \"&\"\n let queryString = queryParams.map((paramDetails: ParamDetails) => {\n let { param, squash, encoded, isDefaultValue } = paramDetails;\n if (encoded == null || (isDefaultValue && squash !== false)) return;\n if (!isArray(encoded)) encoded = [ encoded];\n if (encoded.length === 0) return;\n if (!param.raw) encoded = map( encoded, encodeURIComponent);\n\n return ( encoded).map(val => `${param.id}=${val}`);\n }).filter(identity).reduce(unnestR, []).join(\"&\");\n\n // Concat the pathstring with the queryString (if exists) and the hashString (if exists)\n return pathString + (queryString ? `?${queryString}` : \"\") + (values[\"#\"] ? \"#\" + values[\"#\"] : \"\");\n }\n\n /** @hidden */\n static encodeDashes(str: string) { // Replace dashes with encoded \"\\-\"\n return encodeURIComponent(str).replace(/-/g, c => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n }\n\n /** @hidden Given a matcher, return an array with the matcher's path segments and path params, in order */\n static pathSegmentsAndParams(matcher: UrlMatcher) {\n let staticSegments = matcher._segments;\n let pathParams = matcher._params.filter(p => p.location === DefType.PATH);\n return arrayTuples(staticSegments, pathParams.concat(undefined))\n .reduce(unnestR, [])\n .filter(x => x !== \"\" && isDefined(x));\n }\n\n /** @hidden Given a matcher, return an array with the matcher's query params */\n static queryParams(matcher: UrlMatcher): Param[] {\n return matcher._params.filter(p => p.location === DefType.SEARCH);\n }\n\n /**\n * Compare two UrlMatchers\n *\n * This comparison function converts a UrlMatcher into static and dynamic path segments.\n * Each static path segment is a static string between a path separator (slash character).\n * Each dynamic segment is a path parameter.\n *\n * The comparison function sorts static segments before dynamic ones.\n */\n static compare(a: UrlMatcher, b: UrlMatcher): number {\n /**\n * Turn a UrlMatcher and all its parent matchers into an array\n * of slash literals '/', string literals, and Param objects\n *\n * This example matcher matches strings like \"/foo/:param/tail\":\n * var matcher = $umf.compile(\"/foo\").append($umf.compile(\"/:param\")).append($umf.compile(\"/\")).append($umf.compile(\"tail\"));\n * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ]\n *\n * Caches the result as `matcher._cache.segments`\n */\n const segments = (matcher: UrlMatcher) =>\n matcher._cache.segments = matcher._cache.segments ||\n matcher._cache.path.map(UrlMatcher.pathSegmentsAndParams)\n .reduce(unnestR, [])\n .reduce(joinNeighborsR, [])\n .map(x => isString(x) ? splitOnSlash(x) : x)\n .reduce(unnestR, []);\n\n /**\n * Gets the sort weight for each segment of a UrlMatcher\n *\n * Caches the result as `matcher._cache.weights`\n */\n const weights = (matcher: UrlMatcher) =>\n matcher._cache.weights = matcher._cache.weights ||\n segments(matcher).map(segment => {\n // Sort slashes first, then static strings, the Params\n if (segment === '/') return 1;\n if (isString(segment)) return 2;\n if (segment instanceof Param) return 3;\n });\n\n /**\n * Pads shorter array in-place (mutates)\n */\n const padArrays = (l: any[], r: any[], padVal: any) => {\n const len = Math.max(l.length, r.length);\n while (l.length < len) l.push(padVal);\n while (r.length < len) r.push(padVal);\n };\n\n const weightsA = weights(a), weightsB = weights(b);\n padArrays(weightsA, weightsB, 0);\n let cmp, i, pairs = arrayTuples(weightsA, weightsB);\n\n for (i = 0; i < pairs.length; i++) {\n cmp = pairs[i][0] - pairs[i][1];\n if (cmp !== 0) return cmp;\n }\n\n return 0;\n }\n}\n\n/** @hidden */\ninterface ParamDetails {\n param: Param;\n value: any;\n isValid: boolean;\n isDefaultValue: boolean;\n squash: (boolean|string);\n encoded: (string|string[]);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.d.ts new file mode 100644 index 00000000..a1c1715a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.d.ts @@ -0,0 +1,70 @@ +import { UrlMatcher } from "./urlMatcher"; +import { ParamTypes } from "../params/paramTypes"; +import { ParamTypeDefinition } from "../params/interface"; +import { Disposable } from "../interface"; +import { ParamFactory, UrlMatcherConfig } from "./interface"; +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +export declare class UrlMatcherFactory implements Disposable, UrlMatcherConfig { + /** @hidden */ paramTypes: ParamTypes; + /** @hidden */ _isCaseInsensitive: boolean; + /** @hidden */ _isStrictMode: boolean; + /** @hidden */ _defaultSquashPolicy: (boolean | string); + constructor(); + /** @inheritdoc */ + caseInsensitive(value?: boolean): boolean; + /** @inheritdoc */ + strictMode(value?: boolean): boolean; + /** @inheritdoc */ + defaultSquashPolicy(value?: (boolean | string)): string | boolean; + /** @hidden */ + private _getConfig; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + compile(pattern: string, config?: { + [key: string]: any; + }): UrlMatcher; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + isMatcher(object: any): boolean; + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition): any; + /** @hidden */ + $get(): this; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + paramFactory: ParamFactory; + /** @internalapi */ + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js new file mode 100644 index 00000000..a2cc1e1c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js @@ -0,0 +1,127 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module url + */ /** for typedoc */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var urlMatcher_1 = require("./urlMatcher"); +var param_1 = require("../params/param"); +var paramTypes_1 = require("../params/paramTypes"); +/** + * Factory for [[UrlMatcher]] instances. + * + * The factory is available to ng1 services as + * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. + */ +var UrlMatcherFactory = /** @class */ (function () { + function UrlMatcherFactory() { + var _this = this; + /** @hidden */ this.paramTypes = new paramTypes_1.ParamTypes(); + /** @hidden */ this._isCaseInsensitive = false; + /** @hidden */ this._isStrictMode = true; + /** @hidden */ this._defaultSquashPolicy = false; + /** @hidden */ + this._getConfig = function (config) { + return common_1.extend({ strict: _this._isStrictMode, caseInsensitive: _this._isCaseInsensitive }, config); + }; + /** @internalapi Creates a new [[Param]] for a given location (DefType) */ + this.paramFactory = { + /** Creates a new [[Param]] from a CONFIG block */ + fromConfig: function (id, type, config) { + return new param_1.Param(id, type, config, param_1.DefType.CONFIG, _this); + }, + /** Creates a new [[Param]] from a url PATH */ + fromPath: function (id, type, config) { + return new param_1.Param(id, type, config, param_1.DefType.PATH, _this); + }, + /** Creates a new [[Param]] from a url SEARCH */ + fromSearch: function (id, type, config) { + return new param_1.Param(id, type, config, param_1.DefType.SEARCH, _this); + }, + }; + common_1.extend(this, { UrlMatcher: urlMatcher_1.UrlMatcher, Param: param_1.Param }); + } + /** @inheritdoc */ + UrlMatcherFactory.prototype.caseInsensitive = function (value) { + return this._isCaseInsensitive = predicates_1.isDefined(value) ? value : this._isCaseInsensitive; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.strictMode = function (value) { + return this._isStrictMode = predicates_1.isDefined(value) ? value : this._isStrictMode; + }; + /** @inheritdoc */ + UrlMatcherFactory.prototype.defaultSquashPolicy = function (value) { + if (predicates_1.isDefined(value) && value !== true && value !== false && !predicates_1.isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + return this._defaultSquashPolicy = predicates_1.isDefined(value) ? value : this._defaultSquashPolicy; + }; + /** + * Creates a [[UrlMatcher]] for the specified pattern. + * + * @param pattern The URL pattern. + * @param config The config object hash. + * @returns The UrlMatcher. + */ + UrlMatcherFactory.prototype.compile = function (pattern, config) { + return new urlMatcher_1.UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config)); + }; + /** + * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. + * + * @param object The object to perform the type check against. + * @returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + UrlMatcherFactory.prototype.isMatcher = function (object) { + // TODO: typeof? + if (!predicates_1.isObject(object)) + return false; + var result = true; + common_1.forEach(urlMatcher_1.UrlMatcher.prototype, function (val, name) { + if (predicates_1.isFunction(val)) + result = result && (predicates_1.isDefined(object[name]) && predicates_1.isFunction(object[name])); + }); + return result; + }; + ; + /** + * Creates and registers a custom [[ParamType]] object + * + * A [[ParamType]] can be used to generate URLs with typed parameters. + * + * @param name The type name. + * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. + * @param definitionFn A function that is injected before the app runtime starts. + * The result of this function should be a [[ParamTypeDefinition]]. + * The result is merged into the existing `definition`. + * See [[ParamType]] for information on the values accepted. + * + * @returns - if a type was registered: the [[UrlMatcherFactory]] + * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined + * + * Note: Register custom types *before using them* in a state definition. + * + * See [[ParamTypeDefinition]] for examples + */ + UrlMatcherFactory.prototype.type = function (name, definition, definitionFn) { + var type = this.paramTypes.type(name, definition, definitionFn); + return !predicates_1.isDefined(definition) ? type : this; + }; + ; + /** @hidden */ + UrlMatcherFactory.prototype.$get = function () { + this.paramTypes.enqueue = false; + this.paramTypes._flushTypeQueue(); + return this; + }; + ; + /** @internalapi */ + UrlMatcherFactory.prototype.dispose = function () { + this.paramTypes.dispose(); + }; + return UrlMatcherFactory; +}()); +exports.UrlMatcherFactory = UrlMatcherFactory; +//# sourceMappingURL=urlMatcherFactory.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js.map new file mode 100644 index 00000000..aa1101b0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlMatcherFactory.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlMatcherFactory.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlMatcherFactory.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG,CAAC,kBAAkB;AACtB,2CAAmD;AACnD,mDAAiF;AACjF,2CAA0C;AAC1C,yCAAiD;AACjD,mDAAkD;AAMlD;;;;;GAKG;AACH;IAME;QAAA,iBAEC;QAPD,cAAc,CAAC,eAAU,GAAG,IAAI,uBAAU,EAAE,CAAC;QAC7C,cAAc,CAAC,uBAAkB,GAAY,KAAK,CAAC;QACnD,cAAc,CAAC,kBAAa,GAAY,IAAI,CAAC;QAC7C,cAAc,CAAC,yBAAoB,GAAqB,KAAK,CAAC;QAuB9D,cAAc;QACN,eAAU,GAAG,UAAC,MAAM;YACxB,OAAA,eAAM,CAAC,EAAE,MAAM,EAAE,KAAI,CAAC,aAAa,EAAE,eAAe,EAAE,KAAI,CAAC,kBAAkB,EAAE,EAAE,MAAM,CAAC;QAAxF,CAAwF,CAAC;QA8D7F,0EAA0E;QAC1E,iBAAY,GAAiB;YAC3B,kDAAkD;YAClD,UAAU,EAAE,UAAC,EAAU,EAAE,IAAe,EAAE,MAAW;gBACjD,OAAA,IAAI,aAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,eAAO,CAAC,MAAM,EAAE,KAAI,CAAC;YAAjD,CAAiD;YAErD,8CAA8C;YAC9C,QAAQ,EAAE,UAAC,EAAU,EAAE,IAAe,EAAE,MAAW;gBAC/C,OAAA,IAAI,aAAK,CAAC,EAAE,EAAE,IAAI,EAA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,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACH,wBAAC;AAAD,CAAC,AA9GD,IA8GC;AA9GY,8CAAiB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module url\n */ /** for typedoc */\nimport { forEach, extend } from \"../common/common\";\nimport { isObject, isDefined, isFunction, isString } from \"../common/predicates\";\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { Param, DefType } from \"../params/param\";\nimport { ParamTypes } from \"../params/paramTypes\";\nimport { ParamTypeDefinition } from \"../params/interface\";\nimport { Disposable } from \"../interface\";\nimport { ParamType } from \"../params/paramType\";\nimport { ParamFactory, UrlMatcherConfig } from \"./interface\";\n\n/**\n * Factory for [[UrlMatcher]] instances.\n *\n * The factory is available to ng1 services as\n * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.\n */\nexport class UrlMatcherFactory implements Disposable, UrlMatcherConfig {\n /** @hidden */ paramTypes = new ParamTypes();\n /** @hidden */ _isCaseInsensitive: boolean = false;\n /** @hidden */ _isStrictMode: boolean = true;\n /** @hidden */ _defaultSquashPolicy: (boolean|string) = false;\n\n constructor() {\n extend(this, { UrlMatcher, Param });\n }\n\n /** @inheritdoc */\n caseInsensitive(value?: boolean): boolean {\n return this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive;\n }\n\n /** @inheritdoc */\n strictMode(value?: boolean): boolean {\n return this._isStrictMode = isDefined(value) ? value : this._isStrictMode;\n }\n\n /** @inheritdoc */\n defaultSquashPolicy(value?: (boolean|string)) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(`Invalid squash policy: ${value}. Valid policies: false, true, arbitrary-string`);\n return this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy;\n }\n\n /** @hidden */\n private _getConfig = (config) =>\n extend({ strict: this._isStrictMode, caseInsensitive: this._isCaseInsensitive }, config);\n\n /**\n * Creates a [[UrlMatcher]] for the specified pattern.\n *\n * @param pattern The URL pattern.\n * @param config The config object hash.\n * @returns The UrlMatcher.\n */\n compile(pattern: string, config?: { [key: string]: any }) {\n return new UrlMatcher(pattern, this.paramTypes, this.paramFactory, this._getConfig(config));\n }\n\n /**\n * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.\n *\n * @param object The object to perform the type check against.\n * @returns `true` if the object matches the `UrlMatcher` interface, by\n * implementing all the same methods.\n */\n isMatcher(object: any): boolean {\n // TODO: typeof?\n if (!isObject(object)) return false;\n let result = true;\n\n forEach(UrlMatcher.prototype, (val, name) => {\n if (isFunction(val)) result = result && (isDefined(object[name]) && isFunction(object[name]));\n });\n return result;\n };\n\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A [[ParamType]] can be used to generate URLs with typed parameters.\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns - if a type was registered: the [[UrlMatcherFactory]]\n * - if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n *\n * Note: Register custom types *before using them* in a state definition.\n *\n * See [[ParamTypeDefinition]] for examples\n */\n type(name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) {\n let type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n\n /** @hidden */\n $get() {\n this.paramTypes.enqueue = false;\n this.paramTypes._flushTypeQueue();\n return this;\n };\n\n /** @internalapi Creates a new [[Param]] for a given location (DefType) */\n paramFactory: ParamFactory = {\n /** Creates a new [[Param]] from a CONFIG block */\n fromConfig: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.CONFIG, this),\n\n /** Creates a new [[Param]] from a url PATH */\n fromPath: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.PATH, this),\n\n /** Creates a new [[Param]] from a url SEARCH */\n fromSearch: (id: string, type: ParamType, config: any) =>\n new Param(id, type, config, DefType.SEARCH, this),\n };\n\n /** @internalapi */\n dispose() {\n this.paramTypes.dispose();\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.d.ts new file mode 100644 index 00000000..48c68695 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.d.ts @@ -0,0 +1,117 @@ +import { UrlMatcher } from './urlMatcher'; +import { RawParams } from '../params/interface'; +import { Disposable } from '../interface'; +import { UIRouter } from '../router'; +import { UrlRuleFactory } from './urlRule'; +import { TargetState } from '../state/targetState'; +import { MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRulesApi, UrlSyncApi } from './interface'; +import { TargetStateDef } from '../state/interface'; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +export declare class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable { + /** used to create [[UrlRule]] objects for common cases */ + urlRuleFactory: UrlRuleFactory; + /** @hidden */ private _router; + /** @hidden */ private location; + /** @hidden */ private _sortFn; + /** @hidden */ private _stopFn; + /** @hidden */ _rules: UrlRule[]; + /** @hidden */ private _otherwiseFn; + /** @hidden */ interceptDeferred: boolean; + /** @hidden */ private _id; + /** @hidden */ private _sorted; + /** @hidden */ + constructor(router: UIRouter); + /** @internalapi */ + dispose(): void; + /** @inheritdoc */ + sort(compareFn?: (a: UrlRule, b: UrlRule) => number): void; + private ensureSorted(); + private stableSort(arr, compareFn); + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + match(url: UrlParts): MatchResult; + /** @inheritdoc */ + sync(evt?: any): void; + /** @inheritdoc */ + listen(enabled?: boolean): Function; + /** + * Internal API. + * @internalapi + */ + update(read?: boolean): void; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + push(urlMatcher: UrlMatcher, params?: RawParams, options?: { + replace?: (string | boolean); + }): void; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + href(urlMatcher: UrlMatcher, params?: any, options?: { + absolute: boolean; + }): string; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + rule(rule: UrlRule): Function; + /** @inheritdoc */ + removeRule(rule: any): void; + /** @inheritdoc */ + rules(): UrlRule[]; + /** @inheritdoc */ + otherwise(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** @inheritdoc */ + initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef): void; + /** @inheritdoc */ + when(matcher: (RegExp | UrlMatcher | string), handler: string | UrlRuleHandlerFn, options?: { + priority: number; + }): UrlRule; + /** @inheritdoc */ + deferIntercept(defer?: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js new file mode 100644 index 00000000..231b9283 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js @@ -0,0 +1,315 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module url + */ +/** for typedoc */ +var common_1 = require("../common/common"); +var predicates_1 = require("../common/predicates"); +var urlMatcher_1 = require("./urlMatcher"); +var hof_1 = require("../common/hof"); +var urlRule_1 = require("./urlRule"); +var targetState_1 = require("../state/targetState"); +var common_2 = require("../common"); +/** @hidden */ +function appendBasePath(url, isHtml5, absolute, baseHref) { + if (baseHref === '/') + return url; + if (isHtml5) + return common_2.stripFile(baseHref) + url; + if (absolute) + return baseHref.slice(1) + url; + return url; +} +/** @hidden */ +var prioritySort = function (a, b) { + return (b.priority || 0) - (a.priority || 0); +}; +/** @hidden */ +var typeSort = function (a, b) { + var weights = { "STATE": 4, "URLMATCHER": 4, "REGEXP": 3, "RAW": 2, "OTHER": 1 }; + return (weights[a.type] || 0) - (weights[b.type] || 0); +}; +/** @hidden */ +var urlMatcherSort = function (a, b) { + return !a.urlMatcher || !b.urlMatcher ? 0 : urlMatcher_1.UrlMatcher.compare(a.urlMatcher, b.urlMatcher); +}; +/** @hidden */ +var idSort = function (a, b) { + // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL + var useMatchPriority = { STATE: true, URLMATCHER: true }; + var equal = useMatchPriority[a.type] && useMatchPriority[b.type]; + return equal ? 0 : (a.$id || 0) - (b.$id || 0); +}; +/** + * Default rule priority sorting function. + * + * Sorts rules by: + * + * - Explicit priority (set rule priority using [[UrlRulesApi.when]]) + * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1) + * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule. + * - Rule registration order (for rule types other than STATE and URLMATCHER) + * - Equally sorted State and UrlMatcher rules will each match the URL. + * Then, the *best* match is chosen based on how many parameter values were matched. + * + * @coreapi + */ +var defaultRuleSortFn; +defaultRuleSortFn = function (a, b) { + var cmp = prioritySort(a, b); + if (cmp !== 0) + return cmp; + cmp = typeSort(a, b); + if (cmp !== 0) + return cmp; + cmp = urlMatcherSort(a, b); + if (cmp !== 0) + return cmp; + return idSort(a, b); +}; +/** + * Updates URL and responds to URL changes + * + * ### Deprecation warning: + * This class is now considered to be an internal API + * Use the [[UrlService]] instead. + * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. + * + * This class updates the URL when the state changes. + * It also responds to changes in the URL. + */ +var UrlRouter = /** @class */ (function () { + /** @hidden */ + function UrlRouter(router) { + /** @hidden */ this._sortFn = defaultRuleSortFn; + /** @hidden */ this._rules = []; + /** @hidden */ this.interceptDeferred = false; + /** @hidden */ this._id = 0; + /** @hidden */ this._sorted = false; + this._router = router; + this.urlRuleFactory = new urlRule_1.UrlRuleFactory(router); + common_1.createProxyFunctions(hof_1.val(UrlRouter.prototype), this, hof_1.val(this)); + } + /** @internalapi */ + UrlRouter.prototype.dispose = function () { + this.listen(false); + this._rules = []; + delete this._otherwiseFn; + }; + /** @inheritdoc */ + UrlRouter.prototype.sort = function (compareFn) { + this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn); + this._sorted = true; + }; + UrlRouter.prototype.ensureSorted = function () { + this._sorted || this.sort(); + }; + UrlRouter.prototype.stableSort = function (arr, compareFn) { + var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); }); + arrOfWrapper.sort(function (wrapperA, wrapperB) { + var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem); + return cmpDiff === 0 + ? wrapperA.idx - wrapperB.idx + : cmpDiff; + }); + return arrOfWrapper.map(function (wrapper) { return wrapper.elem; }); + }; + /** + * Given a URL, check all rules and return the best [[MatchResult]] + * @param url + * @returns {MatchResult} + */ + UrlRouter.prototype.match = function (url) { + var _this = this; + this.ensureSorted(); + url = common_1.extend({ path: '', search: {}, hash: '' }, url); + var rules = this.rules(); + if (this._otherwiseFn) + rules.push(this._otherwiseFn); + // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined + var checkRule = function (rule) { + var match = rule.match(url, _this._router); + return match && { match: match, rule: rule, weight: rule.matchPriority(match) }; + }; + // The rules are pre-sorted. + // - Find the first matching rule. + // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`. + // - Choose the rule with the highest match weight. + var best; + for (var i = 0; i < rules.length; i++) { + // Stop when there is a 'best' rule and the next rule sorts differently than it. + if (best && this._sortFn(rules[i], best.rule) !== 0) + break; + var current = checkRule(rules[i]); + // Pick the best MatchResult + best = (!best || current && current.weight > best.weight) ? current : best; + } + return best; + }; + /** @inheritdoc */ + UrlRouter.prototype.sync = function (evt) { + if (evt && evt.defaultPrevented) + return; + var router = this._router, $url = router.urlService, $state = router.stateService; + var url = { + path: $url.path(), search: $url.search(), hash: $url.hash(), + }; + var best = this.match(url); + var applyResult = hof_1.pattern([ + [predicates_1.isString, function (newurl) { return $url.url(newurl, true); }], + [targetState_1.TargetState.isDef, function (def) { return $state.go(def.state, def.params, def.options); }], + [hof_1.is(targetState_1.TargetState), function (target) { return $state.go(target.state(), target.params(), target.options()); }], + ]); + applyResult(best && best.rule.handler(best.match, url, router)); + }; + /** @inheritdoc */ + UrlRouter.prototype.listen = function (enabled) { + var _this = this; + if (enabled === false) { + this._stopFn && this._stopFn(); + delete this._stopFn; + } + else { + return this._stopFn = this._stopFn || this._router.urlService.onChange(function (evt) { return _this.sync(evt); }); + } + }; + /** + * Internal API. + * @internalapi + */ + UrlRouter.prototype.update = function (read) { + var $url = this._router.locationService; + if (read) { + this.location = $url.path(); + return; + } + if ($url.path() === this.location) + return; + $url.url(this.location, true); + }; + /** + * Internal API. + * + * Pushes a new location to the browser history. + * + * @internalapi + * @param urlMatcher + * @param params + * @param options + */ + UrlRouter.prototype.push = function (urlMatcher, params, options) { + var replace = options && !!options.replace; + this._router.urlService.url(urlMatcher.format(params || {}), replace); + }; + /** + * Builds and returns a URL with interpolated parameters + * + * #### Example: + * ```js + * matcher = $umf.compile("/about/:person"); + * params = { person: "bob" }; + * $bob = $urlRouter.href(matcher, params); + * // $bob == "/about/bob"; + * ``` + * + * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. + * @param params An object of parameter values to fill the matcher's required parameters. + * @param options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + UrlRouter.prototype.href = function (urlMatcher, params, options) { + var url = urlMatcher.format(params); + if (url == null) + return null; + options = options || { absolute: false }; + var cfg = this._router.urlService.config; + var isHtml5 = cfg.html5Mode(); + if (!isHtml5 && url !== null) { + url = "#" + cfg.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref()); + if (!options.absolute || !url) { + return url; + } + var slash = (!isHtml5 && url ? '/' : ''), port = cfg.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + return [cfg.protocol(), '://', cfg.host(), port, slash, url].join(''); + }; + /** + * Manually adds a URL Rule. + * + * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. + * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). + * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects. + * + * A rule should have a `match` function which returns truthy if the rule matched. + * It should also have a `handler` function which is invoked if the rule is the best match. + * + * @return a function that deregisters the rule + */ + UrlRouter.prototype.rule = function (rule) { + var _this = this; + if (!urlRule_1.UrlRuleFactory.isUrlRule(rule)) + throw new Error("invalid rule"); + rule.$id = this._id++; + rule.priority = rule.priority || 0; + this._rules.push(rule); + this._sorted = false; + return function () { return _this.removeRule(rule); }; + }; + /** @inheritdoc */ + UrlRouter.prototype.removeRule = function (rule) { + common_1.removeFrom(this._rules, rule); + }; + /** @inheritdoc */ + UrlRouter.prototype.rules = function () { + this.ensureSorted(); + return this._rules.slice(); + }; + /** @inheritdoc */ + UrlRouter.prototype.otherwise = function (handler) { + var handlerFn = getHandlerFn(handler); + this._otherwiseFn = this.urlRuleFactory.create(hof_1.val(true), handlerFn); + this._sorted = false; + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.initial = function (handler) { + var handlerFn = getHandlerFn(handler); + var matchFn = function (urlParts, router) { + return router.globals.transitionHistory.size() === 0 && !!/^\/?$/.exec(urlParts.path); + }; + this.rule(this.urlRuleFactory.create(matchFn, handlerFn)); + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.when = function (matcher, handler, options) { + var rule = this.urlRuleFactory.create(matcher, handler); + if (predicates_1.isDefined(options && options.priority)) + rule.priority = options.priority; + this.rule(rule); + return rule; + }; + ; + /** @inheritdoc */ + UrlRouter.prototype.deferIntercept = function (defer) { + if (defer === undefined) + defer = true; + this.interceptDeferred = defer; + }; + ; + return UrlRouter; +}()); +exports.UrlRouter = UrlRouter; +function getHandlerFn(handler) { + if (!predicates_1.isFunction(handler) && !predicates_1.isString(handler) && !hof_1.is(targetState_1.TargetState)(handler) && !targetState_1.TargetState.isDef(handler)) { + throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property"); + } + return predicates_1.isFunction(handler) ? handler : hof_1.val(handler); +} +//# sourceMappingURL=urlRouter.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js.map new file mode 100644 index 00000000..12f51535 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRouter.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlRouter.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/url/urlRouter.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,kBAAkB;AAClB,2CAA4E;AAC5E,mDAAuE;AACvE,2CAA0C;AAI1C,qCAAiD;AACjD,qCAA2C;AAC3C,oDAAmD;AAGnD,oCAAsC;AAEtC,cAAc;AACd,wBAA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C,AAlQD,IAkQC;AAlQY,8BAAS;AAoQtB,sBAAsB,OAA2D;IAC/E,EAAE,CAAC,CAAC,CAAC,uBAAU,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAE,CAAC,yBAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3G,MAAM,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;IAC9G,CAAC;IACD,MAAM,CAAC,uBAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAA2B,CAAC,CAAC,CAAC,SAAG,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module url\n */\n/** for typedoc */\nimport { createProxyFunctions, extend, removeFrom } from '../common/common';\nimport { isDefined, isFunction, isString } from '../common/predicates';\nimport { UrlMatcher } from './urlMatcher';\nimport { RawParams } from '../params/interface';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { is, pattern, val } from '../common/hof';\nimport { UrlRuleFactory } from './urlRule';\nimport { TargetState } from '../state/targetState';\nimport { MatcherUrlRule, MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn, UrlRuleMatchFn, UrlRulesApi, UrlSyncApi, } from './interface';\nimport { TargetStateDef } from '../state/interface';\nimport { stripFile } from '../common';\n\n/** @hidden */\nfunction appendBasePath(url: string, isHtml5: boolean, absolute: boolean, baseHref: string): string {\n if (baseHref === '/') return url;\n if (isHtml5) return stripFile(baseHref) + url;\n if (absolute) return baseHref.slice(1) + url;\n return url;\n}\n\n/** @hidden */\nconst prioritySort = (a: UrlRule, b: UrlRule) =>\n (b.priority || 0) - (a.priority || 0);\n\n/** @hidden */\nconst typeSort = (a: UrlRule, b: UrlRule) => {\n const weights = { \"STATE\": 4, \"URLMATCHER\": 4, \"REGEXP\": 3, \"RAW\": 2, \"OTHER\": 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n};\n\n/** @hidden */\nconst urlMatcherSort = (a: MatcherUrlRule, b: MatcherUrlRule) =>\n !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n\n/** @hidden */\nconst idSort = (a: UrlRule, b: UrlRule) => {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n const useMatchPriority = { STATE: true, URLMATCHER: true };\n const equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n};\n\n/**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRulesApi.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n *\n * @coreapi\n */\nlet defaultRuleSortFn: (a: UrlRule, b: UrlRule) => number;\ndefaultRuleSortFn = (a, b) => {\n let cmp = prioritySort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = typeSort(a, b);\n if (cmp !== 0) return cmp;\n\n cmp = urlMatcherSort(a as MatcherUrlRule, b as MatcherUrlRule);\n if (cmp !== 0) return cmp;\n\n return idSort(a, b);\n};\n\n/**\n * Updates URL and responds to URL changes\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class updates the URL when the state changes.\n * It also responds to changes in the URL.\n */\nexport class UrlRouter implements UrlRulesApi, UrlSyncApi, Disposable {\n /** used to create [[UrlRule]] objects for common cases */\n public urlRuleFactory: UrlRuleFactory;\n\n /** @hidden */ private _router: UIRouter;\n /** @hidden */ private location: string;\n /** @hidden */ private _sortFn = defaultRuleSortFn;\n /** @hidden */ private _stopFn: Function;\n /** @hidden */ _rules: UrlRule[] = [];\n /** @hidden */ private _otherwiseFn: UrlRule;\n /** @hidden */ interceptDeferred = false;\n /** @hidden */ private _id = 0;\n /** @hidden */ private _sorted = false;\n\n /** @hidden */\n constructor(router: UIRouter) {\n this._router = router;\n this.urlRuleFactory = new UrlRuleFactory(router);\n createProxyFunctions(val(UrlRouter.prototype), this, val(this));\n }\n\n /** @internalapi */\n dispose() {\n this.listen(false);\n this._rules = [];\n delete this._otherwiseFn;\n }\n\n /** @inheritdoc */\n sort(compareFn?: (a: UrlRule, b: UrlRule) => number) {\n this._rules = this.stableSort(this._rules, this._sortFn = compareFn || this._sortFn);\n this._sorted = true;\n }\n\n private ensureSorted() {\n this._sorted || this.sort();\n }\n\n private stableSort(arr, compareFn) {\n const arrOfWrapper = arr.map((elem, idx) => ({ elem, idx }));\n\n arrOfWrapper.sort((wrapperA, wrapperB) => {\n const cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0\n ? wrapperA.idx - wrapperB.idx\n : cmpDiff;\n });\n\n return arrOfWrapper.map(wrapper => wrapper.elem);\n }\n\n /**\n * Given a URL, check all rules and return the best [[MatchResult]]\n * @param url\n * @returns {MatchResult}\n */\n match(url: UrlParts): MatchResult {\n this.ensureSorted();\n\n url = extend({path: '', search: {}, hash: '' }, url);\n let rules = this.rules();\n if (this._otherwiseFn) rules.push(this._otherwiseFn);\n\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n\n let checkRule = (rule: UrlRule): MatchResult => {\n let match = rule.match(url, this._router);\n return match && { match, rule, weight: rule.matchPriority(match) };\n };\n\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n let best: MatchResult;\n for (let i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && this._sortFn(rules[i], best.rule) !== 0) break;\n\n let current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = (!best || current && current.weight > best.weight) ? current : best;\n }\n\n return best;\n }\n\n /** @inheritdoc */\n sync(evt?) {\n if (evt && evt.defaultPrevented) return;\n\n let router = this._router,\n $url = router.urlService,\n $state = router.stateService;\n\n let url: UrlParts = {\n path: $url.path(), search: $url.search(), hash: $url.hash(),\n };\n\n let best = this.match(url);\n\n let applyResult = pattern([\n [isString, (newurl: string) => $url.url(newurl, true)],\n [TargetState.isDef, (def: TargetStateDef) => $state.go(def.state, def.params, def.options)],\n [is(TargetState), (target: TargetState) => $state.go(target.state(), target.params(), target.options())],\n ]);\n\n applyResult(best && best.rule.handler(best.match, url, router));\n }\n\n /** @inheritdoc */\n listen(enabled?: boolean): Function {\n if (enabled === false) {\n this._stopFn && this._stopFn();\n delete this._stopFn;\n } else {\n return this._stopFn = this._stopFn || this._router.urlService.onChange(evt => this.sync(evt));\n }\n }\n\n /**\n * Internal API.\n * @internalapi\n */\n update(read?: boolean) {\n let $url = this._router.locationService;\n if (read) {\n this.location = $url.path();\n return;\n }\n if ($url.path() === this.location) return;\n\n $url.url(this.location, true);\n }\n\n /**\n * Internal API.\n *\n * Pushes a new location to the browser history.\n *\n * @internalapi\n * @param urlMatcher\n * @param params\n * @param options\n */\n push(urlMatcher: UrlMatcher, params?: RawParams, options?: { replace?: (string|boolean) }) {\n let replace = options && !!options.replace;\n this._router.urlService.url(urlMatcher.format(params || {}), replace);\n }\n\n /**\n * Builds and returns a URL with interpolated parameters\n *\n * #### Example:\n * ```js\n * matcher = $umf.compile(\"/about/:person\");\n * params = { person: \"bob\" };\n * $bob = $urlRouter.href(matcher, params);\n * // $bob == \"/about/bob\";\n * ```\n *\n * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate.\n * @param params An object of parameter values to fill the matcher's required parameters.\n * @param options Options object. The options are:\n *\n * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n *\n * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n */\n href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string {\n let url = urlMatcher.format(params);\n if (url == null) return null;\n\n options = options || { absolute: false };\n\n let cfg = this._router.urlService.config;\n let isHtml5 = cfg.html5Mode();\n if (!isHtml5 && url !== null) {\n url = \"#\" + cfg.hashPrefix() + url;\n }\n url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref());\n\n if (!options.absolute || !url) {\n return url;\n }\n\n let slash = (!isHtml5 && url ? '/' : ''), port = cfg.port();\n port = (port === 80 || port === 443 ? '' : ':' + port);\n\n return [cfg.protocol(), '://', cfg.host(), port, slash, url].join('');\n }\n\n\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[UrlRouter.urlRuleFactory]], or create manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n rule(rule: UrlRule): Function {\n if (!UrlRuleFactory.isUrlRule(rule)) throw new Error(\"invalid rule\");\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n\n this._rules.push(rule);\n this._sorted = false;\n\n return () => this.removeRule(rule);\n }\n\n /** @inheritdoc */\n removeRule(rule): void {\n removeFrom(this._rules, rule);\n }\n\n /** @inheritdoc */\n rules(): UrlRule[] {\n this.ensureSorted();\n return this._rules.slice();\n }\n\n /** @inheritdoc */\n otherwise(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n\n /** @inheritdoc */\n initial(handler: string | UrlRuleHandlerFn | TargetState | TargetStateDef) {\n let handlerFn: UrlRuleHandlerFn = getHandlerFn(handler);\n\n let matchFn: UrlRuleMatchFn = (urlParts, router) =>\n router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n\n /** @inheritdoc */\n when(matcher: (RegExp|UrlMatcher|string), handler: string|UrlRuleHandlerFn, options?: { priority: number }): UrlRule {\n let rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority)) rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n\n /** @inheritdoc */\n deferIntercept(defer?: boolean) {\n if (defer === undefined) defer = true;\n this.interceptDeferred = defer;\n };\n}\n\nfunction getHandlerFn(handler: string|UrlRuleHandlerFn|TargetState|TargetStateDef): UrlRuleHandlerFn {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler as UrlRuleHandlerFn : val(handler);\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.d.ts new file mode 100644 index 00000000..3f4b6dba --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.d.ts @@ -0,0 +1,123 @@ +/** + * @coreapi + * @module url + */ /** */ +import { UrlMatcher } from "./urlMatcher"; +import { UIRouter } from "../router"; +import { StateObject } from "../state/stateObject"; +import { UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, MatcherUrlRule, StateRule, RegExpRule } from "./interface"; +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +export declare class UrlRuleFactory { + router: UIRouter; + constructor(router: UIRouter); + compile(str: string): UrlMatcher; + static isUrlRule: (obj: any) => boolean; + create(what: string | UrlMatcher | StateObject | RegExp | UrlRuleMatchFn, handler?: string | UrlRuleHandlerFn): UrlRule; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + fromUrlMatcher(urlMatcher: UrlMatcher, handler: string | UrlMatcher | UrlRuleHandlerFn): MatcherUrlRule; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + fromState(state: StateObject, router: UIRouter): StateRule; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + fromRegExp(regexp: RegExp, handler: string | UrlRuleHandlerFn): RegExpRule; +} +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +export declare class BaseUrlRule implements UrlRule { + match: UrlRuleMatchFn; + $id: number; + priority: number; + type: UrlRuleType; + handler: UrlRuleHandlerFn; + matchPriority: (match: any) => number; + constructor(match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js new file mode 100644 index 00000000..a9fcff29 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js @@ -0,0 +1,209 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module url + */ /** */ +var urlMatcher_1 = require("./urlMatcher"); +var predicates_1 = require("../common/predicates"); +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +/** + * Creates a [[UrlRule]] + * + * Creates a [[UrlRule]] from a: + * + * - `string` + * - [[UrlMatcher]] + * - `RegExp` + * - [[StateObject]] + * @internalapi + */ +var UrlRuleFactory = /** @class */ (function () { + function UrlRuleFactory(router) { + this.router = router; + } + UrlRuleFactory.prototype.compile = function (str) { + return this.router.urlMatcherFactory.compile(str); + }; + UrlRuleFactory.prototype.create = function (what, handler) { + var _this = this; + var makeRule = hof_1.pattern([ + [predicates_1.isString, function (_what) { return makeRule(_this.compile(_what)); }], + [hof_1.is(urlMatcher_1.UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }], + [predicates_1.isState, function (_what) { return _this.fromState(_what, _this.router); }], + [hof_1.is(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }], + [predicates_1.isFunction, function (_what) { return new BaseUrlRule(_what, handler); }], + ]); + var rule = makeRule(what); + if (!rule) + throw new Error("invalid 'what' in when()"); + return rule; + }; + /** + * A UrlRule which matches based on a UrlMatcher + * + * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + * + * ## Handler as UrlMatcher + * + * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. + * The `handler` UrlMatcher is formatted using the matched param from the first matcher. + * The url is replaced with the result. + * + * #### Example: + * ```js + * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); + * var handler = $umf.compile("/home/:fooId/:barId"); + * var rule = factory.fromUrlMatcher(urlMatcher, handler); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); // '/home/123/456' + * ``` + */ + UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) { + var _handler = handler; + if (predicates_1.isString(handler)) + handler = this.router.urlMatcherFactory.compile(handler); + if (hof_1.is(urlMatcher_1.UrlMatcher)(handler)) + _handler = function (match) { return handler.format(match); }; + function match(url) { + var match = urlMatcher.exec(url.path, url.search, url.hash); + return urlMatcher.validates(match) && match; + } + // Prioritize URLs, lowest to highest: + // - Some optional URL parameters, but none matched + // - No optional parameters in URL + // - Some optional parameters, some matched + // - Some optional parameters, all matched + function matchPriority(params) { + var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; }); + if (!optional.length) + return 0.000001; + var matched = optional.filter(function (param) { return params[param.id]; }); + return matched.length / optional.length; + } + var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: "URLMATCHER" }; + return common_1.extend(new BaseUrlRule(match, _handler), details); + }; + /** + * A UrlRule which matches a state by its url + * + * #### Example: + * ```js + * var rule = factory.fromState($state.get('foo'), router); + * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } + * var result = rule.handler(match); + * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } + * ``` + */ + UrlRuleFactory.prototype.fromState = function (state, router) { + /** + * Handles match by transitioning to matched state + * + * First checks if the router should start a new transition. + * A new transition is not required if the current state's URL + * and the new URL are already identical + */ + var handler = function (match) { + var $state = router.stateService; + var globals = router.globals; + if ($state.href(state, match) !== $state.href(globals.current, globals.params)) { + $state.transitionTo(state, match, { inherit: true, source: "url" }); + } + }; + var details = { state: state, type: "STATE" }; + return common_1.extend(this.fromUrlMatcher(state.url, handler), details); + }; + /** + * A UrlRule which matches based on a regular expression + * + * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. + * + * ## Handler as a function + * + * If `handler` is a function, the function is invoked with: + * + * - regexp match array (from `regexp`) + * - url: the current Url ([[UrlParts]]) + * - router: the router object ([[UIRouter]]) + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + * + * ## Handler as string + * + * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. + * The string is first interpolated using `string.replace()` style pattern. + * + * #### Example: + * ```js + * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") + * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] + * var result = rule.handler(match); // '/home/bar' + * ``` + */ + UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) { + if (regexp.global || regexp.sticky) + throw new Error("Rule RegExp must not be global or sticky"); + /** + * If handler is a string, the url will be replaced by the string. + * If the string has any String.replace() style variables in it (like `$2`), + * they will be replaced by the captures from [[match]] + */ + var redirectUrlTo = function (match) { + // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern + return handler.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + }; + var _handler = predicates_1.isString(handler) ? redirectUrlTo : handler; + var match = function (url) { + return regexp.exec(url.path); + }; + var details = { regexp: regexp, type: "REGEXP" }; + return common_1.extend(new BaseUrlRule(match, _handler), details); + }; + UrlRuleFactory.isUrlRule = function (obj) { + return obj && ['type', 'match', 'handler'].every(function (key) { return predicates_1.isDefined(obj[key]); }); + }; + return UrlRuleFactory; +}()); +exports.UrlRuleFactory = UrlRuleFactory; +/** + * A base rule which calls `match` + * + * The value from the `match` function is passed through to the `handler`. + * @internalapi + */ +var BaseUrlRule = /** @class */ (function () { + function BaseUrlRule(match, handler) { + var _this = this; + this.match = match; + this.type = "RAW"; + this.matchPriority = function (match) { return 0 - _this.$id; }; + this.handler = handler || common_1.identity; + } + return BaseUrlRule; +}()); +exports.BaseUrlRule = BaseUrlRule; +//# sourceMappingURL=urlRule.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js.map new file mode 100644 index 00000000..d291850f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlRule.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "urlRule.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Z,CAAY,CAAC;QAGtC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,iBAAQ,CAAC;IACrC,CAAC;IACH,kBAAC;AAAD,CAAC,AAVD,IAUC;AAVY,kCAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** */\nimport { UrlMatcher } from \"./urlMatcher\";\nimport { isString, isDefined, isFunction, isState } from \"../common/predicates\";\nimport { UIRouter } from \"../router\";\nimport { identity, extend } from \"../common/common\";\nimport { is, pattern } from \"../common/hof\";\nimport { StateObject } from \"../state/stateObject\";\nimport { RawParams } from \"../params/interface\";\nimport {\n UrlRule, UrlRuleMatchFn, UrlRuleHandlerFn, UrlRuleType, UrlParts, MatcherUrlRule, StateRule, RegExpRule\n} from \"./interface\";\n\n/**\n * Creates a [[UrlRule]]\n *\n * Creates a [[UrlRule]] from a:\n *\n * - `string`\n * - [[UrlMatcher]]\n * - `RegExp`\n * - [[StateObject]]\n * @internalapi\n */\nexport class UrlRuleFactory {\n constructor(public router: UIRouter) { }\n\n compile(str: string) {\n return this.router.urlMatcherFactory.compile(str);\n }\n\n static isUrlRule = obj =>\n obj && ['type', 'match', 'handler'].every(key => isDefined(obj[key]));\n\n create(what: string|UrlMatcher|StateObject|RegExp|UrlRuleMatchFn, handler?: string|UrlRuleHandlerFn): UrlRule {\n const makeRule = pattern([\n [isString, (_what: string) => makeRule(this.compile(_what))],\n [is(UrlMatcher), (_what: UrlMatcher) => this.fromUrlMatcher(_what, handler)],\n [isState, (_what: StateObject) => this.fromState(_what, this.router)],\n [is(RegExp), (_what: RegExp) => this.fromRegExp(_what, handler)],\n [isFunction, (_what: UrlRuleMatchFn) => new BaseUrlRule(_what, handler as UrlRuleHandlerFn)],\n ]);\n\n let rule = makeRule(what);\n if (!rule) throw new Error(\"invalid 'what' in when()\");\n return rule;\n }\n\n /**\n * A UrlRule which matches based on a UrlMatcher\n *\n * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]]\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, match => \"/home/\" + match.fooId + \"/\" + match.barId);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n *\n * ## Handler as UrlMatcher\n *\n * If `handler` is a UrlMatcher, the handler matcher is used to create the new url.\n * The `handler` UrlMatcher is formatted using the matched param from the first matcher.\n * The url is replaced with the result.\n *\n * #### Example:\n * ```js\n * var urlMatcher = $umf.compile(\"/foo/:fooId/:barId\");\n * var handler = $umf.compile(\"/home/:fooId/:barId\");\n * var rule = factory.fromUrlMatcher(urlMatcher, handler);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match); // '/home/123/456'\n * ```\n */\n fromUrlMatcher(urlMatcher: UrlMatcher, handler: string|UrlMatcher|UrlRuleHandlerFn): MatcherUrlRule {\n let _handler: UrlRuleHandlerFn = handler as any;\n if (isString(handler)) handler = this.router.urlMatcherFactory.compile(handler);\n if (is(UrlMatcher)(handler)) _handler = (match: RawParams) => (handler as UrlMatcher).format(match);\n\n function match(url: UrlParts) {\n let match = urlMatcher.exec(url.path, url.search, url.hash);\n return urlMatcher.validates(match) && match;\n }\n\n // Prioritize URLs, lowest to highest:\n // - Some optional URL parameters, but none matched\n // - No optional parameters in URL\n // - Some optional parameters, some matched\n // - Some optional parameters, all matched\n function matchPriority(params: RawParams): number {\n let optional = urlMatcher.parameters().filter(param => param.isOptional);\n if (!optional.length) return 0.000001;\n let matched = optional.filter(param => params[param.id]);\n return matched.length / optional.length;\n }\n\n let details = { urlMatcher, matchPriority, type: \"URLMATCHER\" };\n return extend(new BaseUrlRule(match, _handler), details) as MatcherUrlRule;\n }\n\n\n /**\n * A UrlRule which matches a state by its url\n *\n * #### Example:\n * ```js\n * var rule = factory.fromState($state.get('foo'), router);\n * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' }\n * var result = rule.handler(match);\n * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' }\n * ```\n */\n fromState(state: StateObject, router: UIRouter): StateRule {\n /**\n * Handles match by transitioning to matched state\n *\n * First checks if the router should start a new transition.\n * A new transition is not required if the current state's URL\n * and the new URL are already identical\n */\n const handler = (match: RawParams) => {\n let $state = router.stateService;\n let globals = router.globals;\n if ($state.href(state, match) !== $state.href(globals.current, globals.params)) {\n $state.transitionTo(state, match, { inherit: true, source: \"url\" });\n }\n };\n\n let details = { state, type: \"STATE\" };\n return extend(this.fromUrlMatcher(state.url, handler), details) as StateRule;\n }\n\n /**\n * A UrlRule which matches based on a regular expression\n *\n * The `handler` may be either a [[UrlRuleHandlerFn]] or a string.\n *\n * ## Handler as a function\n *\n * If `handler` is a function, the function is invoked with:\n *\n * - regexp match array (from `regexp`)\n * - url: the current Url ([[UrlParts]])\n * - router: the router object ([[UIRouter]])\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, match => \"/home/\" + match[1])\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n *\n * ## Handler as string\n *\n * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked.\n * The string is first interpolated using `string.replace()` style pattern.\n *\n * #### Example:\n * ```js\n * var rule = factory.fromRegExp(/^\\/foo\\/(bar|baz)$/, \"/home/$1\")\n * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ]\n * var result = rule.handler(match); // '/home/bar'\n * ```\n */\n fromRegExp(regexp: RegExp, handler: string|UrlRuleHandlerFn): RegExpRule {\n if (regexp.global || regexp.sticky) throw new Error(\"Rule RegExp must not be global or sticky\");\n\n /**\n * If handler is a string, the url will be replaced by the string.\n * If the string has any String.replace() style variables in it (like `$2`),\n * they will be replaced by the captures from [[match]]\n */\n const redirectUrlTo = (match: RegExpExecArray) =>\n // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern\n (handler as string).replace(/\\$(\\$|\\d{1,2})/, (m, what) =>\n match[what === '$' ? 0 : Number(what)]);\n\n const _handler = isString(handler) ? redirectUrlTo : handler;\n\n const match = (url: UrlParts): RegExpExecArray =>\n regexp.exec(url.path);\n\n let details = { regexp, type: \"REGEXP\" };\n return extend(new BaseUrlRule(match, _handler), details) as RegExpRule\n }\n}\n\n/**\n * A base rule which calls `match`\n *\n * The value from the `match` function is passed through to the `handler`.\n * @internalapi\n */\nexport class BaseUrlRule implements UrlRule {\n $id: number;\n priority: number;\n type: UrlRuleType = \"RAW\";\n handler: UrlRuleHandlerFn;\n matchPriority = (match) => 0 - this.$id;\n\n constructor(public match: UrlRuleMatchFn, handler?: UrlRuleHandlerFn) {\n this.handler = handler || identity;\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.d.ts new file mode 100644 index 00000000..11b49c9f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.d.ts @@ -0,0 +1,63 @@ +/** + * @coreapi + * @module url + */ /** */ +import { UIRouter } from "../router"; +import { LocationServices, LocationConfig } from "../common/coreservices"; +import { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from "./interface"; +/** + * API for URL management + */ +export declare class UrlService implements LocationServices, UrlSyncApi { + /** @hidden */ + static locationServiceStub: LocationServices; + /** @hidden */ + static locationConfigStub: LocationConfig; + /** @inheritdoc */ + url(): string; + /** @inheritdoc */ + url(newurl: string, replace?: boolean, state?: any): void; + /** @inheritdoc */ + path(): string; + /** @inheritdoc */ + search(): { + [key: string]: any; + }; + /** @inheritdoc */ + hash(): string; + /** @inheritdoc */ + onChange(callback: Function): Function; + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + parts(): UrlParts; + dispose(): void; + /** @inheritdoc */ + sync(evt?: any): void; + /** @inheritdoc */ + listen(enabled?: boolean): Function; + /** @inheritdoc */ + deferIntercept(defer?: boolean): void; + /** @inheritdoc */ + match(urlParts: UrlParts): MatchResult; + /** + * A nested API for managing URL rules and rewrites + * + * See: [[UrlRulesApi]] for details + */ + rules: UrlRulesApi; + /** + * A nested API to configure the URL and retrieve URL information + * + * See: [[UrlConfigApi]] for details + */ + config: UrlConfigApi; + /** @hidden */ + private router; + /** @hidden */ + constructor(router: UIRouter, lateBind?: boolean); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js new file mode 100644 index 00000000..6fdb7f7f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js @@ -0,0 +1,80 @@ +"use strict"; +/** + * @coreapi + * @module url + */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +var coreservices_1 = require("../common/coreservices"); +var common_1 = require("../common/common"); +/** @hidden */ +var makeStub = function (keys) { + return keys.reduce(function (acc, key) { return (acc[key] = coreservices_1.notImplemented(key), acc); }, { dispose: common_1.noop }); +}; +/** @hidden */ var locationServicesFns = ["url", "path", "search", "hash", "onChange"]; +/** @hidden */ var locationConfigFns = ["port", "protocol", "host", "baseHref", "html5Mode", "hashPrefix"]; +/** @hidden */ var umfFns = ["type", "caseInsensitive", "strictMode", "defaultSquashPolicy"]; +/** @hidden */ var rulesFns = ["sort", "when", "initial", "otherwise", "rules", "rule", "removeRule"]; +/** @hidden */ var syncFns = ["deferIntercept", "listen", "sync", "match"]; +/** + * API for URL management + */ +var UrlService = /** @class */ (function () { + /** @hidden */ + function UrlService(router, lateBind) { + if (lateBind === void 0) { lateBind = true; } + this.router = router; + this.rules = {}; + this.config = {}; + // proxy function calls from UrlService to the LocationService/LocationConfig + var locationServices = function () { return router.locationService; }; + common_1.createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind); + var locationConfig = function () { return router.locationConfig; }; + common_1.createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind); + var umf = function () { return router.urlMatcherFactory; }; + common_1.createProxyFunctions(umf, this.config, umf, umfFns); + var urlRouter = function () { return router.urlRouter; }; + common_1.createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns); + common_1.createProxyFunctions(urlRouter, this, urlRouter, syncFns); + } + UrlService.prototype.url = function (newurl, replace, state) { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.path = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.search = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.hash = function () { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.onChange = function (callback) { return; }; + ; + /** + * Returns the current URL parts + * + * This method returns the current URL components as a [[UrlParts]] object. + * + * @returns the current url parts + */ + UrlService.prototype.parts = function () { + return { path: this.path(), search: this.search(), hash: this.hash() }; + }; + UrlService.prototype.dispose = function () { }; + /** @inheritdoc */ + UrlService.prototype.sync = function (evt) { return; }; + /** @inheritdoc */ + UrlService.prototype.listen = function (enabled) { return; }; + ; + /** @inheritdoc */ + UrlService.prototype.deferIntercept = function (defer) { return; }; + /** @inheritdoc */ + UrlService.prototype.match = function (urlParts) { return; }; + /** @hidden */ + UrlService.locationServiceStub = makeStub(locationServicesFns); + /** @hidden */ + UrlService.locationConfigStub = makeStub(locationConfigFns); + return UrlService; +}()); +exports.UrlService = UrlService; +//# sourceMappingURL=urlService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js.map new file mode 100644 index 00000000..40c1318d --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/url/urlService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3,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EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAA;IACxE,CAAC;IAED,4BAAO,GAAP,cAAY,CAAC;IAEb,kBAAkB;IAClB,yBAAI,GAAJ,UAAK,GAAI,IAAI,MAAM,CAAA,CAAC,CAAC;IACrB,kBAAkB;IAClB,2BAAM,GAAN,UAAO,OAAiB,IAAc,MAAM,CAAA,CAAC,CAAC;IAAA,CAAC;IAC/C,kBAAkB;IAClB,mCAAc,GAAd,UAAe,KAAe,IAAI,MAAM,CAAA,CAAC,CAAC;IAC1C,kBAAkB;IAClB,0BAAK,GAAL,UAAM,QAAkB,IAAiB,MAAM,CAAA,CAAC,CAAC;IAxCjD,cAAc;IACP,8BAAmB,GAAqB,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC7E,cAAc;IACP,6BAAkB,GAAmB,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IA4E1E,iBAAC;CAAA,AAhFD,IAgFC;AAhFY,gCAAU", + "sourcesContent": [ + "/**\n * @coreapi\n * @module url\n */ /** */\n\nimport { UIRouter } from \"../router\";\nimport { LocationServices, notImplemented, LocationConfig } from \"../common/coreservices\";\nimport { noop, createProxyFunctions } from \"../common/common\";\nimport { UrlConfigApi, UrlSyncApi, UrlRulesApi, UrlParts, MatchResult } from \"./interface\";\n\n/** @hidden */\nconst makeStub = (keys: string[]): any =>\n keys.reduce((acc, key) => (acc[key] = notImplemented(key), acc), { dispose: noop });\n\n/** @hidden */ const locationServicesFns = [\"url\", \"path\", \"search\", \"hash\", \"onChange\"];\n/** @hidden */ const locationConfigFns = [\"port\", \"protocol\", \"host\", \"baseHref\", \"html5Mode\", \"hashPrefix\"];\n/** @hidden */ const umfFns = [\"type\", \"caseInsensitive\", \"strictMode\", \"defaultSquashPolicy\"];\n/** @hidden */ const rulesFns = [\"sort\", \"when\", \"initial\", \"otherwise\", \"rules\", \"rule\", \"removeRule\"];\n/** @hidden */ const syncFns = [\"deferIntercept\", \"listen\", \"sync\", \"match\"];\n\n/**\n * API for URL management\n */\nexport class UrlService implements LocationServices, UrlSyncApi {\n /** @hidden */\n static locationServiceStub: LocationServices = makeStub(locationServicesFns);\n /** @hidden */\n static locationConfigStub: LocationConfig = makeStub(locationConfigFns);\n\n /** @inheritdoc */\n url(): string;\n /** @inheritdoc */\n url(newurl: string, replace?: boolean, state?): void;\n url(newurl?, replace?, state?): any { return };\n /** @inheritdoc */\n path(): string { return };\n /** @inheritdoc */\n search(): { [key: string]: any } { return };\n /** @inheritdoc */\n hash(): string { return };\n /** @inheritdoc */\n onChange(callback: Function): Function { return };\n\n\n /**\n * Returns the current URL parts\n *\n * This method returns the current URL components as a [[UrlParts]] object.\n *\n * @returns the current url parts\n */\n parts(): UrlParts {\n return { path: this.path(), search: this.search(), hash: this.hash() }\n }\n\n dispose() { }\n\n /** @inheritdoc */\n sync(evt?) { return }\n /** @inheritdoc */\n listen(enabled?: boolean): Function { return };\n /** @inheritdoc */\n deferIntercept(defer?: boolean) { return }\n /** @inheritdoc */\n match(urlParts: UrlParts): MatchResult { return }\n\n /**\n * A nested API for managing URL rules and rewrites\n *\n * See: [[UrlRulesApi]] for details\n */\n rules: UrlRulesApi;\n\n /**\n * A nested API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfigApi]] for details\n */\n config: UrlConfigApi;\n\n /** @hidden */\n private router: UIRouter;\n\n /** @hidden */\n constructor(router: UIRouter, lateBind = true) {\n this.router = router;\n this.rules = {} as any;\n this.config = {} as any;\n\n // proxy function calls from UrlService to the LocationService/LocationConfig\n const locationServices = () => router.locationService;\n createProxyFunctions(locationServices, this, locationServices, locationServicesFns, lateBind);\n\n const locationConfig = () => router.locationConfig;\n createProxyFunctions(locationConfig, this.config, locationConfig, locationConfigFns, lateBind);\n\n const umf = () => router.urlMatcherFactory;\n createProxyFunctions(umf, this.config, umf, umfFns);\n\n const urlRouter = () => router.urlRouter;\n createProxyFunctions(urlRouter, this.rules, urlRouter, rulesFns);\n createProxyFunctions(urlRouter, this, urlRouter, syncFns);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.d.ts new file mode 100644 index 00000000..bfd03885 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.d.ts @@ -0,0 +1,6 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +export * from "./vanilla/index"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js new file mode 100644 index 00000000..4bc5bee0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js @@ -0,0 +1,12 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +__export(require("./vanilla/index")); +//# sourceMappingURL=vanilla.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js.map new file mode 100644 index 00000000..e3dbc194 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "vanilla.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla.ts" + ], + "names": [], + "mappings": ";;;;;AAAA;;;GAGG;AACH,MAAM;AACN,qCAAgC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./vanilla/index\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts new file mode 100644 index 00000000..298fa1a2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts @@ -0,0 +1,48 @@ +/** + * @internalapi + * @module vanilla + */ /** */ +import { LocationServices } from '../common'; +import { Disposable } from '../interface'; +import { UIRouter } from '../router'; +import { HistoryLike, LocationLike } from './interface'; +/** A base `LocationServices` */ +export declare abstract class BaseLocationServices implements LocationServices, Disposable { + fireAfterUpdate: boolean; + constructor(router: UIRouter, fireAfterUpdate: boolean); + _listener: (evt: any) => void; + private _listeners; + _location: LocationLike; + _history: HistoryLike; + /** + * This should return the current internal URL representation. + * + * The internal URL includes only the portion that UI-Router matches. + * It does not include: + * - protocol + * - server + * - port + * - base href or hash + */ + abstract _get(): string; + /** + * This should set the current URL. + * + * The `url` param should include only the portion that UI-Router matches on. + * It should not include: + * - protocol + * - server + * - port + * - base href or hash + * + * However, after this function completes, the browser URL should reflect the entire (fully qualified) + * HREF including those data. + */ + abstract _set(state: any, title: string, url: string, replace: boolean): any; + hash: () => any; + path: () => any; + search: () => any; + url(url?: string, replace?: boolean): string; + onChange(cb: EventListener): () => Function[]; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js new file mode 100644 index 00000000..4086db80 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js @@ -0,0 +1,43 @@ +"use strict"; +/** + * @internalapi + * @module vanilla + */ /** */ +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require("../common"); +var utils_1 = require("./utils"); +/** A base `LocationServices` */ +var BaseLocationServices = /** @class */ (function () { + function BaseLocationServices(router, fireAfterUpdate) { + var _this = this; + this.fireAfterUpdate = fireAfterUpdate; + this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); }; + this._listeners = []; + this.hash = function () { return utils_1.parseUrl(_this._get()).hash; }; + this.path = function () { return utils_1.parseUrl(_this._get()).path; }; + this.search = function () { return utils_1.getParams(utils_1.parseUrl(_this._get()).search); }; + this._location = common_1.root.location; + this._history = common_1.root.history; + } + BaseLocationServices.prototype.url = function (url, replace) { + if (replace === void 0) { replace = true; } + if (common_1.isDefined(url) && url !== this._get()) { + this._set(null, null, url, replace); + if (this.fireAfterUpdate) { + this._listeners.forEach(function (cb) { return cb({ url: url }); }); + } + } + return utils_1.buildUrl(this); + }; + BaseLocationServices.prototype.onChange = function (cb) { + var _this = this; + this._listeners.push(cb); + return function () { return common_1.removeFrom(_this._listeners, cb); }; + }; + BaseLocationServices.prototype.dispose = function (router) { + common_1.deregAll(this._listeners); + }; + return BaseLocationServices; +}()); +exports.BaseLocationServices = BaseLocationServices; +//# sourceMappingURL=baseLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js.map new file mode 100644 index 00000000..03200182 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/baseLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "baseLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/baseLocationService.ts" + ], + "names": [], + "mappings": ";AAAA;;;GAGG,CAAC,MAAM;;AAEV,oCAAoF;AAIpF,iCAAwD;AAExD,gCAAgC;AAChC;IACE,8BAAY,MAAgB,EAAS,eAAwB;QAA7D,iBAGC;QAHoC,oBAAe,GAAf,eAAe,CAAS;QAK7D,cAAS,GAAG,UAAA,GAAG,IAAI,OAAA,KAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,GAAG,CAAC,EAAP,CAAO,CAAC,EAAtC,CAAsC,CAAC;QAElD,eAAU,GAAe,EAAE,CAAC;QA+BpC,SAAI,GAAK,cAAM,OAAA,gBAAQ,CAAC,KAAI,CAAC,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AC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC;IACH,2BAAC;AAAD,CAAC,AA/DD,IA+DC;AA/DqB,oDAAoB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */ /** */\n\nimport { deregAll, isDefined, LocationServices, removeFrom, root } from '../common';\nimport { Disposable } from '../interface';\nimport { UIRouter } from '../router';\nimport { HistoryLike, LocationLike } from './interface';\nimport { buildUrl, getParams, parseUrl } from './utils';\n\n/** A base `LocationServices` */\nexport abstract class BaseLocationServices implements LocationServices, Disposable {\n constructor(router: UIRouter, public fireAfterUpdate: boolean) {\n this._location = root.location;\n this._history = root.history;\n }\n\n _listener = evt => this._listeners.forEach(cb => cb(evt));\n\n private _listeners: Function[] = [];\n _location: LocationLike;\n _history: HistoryLike;\n\n /**\n * This should return the current internal URL representation.\n *\n * The internal URL includes only the portion that UI-Router matches.\n * It does not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n */\n abstract _get(): string;\n\n /**\n * This should set the current URL.\n *\n * The `url` param should include only the portion that UI-Router matches on.\n * It should not include:\n * - protocol\n * - server\n * - port\n * - base href or hash\n *\n * However, after this function completes, the browser URL should reflect the entire (fully qualified)\n * HREF including those data.\n */\n abstract _set(state: any, title: string, url: string, replace: boolean);\n\n hash = () => parseUrl(this._get()).hash;\n path = () => parseUrl(this._get()).path;\n search = () => getParams(parseUrl(this._get()).search);\n\n url(url?: string, replace: boolean = true): string {\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n\n if (this.fireAfterUpdate) {\n this._listeners.forEach(cb => cb({ url }));\n }\n }\n\n return buildUrl(this);\n }\n\n onChange(cb: EventListener) {\n this._listeners.push(cb);\n return () => removeFrom(this._listeners, cb);\n }\n\n dispose(router: UIRouter) {\n deregAll(this._listeners);\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.d.ts new file mode 100644 index 00000000..cc7422de --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.d.ts @@ -0,0 +1,16 @@ +import { LocationConfig } from "../common/coreservices"; +/** A `LocationConfig` that delegates to the browser's `location` object */ +export declare class BrowserLocationConfig implements LocationConfig { + private _isHtml5; + private _baseHref; + private _hashPrefix; + constructor(router?: any, _isHtml5?: boolean); + port(): number; + protocol(): string; + host(): string; + html5Mode(): boolean; + hashPrefix(): string; + baseHref(href?: string): string; + applyDocumentBaseHref(): string; + dispose(): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js new file mode 100644 index 00000000..17a758ef --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var predicates_1 = require("../common/predicates"); +/** A `LocationConfig` that delegates to the browser's `location` object */ +var BrowserLocationConfig = /** @class */ (function () { + function BrowserLocationConfig(router, _isHtml5) { + if (_isHtml5 === void 0) { _isHtml5 = false; } + this._isHtml5 = _isHtml5; + this._baseHref = undefined; + this._hashPrefix = ""; + } + BrowserLocationConfig.prototype.port = function () { + if (location.port) { + return Number(location.port); + } + return this.protocol() === 'https' ? 443 : 80; + }; + BrowserLocationConfig.prototype.protocol = function () { + return location.protocol.replace(/:/g, ''); + }; + BrowserLocationConfig.prototype.host = function () { + return location.hostname; + }; + BrowserLocationConfig.prototype.html5Mode = function () { + return this._isHtml5; + }; + BrowserLocationConfig.prototype.hashPrefix = function (newprefix) { + return predicates_1.isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix; + }; + ; + BrowserLocationConfig.prototype.baseHref = function (href) { + return predicates_1.isDefined(href) ? this._baseHref = href : + predicates_1.isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref(); + }; + BrowserLocationConfig.prototype.applyDocumentBaseHref = function () { + var baseTag = document.getElementsByTagName("base")[0]; + return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : ""; + }; + BrowserLocationConfig.prototype.dispose = function () { }; + return BrowserLocationConfig; +}()); +exports.BrowserLocationConfig = BrowserLocationConfig; +//# sourceMappingURL=browserLocationConfig.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js.map new file mode 100644 index 00000000..05203be2 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/browserLocationConfig.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "browserLocationConfig.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/browserLocationConfig.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,mDAAiD;AAGjD,2EAA2E;AAC3E;IAIE,+BAAY,MAAO,EAAU,QAAgB;QAAhB,yBAAA,EAAA,gBAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAHrC,cAAS,GAAG,SAAS,CAAC;QACtB,gBAAW,GAAG,EAAE,CAAC;IAEwB,CAAC;IAElD,oCAAI,GAAJ;QACE,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,CAAC;IAED,wCAAQ,GAAR;QACE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,oCAAI,GAAJ;QACE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAED,yCAAS,GAAT;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD,0CAAU,GAAV,UAAW,SAAkB;QAC3B,MAAM,CAAC,sBAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAChF,CAAC;IAAA,CAAC;IAEF,wCAAQ,GAAR,UAAS,IAAa;QACpB,MAAM,CAAC,sBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;YAC9C,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC9E,CAAC;IAED,qDAAqB,GAArB;QACE,IAAI,OAAO,GAAoB,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,CAAC;IAED,uCAAO,GAAP,cAAW,CAAC;IACd,4BAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,sDAAqB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isDefined } from \"../common/predicates\";\nimport { LocationConfig } from \"../common/coreservices\";\n\n/** A `LocationConfig` that delegates to the browser's `location` object */\nexport class BrowserLocationConfig implements LocationConfig {\n private _baseHref = undefined;\n private _hashPrefix = \"\";\n\n constructor(router?, private _isHtml5 = false) { }\n\n port(): number {\n if (location.port) {\n return Number(location.port);\n }\n\n return this.protocol() === 'https' ? 443 : 80;\n }\n\n protocol(): string {\n return location.protocol.replace(/:/g, '');\n }\n\n host(): string {\n return location.hostname;\n }\n\n html5Mode(): boolean {\n return this._isHtml5;\n }\n\n hashPrefix(): string;\n hashPrefix(newprefix?: string): string {\n return isDefined(newprefix) ? this._hashPrefix = newprefix : this._hashPrefix;\n };\n\n baseHref(href?: string): string {\n return isDefined(href) ? this._baseHref = href :\n isDefined(this._baseHref) ? this._baseHref : this.applyDocumentBaseHref();\n }\n\n applyDocumentBaseHref() {\n let baseTag: HTMLBaseElement = document.getElementsByTagName(\"base\")[0];\n return this._baseHref = baseTag ? baseTag.href.substr(location.origin.length) : \"\";\n }\n\n dispose() {}\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.d.ts new file mode 100644 index 00000000..884b662c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.d.ts @@ -0,0 +1,9 @@ +import { UIRouter } from '../router'; +import { BaseLocationServices } from './baseLocationService'; +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +export declare class HashLocationService extends BaseLocationServices { + constructor(router: UIRouter); + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js new file mode 100644 index 00000000..366b2cc6 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js @@ -0,0 +1,41 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var common_1 = require("../common"); +var baseLocationService_1 = require("./baseLocationService"); +/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ +var HashLocationService = /** @class */ (function (_super) { + __extends(HashLocationService, _super); + function HashLocationService(router) { + var _this = _super.call(this, router, false) || this; + common_1.root.addEventListener('hashchange', _this._listener, false); + return _this; + } + HashLocationService.prototype._get = function () { + return common_1.trimHashVal(this._location.hash); + }; + HashLocationService.prototype._set = function (state, title, url, replace) { + this._location.hash = url; + }; + HashLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + common_1.root.removeEventListener('hashchange', this._listener); + }; + return HashLocationService; +}(baseLocationService_1.BaseLocationServices)); +exports.HashLocationService = HashLocationService; +//# sourceMappingURL=hashLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js.map new file mode 100644 index 00000000..2de9b40e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/hashLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "hashLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/hashLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;;;;;;AAAA;;;GAGG;AACH,MAAM;AACN,oCAA8C;AAE9C,6DAA6D;AAE7D,0FAA0F;AAC1F;IAAyC,uCAAoB;IAC3D,6BAAY,MAAgB;QAA5B,YACE,kBAAM,MAAM,EAAE,KAAK,CAAC,SAErB;QADC,aAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;;IAC7D,CAAC;IAED,kCAAI,GAAJ;QACE,MAAM,CAAC,oBAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACD,kCAAI,GAAJ,UAAK,KAAU,EAAE,KAAa,EAAE,GAAW,EAAE,OAAgB;QAC3D,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,GAAG,CAAC;IAC5B,CAAC;IAED,qCAAO,GAAP,UAAS,MAAgB;QACvB,iBAAM,OAAO,YAAC,MAAM,CAAC,CAAC;QACtB,aAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,CAAyC,0CAAoB,GAiB5D;AAjBY,kDAAmB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { root, trimHashVal } from '../common';\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\n\n/** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\nexport class HashLocationService extends BaseLocationServices {\n constructor(router: UIRouter) {\n super(router, false);\n root.addEventListener('hashchange', this._listener, false);\n }\n\n _get() {\n return trimHashVal(this._location.hash);\n }\n _set(state: any, title: string, url: string, replace: boolean) {\n this._location.hash = url;\n }\n\n dispose (router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('hashchange', this._listener);\n }\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.d.ts new file mode 100644 index 00000000..010c5068 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.d.ts @@ -0,0 +1,19 @@ +/** + * Naive, pure JS implementation of core ui-router services + * + * + * @internalapi + * @module vanilla + */ +/** */ +export * from "./interface"; +export * from "./q"; +export * from "./injector"; +export * from "./baseLocationService"; +export * from "./hashLocationService"; +export * from "./memoryLocationService"; +export * from "./pushStateLocationService"; +export * from "./memoryLocationConfig"; +export * from "./browserLocationConfig"; +export * from "./utils"; +export * from "./plugins"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js new file mode 100644 index 00000000..453e488e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js @@ -0,0 +1,16 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./q")); +__export(require("./injector")); +__export(require("./baseLocationService")); +__export(require("./hashLocationService")); +__export(require("./memoryLocationService")); +__export(require("./pushStateLocationService")); +__export(require("./memoryLocationConfig")); +__export(require("./browserLocationConfig")); +__export(require("./utils")); +__export(require("./plugins")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js.map new file mode 100644 index 00000000..30f1070f --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/index.ts" + ], + "names": [], + "mappings": ";;;;;AAUA,yBAAoB;AACpB,gCAA2B;AAE3B,2CAAsC;AACtC,2CAAsC;AACtC,6CAAwC;AACxC,gDAA2C;AAE3C,4CAAuC;AACvC,6CAAwC;AAExC,6BAAwB;AACxB,+BAA0B", + "sourcesContent": [ + "/**\n * Naive, pure JS implementation of core ui-router services\n *\n *\n * @internalapi\n * @module vanilla\n */\n/** */\nexport * from \"./interface\";\n\nexport * from \"./q\";\nexport * from \"./injector\";\n\nexport * from \"./baseLocationService\";\nexport * from \"./hashLocationService\";\nexport * from \"./memoryLocationService\";\nexport * from \"./pushStateLocationService\";\n\nexport * from \"./memoryLocationConfig\";\nexport * from \"./browserLocationConfig\";\n\nexport * from \"./utils\";\nexport * from \"./plugins\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.d.ts new file mode 100644 index 00000000..7c8fdb36 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.d.ts @@ -0,0 +1,48 @@ +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +export declare const $injector: any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js new file mode 100644 index 00000000..bd55cb89 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var index_1 = require("../common/index"); +// globally available injectables +var globals = {}; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var ARGUMENT_NAMES = /([^\s,]+)/g; +/** + * A basic angular1-like injector api + * + * This object implements four methods similar to the + * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This object provides a naive implementation of a globally scoped dependency injection system. + * It supports the following DI approaches: + * + * ### Function parameter names + * + * A function's `.toString()` is called, and the parameter names are parsed. + * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. + * + * ```js + * function injectedFunction(FooService, BarService) { + * // FooService and BarService are injected + * } + * ``` + * + * ### Function annotation + * + * A function may be annotated with an array of dependency names as the `$inject` property. + * + * ```js + * injectedFunction.$inject = [ 'FooService', 'BarService' ]; + * function injectedFunction(fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * } + * ``` + * + * ### Array notation + * + * An array provides the names of the dependencies to inject (as strings). + * The function is the last element of the array. + * + * ```js + * [ 'FooService', 'BarService', function (fs, bs) { + * // FooService and BarService are injected as fs and bs parameters + * }] + * ``` + * + * @type {$InjectorLike} + */ +exports.$injector = { + /** Gets an object from DI based on a string token */ + get: function (name) { return globals[name]; }, + /** Returns true if an object named `name` exists in global DI */ + has: function (name) { return exports.$injector.get(name) != null; }, + /** + * Injects a function + * + * @param fn the function to inject + * @param context the function's `this` binding + * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }` + */ + invoke: function (fn, context, locals) { + var all = index_1.extend({}, globals, locals || {}); + var params = exports.$injector.annotate(fn); + var ensureExist = index_1.assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; }); + var args = params.filter(ensureExist).map(function (x) { return all[x]; }); + if (index_1.isFunction(fn)) + return fn.apply(context, args); + else + return fn.slice(-1)[0].apply(context, args); + }, + /** + * Returns a function's dependencies + * + * Analyzes a function (or array) and returns an array of DI tokens that the function requires. + * @return an array of `string`s + */ + annotate: function (fn) { + if (!index_1.isInjectable(fn)) + throw new Error("Not an injectable function: " + fn); + if (fn && fn.$inject) + return fn.$inject; + if (index_1.isArray(fn)) + return fn.slice(0, -1); + var fnStr = fn.toString().replace(STRIP_COMMENTS, ''); + var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); + return result || []; + } +}; +//# sourceMappingURL=injector.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js.map new file mode 100644 index 00000000..aa91ee7a --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/injector.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "injector.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/injector.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,yCAEyB;AAEzB,iCAAiC;AACjC,IAAI,OAAO,GAAG,EAAE,CAAC;AACjB,IAAI,cAAc,GAAG,kCAAkC,CAAC;AACxD,IAAI,cAAc,GAAG,YAAY,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACU,QAAA,SAAS,GAAG;IACvB,qDAAqD;IACrD,GAAG,EAAE,UAAA,IAAI,IAAI,OAAA,OAAO,CAAC,IAAI,CAAC,EAAb,CAAa;IAE1B,iEAAiE;IACjE,GAAG,EAAE,UAAC,IAAI,IAAK,OAAA,iBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAA3B,CAA2B;IAE1C;;;;;;OAMG;IACH,MAAM,EAAE,UAAC,EAAe,EAAE,OAAQ,EAAE,MAAO;QACzC,IAAI,GAAG,GAAG,cAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;QAC5C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,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC3F,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;CACe,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n extend, assertPredicate, isFunction, isArray, isInjectable, $InjectorLike, IInjectable\n} from \"../common/index\";\n\n// globally available injectables\nlet globals = {};\nlet STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nlet ARGUMENT_NAMES = /([^\\s,]+)/g;\n\n/**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\nexport const $injector = {\n /** Gets an object from DI based on a string token */\n get: name => globals[name],\n\n /** Returns true if an object named `name` exists in global DI */\n has: (name) => $injector.get(name) != null,\n\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: (fn: IInjectable, context?, locals?) => {\n let all = extend({}, globals, locals || {});\n let params = $injector.annotate(fn);\n let ensureExist = assertPredicate((key: string) => all.hasOwnProperty(key), key => `DI can't find injectable: '${key}'`);\n let args = params.filter(ensureExist).map(x => all[x]);\n if (isFunction(fn)) return fn.apply(context, args);\n else return (fn as any[]).slice(-1)[0].apply(context, args);\n },\n\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: (fn: IInjectable): any[] => {\n if (!isInjectable(fn)) throw new Error(`Not an injectable function: ${fn}`);\n if (fn && (fn as any).$inject) return (fn as any).$inject;\n if (isArray(fn)) return fn.slice(0, -1);\n let fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n let result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n }\n} as $InjectorLike;" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.d.ts new file mode 100644 index 00000000..50253f51 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.d.ts @@ -0,0 +1,27 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig, LocationServices } from "../common/coreservices"; +import { UIRouterPlugin } from "../interface"; +import { $InjectorLike, $QLike } from "../common/index"; +export interface LocationPlugin extends UIRouterPlugin { + service: LocationServices; + configuration: LocationConfig; +} +export interface ServicesPlugin extends UIRouterPlugin { + $q: $QLike; + $injector: $InjectorLike; +} +export interface LocationLike { + hash: string; + pathname: string; + search: string; +} +export interface HistoryLike { + back(distance?: any): void; + forward(distance?: any): void; + pushState(statedata: any, title?: string, url?: string): void; + replaceState(statedata: any, title?: string, url?: string): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js new file mode 100644 index 00000000..d549d1f1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js.map new file mode 100644 index 00000000..766db6cc --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig, LocationServices } from \"../common/coreservices\";\nimport { UIRouterPlugin } from \"../interface\";\nimport { $InjectorLike, $QLike } from \"../common/index\";\n\nexport interface LocationPlugin extends UIRouterPlugin {\n service: LocationServices;\n configuration: LocationConfig;\n}\n\nexport interface ServicesPlugin extends UIRouterPlugin {\n $q: $QLike,\n $injector: $InjectorLike\n}\n\nexport interface LocationLike {\n hash: string;\n pathname: string;\n search: string;\n}\n\nexport interface HistoryLike {\n back(distance?: any): void;\n forward(distance?: any): void;\n pushState(statedata: any, title?: string, url?: string): void;\n replaceState(statedata: any, title?: string, url?: string): void;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.d.ts new file mode 100644 index 00000000..95b8d4e1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.d.ts @@ -0,0 +1,22 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig } from "../common/coreservices"; +import { noop } from "../common/common"; +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +export declare class MemoryLocationConfig implements LocationConfig { + _baseHref: string; + _port: number; + _protocol: string; + _host: string; + _hashPrefix: string; + port: () => number; + protocol: () => string; + host: () => string; + baseHref: () => string; + html5Mode: () => boolean; + hashPrefix: (newval?: any) => any; + dispose: typeof noop; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js new file mode 100644 index 00000000..a211300e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var predicates_1 = require("../common/predicates"); +var common_1 = require("../common/common"); +/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ +var MemoryLocationConfig = /** @class */ (function () { + function MemoryLocationConfig() { + var _this = this; + this._baseHref = ''; + this._port = 80; + this._protocol = "http"; + this._host = "localhost"; + this._hashPrefix = ""; + this.port = function () { return _this._port; }; + this.protocol = function () { return _this._protocol; }; + this.host = function () { return _this._host; }; + this.baseHref = function () { return _this._baseHref; }; + this.html5Mode = function () { return false; }; + this.hashPrefix = function (newval) { return predicates_1.isDefined(newval) ? _this._hashPrefix = newval : _this._hashPrefix; }; + this.dispose = common_1.noop; + } + return MemoryLocationConfig; +}()); +exports.MemoryLocationConfig = MemoryLocationConfig; +//# sourceMappingURL=memoryLocationConfig.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js.map new file mode 100644 index 00000000..590415ee --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationConfig.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "memoryLocationConfig.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/memoryLocationConfig.ts" + ], + "names": [], + "mappings": ";;AAMA,mDAAiD;AACjD,2CAAwC;AAExC,iFAAiF;AACjF;IAAA;QAAA,iBAcC;QAbC,cAAS,GAAG,EAAE,CAAC;QACf,UAAK,GAAG,EAAE,CAAC;QACX,cAAS,GAAG,MAAM,CAAC;QACnB,UAAK,GAAG,WAAW,CAAC;QACpB,gBAAW,GAAG,EAAE,CAAC;QAEjB,SAAI,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC;QACxB,aAAQ,GAAG,cAAM,OAAA,KAAI,CAAC,SAAS,EAAd,CAAc,CAAC;QAChC,SAAI,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC;QACxB,aAAQ,GAAG,cAAM,OAAA,KAAI,CAAC,SAAS,EAAd,CAAc,CAAC;QAChC,cAAS,GAAG,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC;QACxB,eAAU,GAAG,UAAC,MAAO,IAAK,OAAA,sBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,EAAhE,CAAgE,CAAC;QAC3F,YAAO,GAAG,aAAI,CAAC;IACjB,CAAC;IAAD,2BAAC;AAAD,CAAC,AAdD,IAcC;AAdY,oDAAoB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { LocationConfig } from \"../common/coreservices\";\nimport { isDefined } from \"../common/predicates\";\nimport { noop } from \"../common/common\";\n\n/** A `LocationConfig` mock that gets/sets all config from an in-memory object */\nexport class MemoryLocationConfig implements LocationConfig {\n _baseHref = '';\n _port = 80;\n _protocol = \"http\";\n _host = \"localhost\";\n _hashPrefix = \"\";\n\n port = () => this._port;\n protocol = () => this._protocol;\n host = () => this._host;\n baseHref = () => this._baseHref;\n html5Mode = () => false;\n hashPrefix = (newval?) => isDefined(newval) ? this._hashPrefix = newval : this._hashPrefix;\n dispose = noop;\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.d.ts new file mode 100644 index 00000000..2805e2cd --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.d.ts @@ -0,0 +1,14 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { BaseLocationServices } from './baseLocationService'; +import { UIRouter } from '../router'; +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +export declare class MemoryLocationService extends BaseLocationServices { + _url: string; + constructor(router: UIRouter); + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js new file mode 100644 index 00000000..ed5111f5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js @@ -0,0 +1,34 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var baseLocationService_1 = require("./baseLocationService"); +/** A `LocationServices` that gets/sets the current location from an in-memory object */ +var MemoryLocationService = /** @class */ (function (_super) { + __extends(MemoryLocationService, _super); + function MemoryLocationService(router) { + return _super.call(this, router, true) || this; + } + MemoryLocationService.prototype._get = function () { + return this._url; + }; + MemoryLocationService.prototype._set = function (state, title, url, replace) { + this._url = url; + }; + return MemoryLocationService; +}(baseLocationService_1.BaseLocationServices)); +exports.MemoryLocationService = MemoryLocationService; +//# sourceMappingURL=memoryLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js.map new file mode 100644 index 00000000..8b6beb69 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/memoryLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "memoryLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/memoryLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;;;;;;AAAA;;;GAGG;AACH,MAAM;AACN,6DAA6D;AAG7D,wFAAwF;AACxF;IAA2C,yCAAoB;IAG7D,+BAAY,MAAgB;eAC1B,kBAAM,MAAM,EAAE,IAAI,CAAC;IACrB,CAAC;IAED,oCAAI,GAAJ;QACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,oCAAI,GAAJ,UAAK,KAAU,EAAE,KAAa,EAAE,GAAW,EAAE,OAAgB;QAC3D,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IACH,4BAAC;AAAD,CAAC,AAdD,CAA2C,0CAAoB,GAc9D;AAdY,sDAAqB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BaseLocationServices } from './baseLocationService';\nimport { UIRouter } from '../router';\n\n/** A `LocationServices` that gets/sets the current location from an in-memory object */\nexport class MemoryLocationService extends BaseLocationServices {\n _url: string;\n\n constructor(router: UIRouter) {\n super(router, true);\n }\n\n _get() {\n return this._url;\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n this._url = url;\n }\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.d.ts new file mode 100644 index 00000000..98f50892 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.d.ts @@ -0,0 +1,9 @@ +import { LocationPlugin, ServicesPlugin } from "./interface"; +import { UIRouter } from "../router"; +export declare function servicesPlugin(router: UIRouter): ServicesPlugin; +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +export declare const hashLocationPlugin: (router: UIRouter) => LocationPlugin; +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +export declare const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin; +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +export declare const memoryLocationPlugin: (router: UIRouter) => LocationPlugin; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js new file mode 100644 index 00000000..f7b1b5e9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var browserLocationConfig_1 = require("./browserLocationConfig"); +var hashLocationService_1 = require("./hashLocationService"); +var utils_1 = require("./utils"); +var pushStateLocationService_1 = require("./pushStateLocationService"); +var memoryLocationService_1 = require("./memoryLocationService"); +var memoryLocationConfig_1 = require("./memoryLocationConfig"); +var injector_1 = require("./injector"); +var q_1 = require("./q"); +var coreservices_1 = require("../common/coreservices"); +function servicesPlugin(router) { + coreservices_1.services.$injector = injector_1.$injector; + coreservices_1.services.$q = q_1.$q; + return { name: "vanilla.services", $q: q_1.$q, $injector: injector_1.$injector, dispose: function () { return null; } }; +} +exports.servicesPlugin = servicesPlugin; +/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ +exports.hashLocationPlugin = utils_1.locationPluginFactory('vanilla.hashBangLocation', false, hashLocationService_1.HashLocationService, browserLocationConfig_1.BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ +exports.pushStateLocationPlugin = utils_1.locationPluginFactory("vanilla.pushStateLocation", true, pushStateLocationService_1.PushStateLocationService, browserLocationConfig_1.BrowserLocationConfig); +/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ +exports.memoryLocationPlugin = utils_1.locationPluginFactory("vanilla.memoryLocation", false, memoryLocationService_1.MemoryLocationService, memoryLocationConfig_1.MemoryLocationConfig); +//# sourceMappingURL=plugins.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js.map new file mode 100644 index 00000000..945b7cc0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/plugins.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "plugins.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/plugins.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,iEAAgE;AAChE,6DAA4D;AAC5D,iCAAgD;AAGhD,uEAAsE;AACtE,iEAAgE;AAChE,+DAA8D;AAC9D,uCAAuC;AACvC,yBAAyB;AACzB,uDAAkD;AAElD,wBAA+B,MAAgB;IAC7C,uBAAQ,CAAC,SAAS,GAAG,oBAAS,CAAC;IAC/B,uBAAQ,CAAC,EAAE,GAAG,MAAE,CAAC;IAEjB,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,QAAA,EAAE,SAAS,sBAAA,EAAE,OAAO,EAAE,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAE,CAAC;AAC1E,CAAC;AALD,wCAKC;AAED,+EAA+E;AAClE,QAAA,kBAAkB,GAC3B,6BAAqB,CAAC,0BAA0B,EAAE,KAAK,EAAE,yCAAmB,EAAE,6CAAqB,CAAC,CAAC;AAEzG,+GAA+G;AAClG,QAAA,uBAAuB,GAChC,6BAAqB,CAAC,2BAA2B,EAAE,IAAI,EAAE,mDAAwB,EAAE,6CAAqB,CAAC,CAAC;AAE9G,sFAAsF;AACzE,QAAA,oBAAoB,GAC7B,6BAAqB,CAAC,wBAAwB,EAAE,KAAK,EAAE,6CAAqB,EAAE,2CAAoB,CAAC,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { BrowserLocationConfig } from \"./browserLocationConfig\";\nimport { HashLocationService } from \"./hashLocationService\";\nimport { locationPluginFactory } from \"./utils\";\nimport { LocationPlugin, ServicesPlugin } from \"./interface\";\nimport { UIRouter } from \"../router\";\nimport { PushStateLocationService } from \"./pushStateLocationService\";\nimport { MemoryLocationService } from \"./memoryLocationService\";\nimport { MemoryLocationConfig } from \"./memoryLocationConfig\";\nimport { $injector } from \"./injector\";\nimport { $q } from \"./q\";\nimport { services } from \"../common/coreservices\";\n\nexport function servicesPlugin(router: UIRouter): ServicesPlugin {\n services.$injector = $injector;\n services.$q = $q;\n\n return { name: \"vanilla.services\", $q, $injector, dispose: () => null };\n}\n\n/** A `UIRouterPlugin` uses the browser hash to get/set the current location */\nexport const hashLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\nexport const pushStateLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.pushStateLocation\", true, PushStateLocationService, BrowserLocationConfig);\n\n/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\nexport const memoryLocationPlugin: (router: UIRouter) => LocationPlugin =\n locationPluginFactory(\"vanilla.memoryLocation\", false, MemoryLocationService, MemoryLocationConfig);\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.d.ts new file mode 100644 index 00000000..70449647 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.d.ts @@ -0,0 +1,32 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { UIRouter } from '../router'; +import { BaseLocationServices } from './baseLocationService'; +import { LocationConfig } from '../common'; +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +export declare class PushStateLocationService extends BaseLocationServices { + _config: LocationConfig; + constructor(router: UIRouter); + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + _getBasePrefix(): string; + _get(): string; + _set(state: any, title: string, url: string, replace: boolean): void; + dispose(router: UIRouter): void; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js new file mode 100644 index 00000000..3510a8a3 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js @@ -0,0 +1,69 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var baseLocationService_1 = require("./baseLocationService"); +var common_1 = require("../common"); +/** + * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis + * + * Uses `history.pushState` and `history.replaceState` + */ +var PushStateLocationService = /** @class */ (function (_super) { + __extends(PushStateLocationService, _super); + function PushStateLocationService(router) { + var _this = _super.call(this, router, true) || this; + _this._config = router.urlService.config; + common_1.root.addEventListener('popstate', _this._listener, false); + return _this; + } + ; + /** + * Gets the base prefix without: + * - trailing slash + * - trailing filename + * - protocol and hostname + * + * If , this returns '/base'. + * If , this returns '/base'. + * + * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element + */ + PushStateLocationService.prototype._getBasePrefix = function () { + return common_1.stripFile(this._config.baseHref()); + }; + PushStateLocationService.prototype._get = function () { + var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search; + search = common_1.splitQuery(search)[1]; // strip ? if found + hash = common_1.splitHash(hash)[1]; // strip # if found + var basePrefix = this._getBasePrefix(); + var exactMatch = pathname === this._config.baseHref(); + var startsWith = pathname.startsWith(basePrefix); + pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname; + return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : ''); + }; + PushStateLocationService.prototype._set = function (state, title, url, replace) { + var fullUrl = this._getBasePrefix() + url; + if (replace) { + this._history.replaceState(state, title, fullUrl); + } + else { + this._history.pushState(state, title, fullUrl); + } + }; + PushStateLocationService.prototype.dispose = function (router) { + _super.prototype.dispose.call(this, router); + common_1.root.removeEventListener('popstate', this._listener); + }; + return PushStateLocationService; +}(baseLocationService_1.BaseLocationServices)); +exports.PushStateLocationService = PushStateLocationService; +//# sourceMappingURL=pushStateLocationService.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js.map new file mode 100644 index 00000000..2ca7353c --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/pushStateLocationService.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "pushStateLocationService.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/pushStateLocationService.ts" + ], + "names": [], + "mappings": ";;;;;;;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AAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,uCAAI,GAAJ,UAAK,KAAU,EAAE,KAAa,EAAE,GAAW,EAAE,OAAgB;QAC3D,IAAI,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,GAAG,CAAC;QAE1C,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,0CAAO,GAAP,UAAQ,MAAgB;QACtB,iBAAM,OAAO,YAAC,MAAM,CAAC,CAAC;QACtB,aAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IACH,+BAAC;AAAD,CAAC,AAnDD,CAA8C,0CAAoB,GAmDjE;AAnDY,4DAAwB", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { UIRouter } from '../router';\nimport { BaseLocationServices } from './baseLocationService';\nimport { LocationConfig, root, splitHash, splitQuery, stripFile } from '../common';\n\n/**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\nexport class PushStateLocationService extends BaseLocationServices {\n _config: LocationConfig;\n\n constructor(router: UIRouter) {\n super(router, true);\n this._config = router.urlService.config;\n root.addEventListener('popstate', this._listener, false);\n };\n\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/base'.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n _getBasePrefix() {\n return stripFile(this._config.baseHref());\n }\n\n _get() {\n let { pathname, hash, search } = this._location;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n\n const basePrefix = this._getBasePrefix();\n let exactMatch = pathname === this._config.baseHref();\n let startsWith = pathname.startsWith(basePrefix);\n pathname = exactMatch ? '/' : startsWith ? pathname.substring(basePrefix.length) : pathname;\n\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n }\n\n _set(state: any, title: string, url: string, replace: boolean) {\n let fullUrl = this._getBasePrefix() + url;\n\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n } else {\n this._history.pushState(state, title, fullUrl);\n }\n }\n\n dispose(router: UIRouter) {\n super.dispose(router);\n root.removeEventListener('popstate', this._listener);\n }\n}\n\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.d.ts new file mode 100644 index 00000000..78d27a77 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.d.ts @@ -0,0 +1,16 @@ +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +export declare const $q: any; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js new file mode 100644 index 00000000..d8c8d8ad --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var index_1 = require("../common/index"); +/** + * An angular1-like promise api + * + * This object implements four methods similar to the + * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) + * + * UI-Router evolved from an angular 1 library to a framework agnostic library. + * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. + * + * This API provides native ES6 promise support wrapped as a $q-like API. + * Internally, UI-Router uses this $q object to perform promise operations. + * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. + * + * $q-like promise api + */ +exports.$q = { + /** Normalizes a value as a promise */ + when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); }, + /** Normalizes a value as a promise rejection */ + reject: function (val) { return new Promise(function (resolve, reject) { reject(val); }); }, + /** @returns a deferred object, which has `resolve` and `reject` functions */ + defer: function () { + var deferred = {}; + deferred.promise = new Promise(function (resolve, reject) { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }, + /** Like Promise.all(), but also supports object key/promise notation like $q */ + all: function (promises) { + if (index_1.isArray(promises)) { + return Promise.all(promises); + } + if (index_1.isObject(promises)) { + // Convert promises map to promises array. + // When each promise resolves, map it to a tuple { key: key, val: val } + var chain = Object.keys(promises) + .map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); }); + // Then wait for all promises to resolve, and convert them back to an object + return exports.$q.all(chain).then(function (values) { + return values.reduce(function (acc, tuple) { acc[tuple.key] = tuple.val; return acc; }, {}); + }); + } + } +}; +//# sourceMappingURL=q.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js.map new file mode 100644 index 00000000..eab29724 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/q.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "q.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/q.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,yCAA4D;AA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uC,CAAC,CAAC;YAEzD,4EAA4E;YAC5E,MAAM,CAAC,UAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAA,MAAM;gBAC9B,OAAA,MAAM,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,KAAK,IAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAA9E,CAA8E,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;CACQ,CAAC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport { isArray, isObject, $QLike } from \"../common/index\";\n\n/**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\nexport const $q = {\n /** Normalizes a value as a promise */\n when: (val) => new Promise((resolve, reject) => resolve(val)),\n\n /** Normalizes a value as a promise rejection */\n reject: (val) => new Promise((resolve, reject) => { reject(val); }),\n\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: () => {\n let deferred: any = {};\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: (promises: { [key: string]: Promise } | Promise[]) => {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n let chain = Object.keys(promises)\n .map(key => promises[key].then(val => ({key, val})));\n\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(values =>\n values.reduce((acc, tuple) => { acc[tuple.key] = tuple.val; return acc; }, {}));\n }\n }\n} as $QLike;" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.d.ts new file mode 100644 index 00000000..4c8d80a9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.d.ts @@ -0,0 +1,26 @@ +/** + * @internalapi + * @module vanilla + */ +/** */ +import { LocationConfig, LocationServices } from "../common"; +import { UIRouter } from "../router"; +export declare const keyValsToObjectR: (accum: any, [key, val]: [any, any]) => any; +export declare const getParams: (queryString: string) => any; +export declare function parseUrl(url: string): { + path: any; + search: any; + hash: any; + url: string; +}; +export declare const buildUrl: (loc: LocationServices) => string; +export declare function locationPluginFactory(name: string, isHtml5: boolean, serviceClass: { + new (router?: UIRouter): LocationServices; +}, configurationClass: { + new (router?: UIRouter, isHtml5?: boolean): LocationConfig; +}): (router: UIRouter) => { + name: string; + service: LocationServices; + configuration: LocationConfig; + dispose: (router: UIRouter) => void; +}; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js new file mode 100644 index 00000000..10750703 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @internalapi + * @module vanilla + */ +/** */ +var common_1 = require("../common"); +exports.keyValsToObjectR = function (accum, _a) { + var key = _a[0], val = _a[1]; + if (!accum.hasOwnProperty(key)) { + accum[key] = val; + } + else if (common_1.isArray(accum[key])) { + accum[key].push(val); + } + else { + accum[key] = [accum[key], val]; + } + return accum; +}; +exports.getParams = function (queryString) { + return queryString.split("&").filter(common_1.identity).map(common_1.splitEqual).reduce(exports.keyValsToObjectR, {}); +}; +function parseUrl(url) { + var orEmptyString = function (x) { return x || ""; }; + var _a = common_1.splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1]; + var _b = common_1.splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1]; + return { path: path, search: search, hash: hash, url: url }; +} +exports.parseUrl = parseUrl; +exports.buildUrl = function (loc) { + var path = loc.path(); + var searchObject = loc.search(); + var hash = loc.hash(); + var search = Object.keys(searchObject).map(function (key) { + var param = searchObject[key]; + var vals = common_1.isArray(param) ? param : [param]; + return vals.map(function (val) { return key + "=" + val; }); + }).reduce(common_1.unnestR, []).join("&"); + return path + (search ? "?" + search : "") + (hash ? "#" + hash : ""); +}; +function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) { + return function (router) { + var service = router.locationService = new serviceClass(router); + var configuration = router.locationConfig = new configurationClass(router, isHtml5); + function dispose(router) { + router.dispose(service); + router.dispose(configuration); + } + return { name: name, service: service, configuration: configuration, dispose: dispose }; + }; +} +exports.locationPluginFactory = locationPluginFactory; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js.map new file mode 100644 index 00000000..477b6c57 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/vanilla/utils.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "utils.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/vanilla/utils.ts" + ], + "names": [], + "mappings": ";;AAAA;;;GAGG;AACH,MAAM;AACN,oCAEmB;AAGN,QAAA,gBAAgB,GAAG,UAAC,KAAK,EAAE,EAAU;QAAT,WAAG,EAAE,WAAG;IAC/C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/B,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACnB,CAAC;IAAC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,CAAC,CAAC;QAC9B,IAAI,IAAI,GAAG,gBAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,GAAG,GAAG,GAAG,GAAG,EAAf,CAAe,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEjC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,+BACI,IAAY,EACZ,OAAgB,EAChB,YAA0D,EAC1D,kBAAiF;IAEnF,MAAM,CAAC,UAAS,MAAgB;QAC9B,IAAI,OAAO,GAAS,MAAM,CAAC,eAAe,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc,GAAI,IAAI,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAErF,iBAAiB,MAAgB;YAC/B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACxB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,aAAa,eAAA,EAAE,OAAO,SAAA,EAAE,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC;AAjBD,sDAiBC", + "sourcesContent": [ + "/**\n * @internalapi\n * @module vanilla\n */\n/** */\nimport {\n LocationConfig, LocationServices, identity, unnestR, isArray, splitEqual, splitHash, splitQuery\n} from \"../common\";\nimport { UIRouter } from \"../router\";\n\nexport const keyValsToObjectR = (accum, [key, val]) => {\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n } else if (isArray(accum[key])) {\n accum[key].push(val);\n } else {\n accum[key] = [accum[key], val]\n }\n return accum;\n};\n\nexport const getParams = (queryString: string): any =>\n queryString.split(\"&\").filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n\nexport function parseUrl(url: string) {\n const orEmptyString = x => x || \"\";\n let [beforehash, hash] = splitHash(url).map(orEmptyString);\n let [path, search] = splitQuery(beforehash).map(orEmptyString);\n\n return { path, search, hash, url };\n}\n\nexport const buildUrl = (loc: LocationServices) => {\n let path = loc.path();\n let searchObject = loc.search();\n let hash = loc.hash();\n\n let search = Object.keys(searchObject).map(key => {\n let param = searchObject[key];\n let vals = isArray(param) ? param : [param];\n return vals.map(val => key + \"=\" + val);\n }).reduce(unnestR, []).join(\"&\");\n\n return path + (search ? \"?\" + search : \"\") + (hash ? \"#\" + hash : \"\");\n};\n\nexport function locationPluginFactory(\n name: string,\n isHtml5: boolean,\n serviceClass: { new(router?: UIRouter): LocationServices },\n configurationClass: { new(router?: UIRouter, isHtml5?: boolean): LocationConfig }\n) {\n return function(router: UIRouter) {\n let service = router.locationService = new serviceClass(router);\n let configuration = router.locationConfig = new configurationClass(router, isHtml5);\n\n function dispose(router: UIRouter) {\n router.dispose(service);\n router.dispose(configuration);\n }\n\n return { name, service, configuration, dispose };\n };\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/index.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.d.ts new file mode 100644 index 00000000..7d0b82f7 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.d.ts @@ -0,0 +1,6 @@ +/** + * @coreapi + * @module view + */ /** for typedoc */ +export * from "./interface"; +export * from "./view"; diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js new file mode 100644 index 00000000..e72f6374 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./view")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js.map new file mode 100644 index 00000000..bcc63e39 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/index.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/index.ts" + ], + "names": [], + "mappings": ";;;;;AAKA,4BAAuB", + "sourcesContent": [ + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nexport * from \"./interface\";\nexport * from \"./view\";\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.d.ts new file mode 100644 index 00000000..b796a326 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.d.ts @@ -0,0 +1,50 @@ +/** @module view */ /** for typedoc */ +import { _ViewDeclaration } from "../state/interface"; +import { PathNode } from "../path/pathNode"; +/** + * The context ref can be anything that has a `name` and a `parent` reference to another IContextRef + */ +export interface ViewContext { + name: string; + parent: ViewContext; +} +/** @internalapi */ +export interface ActiveUIView { + /** type of framework, e.g., "ng1" or "ng2" */ + $type: string; + /** An auto-incremented id */ + id: number; + /** The ui-view short name */ + name: string; + /** The ui-view's fully qualified name */ + fqn: string; + /** The ViewConfig that is currently loaded into the ui-view */ + config: ViewConfig; + /** The state context in which the ui-view tag was created. */ + creationContext: ViewContext; + /** A callback that should apply a ViewConfig (or clear the ui-view, if config is undefined) */ + configUpdated: (config: ViewConfig) => void; +} +/** + * This interface represents a [[_ViewDeclaration]] that is bound to a [[PathNode]]. + * + * A `ViewConfig` is the runtime definition of a single view. + * + * During a transition, `ViewConfig`s are created for each [[_ViewDeclaration]] defined on each "entering" [[StateObject]]. + * Then, the [[ViewService]] finds any matching `ui-view`(s) in the DOM, and supplies the ui-view + * with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`. + * + * A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the + * context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches + * the `uiViewName` address. + */ +export interface ViewConfig { + $id: number; + /** The normalized view declaration from [[State.views]] */ + viewDecl: _ViewDeclaration; + /** The node the ViewConfig is bound to */ + path: PathNode[]; + /** Fetches templates, runs dynamic (controller|template)Provider code, lazy loads Components, etc */ + load(): Promise; + loaded: boolean; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js new file mode 100644 index 00000000..d549d1f1 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js.map new file mode 100644 index 00000000..fcc41757 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/interface.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "interface.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/interface.ts" + ], + "names": [], + "mappings": "", + "sourcesContent": [ + "/** @module view */ /** for typedoc */\nimport {_ViewDeclaration} from \"../state/interface\";\nimport {PathNode} from \"../path/pathNode\";\n\n/**\n * The context ref can be anything that has a `name` and a `parent` reference to another IContextRef\n */\nexport interface ViewContext {\n name: string;\n parent: ViewContext;\n}\n\n/** @internalapi */\nexport interface ActiveUIView {\n /** type of framework, e.g., \"ng1\" or \"ng2\" */\n $type: string;\n /** An auto-incremented id */\n id: number;\n /** The ui-view short name */\n name: string;\n /** The ui-view's fully qualified name */\n fqn: string;\n /** The ViewConfig that is currently loaded into the ui-view */\n config: ViewConfig;\n /** The state context in which the ui-view tag was created. */\n creationContext: ViewContext;\n /** A callback that should apply a ViewConfig (or clear the ui-view, if config is undefined) */\n configUpdated: (config: ViewConfig) => void;\n}\n\n/**\n * This interface represents a [[_ViewDeclaration]] that is bound to a [[PathNode]].\n *\n * A `ViewConfig` is the runtime definition of a single view.\n *\n * During a transition, `ViewConfig`s are created for each [[_ViewDeclaration]] defined on each \"entering\" [[StateObject]].\n * Then, the [[ViewService]] finds any matching `ui-view`(s) in the DOM, and supplies the ui-view\n * with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`.\n *\n * A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the\n * context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches\n * the `uiViewName` address.\n */\nexport interface ViewConfig {\n /* The unique id for the ViewConfig instance */\n $id: number;\n /** The normalized view declaration from [[State.views]] */\n viewDecl: _ViewDeclaration;\n\n /** The node the ViewConfig is bound to */\n path: PathNode[];\n\n /** Fetches templates, runs dynamic (controller|template)Provider code, lazy loads Components, etc */\n load(): Promise;\n \n loaded: boolean;\n}\n" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/view.d.ts b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.d.ts new file mode 100644 index 00000000..eaa38fd0 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.d.ts @@ -0,0 +1,154 @@ +/** + * @coreapi + * @module view + */ /** for typedoc */ +import { TypedMap } from "../common/common"; +import { PathNode } from "../path/pathNode"; +import { ActiveUIView, ViewContext, ViewConfig } from "./interface"; +import { _ViewDeclaration } from "../state/interface"; +export declare type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig | ViewConfig[]; +export interface ViewServicePluginAPI { + _rootViewContext(context?: ViewContext): ViewContext; + _viewConfigFactory(viewType: string, factory: ViewConfigFactory): any; + _registeredUIViews(): ActiveUIView[]; + _activeViewConfigs(): ViewConfig[]; +} +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +export declare class ViewService { + private _uiViews; + private _viewConfigs; + private _rootContext; + private _viewConfigFactories; + constructor(); + _pluginapi: ViewServicePluginAPI; + private _rootViewContext(context?); + private _viewConfigFactory(viewType, factory); + createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[]; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + deactivateViewConfig(viewConfig: ViewConfig): void; + activateViewConfig(viewConfig: ViewConfig): void; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + static matches: (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => boolean; + sync(): void; + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + registerUIView(uiView: ActiveUIView): () => void; + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + available(): any[]; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + active(): any[]; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + static normalizeUIViewTarget(context: ViewContext, rawViewName?: string): { + uiViewName: string; + uiViewContextAnchor: string; + }; +} diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js new file mode 100644 index 00000000..3f6b1813 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js @@ -0,0 +1,285 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @coreapi + * @module view + */ /** for typedoc */ +var common_1 = require("../common/common"); +var hof_1 = require("../common/hof"); +var predicates_1 = require("../common/predicates"); +var trace_1 = require("../common/trace"); +/** + * The View service + * + * This service pairs existing `ui-view` components (which live in the DOM) + * with view configs (from the state declaration objects: [[StateDeclaration.views]]). + * + * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. + * The views from exited states are deactivated via [[deactivateViewConfig]]. + * (See: the [[registerActivateViews]] Transition Hook) + * + * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. + * + * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) + * are configured with the matching [[ViewConfig]](s) + * + */ +var ViewService = /** @class */ (function () { + function ViewService() { + var _this = this; + this._uiViews = []; + this._viewConfigs = []; + this._viewConfigFactories = {}; + this._pluginapi = { + _rootViewContext: this._rootViewContext.bind(this), + _viewConfigFactory: this._viewConfigFactory.bind(this), + _registeredUIViews: function () { return _this._uiViews; }, + _activeViewConfigs: function () { return _this._viewConfigs; }, + }; + } + ViewService.prototype._rootViewContext = function (context) { + return this._rootContext = context || this._rootContext; + }; + ; + ViewService.prototype._viewConfigFactory = function (viewType, factory) { + this._viewConfigFactories[viewType] = factory; + }; + ViewService.prototype.createViewConfig = function (path, decl) { + var cfgFactory = this._viewConfigFactories[decl.$type]; + if (!cfgFactory) + throw new Error("ViewService: No view config factory registered for type " + decl.$type); + var cfgs = cfgFactory(path, decl); + return predicates_1.isArray(cfgs) ? cfgs : [cfgs]; + }; + /** + * Deactivates a ViewConfig. + * + * This function deactivates a `ViewConfig`. + * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. + * + * @param viewConfig The ViewConfig view to deregister. + */ + ViewService.prototype.deactivateViewConfig = function (viewConfig) { + trace_1.trace.traceViewServiceEvent("<- Removing", viewConfig); + common_1.removeFrom(this._viewConfigs, viewConfig); + }; + ViewService.prototype.activateViewConfig = function (viewConfig) { + trace_1.trace.traceViewServiceEvent("-> Registering", viewConfig); + this._viewConfigs.push(viewConfig); + }; + ViewService.prototype.sync = function () { + var _this = this; + var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(common_1.applyPairs, {}); + // Return a weighted depth value for a uiView. + // The depth is the nesting depth of ui-views (based on FQN; times 10,000) + // plus the depth of the state that is populating the uiView + function uiViewDepth(uiView) { + var stateDepth = function (context) { + return context && context.parent ? stateDepth(context.parent) + 1 : 1; + }; + return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext); + } + // Return the ViewConfig's context's depth in the context tree. + function viewConfigDepth(config) { + var context = config.viewDecl.$context, count = 0; + while (++count && context.parent) + context = context.parent; + return count; + } + // Given a depth function, returns a compare function which can return either ascending or descending order + var depthCompare = hof_1.curry(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); }); + var matchingConfigPair = function (uiView) { + var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView)); + if (matchingConfigs.length > 1) { + // This is OK. Child states can target a ui-view that the parent state also targets (the child wins) + // Sort by depth and return the match from the deepest child + // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs); + matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending + } + return [uiView, matchingConfigs[0]]; + }; + var configureUIView = function (_a) { + var uiView = _a[0], viewConfig = _a[1]; + // If a parent ui-view is reconfigured, it could destroy child ui-views. + // Before configuring a child ui-view, make sure it's still in the active uiViews array. + if (_this._uiViews.indexOf(uiView) !== -1) + uiView.configUpdated(viewConfig); + }; + // Sort views by FQN and state depth. Process uiviews nearest the root first. + var pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair); + trace_1.trace.traceViewSync(pairs); + pairs.forEach(configureUIView); + }; + ; + /** + * Registers a `ui-view` component + * + * When a `ui-view` component is created, it uses this method to register itself. + * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. + * + * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, + * and what the view's state context is. + * + * Note: There is no corresponding `deregisterUIView`. + * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. + * + * @param uiView The metadata for a UIView + * @return a de-registration function used when the view is destroyed. + */ + ViewService.prototype.registerUIView = function (uiView) { + trace_1.trace.traceViewServiceUIViewEvent("-> Registering", uiView); + var uiViews = this._uiViews; + var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; }; + if (uiViews.filter(fqnAndTypeMatches).length) + trace_1.trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:", uiView); + uiViews.push(uiView); + this.sync(); + return function () { + var idx = uiViews.indexOf(uiView); + if (idx === -1) { + trace_1.trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView", uiView); + return; + } + trace_1.trace.traceViewServiceUIViewEvent("<- Deregistering", uiView); + common_1.removeFrom(uiViews)(uiView); + }; + }; + ; + /** + * Returns the list of views currently available on the page, by fully-qualified name. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.available = function () { + return this._uiViews.map(hof_1.prop("fqn")); + }; + /** + * Returns the list of views on the page containing loaded content. + * + * @return {Array} Returns an array of fully-qualified view names. + */ + ViewService.prototype.active = function () { + return this._uiViews.filter(hof_1.prop("$config")).map(hof_1.prop("name")); + }; + /** + * Normalizes a view's name from a state.views configuration block. + * + * This should be used by a framework implementation to calculate the values for + * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. + * + * @param context the context object (state declaration) that the view belongs to + * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] + * + * @returns the normalized uiViewName and uiViewContextAnchor that the view targets + */ + ViewService.normalizeUIViewTarget = function (context, rawViewName) { + if (rawViewName === void 0) { rawViewName = ""; } + // TODO: Validate incoming view name with a regexp to allow: + // ex: "view.name@foo.bar" , "^.^.view.name" , "view.name@^.^" , "" , + // "@" , "$default@^" , "!$default.$default" , "!foo.bar" + var viewAtContext = rawViewName.split("@"); + var uiViewName = viewAtContext[0] || "$default"; // default to unnamed view + var uiViewContextAnchor = predicates_1.isString(viewAtContext[1]) ? viewAtContext[1] : "^"; // default to parent context + // Handle relative view-name sugar syntax. + // Matches rawViewName "^.^.^.foo.bar" into array: ["^.^.^.foo.bar", "^.^.^", "foo.bar"], + var relativeViewNameSugar = /^(\^(?:\.\^)*)\.(.*$)/.exec(uiViewName); + if (relativeViewNameSugar) { + // Clobbers existing contextAnchor (rawViewName validation will fix this) + uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to "^.^.^" + uiViewName = relativeViewNameSugar[2]; // set view-name to "foo.bar" + } + if (uiViewName.charAt(0) === '!') { + uiViewName = uiViewName.substr(1); + uiViewContextAnchor = ""; // target absolutely from root + } + // handle parent relative targeting "^.^.^" + var relativeMatch = /^(\^(?:\.\^)*)$/; + if (relativeMatch.exec(uiViewContextAnchor)) { + var anchor = uiViewContextAnchor.split(".").reduce((function (anchor, x) { return anchor.parent; }), context); + uiViewContextAnchor = anchor.name; + } + else if (uiViewContextAnchor === '.') { + uiViewContextAnchor = context.name; + } + return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor }; + }; + /** + * Given a ui-view and a ViewConfig, determines if they "match". + * + * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in + * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. + * + * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or + * can be a segmented ui-view path, describing a portion of a ui-view fqn. + * + * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type + * + * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: + * - the ui-view's name matches the ViewConfig's target name + * - the ui-view's context matches the ViewConfig's anchor + * + * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: + * - There exists a parent ui-view where: + * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name + * - the parent ui-view's context matches the ViewConfig's anchor + * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn + * + * Example: + * + * DOM: + * + * + * + * + * + * + * + * + * + * uiViews: [ + * { fqn: "$default", creationContext: { name: "" } }, + * { fqn: "$default.foo", creationContext: { name: "A" } }, + * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } + * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } + * ] + * + * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": + * + * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } + * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } + * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } + * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } + * + * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: + * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] + * - There exists a parent ui-view (which has fqn: "$default.foo") where: + * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name + * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" + * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match + * the tail of the ui-view's fqn "default.bar" + * + * @internalapi + */ + ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) { + // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc + if (uiView.$type !== viewConfig.viewDecl.$type) + return false; + // Split names apart from both viewConfig and uiView into segments + var vc = viewConfig.viewDecl; + var vcSegments = vc.$uiViewName.split("."); + var uivSegments = uiView.fqn.split("."); + // Check if the tails of the segment arrays match. ex, these arrays' tails match: + // vc: ["foo", "bar"], uiv fqn: ["$default", "foo", "bar"] + if (!common_1.equals(vcSegments, uivSegments.slice(0 - vcSegments.length))) + return false; + // Now check if the fqn ending at the first segment of the viewConfig matches the context: + // ["$default", "foo"].join(".") == "$default.foo", does the ui-view $default.foo context match? + var negOffset = (1 - vcSegments.length) || undefined; + var fqnToFirstSegment = uivSegments.slice(0, negOffset).join("."); + var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext; + return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name); + }; }; + return ViewService; +}()); +exports.ViewService = ViewService; +//# sourceMappingURL=view.js.map \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js.map b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js.map new file mode 100644 index 00000000..705bad3e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/lib/view/view.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "view.js", + "sourceRoot": "", + "sources": [ + "@uirouter/core/view/view.ts" + ], + "names": [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,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;QACrD,IAAI,iBAAiB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,aAAa,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC;QACpE,MAAM,CAAC,EAAE,CAAC,oBAAoB,KAAK,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC,EApBgF,CAoBhF,CAAA;IAqJH,kBAAC;CAAA,AAlRD,IAkRC;AAlRY,kCAAW", + "sourcesContent": [ + "/**\n * @coreapi\n * @module view\n */ /** for typedoc */\nimport {equals, applyPairs, removeFrom, TypedMap} from \"../common/common\";\nimport {curry, prop} from \"../common/hof\";\nimport {isString, isArray} from \"../common/predicates\";\nimport {trace} from \"../common/trace\";\nimport {PathNode} from \"../path/pathNode\";\n\nimport {ActiveUIView, ViewContext, ViewConfig} from \"./interface\";\nimport {_ViewDeclaration} from \"../state/interface\";\n\nexport type ViewConfigFactory = (path: PathNode[], decl: _ViewDeclaration) => ViewConfig|ViewConfig[];\n\nexport interface ViewServicePluginAPI {\n _rootViewContext(context?: ViewContext): ViewContext;\n _viewConfigFactory(viewType: string, factory: ViewConfigFactory);\n _registeredUIViews(): ActiveUIView[];\n _activeViewConfigs(): ViewConfig[];\n}\n\n/**\n * The View service\n *\n * This service pairs existing `ui-view` components (which live in the DOM)\n * with view configs (from the state declaration objects: [[StateDeclaration.views]]).\n *\n * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].\n * The views from exited states are deactivated via [[deactivateViewConfig]].\n * (See: the [[registerActivateViews]] Transition Hook)\n *\n * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].\n *\n * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])\n * are configured with the matching [[ViewConfig]](s)\n *\n */\nexport class ViewService {\n private _uiViews: ActiveUIView[] = [];\n private _viewConfigs: ViewConfig[] = [];\n private _rootContext: ViewContext;\n private _viewConfigFactories: { [key: string]: ViewConfigFactory } = {};\n\n constructor() { }\n\n public _pluginapi: ViewServicePluginAPI = {\n _rootViewContext: this._rootViewContext.bind(this),\n _viewConfigFactory: this._viewConfigFactory.bind(this),\n _registeredUIViews: () => this._uiViews,\n _activeViewConfigs: () => this._viewConfigs,\n };\n\n private _rootViewContext(context?: ViewContext): ViewContext {\n return this._rootContext = context || this._rootContext;\n };\n\n private _viewConfigFactory(viewType: string, factory: ViewConfigFactory) {\n this._viewConfigFactories[viewType] = factory;\n }\n\n createViewConfig(path: PathNode[], decl: _ViewDeclaration): ViewConfig[] {\n let cfgFactory = this._viewConfigFactories[decl.$type];\n if (!cfgFactory) throw new Error(\"ViewService: No view config factory registered for type \" + decl.$type);\n let cfgs = cfgFactory(path, decl);\n return isArray(cfgs) ? cfgs : [cfgs];\n }\n \n /**\n * Deactivates a ViewConfig.\n *\n * This function deactivates a `ViewConfig`.\n * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired.\n *\n * @param viewConfig The ViewConfig view to deregister.\n */\n deactivateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"<- Removing\", viewConfig);\n removeFrom(this._viewConfigs, viewConfig);\n }\n\n activateViewConfig(viewConfig: ViewConfig) {\n trace.traceViewServiceEvent(\"-> Registering\", viewConfig);\n this._viewConfigs.push(viewConfig);\n }\n\n /**\n * Given a ui-view and a ViewConfig, determines if they \"match\".\n *\n * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in\n * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.\n *\n * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or\n * can be a segmented ui-view path, describing a portion of a ui-view fqn.\n *\n * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type\n *\n * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if:\n * - the ui-view's name matches the ViewConfig's target name\n * - the ui-view's context matches the ViewConfig's anchor\n *\n * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if:\n * - There exists a parent ui-view where:\n * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name\n * - the parent ui-view's context matches the ViewConfig's anchor\n * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn\n *\n * Example:\n *\n * DOM:\n * \n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internalapi\n */\n static matches = (uiViewsByFqn: TypedMap, uiView: ActiveUIView) => (viewConfig: ViewConfig) => {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type) return false;\n\n // Split names apart from both viewConfig and uiView into segments\n let vc = viewConfig.viewDecl;\n let vcSegments = vc.$uiViewName.split(\".\");\n let uivSegments = uiView.fqn.split(\".\");\n\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n let negOffset = (1 - vcSegments.length) || undefined;\n let fqnToFirstSegment = uivSegments.slice(0, negOffset).join(\".\");\n let uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }\n\n sync() {\n let uiViewsByFqn: TypedMap =\n this._uiViews.map(uiv => [uiv.fqn, uiv]).reduce(applyPairs, {});\n\n // Return a weighted depth value for a uiView.\n // The depth is the nesting depth of ui-views (based on FQN; times 10,000)\n // plus the depth of the state that is populating the uiView\n function uiViewDepth(uiView: ActiveUIView) {\n const stateDepth = (context: ViewContext) =>\n context && context.parent ? stateDepth(context.parent) + 1 : 1;\n return (uiView.fqn.split(\".\").length * 10000) + stateDepth(uiView.creationContext);\n }\n\n // Return the ViewConfig's context's depth in the context tree.\n function viewConfigDepth(config: ViewConfig) {\n let context: ViewContext = config.viewDecl.$context, count = 0;\n while (++count && context.parent) context = context.parent;\n return count;\n }\n\n // Given a depth function, returns a compare function which can return either ascending or descending order\n const depthCompare = curry((depthFn, posNeg, left, right) => posNeg * (depthFn(left) - depthFn(right)));\n\n const matchingConfigPair = (uiView: ActiveUIView) => {\n let matchingConfigs = this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView));\n if (matchingConfigs.length > 1) {\n // This is OK. Child states can target a ui-view that the parent state also targets (the child wins)\n // Sort by depth and return the match from the deepest child\n // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs);\n matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending\n }\n return [uiView, matchingConfigs[0]];\n };\n\n const configureUIView = ([uiView, viewConfig]) => {\n // If a parent ui-view is reconfigured, it could destroy child ui-views.\n // Before configuring a child ui-view, make sure it's still in the active uiViews array.\n if (this._uiViews.indexOf(uiView) !== -1)\n uiView.configUpdated(viewConfig);\n };\n\n // Sort views by FQN and state depth. Process uiviews nearest the root first.\n const pairs = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair);\n\n trace.traceViewSync(pairs);\n\n pairs.forEach(configureUIView);\n };\n\n /**\n * Registers a `ui-view` component\n *\n * When a `ui-view` component is created, it uses this method to register itself.\n * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]].\n *\n * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,\n * and what the view's state context is.\n *\n * Note: There is no corresponding `deregisterUIView`.\n * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.\n *\n * @param uiView The metadata for a UIView\n * @return a de-registration function used when the view is destroyed.\n */\n registerUIView(uiView: ActiveUIView) {\n trace.traceViewServiceUIViewEvent(\"-> Registering\", uiView);\n let uiViews = this._uiViews;\n const fqnAndTypeMatches = (uiv: ActiveUIView) => uiv.fqn === uiView.fqn && uiv.$type === uiView.$type;\n if (uiViews.filter(fqnAndTypeMatches).length)\n trace.traceViewServiceUIViewEvent(\"!!!! duplicate uiView named:\", uiView);\n\n uiViews.push(uiView);\n this.sync();\n\n return () => {\n let idx = uiViews.indexOf(uiView);\n if (idx === -1) {\n trace.traceViewServiceUIViewEvent(\"Tried removing non-registered uiView\", uiView);\n return;\n }\n trace.traceViewServiceUIViewEvent(\"<- Deregistering\", uiView);\n removeFrom(uiViews)(uiView);\n };\n };\n\n /**\n * Returns the list of views currently available on the page, by fully-qualified name.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n available() {\n return this._uiViews.map(prop(\"fqn\"));\n }\n\n /**\n * Returns the list of views on the page containing loaded content.\n *\n * @return {Array} Returns an array of fully-qualified view names.\n */\n active() {\n return this._uiViews.filter(prop(\"$config\")).map(prop(\"name\"));\n }\n\n /**\n * Normalizes a view's name from a state.views configuration block.\n *\n * This should be used by a framework implementation to calculate the values for\n * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].\n *\n * @param context the context object (state declaration) that the view belongs to\n * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]\n *\n * @returns the normalized uiViewName and uiViewContextAnchor that the view targets\n */\n static normalizeUIViewTarget(context: ViewContext, rawViewName = \"\") {\n // TODO: Validate incoming view name with a regexp to allow:\n // ex: \"view.name@foo.bar\" , \"^.^.view.name\" , \"view.name@^.^\" , \"\" ,\n // \"@\" , \"$default@^\" , \"!$default.$default\" , \"!foo.bar\"\n let viewAtContext: string[] = rawViewName.split(\"@\");\n let uiViewName = viewAtContext[0] || \"$default\"; // default to unnamed view\n let uiViewContextAnchor = isString(viewAtContext[1]) ? viewAtContext[1] : \"^\"; // default to parent context\n\n // Handle relative view-name sugar syntax.\n // Matches rawViewName \"^.^.^.foo.bar\" into array: [\"^.^.^.foo.bar\", \"^.^.^\", \"foo.bar\"],\n let relativeViewNameSugar = /^(\\^(?:\\.\\^)*)\\.(.*$)/.exec(uiViewName);\n if (relativeViewNameSugar) {\n // Clobbers existing contextAnchor (rawViewName validation will fix this)\n uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to \"^.^.^\"\n uiViewName = relativeViewNameSugar[2]; // set view-name to \"foo.bar\"\n }\n\n if (uiViewName.charAt(0) === '!') {\n uiViewName = uiViewName.substr(1);\n uiViewContextAnchor = \"\"; // target absolutely from root\n }\n\n // handle parent relative targeting \"^.^.^\"\n let relativeMatch = /^(\\^(?:\\.\\^)*)$/;\n if (relativeMatch.exec(uiViewContextAnchor)) {\n let anchor = uiViewContextAnchor.split(\".\").reduce(((anchor, x) => anchor.parent), context);\n uiViewContextAnchor = anchor.name;\n } else if (uiViewContextAnchor === '.') {\n uiViewContextAnchor = context.name;\n }\n\n return {uiViewName, uiViewContextAnchor};\n }\n}" + ] +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/@uirouter/core/migrate/migrate.json b/public/app/vendor/node_modules/@uirouter/core/migrate/migrate.json new file mode 100644 index 00000000..0da49d1e --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/migrate/migrate.json @@ -0,0 +1,4 @@ +{ + "old": "ui-router-core", + "new": "@uirouter/core" +} diff --git a/public/app/vendor/node_modules/@uirouter/core/migrate/migratewarn.js b/public/app/vendor/node_modules/@uirouter/core/migrate/migratewarn.js new file mode 100755 index 00000000..60e85ae5 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/migrate/migratewarn.js @@ -0,0 +1,10 @@ +#!env node +"use strict"; + +var pkg = require('../package.json'); +var migrate = require('./migrate.json'); + +if (pkg.name === migrate.old) { + var warning = 'WARNING! this npm package "' + migrate.old + '" has moved to "' + migrate.new + '". Please update your package.json'; + console.log("\x1b[1m\x1b[37m\x1b[41m%s\x1b[0m", warning); +} diff --git a/public/app/vendor/node_modules/@uirouter/core/package.json b/public/app/vendor/node_modules/@uirouter/core/package.json new file mode 100644 index 00000000..c136bef9 --- /dev/null +++ b/public/app/vendor/node_modules/@uirouter/core/package.json @@ -0,0 +1,167 @@ +{ + "_args": [ + [ + { + "raw": "@uirouter/core@5.0.11", + "scope": "@uirouter", + "escapedName": "@uirouter%2fcore", + "name": "@uirouter/core", + "rawSpec": "5.0.11", + "spec": "5.0.11", + "type": "version" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/@uirouter/angularjs" + ] + ], + "_from": "@uirouter/core@5.0.11", + "_id": "@uirouter/core@5.0.11", + "_inCache": true, + "_location": "/@uirouter/core", + "_nodeVersion": "7.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/core-5.0.11.tgz_1508003047749_0.19177841721102595" + }, + "_npmUser": { + "name": "christopherthielen", + "email": "christopherthielen@ikkyikkyikkypikangzoopboing.com" + }, + "_npmVersion": "5.4.2", + "_phantomChildren": {}, + "_requested": { + "raw": "@uirouter/core@5.0.11", + "scope": "@uirouter", + "escapedName": "@uirouter%2fcore", + "name": "@uirouter/core", + "rawSpec": "5.0.11", + "spec": "5.0.11", + "type": "version" + }, + "_requiredBy": [ + "/@uirouter/angularjs" + ], + "_resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.11.tgz", + "_shasum": "bec461fcda767d79c98f6647cc9313ef9e5de03a", + "_shrinkwrap": null, + "_spec": "@uirouter/core@5.0.11", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/@uirouter/angularjs", + "bugs": { + "url": "https://github.com/ui-router/core/issues" + }, + "contributors": [ + { + "name": "Nate Abele", + "email": "nate@radify.io", + "url": "https://radify.io" + }, + { + "name": "Chris Thielen", + "url": "https://github.com/christopherthielen" + }, + { + "name": "Tim Kindberg", + "url": "https://github.com/timkindberg" + }, + { + "name": "Karsten Sperling", + "url": "https://github.com/ksperling" + } + ], + "dependencies": {}, + "description": "UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps", + "devDependencies": { + "@types/jasmine": "^2.5.47", + "@types/jquery": "^1.10.31", + "@uirouter/publish-scripts": "1.1.1", + "awesome-typescript-loader": "3.0.0-beta.10", + "conventional-changelog": "^1.1.0", + "conventional-changelog-cli": "^1.1.1", + "core-js": "^2.4.1", + "dts-downlevel": "^0.3.0", + "glob": "^7.1.2", + "jasmine-core": "^2.4.1", + "karma": "^1.2.0", + "karma-chrome-launcher": "~0.1.0", + "karma-coverage": "^0.5.3", + "karma-firefox-launcher": "^1.0.1", + "karma-jasmine": "^1.0.2", + "karma-phantomjs-launcher": "^1.0.4", + "karma-script-launcher": "~0.1.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "^1.8.0", + "npm-run-all": "^3.1.1", + "readline-sync": "^1.4.4", + "rollup": "^0.41.6", + "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-progress": "^0.2.1", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-uglify": "^1.0.2", + "rollup-plugin-visualizer": "^0.2.1", + "shelljs": "^0.7.0", + "shx": "^0.1.4", + "tslint": "^4.5.1", + "typescript": "2.5.3", + "webpack": "^1.13.3" + }, + "directories": {}, + "dist": { + "integrity": "sha512-x8js8f0nJivRMlxVyFcP5VmHyI091qUYCSEP69+m3uTCsIlCvLWmQiT4/FY7YBe9go6tYBBzPV+dWseg5XMD8Q==", + "shasum": "bec461fcda767d79c98f6647cc9313ef9e5de03a", + "tarball": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.11.tgz" + }, + "engines": { + "node": ">=4.0.0" + }, + "gitHead": "f8bfa589ad329edb7072ac1e1f6ce30753ff8483", + "homepage": "https://ui-router.github.io", + "jsnext:main": "lib-esm/index.js", + "license": "MIT", + "main": "lib/index.js", + "maintainers": [ + { + "name": "christopherthielen", + "email": "christopherthielen@ikkyikkyikkypikangzoopboing.com" + }, + { + "name": "christopherthielen2", + "email": "christhielen@gmail.com" + }, + { + "name": "elboman", + "email": "marco.botto@gmail.com" + }, + { + "name": "nateabele", + "email": "nate.abele@gmail.com" + } + ], + "name": "@uirouter/core", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ui-router/core.git" + }, + "scripts": { + "build": "npm run clean && tsc && tsc -m es6 --outDir lib-esm && npm run fixdts && npm run bundle && npm run fixmaps", + "bundle": "rollup -c && rollup -c --environment MINIFY", + "changelog": "update_changelog", + "clean": "shx rm -rf lib lib-esm _bundles", + "debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=ChromeCanary", + "fixdts": "dts-downlevel 'lib/**/*.d.ts' 'lib-esm/**/*.d.ts'", + "fixmaps": "run-s fixmaps:*", + "fixmaps:bundle": "tweak_sourcemap_paths -a --include '_bundles/**/*.js.map'", + "fixmaps:lib": "tweak_sourcemap_paths -a --include 'lib/**/*.js.map' 'lib-esm/**/*.js.map'", + "install": "node migrate/migratewarn.js", + "prepublishOnly": "npm run build", + "release": "release", + "test": "karma start", + "watch": "run-p watch:*", + "watch:buildesm": "tsc -w -m es6 --outDir lib-esm", + "watch:buildjs": "tsc -w", + "watch:dts-downlevel": "npm run fixdts", + "watch:test": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1" + }, + "typings": "lib/index.d.ts", + "version": "5.0.11" +} diff --git a/public/app/vendor/node_modules/amdefine/LICENSE b/public/app/vendor/node_modules/amdefine/LICENSE new file mode 100644 index 00000000..9b25ee00 --- /dev/null +++ b/public/app/vendor/node_modules/amdefine/LICENSE @@ -0,0 +1,58 @@ +amdefine is released under two licenses: new BSD, and MIT. You may pick the +license that best suits your development needs. The text of both licenses are +provided below. + + +The "New" BSD License: +---------------------- + +Copyright (c) 2011-2016, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +MIT License +----------- + +Copyright (c) 2011-2016, The Dojo Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/app/vendor/node_modules/amdefine/README.md b/public/app/vendor/node_modules/amdefine/README.md new file mode 100644 index 00000000..037a6e81 --- /dev/null +++ b/public/app/vendor/node_modules/amdefine/README.md @@ -0,0 +1,171 @@ +# amdefine + +A module that can be used to implement AMD's define() in Node. This allows you +to code to the AMD API and have the module work in node programs without +requiring those other programs to use AMD. + +## Usage + +**1)** Update your package.json to indicate amdefine as a dependency: + +```javascript + "dependencies": { + "amdefine": ">=0.1.0" + } +``` + +Then run `npm install` to get amdefine into your project. + +**2)** At the top of each module that uses define(), place this code: + +```javascript +if (typeof define !== 'function') { var define = require('amdefine')(module) } +``` + +**Only use these snippets** when loading amdefine. If you preserve the basic structure, +with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). + +You can add spaces, line breaks and even require amdefine with a local path, but +keep the rest of the structure to get the stripping behavior. + +As you may know, because `if` statements in JavaScript don't have their own scope, the var +declaration in the above snippet is made whether the `if` expression is truthy or not. If +RequireJS is loaded then the declaration is superfluous because `define` is already already +declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` +declarations of the same variable in the same scope gracefully. + +If you want to deliver amdefine.js with your code rather than specifying it as a dependency +with npm, then just download the latest release and refer to it using a relative path: + +[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) + +### amdefine/intercept + +Consider this very experimental. + +Instead of pasting the piece of text for the amdefine setup of a `define` +variable in each module you create or consume, you can use `amdefine/intercept` +instead. It will automatically insert the above snippet in each .js file loaded +by Node. + +**Warning**: you should only use this if you are creating an application that +is consuming AMD style defined()'d modules that are distributed via npm and want +to run that code in Node. + +For library code where you are not sure if it will be used by others in Node or +in the browser, then explicitly depending on amdefine and placing the code +snippet above is suggested path, instead of using `amdefine/intercept`. The +intercept module affects all .js files loaded in the Node app, and it is +inconsiderate to modify global state like that unless you are also controlling +the top level app. + +#### Why distribute AMD-style modules via npm? + +npm has a lot of weaknesses for front-end use (installed layout is not great, +should have better support for the `baseUrl + moduleID + '.js' style of loading, +single file JS installs), but some people want a JS package manager and are +willing to live with those constraints. If that is you, but still want to author +in AMD style modules to get dynamic require([]), better direct source usage and +powerful loader plugin support in the browser, then this tool can help. + +#### amdefine/intercept usage + +Just require it in your top level app module (for example index.js, server.js): + +```javascript +require('amdefine/intercept'); +``` + +The module does not return a value, so no need to assign the result to a local +variable. + +Then just require() code as you normally would with Node's require(). Any .js +loaded after the intercept require will have the amdefine check injected in +the .js source as it is loaded. It does not modify the source on disk, just +prepends some content to the text of the module as it is loaded by Node. + +#### How amdefine/intercept works + +It overrides the `Module._extensions['.js']` in Node to automatically prepend +the amdefine snippet above. So, it will affect any .js file loaded by your +app. + +## define() usage + +It is best if you use the anonymous forms of define() in your module: + +```javascript +define(function (require) { + var dependency = require('dependency'); +}); +``` + +or + +```javascript +define(['dependency'], function (dependency) { + +}); +``` + +## RequireJS optimizer integration. + +Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) +will have support for stripping the `if (typeof define !== 'function')` check +mentioned above, so you can include this snippet for code that runs in the +browser, but avoid taking the cost of the if() statement once the code is +optimized for deployment. + +## Node 0.4 Support + +If you want to support Node 0.4, then add `require` as the second parameter to amdefine: + +```javascript +//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. +if (typeof define !== 'function') { var define = require('amdefine')(module, require) } +``` + +## Limitations + +### Synchronous vs Asynchronous + +amdefine creates a define() function that is callable by your code. It will +execute and trace dependencies and call the factory function *synchronously*, +to keep the behavior in line with Node's synchronous dependency tracing. + +The exception: calling AMD's callback-style require() from inside a factory +function. The require callback is called on process.nextTick(): + +```javascript +define(function (require) { + require(['a'], function(a) { + //'a' is loaded synchronously, but + //this callback is called on process.nextTick(). + }); +}); +``` + +### Loader Plugins + +Loader plugins are supported as long as they call their load() callbacks +synchronously. So ones that do network requests will not work. However plugins +like [text](http://requirejs.org/docs/api.html#text) can load text files locally. + +The plugin API's `load.fromText()` is **not supported** in amdefine, so this means +transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) +will not work. This may be fixable, but it is a bit complex, and I do not have +enough node-fu to figure it out yet. See the source for amdefine.js if you want +to get an idea of the issues involved. + +## Tests + +To run the tests, cd to **tests** and run: + +``` +node all.js +node all-intercept.js +``` + +## License + +New BSD and MIT. Check the LICENSE file for all the details. diff --git a/public/app/vendor/node_modules/amdefine/amdefine.js b/public/app/vendor/node_modules/amdefine/amdefine.js new file mode 100644 index 00000000..ca830ba4 --- /dev/null +++ b/public/app/vendor/node_modules/amdefine/amdefine.js @@ -0,0 +1,301 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 1.0.1 Copyright (c) 2011-2016, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + if (callback) { + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; diff --git a/public/app/vendor/node_modules/amdefine/intercept.js b/public/app/vendor/node_modules/amdefine/intercept.js new file mode 100644 index 00000000..771a9830 --- /dev/null +++ b/public/app/vendor/node_modules/amdefine/intercept.js @@ -0,0 +1,36 @@ +/*jshint node: true */ +var inserted, + Module = require('module'), + fs = require('fs'), + existingExtFn = Module._extensions['.js'], + amdefineRegExp = /amdefine\.js/; + +inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; + +//From the node/lib/module.js source: +function stripBOM(content) { + // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + // because the buffer-to-string conversion in `fs.readFileSync()` + // translates it to FEFF, the UTF-16 BOM. + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +//Also adapted from the node/lib/module.js source: +function intercept(module, filename) { + var content = stripBOM(fs.readFileSync(filename, 'utf8')); + + if (!amdefineRegExp.test(module.id)) { + content = inserted + content; + } + + module._compile(content, filename); +} + +intercept._id = 'amdefine/intercept'; + +if (!existingExtFn._id || existingExtFn._id !== intercept._id) { + Module._extensions['.js'] = intercept; +} diff --git a/public/app/vendor/node_modules/amdefine/package.json b/public/app/vendor/node_modules/amdefine/package.json new file mode 100644 index 00000000..e641b833 --- /dev/null +++ b/public/app/vendor/node_modules/amdefine/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "amdefine@>=0.0.4", + "scope": null, + "escapedName": "amdefine", + "name": "amdefine", + "rawSpec": ">=0.0.4", + "spec": ">=0.0.4", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/source-map" + ] + ], + "_from": "amdefine@>=0.0.4", + "_id": "amdefine@1.0.1", + "_inCache": true, + "_location": "/amdefine", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/amdefine-1.0.1.tgz_1478062849665_0.19916908955201507" + }, + "_npmUser": { + "name": "jrburke", + "email": "jrburke@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "amdefine@>=0.0.4", + "scope": null, + "escapedName": "amdefine", + "name": "amdefine", + "rawSpec": ">=0.0.4", + "spec": ">=0.0.4", + "type": "range" + }, + "_requiredBy": [ + "/source-map" + ], + "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "_shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", + "_shrinkwrap": null, + "_spec": "amdefine@>=0.0.4", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/source-map", + "author": { + "name": "James Burke", + "email": "jrburke@gmail.com", + "url": "http://github.com/jrburke" + }, + "bugs": { + "url": "https://github.com/jrburke/amdefine/issues" + }, + "dependencies": {}, + "description": "Provide AMD's define() API for declaring modules in the AMD format", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "4a5282ac164729e93619bcfd3ad151f817ce91f5", + "tarball": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + }, + "engines": { + "node": ">=0.4.2" + }, + "gitHead": "e59edc9da24404ec7937098e3992f8fb0e260be7", + "homepage": "http://github.com/jrburke/amdefine", + "license": "BSD-3-Clause OR MIT", + "main": "./amdefine.js", + "maintainers": [ + { + "name": "jrburke", + "email": "jrburke@gmail.com" + } + ], + "name": "amdefine", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jrburke/amdefine.git" + }, + "scripts": {}, + "version": "1.0.1" +} diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_de-it.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_de-it.js new file mode 100644 index 00000000..f2bc9a82 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_de-it.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "vorm.", + "nachm." + ], + "DAY": [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" + ], + "ERANAMES": [ + "v. Chr.", + "n. Chr." + ], + "ERAS": [ + "v. Chr.", + "n. Chr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "SHORTDAY": [ + "So.", + "Mo.", + "Di.", + "Mi.", + "Do.", + "Fr.", + "Sa." + ], + "SHORTMONTH": [ + "J\u00e4n.", + "Feb.", + "M\u00e4rz", + "Apr.", + "Mai", + "Juni", + "Juli", + "Aug.", + "Sep.", + "Okt.", + "Nov.", + "Dez." + ], + "STANDALONEMONTH": [ + "J\u00e4nner", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d. MMMM y", + "longDate": "d. MMMM y", + "medium": "dd.MM.y HH:mm:ss", + "mediumDate": "dd.MM.y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.yy HH:mm", + "shortDate": "dd.MM.yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "de-it", + "localeID": "de_IT", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_en-us-posix.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_en-us-posix.js new file mode 100644 index 00000000..202e9a64 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_en-us-posix.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "ERANAMES": [ + "Before Christ", + "Anno Domini" + ], + "ERAS": [ + "BC", + "AD" + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, MMMM d, y", + "longDate": "MMMM d, y", + "medium": "MMM d, y h:mm:ss a", + "mediumDate": "MMM d, y", + "mediumTime": "h:mm:ss a", + "short": "M/d/yy h:mm a", + "shortDate": "M/d/yy", + "shortTime": "h:mm a" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 6, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 0, + "lgSize": 0, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + } + ] + }, + "id": "en-us-posix", + "localeID": "en_US_POSIX", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_es-bz.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_es-bz.js new file mode 100644 index 00000000..5e39c698 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_es-bz.js @@ -0,0 +1,125 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "domingo", + "lunes", + "martes", + "mi\u00e9rcoles", + "jueves", + "viernes", + "s\u00e1bado" + ], + "ERANAMES": [ + "antes de Cristo", + "despu\u00e9s de Cristo" + ], + "ERAS": [ + "a. C.", + "d. C." + ], + "FIRSTDAYOFWEEK": 6, + "MONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "SHORTDAY": [ + "dom.", + "lun.", + "mar.", + "mi\u00e9.", + "jue.", + "vie.", + "s\u00e1b." + ], + "SHORTMONTH": [ + "ene.", + "feb.", + "mar.", + "abr.", + "may.", + "jun.", + "jul.", + "ago.", + "sep.", + "oct.", + "nov.", + "dic." + ], + "STANDALONEMONTH": [ + "enero", + "febrero", + "marzo", + "abril", + "mayo", + "junio", + "julio", + "agosto", + "septiembre", + "octubre", + "noviembre", + "diciembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d 'de' MMMM 'de' y", + "longDate": "d 'de' MMMM 'de' y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "d/M/yy HH:mm", + "shortDate": "d/M/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "$", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4", + "negSuf": "", + "posPre": "\u00a4", + "posSuf": "" + } + ] + }, + "id": "es-bz", + "localeID": "es_BZ", + "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_it-va.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_it-va.js new file mode 100644 index 00000000..4ab07dbe --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_it-va.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "domenica", + "luned\u00ec", + "marted\u00ec", + "mercoled\u00ec", + "gioved\u00ec", + "venerd\u00ec", + "sabato" + ], + "ERANAMES": [ + "avanti Cristo", + "dopo Cristo" + ], + "ERAS": [ + "a.C.", + "d.C." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "SHORTDAY": [ + "dom", + "lun", + "mar", + "mer", + "gio", + "ven", + "sab" + ], + "SHORTMONTH": [ + "gen", + "feb", + "mar", + "apr", + "mag", + "giu", + "lug", + "ago", + "set", + "ott", + "nov", + "dic" + ], + "STANDALONEMONTH": [ + "gennaio", + "febbraio", + "marzo", + "aprile", + "maggio", + "giugno", + "luglio", + "agosto", + "settembre", + "ottobre", + "novembre", + "dicembre" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE d MMMM y", + "longDate": "d MMMM y", + "medium": "dd MMM y HH:mm:ss", + "mediumDate": "dd MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd/MM/yy HH:mm", + "shortDate": "dd/MM/yy", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "it-va", + "localeID": "it_VA", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_mo.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_mo.js new file mode 100644 index 00000000..b7901384 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_mo.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "a.m.", + "p.m." + ], + "DAY": [ + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103" + ], + "ERANAMES": [ + "\u00eenainte de Hristos", + "dup\u0103 Hristos" + ], + "ERAS": [ + "\u00ee.Hr.", + "d.Hr." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "SHORTDAY": [ + "Dum", + "Lun", + "Mar", + "Mie", + "Joi", + "Vin", + "S\u00e2m" + ], + "SHORTMONTH": [ + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec." + ], + "STANDALONEMONTH": [ + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, d MMMM y", + "longDate": "d MMMM y", + "medium": "d MMM y HH:mm:ss", + "mediumDate": "d MMM y", + "mediumTime": "HH:mm:ss", + "short": "dd.MM.y HH:mm", + "shortDate": "dd.MM.y", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "MDL", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "mo", + "localeID": "mo", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-de.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-de.js new file mode 100644 index 00000000..21778c78 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-de.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds-de", + "localeID": "nds_DE", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-nl.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-nl.js new file mode 100644 index 00000000..3eb28a02 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds-nl.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds-nl", + "localeID": "nds_NL", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_nds.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds.js new file mode 100644 index 00000000..af7dadc4 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_nds.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "AM", + "PM" + ], + "DAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "ERANAMES": [ + "BCE", + "CE" + ], + "ERAS": [ + "BCE", + "CE" + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "SHORTDAY": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + "SHORTMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "STANDALONEMONTH": [ + "M01", + "M02", + "M03", + "M04", + "M05", + "M06", + "M07", + "M08", + "M09", + "M10", + "M11", + "M12" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "y MMMM d, EEEE", + "longDate": "y MMMM d", + "medium": "y MMM d HH:mm:ss", + "mediumDate": "y MMM d", + "mediumTime": "HH:mm:ss", + "short": "y-MM-dd HH:mm", + "shortDate": "y-MM-dd", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "\u20ac", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-\u00a4\u00a0", + "negSuf": "", + "posPre": "\u00a4\u00a0", + "posSuf": "" + } + ] + }, + "id": "nds", + "localeID": "nds", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/angular-locale_sh.js b/public/app/vendor/node_modules/angular-i18n/angular-locale_sh.js new file mode 100644 index 00000000..2a242aed --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/angular-locale_sh.js @@ -0,0 +1,143 @@ +'use strict'; +angular.module("ngLocale", [], ["$provide", function($provide) { +var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; +function getDecimals(n) { + n = n + ''; + var i = n.indexOf('.'); + return (i == -1) ? 0 : n.length - i - 1; +} + +function getVF(n, opt_precision) { + var v = opt_precision; + + if (undefined === v) { + v = Math.min(getDecimals(n), 3); + } + + var base = Math.pow(10, v); + var f = ((n * base) | 0) % base; + return {v: v, f: f}; +} + +$provide.value("$locale", { + "DATETIME_FORMATS": { + "AMPMS": [ + "pre podne", + "po podne" + ], + "DAY": [ + "nedelja", + "ponedeljak", + "utorak", + "sreda", + "\u010detvrtak", + "petak", + "subota" + ], + "ERANAMES": [ + "pre nove ere", + "nove ere" + ], + "ERAS": [ + "p. n. e.", + "n. e." + ], + "FIRSTDAYOFWEEK": 0, + "MONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "SHORTDAY": [ + "ned", + "pon", + "uto", + "sre", + "\u010det", + "pet", + "sub" + ], + "SHORTMONTH": [ + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "avg", + "sep", + "okt", + "nov", + "dec" + ], + "STANDALONEMONTH": [ + "januar", + "februar", + "mart", + "april", + "maj", + "jun", + "jul", + "avgust", + "septembar", + "oktobar", + "novembar", + "decembar" + ], + "WEEKENDRANGE": [ + 5, + 6 + ], + "fullDate": "EEEE, dd. MMMM y.", + "longDate": "dd. MMMM y.", + "medium": "dd.MM.y. HH:mm:ss", + "mediumDate": "dd.MM.y.", + "mediumTime": "HH:mm:ss", + "short": "d.M.yy. HH:mm", + "shortDate": "d.M.yy.", + "shortTime": "HH:mm" + }, + "NUMBER_FORMATS": { + "CURRENCY_SYM": "din", + "DECIMAL_SEP": ",", + "GROUP_SEP": ".", + "PATTERNS": [ + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 3, + "minFrac": 0, + "minInt": 1, + "negPre": "-", + "negSuf": "", + "posPre": "", + "posSuf": "" + }, + { + "gSize": 3, + "lgSize": 3, + "maxFrac": 2, + "minFrac": 2, + "minInt": 1, + "negPre": "-", + "negSuf": "\u00a0\u00a4", + "posPre": "", + "posSuf": "\u00a0\u00a4" + } + ] + }, + "id": "sh", + "localeID": "sh", + "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;} +}); +}]); diff --git a/public/app/vendor/node_modules/angular-i18n/de-it.js b/public/app/vendor/node_modules/angular-i18n/de-it.js new file mode 100644 index 00000000..fd6ba0a1 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/de-it.js @@ -0,0 +1,2 @@ +require('./angular-locale_de-it'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/en-us-posix.js b/public/app/vendor/node_modules/angular-i18n/en-us-posix.js new file mode 100644 index 00000000..6237c86e --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/en-us-posix.js @@ -0,0 +1,2 @@ +require('./angular-locale_en-us-posix'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/es-bz.js b/public/app/vendor/node_modules/angular-i18n/es-bz.js new file mode 100644 index 00000000..f2a34d31 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/es-bz.js @@ -0,0 +1,2 @@ +require('./angular-locale_es-bz'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/it-va.js b/public/app/vendor/node_modules/angular-i18n/it-va.js new file mode 100644 index 00000000..1e5b82c9 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/it-va.js @@ -0,0 +1,2 @@ +require('./angular-locale_it-va'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/mo.js b/public/app/vendor/node_modules/angular-i18n/mo.js new file mode 100644 index 00000000..ad951b39 --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/mo.js @@ -0,0 +1,2 @@ +require('./angular-locale_mo'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/nds-de.js b/public/app/vendor/node_modules/angular-i18n/nds-de.js new file mode 100644 index 00000000..3221368b --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/nds-de.js @@ -0,0 +1,2 @@ +require('./angular-locale_nds-de'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/nds-nl.js b/public/app/vendor/node_modules/angular-i18n/nds-nl.js new file mode 100644 index 00000000..bc24852c --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/nds-nl.js @@ -0,0 +1,2 @@ +require('./angular-locale_nds-nl'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/nds.js b/public/app/vendor/node_modules/angular-i18n/nds.js new file mode 100644 index 00000000..6a6b11ae --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/nds.js @@ -0,0 +1,2 @@ +require('./angular-locale_nds'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-i18n/sh.js b/public/app/vendor/node_modules/angular-i18n/sh.js new file mode 100644 index 00000000..12e97bbb --- /dev/null +++ b/public/app/vendor/node_modules/angular-i18n/sh.js @@ -0,0 +1,2 @@ +require('./angular-locale_sh'); +module.exports = 'ngLocale'; diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.css b/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.css new file mode 100644 index 00000000..d1db58fc --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.css @@ -0,0 +1,10 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +/* Only used with Theme processes */ +html.md-THEME_NAME-theme, body.md-THEME_NAME-theme { + color: '{{foreground-1}}'; + background-color: '{{background-color}}'; } diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.min.css b/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.min.css new file mode 100644 index 00000000..4fdf87f1 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/core/core-default-theme.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */body.md-THEME_NAME-theme,html.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-color}}"} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.css b/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.css new file mode 100644 index 00000000..cdacfa21 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.css @@ -0,0 +1,11 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +[md-swipe-left], [md-swipe-right] { + touch-action: pan-y; } + +[md-swipe-up], [md-swipe-down] { + touch-action: pan-x; } diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.min.css b/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.min.css new file mode 100644 index 00000000..32398f0b --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/swipe/swipe.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */[md-swipe-left],[md-swipe-right]{touch-action:pan-y}[md-swipe-down],[md-swipe-up]{touch-action:pan-x} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.css b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.css new file mode 100644 index 00000000..1cfb9cb0 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.css @@ -0,0 +1,14 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +.md-truncate { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } + .md-truncate.md-clip { + text-overflow: clip; } + .md-truncate.flex { + width: 0; } diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.js b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.js new file mode 100644 index 00000000..cc1a2675 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.js @@ -0,0 +1,97 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +goog.provide('ngmaterial.components.truncate'); +goog.require('ngmaterial.core'); +/** + * @ngdoc module + * @name material.components.truncate + */ +MdTruncateController['$inject'] = ["$element"]; +angular.module('material.components.truncate', ['material.core']) + .directive('mdTruncate', MdTruncateDirective); + +/** + * @ngdoc directive + * @name mdTruncate + * @module material.components.truncate + * @restrict AE + * @description + * + * The `md-truncate` component displays a label that will automatically clip text which is wider + * than the component. By default, it displays an ellipsis, but you may apply the `md-clip` CSS + * class to override this default and use a standard "clipping" approach. + * + * Note: The `md-truncate` component does not automatically adjust it's width. You must + * provide the `flex` attribute, or some other CSS-based width management. See the + * demos for examples. + * + * @usage + * + * ### As an Element + * + * + *
    + * Back + * + * Chapter 1 - The Way of the Old West + * + * Forward + *
    + *
    + * + * ### As an Attribute + * + * + *

    Some Title With a Lot of Text

    + *
    + * + * ## CSS & Styles + * + * `` provides two CSS classes that you may use to control the type of clipping. + * + * Note: The `md-truncate` also applies a setting of `width: 0;` when used with the `flex` + * attribute to fix an issue with the flex element not shrinking properly. + * + *
    + * + * + * + * Assigns the "ellipsis" behavior (default) which will cut off mid-word and append an ellipsis + * (…) to the end of the text. + * + * + * + * Assigns the "clipping" behavior which will simply chop off the text. This may happen + * mid-word or even mid-character. + * + * + * + *
    + */ +function MdTruncateDirective() { + return { + restrict: 'AE', + + controller: MdTruncateController, + controllerAs: '$ctrl', + bindToController: true + } +} + +/** + * Controller for the component. + * + * @param $element The md-truncate element. + * + * @constructor + * ngInject + */ +function MdTruncateController($element) { + $element.addClass('md-truncate'); +} + +ngmaterial.components.truncate = angular.module("material.components.truncate"); \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.css b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.css new file mode 100644 index 00000000..c13a2669 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */.md-truncate{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.md-truncate.md-clip{text-overflow:clip}.md-truncate.flex{width:0} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.js b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.js new file mode 100644 index 00000000..ce87c332 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/closure/truncate/truncate.min.js @@ -0,0 +1,7 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */ +function MdTruncateDirective(){return{restrict:"AE",controller:MdTruncateController,controllerAs:"$ctrl",bindToController:!0}}function MdTruncateController(e){e.addClass("md-truncate")}goog.provide("ngmaterial.components.truncate"),goog.require("ngmaterial.core"),MdTruncateController.$inject=["$element"],angular.module("material.components.truncate",["material.core"]).directive("mdTruncate",MdTruncateDirective),ngmaterial.components.truncate=angular.module("material.components.truncate"); \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.css b/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.css new file mode 100644 index 00000000..d1db58fc --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.css @@ -0,0 +1,10 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +/* Only used with Theme processes */ +html.md-THEME_NAME-theme, body.md-THEME_NAME-theme { + color: '{{foreground-1}}'; + background-color: '{{background-color}}'; } diff --git a/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.min.css b/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.min.css new file mode 100644 index 00000000..4fdf87f1 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/core/core-default-theme.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */body.md-THEME_NAME-theme,html.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-color}}"} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.css b/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.css new file mode 100644 index 00000000..cdacfa21 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.css @@ -0,0 +1,11 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +[md-swipe-left], [md-swipe-right] { + touch-action: pan-y; } + +[md-swipe-up], [md-swipe-down] { + touch-action: pan-x; } diff --git a/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.min.css b/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.min.css new file mode 100644 index 00000000..32398f0b --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/swipe/swipe.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */[md-swipe-left],[md-swipe-right]{touch-action:pan-y}[md-swipe-down],[md-swipe-up]{touch-action:pan-x} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/truncate/bower.json b/public/app/vendor/node_modules/angular-material/modules/js/truncate/bower.json new file mode 100644 index 00000000..1ebdd319 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/truncate/bower.json @@ -0,0 +1,7 @@ +{ + "name": "angular-material-truncate", + "version": "1.1.4-master-87d1cb1", + "dependencies": { + "angular-material-core": "1.1.4-master-87d1cb1" + } +} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.css b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.css new file mode 100644 index 00000000..1cfb9cb0 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.css @@ -0,0 +1,14 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +.md-truncate { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } + .md-truncate.md-clip { + text-overflow: clip; } + .md-truncate.flex { + width: 0; } diff --git a/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.js b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.js new file mode 100644 index 00000000..9d9c5828 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.js @@ -0,0 +1,98 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.5 + */ +(function( window, angular, undefined ){ +"use strict"; + +/** + * @ngdoc module + * @name material.components.truncate + */ +MdTruncateController['$inject'] = ["$element"]; +angular.module('material.components.truncate', ['material.core']) + .directive('mdTruncate', MdTruncateDirective); + +/** + * @ngdoc directive + * @name mdTruncate + * @module material.components.truncate + * @restrict AE + * @description + * + * The `md-truncate` component displays a label that will automatically clip text which is wider + * than the component. By default, it displays an ellipsis, but you may apply the `md-clip` CSS + * class to override this default and use a standard "clipping" approach. + * + * Note: The `md-truncate` component does not automatically adjust it's width. You must + * provide the `flex` attribute, or some other CSS-based width management. See the + * demos for examples. + * + * @usage + * + * ### As an Element + * + * + *
    + * Back + * + * Chapter 1 - The Way of the Old West + * + * Forward + *
    + *
    + * + * ### As an Attribute + * + * + *

    Some Title With a Lot of Text

    + *
    + * + * ## CSS & Styles + * + * `` provides two CSS classes that you may use to control the type of clipping. + * + * Note: The `md-truncate` also applies a setting of `width: 0;` when used with the `flex` + * attribute to fix an issue with the flex element not shrinking properly. + * + *
    + * + * + * + * Assigns the "ellipsis" behavior (default) which will cut off mid-word and append an ellipsis + * (…) to the end of the text. + * + * + * + * Assigns the "clipping" behavior which will simply chop off the text. This may happen + * mid-word or even mid-character. + * + * + * + *
    + */ +function MdTruncateDirective() { + return { + restrict: 'AE', + + controller: MdTruncateController, + controllerAs: '$ctrl', + bindToController: true + } +} + +/** + * Controller for the component. + * + * @param $element The md-truncate element. + * + * @constructor + * ngInject + */ +function MdTruncateController($element) { + $element.addClass('md-truncate'); +} + +})(window, window.angular); \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.css b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.css new file mode 100644 index 00000000..c13a2669 --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.css @@ -0,0 +1,6 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */.md-truncate{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.md-truncate.md-clip{text-overflow:clip}.md-truncate.flex{width:0} \ No newline at end of file diff --git a/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.js b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.js new file mode 100644 index 00000000..7326ec0f --- /dev/null +++ b/public/app/vendor/node_modules/angular-material/modules/js/truncate/truncate.min.js @@ -0,0 +1,7 @@ +/*! + * AngularJS Material Design + * https://github.com/angular/material + * @license MIT + * v1.1.4-master-87d1cb1 + */ +!function(t,n,e){"use strict";function r(){return{restrict:"AE",controller:o,controllerAs:"$ctrl",bindToController:!0}}function o(t){t.addClass("md-truncate")}o.$inject=["$element"],n.module("material.components.truncate",["material.core"]).directive("mdTruncate",r)}(window,window.angular); \ No newline at end of file diff --git a/public/app/vendor/node_modules/clone-buffer/LICENSE b/public/app/vendor/node_modules/clone-buffer/LICENSE new file mode 100644 index 00000000..fa16a894 --- /dev/null +++ b/public/app/vendor/node_modules/clone-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Blaine Bublitz , Eric Schoffstall and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/public/app/vendor/node_modules/clone-buffer/README.md b/public/app/vendor/node_modules/clone-buffer/README.md new file mode 100644 index 00000000..51c8a8d2 --- /dev/null +++ b/public/app/vendor/node_modules/clone-buffer/README.md @@ -0,0 +1,47 @@ +

    + + + +

    + +# clone-buffer + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Easier Buffer cloning in node. + +## Example + +```js +var cloneBuffer = require('clone-buffer'); + +var buffer = new Buffer('test'); +var cloned = cloneBuffer(buffer); +// buffer !== cloned +``` + +## API + +### `cloneBuffer(buffer)` + +Takes a `Buffer` object and returns a clone. Throws if a non-`Buffer` is passed. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/clone-buffer.svg +[npm-url]: https://npmjs.org/package/clone-buffer +[npm-image]: http://img.shields.io/npm/v/clone-buffer.svg + +[travis-url]: https://travis-ci.org/gulpjs/clone-buffer +[travis-image]: http://img.shields.io/travis/gulpjs/clone-buffer.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/clone-buffer +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/clone-buffer.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/clone-buffer +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/clone-buffer/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/public/app/vendor/node_modules/clone-buffer/index.js b/public/app/vendor/node_modules/clone-buffer/index.js new file mode 100644 index 00000000..eb3837e6 --- /dev/null +++ b/public/app/vendor/node_modules/clone-buffer/index.js @@ -0,0 +1,28 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; + +function hasFrom() { + // Node versions 5.x below 5.10 seem to have a `from` method + // However, it doesn't clone Buffers + // Luckily, it reports as `false` to hasOwnProperty + return (Buffer.hasOwnProperty('from') && typeof Buffer.from === 'function'); +} + +function cloneBuffer(buf) { + if (!Buffer.isBuffer(buf)) { + throw new Error('Can only clone Buffer.'); + } + + if (hasFrom()) { + return Buffer.from(buf); + } + + var copy = new Buffer(buf.length); + buf.copy(copy); + return copy; +} + +cloneBuffer.hasFrom = hasFrom; + +module.exports = cloneBuffer; diff --git a/public/app/vendor/node_modules/clone-buffer/package.json b/public/app/vendor/node_modules/clone-buffer/package.json new file mode 100644 index 00000000..59ac5651 --- /dev/null +++ b/public/app/vendor/node_modules/clone-buffer/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + { + "raw": "clone-buffer@^1.0.0", + "scope": null, + "escapedName": "clone-buffer", + "name": "clone-buffer", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl" + ] + ], + "_from": "clone-buffer@>=1.0.0 <2.0.0", + "_id": "clone-buffer@1.0.0", + "_inCache": true, + "_location": "/clone-buffer", + "_nodeVersion": "0.10.41", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/clone-buffer-1.0.0.tgz_1474782560642_0.6453048929106444" + }, + "_npmUser": { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + }, + "_npmVersion": "2.15.2", + "_phantomChildren": {}, + "_requested": { + "raw": "clone-buffer@^1.0.0", + "scope": null, + "escapedName": "clone-buffer", + "name": "clone-buffer", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "_shasum": "e3e25b207ac4e701af721e2cb5a16792cac3dc58", + "_shrinkwrap": null, + "_spec": "clone-buffer@^1.0.0", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl", + "author": { + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "http://gulpjs.com/" + }, + "bugs": { + "url": "https://github.com/gulpjs/clone-buffer/issues" + }, + "contributors": [ + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + } + ], + "dependencies": {}, + "description": "Easier Buffer cloning in node.", + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "directories": {}, + "dist": { + "shasum": "e3e25b207ac4e701af721e2cb5a16792cac3dc58", + "tarball": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz" + }, + "engines": { + "node": ">= 0.10" + }, + "files": [ + "LICENSE", + "index.js" + ], + "gitHead": "7dab09850f080e2d137c62c6a673344fa8458942", + "homepage": "https://github.com/gulpjs/clone-buffer#readme", + "keywords": [ + "buffer", + "clone", + "from", + "copy" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + } + ], + "name": "clone-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/gulpjs/clone-buffer.git" + }, + "scripts": { + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls", + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only" + }, + "version": "1.0.0" +} diff --git a/public/app/vendor/node_modules/clone-stats/LICENSE.md b/public/app/vendor/node_modules/clone-stats/LICENSE.md new file mode 100644 index 00000000..146cb32a --- /dev/null +++ b/public/app/vendor/node_modules/clone-stats/LICENSE.md @@ -0,0 +1,21 @@ +## The MIT License (MIT) ## + +Copyright (c) 2014 Hugh Kennedy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/public/app/vendor/node_modules/clone-stats/README.md b/public/app/vendor/node_modules/clone-stats/README.md new file mode 100644 index 00000000..8b12b6fa --- /dev/null +++ b/public/app/vendor/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # + +Safely clone node's +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without +losing their class methods, i.e. `stat.isDirectory()` and co. + +## Usage ## + +[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) + +### `copy = require('clone-stats')(stat)` ### + +Returns a clone of the original `fs.Stats` instance (`stat`). + +## License ## + +MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/public/app/vendor/node_modules/clone-stats/index.js b/public/app/vendor/node_modules/clone-stats/index.js new file mode 100644 index 00000000..e797cfe6 --- /dev/null +++ b/public/app/vendor/node_modules/clone-stats/index.js @@ -0,0 +1,13 @@ +var Stat = require('fs').Stats + +module.exports = cloneStats + +function cloneStats(stats) { + var replacement = new Stat + + Object.keys(stats).forEach(function(key) { + replacement[key] = stats[key] + }) + + return replacement +} diff --git a/public/app/vendor/node_modules/clone-stats/package.json b/public/app/vendor/node_modules/clone-stats/package.json new file mode 100644 index 00000000..2cf893df --- /dev/null +++ b/public/app/vendor/node_modules/clone-stats/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "clone-stats@^1.0.0", + "scope": null, + "escapedName": "clone-stats", + "name": "clone-stats", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl" + ] + ], + "_from": "clone-stats@>=1.0.0 <2.0.0", + "_id": "clone-stats@1.0.0", + "_inCache": true, + "_location": "/clone-stats", + "_nodeVersion": "4.4.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/clone-stats-1.0.0.tgz_1463448820687_0.06707892613485456" + }, + "_npmUser": { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + }, + "_npmVersion": "2.14.20", + "_phantomChildren": {}, + "_requested": { + "raw": "clone-stats@^1.0.0", + "scope": null, + "escapedName": "clone-stats", + "name": "clone-stats", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "_shasum": "b3782dff8bb5474e18b9b6bf0fdfe782f8777680", + "_shrinkwrap": null, + "_spec": "clone-stats@^1.0.0", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "index.js", + "bugs": { + "url": "https://github.com/hughsk/clone-stats/issues" + }, + "dependencies": {}, + "description": "Safely clone node's fs.Stats instances without losing their class methods", + "devDependencies": { + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "b3782dff8bb5474e18b9b6bf0fdfe782f8777680", + "tarball": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz" + }, + "gitHead": "25810f469944326c761f9f6273268453734a8465", + "homepage": "https://github.com/hughsk/clone-stats", + "keywords": [ + "stats", + "fs", + "clone", + "copy", + "prototype" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "hughsk", + "email": "hughskennedy@gmail.com" + } + ], + "name": "clone-stats", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/clone-stats.git" + }, + "scripts": { + "test": "node test" + }, + "version": "1.0.0" +} diff --git a/public/app/vendor/node_modules/clone-stats/test.js b/public/app/vendor/node_modules/clone-stats/test.js new file mode 100644 index 00000000..e4bb2814 --- /dev/null +++ b/public/app/vendor/node_modules/clone-stats/test.js @@ -0,0 +1,36 @@ +var test = require('tape') +var clone = require('./') +var fs = require('fs') + +test('file', function(t) { + compare(t, fs.statSync(__filename)) + t.end() +}) + +test('directory', function(t) { + compare(t, fs.statSync(__dirname)) + t.end() +}) + +function compare(t, stat) { + var copy = clone(stat) + + t.deepEqual(stat, copy, 'clone has equal properties') + t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') + t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') + + ;['isDirectory' + , 'isFile' + , 'isBlockDevice' + , 'isCharacterDevice' + , 'isSymbolicLink' + , 'isFIFO' + , 'isSocket' + ].forEach(function(method) { + t.equal( + stat[method].call(stat) + , copy[method].call(copy) + , 'equal value for stat.' + method + '()' + ) + }) +} diff --git a/public/app/vendor/node_modules/clone/.npmignore b/public/app/vendor/node_modules/clone/.npmignore new file mode 100644 index 00000000..2ff84f0a --- /dev/null +++ b/public/app/vendor/node_modules/clone/.npmignore @@ -0,0 +1,4 @@ +/node_modules/ +/test.js +/.travis.yml +*.html diff --git a/public/app/vendor/node_modules/clone/LICENSE b/public/app/vendor/node_modules/clone/LICENSE new file mode 100644 index 00000000..cc3c87bc --- /dev/null +++ b/public/app/vendor/node_modules/clone/LICENSE @@ -0,0 +1,18 @@ +Copyright © 2011-2015 Paul Vorbach + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/app/vendor/node_modules/clone/README.md b/public/app/vendor/node_modules/clone/README.md new file mode 100644 index 00000000..c21ba167 --- /dev/null +++ b/public/app/vendor/node_modules/clone/README.md @@ -0,0 +1,178 @@ +# clone + +[![build status](https://secure.travis-ci.org/pvorb/clone.svg)](http://travis-ci.org/pvorb/clone) [![downloads](https://img.shields.io/npm/dt/clone.svg)](http://npm-stat.com/charts.html?package=clone) + +offers foolproof _deep cloning_ of objects, arrays, numbers, strings, maps, +sets, promises, etc. in JavaScript. + + +## Installation + + npm install clone + +(It also works with browserify, ender or standalone. You may want to use the +option `noParse` in browserify to reduce the resulting file size, since usually +`Buffer`s are not needed in browsers.) + + +## Example + +~~~ javascript +var clone = require('clone'); + +var a, b; + +a = { foo: { bar: 'baz' } }; // initial value of a + +b = clone(a); // clone a -> b +a.foo.bar = 'foo'; // change a + +console.log(a); // show a +console.log(b); // show b +~~~ + +This will print: + +~~~ javascript +{ foo: { bar: 'foo' } } +{ foo: { bar: 'baz' } } +~~~ + +**clone** masters cloning simple objects (even with custom prototype), arrays, +Date objects, and RegExp objects. Everything is cloned recursively, so that you +can clone dates in arrays in objects, for example. + + +## API + +`clone(val, circular, depth)` + + * `val` -- the value that you want to clone, any type allowed + * `circular` -- boolean + + Call `clone` with `circular` set to `false` if you are certain that `obj` + contains no circular references. This will give better performance if + needed. There is no error if `undefined` or `null` is passed as `obj`. + * `depth` -- depth to which the object is to be cloned (optional, + defaults to infinity) + * `prototype` -- sets the prototype to be used when cloning an object. + (optional, defaults to parent prototype). + * `includeNonEnumerable` -- set to `true` if the non-enumerable properties + should be cloned as well. Non-enumerable properties on the prototype chain + will be ignored. (optional, defaults to `false`) + +`clone.clonePrototype(obj)` + + * `obj` -- the object that you want to clone + +Does a prototype clone as +[described by Oran Looney](http://oranlooney.com/functional-javascript/). + + +## Circular References + +~~~ javascript +var a, b; + +a = { hello: 'world' }; + +a.myself = a; +b = clone(a); + +console.log(b); +~~~ + +This will print: + +~~~ javascript +{ hello: "world", myself: [Circular] } +~~~ + +So, `b.myself` points to `b`, not `a`. Neat! + + +## Test + + npm test + + +## Changelog + +### v2.1.1 + +#### 2017-03-09 + + - Fix build badge in README + - Add support for cloning Maps and Sets on Internet Explorer + +### v2.1.0 + +#### 2016-11-22 + + - Add support for cloning Errors + - Exclude non-enumerable symbol-named object properties from cloning + - Add option to include non-enumerable own properties of objects + +### v2.0.0 + +#### 2016-09-28 + + - Add support for cloning ES6 Maps, Sets, Promises, and Symbols + +### v1.0.2 + +#### 2015-03-25 + + - Fix call on getRegExpFlags + - Refactor utilities + - Refactor test suite + +### v1.0.1 + +#### 2015-03-04 + + - Fix nodeunit version + - Directly call getRegExpFlags + +### v1.0.0 + +#### 2015-02-10 + + - Improve browser support + - Improve browser testability + - Move helper methods to private namespace + +## Caveat + +Some special objects like a socket or `process.stdout`/`stderr` are known to not +be cloneable. If you find other objects that cannot be cloned, please [open an +issue](https://github.com/pvorb/clone/issues/new). + + +## Bugs and Issues + +If you encounter any bugs or issues, feel free to [open an issue at +github](https://github.com/pvorb/clone/issues) or send me an email to +. I also always like to hear from you, if you’re using my code. + +## License + +Copyright © 2011-2016 [Paul Vorbach](https://paul.vorba.ch/) and +[contributors](https://github.com/pvorb/clone/graphs/contributors). + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/app/vendor/node_modules/clone/clone.iml b/public/app/vendor/node_modules/clone/clone.iml new file mode 100644 index 00000000..30de8aee --- /dev/null +++ b/public/app/vendor/node_modules/clone/clone.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/app/vendor/node_modules/clone/clone.js b/public/app/vendor/node_modules/clone/clone.js new file mode 100644 index 00000000..80d0c765 --- /dev/null +++ b/public/app/vendor/node_modules/clone/clone.js @@ -0,0 +1,251 @@ +var clone = (function() { +'use strict'; + +function _instanceof(obj, type) { + return type != null && obj instanceof type; +} + +var nativeMap; +try { + nativeMap = Map; +} catch(_) { + // maybe a reference error because no `Map`. Give it a dummy value that no + // value will ever be an instanceof. + nativeMap = function() {}; +} + +var nativeSet; +try { + nativeSet = Set; +} catch(_) { + nativeSet = function() {}; +} + +var nativePromise; +try { + nativePromise = Promise; +} catch(_) { + nativePromise = function() {}; +} + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). + * @param `includeNonEnumerable` - set to true if the non-enumerable properties + * should be cloned as well. Non-enumerable properties on the prototype + * chain will be ignored. (optional - false by default) +*/ +function clone(parent, circular, depth, prototype, includeNonEnumerable) { + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + includeNonEnumerable = circular.includeNonEnumerable; + circular = circular.circular; + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth === 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (_instanceof(parent, nativeMap)) { + child = new nativeMap(); + } else if (_instanceof(parent, nativeSet)) { + child = new nativeSet(); + } else if (_instanceof(parent, nativePromise)) { + child = new nativePromise(function (resolve, reject) { + parent.then(function(value) { + resolve(_clone(value, depth - 1)); + }, function(err) { + reject(_clone(err, depth - 1)); + }); + }); + } else if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + child = new Buffer(parent.length); + parent.copy(child); + return child; + } else if (_instanceof(parent, Error)) { + child = Object.create(parent); + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + if (_instanceof(parent, nativeMap)) { + parent.forEach(function(value, key) { + var keyChild = _clone(key, depth - 1); + var valueChild = _clone(value, depth - 1); + child.set(keyChild, valueChild); + }); + } + if (_instanceof(parent, nativeSet)) { + parent.forEach(function(value) { + var entryChild = _clone(value, depth - 1); + child.add(entryChild); + }); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(parent); + for (var i = 0; i < symbols.length; i++) { + // Don't need to worry about cloning a symbol because it is a primitive, + // like a number or string. + var symbol = symbols[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); + if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { + continue; + } + child[symbol] = _clone(parent[symbol], depth - 1); + if (!descriptor.enumerable) { + Object.defineProperty(child, symbol, { + enumerable: false + }); + } + } + } + + if (includeNonEnumerable) { + var allPropertyNames = Object.getOwnPropertyNames(parent); + for (var i = 0; i < allPropertyNames.length; i++) { + var propertyName = allPropertyNames[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); + if (descriptor && descriptor.enumerable) { + continue; + } + child[propertyName] = _clone(parent[propertyName], depth - 1); + Object.defineProperty(child, propertyName, { + enumerable: false + }); + } + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; + +// private utility functions + +function __objToStr(o) { + return Object.prototype.toString.call(o); +} +clone.__objToStr = __objToStr; + +function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; +} +clone.__isDate = __isDate; + +function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; +} +clone.__isArray = __isArray; + +function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; +} +clone.__isRegExp = __isRegExp; + +function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; +} +clone.__getRegExpFlags = __getRegExpFlags; + +return clone; +})(); + +if (typeof module === 'object' && module.exports) { + module.exports = clone; +} diff --git a/public/app/vendor/node_modules/clone/package.json b/public/app/vendor/node_modules/clone/package.json new file mode 100644 index 00000000..e1ee74c6 --- /dev/null +++ b/public/app/vendor/node_modules/clone/package.json @@ -0,0 +1,192 @@ +{ + "_args": [ + [ + { + "raw": "clone@^2.1.1", + "scope": null, + "escapedName": "clone", + "name": "clone", + "rawSpec": "^2.1.1", + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl" + ] + ], + "_from": "clone@>=2.1.1 <3.0.0", + "_id": "clone@2.1.1", + "_inCache": true, + "_location": "/clone", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/clone-2.1.1.tgz_1489087434592_0.8986071727704257" + }, + "_npmUser": { + "name": "pvorb", + "email": "paul@vorba.ch" + }, + "_npmVersion": "3.9.3", + "_phantomChildren": {}, + "_requested": { + "raw": "clone@^2.1.1", + "scope": null, + "escapedName": "clone", + "name": "clone", + "rawSpec": "^2.1.1", + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "_shasum": "d217d1e961118e3ac9a4b8bba3285553bf647cdb", + "_shrinkwrap": null, + "_spec": "clone@^2.1.1", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch/" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "contributors": [ + { + "name": "Blake Miner", + "email": "miner.blake@gmail.com", + "url": "http://www.blakeminer.com/" + }, + { + "name": "Tian You", + "email": "axqd001@gmail.com", + "url": "http://blog.axqd.net/" + }, + { + "name": "George Stagas", + "email": "gstagas@gmail.com", + "url": "http://stagas.com/" + }, + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "url": "https://github.com/TobiaszCudnik" + }, + { + "name": "Pavel Lang", + "email": "langpavel@phpskelet.org", + "url": "https://github.com/langpavel" + }, + { + "name": "Dan MacTough", + "url": "http://yabfog.com/" + }, + { + "name": "w1nk", + "url": "https://github.com/w1nk" + }, + { + "name": "Hugh Kennedy", + "url": "http://twitter.com/hughskennedy" + }, + { + "name": "Dustin Diaz", + "url": "http://dustindiaz.com" + }, + { + "name": "Ilya Shaisultanov", + "url": "https://github.com/diversario" + }, + { + "name": "Nathan MacInnes", + "email": "nathan@macinn.es", + "url": "http://macinn.es/" + }, + { + "name": "Benjamin E. Coe", + "email": "ben@npmjs.com", + "url": "https://twitter.com/benjamincoe" + }, + { + "name": "Nathan Zadoks", + "url": "https://github.com/nathan7" + }, + { + "name": "Róbert Oroszi", + "email": "robert+gh@oroszi.net", + "url": "https://github.com/oroce" + }, + { + "name": "Aurélio A. Heckert", + "url": "http://softwarelivre.org/aurium" + }, + { + "name": "Guy Ellis", + "url": "http://www.guyellisrocks.com/" + }, + { + "name": "fscherwi", + "url": "https://fscherwi.github.io" + }, + { + "name": "rictic", + "url": "https://github.com/rictic" + }, + { + "name": "Martin Jurča", + "url": "https://github.com/jurca" + }, + { + "name": "Misery Lee", + "email": "miserylee@foxmail.com", + "url": "https://github.com/miserylee" + }, + { + "name": "Clemens Wolff", + "url": "https://github.com/c-w" + } + ], + "dependencies": {}, + "description": "deep cloning of objects and arrays", + "devDependencies": { + "nodeunit": "~0.9.0" + }, + "directories": {}, + "dist": { + "shasum": "d217d1e961118e3ac9a4b8bba3285553bf647cdb", + "tarball": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz" + }, + "engines": { + "node": ">=0.8" + }, + "gitHead": "a321fd85bb79f787fb33ba5f9a44d2ad480832ef", + "homepage": "https://github.com/pvorb/node-clone#readme", + "license": "MIT", + "main": "clone.js", + "maintainers": [ + { + "name": "pvorb", + "email": "paul@vorb.de" + } + ], + "name": "clone", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "scripts": { + "test": "nodeunit test.js" + }, + "tags": [ + "clone", + "object", + "array", + "function", + "date" + ], + "version": "2.1.1" +} diff --git a/public/app/vendor/node_modules/cloneable-readable/.npmignore b/public/app/vendor/node_modules/cloneable-readable/.npmignore new file mode 100644 index 00000000..e920c167 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/.npmignore @@ -0,0 +1,33 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +node_modules + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/public/app/vendor/node_modules/cloneable-readable/.travis.yml b/public/app/vendor/node_modules/cloneable-readable/.travis.yml new file mode 100644 index 00000000..3e4281a7 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +sudo: false +node_js: + - "0.10" + - "0.12" + - "4" + - "5" + - "6" diff --git a/public/app/vendor/node_modules/cloneable-readable/LICENSE b/public/app/vendor/node_modules/cloneable-readable/LICENSE new file mode 100644 index 00000000..ecf62450 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/public/app/vendor/node_modules/cloneable-readable/README.md b/public/app/vendor/node_modules/cloneable-readable/README.md new file mode 100644 index 00000000..b62fd1d3 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/README.md @@ -0,0 +1,52 @@ +# cloneable-readable + +[![Build Status](https://travis-ci.org/mcollina/cloneable-readable.svg?branch=master)](https://travis-ci.org/mcollina/cloneable-readable) + +Clone a Readable stream, safely. + +```js +'use strict' + +var cloneable = require('cloneable-readable') +var fs = require('fs') +var pump = require('pump') + +var stream = cloneable(fs.createReadStream('./package.json')) + +pump(stream.clone(), fs.createWriteStream('./out1')) + +// simulate some asynchronicity +setImmediate(function () { + pump(stream, fs.createWriteStream('./out2')) +}) +``` + +**cloneable-readable** automatically handles `objectMode: true`. + +This module comes out of an healthy discussion on the 'right' way to +clone a Readable in https://github.com/gulpjs/vinyl/issues/85 +and https://github.com/nodejs/readable-stream/issues/202. This is my take. + +**YOU MUST PIPE ALL CLONES TO START THE FLOW** + +You can also attach `'data'` and `'readable'` events to them. + +## API + +### cloneable(stream) + +Create a `Cloneable` stream. +A Cloneable has a `clone()` method to create more clones. +All clones must be resumed/piped to start the flow. + +### cloneable.isCloneable(stream) + +Check if `stream` needs to be wrapped in a `Cloneable` or not. + +## Acknowledgements + +This project was kindly sponsored by [nearForm](http://nearform.com). + +## License + +MIT diff --git a/public/app/vendor/node_modules/cloneable-readable/example.js b/public/app/vendor/node_modules/cloneable-readable/example.js new file mode 100644 index 00000000..e980b979 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/example.js @@ -0,0 +1,14 @@ +'use strict' + +var cloneable = require('./') +var fs = require('fs') +var pump = require('pump') + +var stream = cloneable(fs.createReadStream('./package.json')) + +pump(stream.clone(), fs.createWriteStream('./out1')) + +// simulate some asynchronicity +setImmediate(function () { + pump(stream, fs.createWriteStream('./out2')) +}) diff --git a/public/app/vendor/node_modules/cloneable-readable/index.js b/public/app/vendor/node_modules/cloneable-readable/index.js new file mode 100644 index 00000000..7696886d --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/index.js @@ -0,0 +1,110 @@ +'use strict' + +var through2 = require('through2') +var inherits = require('inherits') +var nextTick = require('process-nextick-args') +var Ctor = through2.ctor() + +function Cloneable (stream, opts) { + if (!(this instanceof Cloneable)) { + return new Cloneable(stream, opts) + } + + var objectMode = stream._readableState.objectMode + this._original = stream + this._clonesCount = 1 + + opts = opts || {} + opts.objectMode = objectMode + + Ctor.call(this, opts) + + forwardDestroy(stream, this) + + this.on('newListener', onData) +} + +inherits(Cloneable, Ctor) + +function onData (event, listener) { + if (event === 'data' || event === 'readable') { + this.removeListener('newListener', onData) + nextTick(clonePiped, this) + } +} + +Cloneable.prototype.clone = function () { + if (!this._original) { + throw new Error('already started') + } + + this._clonesCount++ + + // the events added by the clone should not count + // for starting the flow + this.removeListener('newListener', onData) + var clone = new Clone(this) + this.on('newListener', onData) + + return clone +} + +function forwardDestroy (src, dest) { + src.on('error', destroy) + src.on('close', destroy) + + function destroy (err) { + dest.destroy(err) + } +} + +function clonePiped (that) { + if (--that._clonesCount === 0 && !that._destroyed) { + that._original.pipe(that) + that._original = undefined + } +} + +function Clone (parent, opts) { + if (!(this instanceof Clone)) { + return new Clone(parent, opts) + } + + var objectMode = parent._readableState.objectMode + + opts = opts || {} + opts.objectMode = objectMode + + this.parent = parent + + Ctor.call(this, opts) + + forwardDestroy(this.parent, this) + + parent.pipe(this) + + // the events added by the clone should not count + // for starting the flow + // so we add the newListener handle after we are done + this.on('newListener', onDataClone) +} + +function onDataClone (event, listener) { + // We start the flow once all clones are piped or destroyed + if (event === 'data' || event === 'readable' || event === 'close') { + nextTick(clonePiped, this.parent) + this.removeListener('newListener', onDataClone) + } +} + +inherits(Clone, Ctor) + +Clone.prototype.clone = function () { + return this.parent.clone() +} + +Cloneable.isCloneable = function (stream) { + return stream instanceof Cloneable || stream instanceof Clone +} + +module.exports = Cloneable diff --git a/public/app/vendor/node_modules/cloneable-readable/package.json b/public/app/vendor/node_modules/cloneable-readable/package.json new file mode 100644 index 00000000..690d3034 --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "cloneable-readable@^1.0.0", + "scope": null, + "escapedName": "cloneable-readable", + "name": "cloneable-readable", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl" + ] + ], + "_from": "cloneable-readable@>=1.0.0 <2.0.0", + "_id": "cloneable-readable@1.0.0", + "_inCache": true, + "_location": "/cloneable-readable", + "_nodeVersion": "6.8.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cloneable-readable-1.0.0.tgz_1477399717263_0.541040712967515" + }, + "_npmUser": { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "cloneable-readable@^1.0.0", + "scope": null, + "escapedName": "cloneable-readable", + "name": "cloneable-readable", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "_shasum": "a6290d413f217a61232f95e458ff38418cfb0117", + "_shrinkwrap": null, + "_spec": "cloneable-readable@^1.0.0", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/vinyl", + "author": { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + "bugs": { + "url": "https://github.com/mcollina/cloneable-readable/issues" + }, + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^1.0.6", + "through2": "^2.0.1" + }, + "description": "Clone a Readable stream, safely", + "devDependencies": { + "flush-write-stream": "^1.0.0", + "from2": "^2.1.1", + "pre-commit": "^1.1.2", + "readable-stream": "^2.1.0", + "standard": "^8.0.0", + "tap-spec": "^4.1.1", + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "a6290d413f217a61232f95e458ff38418cfb0117", + "tarball": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz" + }, + "gitHead": "9d887ebaec81a5f59593b6d7b69c3c522bf5d425", + "homepage": "https://github.com/mcollina/cloneable-readable#readme", + "keywords": [ + "readable", + "stream", + "clone" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + } + ], + "name": "cloneable-readable", + "optionalDependencies": {}, + "precommit": "test", + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/cloneable-readable.git" + }, + "scripts": { + "test": "standard && tape test.js | tap-spec" + }, + "version": "1.0.0" +} diff --git a/public/app/vendor/node_modules/cloneable-readable/test.js b/public/app/vendor/node_modules/cloneable-readable/test.js new file mode 100644 index 00000000..e1d88d4d --- /dev/null +++ b/public/app/vendor/node_modules/cloneable-readable/test.js @@ -0,0 +1,576 @@ +'use strict' + +var test = require('tape').test +var from = require('from2') +var sink = require('flush-write-stream') +var cloneable = require('./') + +test('basic passthrough', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('clone sync', function (t) { + t.plan(4) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('clone async', function (t) { + t.plan(4) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + setImmediate(function () { + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + }) +}) + +test('basic passthrough in obj mode', function (t) { + t.plan(2) + + var read = false + var source = from.obj(function (size, next) { + if (read) { + return this.push(null) + } else { + read = true + this.push({ hello: 'world' }) + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) +}) + +test('multiple clone in object mode', function (t) { + t.plan(4) + + var read = false + var source = from.obj(function (size, next) { + if (read) { + return this.push(null) + } else { + read = true + this.push({ hello: 'world' }) + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) + + setImmediate(function () { + cloned.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) + }) +}) + +test('basic passthrough with data event', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var data = '' + instance.on('data', function (chunk) { + data += chunk.toString() + }) + + instance.on('end', function () { + t.equal(data, 'hello world', 'chunk matches') + }) +}) + +test('basic passthrough with data event on clone', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + var cloned = instance.clone() + + t.notOk(read, 'stream not started') + + var data = '' + cloned.on('data', function (chunk) { + data += chunk.toString() + }) + + cloned.on('end', function () { + t.equal(data, 'hello world', 'chunk matches in clone') + }) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') + cb() + })) +}) + +test('errors if cloned after start', function (t) { + t.plan(2) + + var source = from(function (size, next) { + this.push('hello world') + this.push(null) + next() + }) + + var instance = cloneable(source) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + t.throws(function () { + instance.clone() + }, 'throws if cloned after start') + cb() + })) +}) + +test('basic passthrough with readable event', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var data = '' + instance.on('readable', function () { + var chunk + while ((chunk = this.read()) !== null) { + data += chunk.toString() + } + }) + + instance.on('end', function () { + t.equal(data, 'hello world', 'chunk matches') + }) +}) + +test('basic passthrough with readable event on clone', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + var cloned = instance.clone() + + t.notOk(read, 'stream not started') + + var data = '' + cloned.on('readable', function () { + var chunk + while ((chunk = this.read()) !== null) { + data += chunk.toString() + } + }) + + cloned.on('end', function () { + t.equal(data, 'hello world', 'chunk matches in clone') + }) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') + cb() + })) +}) + +test('source error destroys all', function (t) { + t.plan(5) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('error', function (err) { + t.ok(err, 'source errors') + + instance.on('error', function (err2) { + t.ok(err === err2, 'instance receives same error') + }) + + instance.on('close', function () { + t.pass('instance is closed') + }) + + clone.on('error', function (err3) { + t.ok(err === err3, 'clone receives same error') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + }) + + source.emit('error', new Error()) +}) + +test('source destroy destroys all', function (t) { + t.plan(2) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + instance.on('close', function () { + t.pass('instance is closed') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + + source.destroy() +}) + +test('instance error destroys all but the source', function (t) { + t.plan(4) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('error', function (err) { + t.is(err.message, 'beep', 'instance errors') + + instance.on('close', function () { + t.pass('instance is closed') + }) + + clone.on('error', function (err3) { + t.ok(err === err3, 'clone receives same error') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + }) + + instance.destroy(new Error('beep')) +}) + +test('instance destroy destroys all but the source', function (t) { + t.plan(2) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('close', function () { + t.pass('instance is closed') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + + instance.destroy() +}) + +test('clone destroy does not affect other clones, cloneable or source', function (t) { + t.plan(1) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + var other = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('close', function () { + t.fail('instance should not be closed') + }) + + other.on('close', function () { + t.fail('other clone should not be closed') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + + clone.destroy() +}) + +test('clone remains readable if other is destroyed', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello') + } + next() + }) + + var instance = cloneable(source) + var clone = instance.clone() + var other = instance.clone() + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk.toString(), 'hello', 'instance chunk matches') + cb() + })) + + clone.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk.toString(), 'hello', 'clone chunk matches') + cb() + })) + + clone.on('close', function () { + t.fail('clone should not be closed') + }) + + instance.on('close', function () { + t.fail('instance should not be closed') + }) + + other.on('close', function () { + t.pass('other is closed') + }) + + other.destroy() +}) + +test('clone of clone', function (t) { + t.plan(6) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + var replica = cloned.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + replica.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('from vinyl', function (t) { + t.plan(3) + + var source = from(['wa', 'dup']) + + var instance = cloneable(source) + var clone = instance.clone() + + var data = '' + var data2 = '' + var ends = 2 + + function latch () { + if (--ends === 0) { + t.equal(data, data2) + } + } + + instance.on('data', function (chunk) { + data += chunk.toString() + }) + + process.nextTick(function () { + t.equal('', data, 'nothing was written yet') + t.equal('', data2, 'nothing was written yet') + + clone.on('data', function (chunk) { + data2 += chunk.toString() + }) + }) + + instance.on('end', latch) + clone.on('end', latch) +}) + +test('waits till all are flowing', function (t) { + t.plan(1) + + var source = from(['wa', 'dup']) + + var instance = cloneable(source) + + // we create a clone + instance.clone() + + instance.on('data', function (chunk) { + t.fail('this should never happen') + }) + + process.nextTick(function () { + t.pass('wait till nextTick') + }) +}) + +test('isCloneable', function (t) { + t.plan(4) + + var source = from(['hello', ' ', 'world']) + t.notOk(cloneable.isCloneable(source), 'a generic readable is not cloneable') + + var instance = cloneable(source) + t.ok(cloneable.isCloneable(instance), 'a cloneable is cloneable') + + var clone = instance.clone() + t.ok(cloneable.isCloneable(clone), 'a clone is cloneable') + + var cloneClone = clone.clone() + t.ok(cloneable.isCloneable(cloneClone), 'a clone of a clone is cloneable') +}) diff --git a/public/app/vendor/node_modules/core-util-is/LICENSE b/public/app/vendor/node_modules/core-util-is/LICENSE new file mode 100644 index 00000000..d8d7f943 --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/public/app/vendor/node_modules/core-util-is/README.md b/public/app/vendor/node_modules/core-util-is/README.md new file mode 100644 index 00000000..5a76b414 --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/public/app/vendor/node_modules/core-util-is/float.patch b/public/app/vendor/node_modules/core-util-is/float.patch new file mode 100644 index 00000000..a06d5c05 --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/public/app/vendor/node_modules/core-util-is/lib/util.js b/public/app/vendor/node_modules/core-util-is/lib/util.js new file mode 100644 index 00000000..ff4c851c --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/public/app/vendor/node_modules/core-util-is/package.json b/public/app/vendor/node_modules/core-util-is/package.json new file mode 100644 index 00000000..37e67a62 --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/readable-stream" + ] + ], + "_from": "core-util-is@>=1.0.0 <1.1.0", + "_id": "core-util-is@1.0.2", + "_inCache": true, + "_location": "/core-util-is", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_shrinkwrap": null, + "_spec": "core-util-is@~1.0.0", + "_where": "/home/cycojesus/projets/ledgerrb/public/app/vendor/node_modules/readable-stream", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "dependencies": {}, + "description": "The `util.is*` functions introduced in Node v0.12.", + "devDependencies": { + "tap": "^2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "license": "MIT", + "main": "lib/util.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "core-util-is", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.2" +} diff --git a/public/app/vendor/node_modules/core-util-is/test.js b/public/app/vendor/node_modules/core-util-is/test.js new file mode 100644 index 00000000..1a490c65 --- /dev/null +++ b/public/app/vendor/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/.gitmodules b/public/app/vendor/node_modules/google-closure-compiler-js/.gitmodules new file mode 100644 index 00000000..9c8fb74e --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/.gitmodules @@ -0,0 +1,3 @@ +[submodule "closure-compiler"] + path = closure-compiler + url = https://github.com/google/closure-compiler diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/CONTRIBUTING.md b/public/app/vendor/node_modules/google-closure-compiler-js/CONTRIBUTING.md new file mode 100644 index 00000000..052f6dca --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/CONTRIBUTING.md @@ -0,0 +1,24 @@ +Want to contribute? Great! First, read this page (including the small print at the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. We +use Github pull requests for this purpose. + +### The small print +Contributions made by corporations are covered by a different agreement than +the one above, the Software Grant and Corporate Contributor License Agreement. \ No newline at end of file diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/LICENSE b/public/app/vendor/node_modules/google-closure-compiler-js/LICENSE new file mode 100644 index 00000000..9c8f3ea0 --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/README.md b/public/app/vendor/node_modules/google-closure-compiler-js/README.md new file mode 100644 index 00000000..72af860c --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/README.md @@ -0,0 +1,167 @@ +# closure-compiler-js + +Check, compile, transpile, optimize and compress JavaScript with Closure Compiler in JS. + +This repo tracks issues related to the publication to npmjs.org and associated plugins. +Any bugs not related to the plugins themselves should be reported to the [main repository](https://github.com/google/closure-compiler/). + +Unlike other packages, this allows Closure Compiler to run entirely in JS. +*Java is not required.* + +This is an experimental release - meaning some features are not available and performance may not be on-par with the Java implementation. [Details Here](#transpilation) + +## Usage + +First, install the latest version: + +```bash +npm install --save google-closure-compiler-js +``` + +The module supports modern web browsers as well as Node v4 LTS, and provides `compile` as a low-level method to compile JavaScript. +By default, this compiles ES6 to ES5 and includes the default set of ECMAScript externs files. +For example: + +```js +const compile = require('google-closure-compiler-js').compile; + +const flags = { + jsCode: [{src: 'const x = 1 + 2;'}], +}; +const out = compile(flags); +console.info(out.compiledCode); // will print 'var x = 3;\n' +``` + +Or to install the command-line version, do: + +```bash +npm install -g google-closure-compiler-js +``` + +You should now be able to run `google-closure-compiler-js` as a command. +The `google-closure-compiler-js` command can read from stdin or from a file. +For example: + +```bash +google-closure-compiler-js code.js > minified.js +``` + +Run `google-closure-compiler-js --help` for full usage information. + +## Build Systems + +### Webpack + +Your `webpack.config.js` should look like this: + +```js +const ClosureCompiler = require('google-closure-compiler-js').webpack; +const path = require('path'); + +module.exports = { + entry: [ + path.join(__dirname, 'app.js') + ], + output: { + path: path.join(__dirname, 'dist'), + filename: 'app.min.js' + }, + plugins: [ + new ClosureCompiler({ + options: { + languageIn: 'ECMASCRIPT6', + languageOut: 'ECMASCRIPT5', + compilationLevel: 'ADVANCED', + warningLevel: 'VERBOSE', + }, + }) + ] +}; +``` + +### Gulp + +Your `gulpfile.js` should contain a task like this: + +```js +const compiler = require('google-closure-compiler-js').gulp(); + +gulp.task('script', function() { + return gulp.src('./path/to/src.js', {base: './'}) + // your other steps here + .pipe(compiler({ + compilationLevel: 'SIMPLE', + warningLevel: 'VERBOSE', + outputWrapper: '(function(){\n%output%\n}).call(this)', + jsOutputFile: 'output.min.js', // outputs single file + createSourceMap: true, + })) + .pipe(gulp.dest('./dist')); +}); +``` + +## Flags + +| Flag | Default | Usage | +|----------------------------------|---------|-------| +| angularPass | false | Generate $inject properties for AngularJS for functions annotated with @ngInject | +| applyInputSourceMaps | true | Compose input source maps into output source map | +| assumeFunctionWrapper | false | Enable additional optimizations based on the assumption that the output will be wrapped with a function wrapper. This flag is used to indicate that "global" declarations will not actually be global but instead isolated to the compilation unit. This enables additional optimizations. | +| checksOnly | false | Don't generate output. Run checks, but no optimization passes. | +| compilationLevel | SIMPLE | Specifies the compilation level to use.
    Options: WHITESPACE_ONLY, SIMPLE, ADVANCED | +| dartPass | false | | +| defines | null | Overrides the value of variables annotated with `@define`, an object mapping names to primitive types | +| env | BROWSER | Determines the set of builtin externs to load.
    Options: BROWSER, CUSTOM | +| exportLocalPropertyDefinitions | false | | +| generateExports | false | Generates export code for those marked with @export. | +| languageIn | ES6 | Sets what language spec that input sources conform to. | +| languageOut | ES5 | Sets what language spec the output should conform to. | +| newTypeInf | false | Checks for type errors using the new type inference algorithm. | +| outputWrapper | null | Interpolate output into this string, replacing the token `%output%` | +| polymerVersion | null | Specify the Polymer version pass to use. | +| preserveTypeAnnotations | false | | +| processCommonJsModules | false | Process CommonJS modules to a concatenable form, i.e., support `require` statements. | +| renamePrefixNamespace | | Specifies the name of an object that will be used to store all non-extern globals. | +| rewritePolyfills | false | Rewrite ES6 library calls to use polyfills provided by the compiler's runtime. | +| useTypesForOptimization | false | Enable or disable the optimizations based on available type information. Inaccurate type annotations may result in incorrect results. | +| warningLevel | DEFAULT | Specifies the warning level to use.
    Options: QUIET, DEFAULT, VERBOSE | +| jsCode | [] | Specifies the source code to compile. | +| externs | [] | Additional externs to use for this compile. | +| createSourceMap | false | Generates a source map mapping the generated source file back to its original sources. | + +### Languages + +The Closure Compiler supports the following languages: +- `ECMASCRIPT3`, `ECMASCRIPT5` and `ECMASCRIPT5_STRICT` for input and output; +- `ECMASCRIPT6` and `ECMASCRIPT6_STRICT` for input only; +- `ECMASCRIPT6_TYPED` (experimental) for both. + +### Source Code + +Unless you're using Gulp's or Webpack's plugins, you'll need to specify code via flags: +- Both `jsCode` and `externs` accept an array containing objects in the form `{src, path, sourceMap}`. +- Using `path` you can construct a virtual filesystem for use with ES6 or CommonJS imports — although for CommonJS you'll have to set `processCommonJsModules: true`. + +## Transpilation +The JavaScript version of the Closure-Compiler is transpiled by GWT from the Java source. For more details on the differences in behavior see the [super sourced files](https://github.com/google/closure-compiler/tree/master/src/com/google/javascript/jscomp/gwt/super) in the main repo. + +## Version History + +Closure Compiler release notes can be found on the +[main repository wiki](https://github.com/google/closure-compiler/wiki/Binary-Downloads). + +## License + +Copyright © 2017 The Closure Compiler Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/build.js b/public/app/vendor/node_modules/google-closure-compiler-js/build.js new file mode 100755 index 00000000..f40f953d --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/build.js @@ -0,0 +1,45 @@ +#!/usr/bin/env node +/* + * Copyright 2016 The Closure Compiler Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +const spawn = require('child_process').spawnSync; +const ncp = require('ncp'); + +const moduleName = 'com.google.javascript:closure-compiler-gwt'; +const compilerBuild = spawn('mvn', ['-DskipTests', '-pl', moduleName], { + cwd: './closure-compiler', + stdio: 'inherit' +}); + +if (compilerBuild.status !== 0) { + throw new Error('compiler build failed'); +} + +const targetPath = './closure-compiler/target/closure-compiler-gwt-1.0-SNAPSHOT/jscomp/jscomp.js'; +ncp(targetPath, './jscomp.js', err => { + if (err) { + throw new Error(err); + } + ['contrib'].forEach(name => { + ncp('./closure-compiler/' + name, './' + name, function(err) { + if (err) { + throw new Error(err); + } + }); + }); +}); diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/cmd.js b/public/app/vendor/node_modules/google-closure-compiler-js/cmd.js new file mode 100755 index 00000000..fa16ed4b --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/cmd.js @@ -0,0 +1,121 @@ +#!/usr/bin/env node +/* + * Copyright 2016 The Closure Compiler Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Command-line interface for Google Closure Compiler in JS + */ + +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const minimist = require('minimist'); +const compile = require('./compile.js'); +const logger = require('./logger.js'); + +const argv = minimist(process.argv.slice(2), { + alias: {h: 'help', v: 'version'}, +}); +if (argv.help) { + const helpfile = path.join(__dirname, 'usage.txt'); + return fs.readFile(helpfile, 'utf8', (err, src) => { + if (err) { + error(err) + } else { + console.log(src); + } + }); +} +if (argv.version) { + return console.log(require('./package.json').version); +} + +const infiles = argv._.concat(toArray(argv.jsCode)); // treat jsCode as _ +if (infiles.length === 0) { + infiles.push(null); // if no files were specified, read from stdin +} +const sources = readAllFiles(infiles); +delete argv._; +delete argv.jsCode; + +const externs = readAllFiles(toArray(argv.externs)); +delete argv.externs; + +Promise.all([sources, externs]).then(arr => ready(...arr)).catch(error); + +/** + * Minimist gives us a string, array or null: normalize to array. + * + * @param {(string|Array)} + * @return {!Array} + */ +function toArray(arg) { + if (typeof arg === 'string') { + return [arg]; + } else if (arg) { + return arg; + } else { + return []; + } +} + +/** + * @param {!Array} paths + * @return {!Promise>} + */ +function readAllFiles(paths) { + return Promise.all(paths.map(path => readFile(path))); +} + +/** + * @param {?string} path + * @return {!Promise<{src: string, path: string}>} + */ +function readFile(path) { + return new Promise((resolve, reject) => { + if (path === null) { + let src = ''; + process.stdin.resume(); + process.stdin.on('data', buf => src += buf.toString()); + process.stdin.on('end', () => resolve({src, path: '-'})); + } else { + fs.readFile(path, 'utf8', (err, src) => err ? reject(err) : resolve({src, path})); + } + }); +} + +/** + * @param {!Array<{src: string, path: string}>} sources + * @param {!Array<{src: string, path: string}>} externs + */ +function ready(sources, externs) { + const flags = Object.assign(Object.assign({}, argv), {jsCode: sources, externs: externs}); + const output = compile(flags); + + let code = 0; + if (logger(flags, output)) { + code = 1; + } + console.log(output.compiledCode); + + process.exit(code); +} + +function error(err) { + console.error(err); + process.exit(1); +} diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/compile.js b/public/app/vendor/node_modules/google-closure-compiler-js/compile.js new file mode 100644 index 00000000..ad003492 --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/compile.js @@ -0,0 +1,38 @@ +/* + * Copyright 2016 The Closure Compiler Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Wrapper for the natively built Closure Compiler GWT binary to + * work around quirks. Depending on the release, this file could be empty. + */ + +'use strict'; + +const jscomp = require('./jscomp.js'); + +module.exports = function(flags) { + const clone = {}; + for (const k in flags) { + clone[k] = flags[k]; + } + const out = jscomp(clone); + + // hide weird GWT internals + out.warnings = Array.prototype.slice.call(out.warnings); + out.errors = Array.prototype.slice.call(out.errors); + + return out; +}; diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/index.js b/public/app/vendor/node_modules/google-closure-compiler-js/index.js new file mode 100644 index 00000000..3c67e43e --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/index.js @@ -0,0 +1,28 @@ +/* + * Copyright 2016 The Closure Compiler Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview NodeJS plugins and build tools for Google Closure Compiler in JS + */ + +'use strict'; + +module.exports = { + logger: require('./logger.js'), + compile: require('./compile.js'), + gulp: require('./lib/gulp'), + webpack: require('./lib/webpack'), +}; diff --git a/public/app/vendor/node_modules/google-closure-compiler-js/jscomp.js b/public/app/vendor/node_modules/google-closure-compiler-js/jscomp.js new file mode 100644 index 00000000..1310988c --- /dev/null +++ b/public/app/vendor/node_modules/google-closure-compiler-js/jscomp.js @@ -0,0 +1,7902 @@ +(function(){var $wnd={'Error':{}};var $doc={},$moduleName,$moduleBase;function ub(){} +function Fb(){} +function oK(){} +function vK(){} +function td(){} +function zd(){} +function df(){} +function Kj(){} +function qw(){} +function cx(){} +function kx(){} +function OC(){} +function $F(){} +function YI(){} +function eJ(){} +function pJ(){} +function AJ(){} +function BJ(){} +function eK(){} +function hjb(){} +function cjb(){} +function ykb(){} +function Gob(){} +function nqb(){} +function isb(){} +function wsb(){} +function Asb(){} +function Jsb(){} +function Ysb(){} +function Zsb(){} +function $sb(){} +function _sb(){} +function _tb(){} +function yzb(){} +function aCb(){} +function UCb(){} +function jKb(){} +function vNb(){} +function KNb(){} +function LNb(){} +function dQb(){} +function dZb(){} +function wZb(){} +function w1b(){} +function z2b(){} +function O2b(){} +function S4b(){} +function S7b(){} +function d7b(){} +function K7b(){} +function s5b(){} +function T8b(){} +function d9b(){} +function q9b(){} +function bac(){} +function Kac(){} +function Pac(){} +function Tac(){} +function _ac(){} +function dbc(){} +function scc(){} +function Hhc(){} +function cic(){} +function nic(){} +function qjc(){} +function tjc(){} +function xjc(){} +function Yjc(){} +function elc(){} +function hlc(){} +function Umc(){} +function jnc(){} +function Boc(){} +function Foc(){} +function ppc(){} +function Ipc(){} +function erc(){} +function wsc(){} +function ytc(){} +function muc(){} +function gEc(){} +function kEc(){} +function oEc(){} +function sEc(){} +function KEc(){} +function UEc(){} +function YEc(){} +function YFc(){} +function NFc(){} +function ZGc(){} +function aHc(){} +function yIc(){} +function kJc(){} +function nJc(){} +function uKc(){} +function zKc(){} +function rMc(){} +function QPc(){} +function hQc(){} +function jQc(){} +function OQc(){} +function OUc(){} +function GUc(){} +function JUc(){} +function MUc(){} +function ZUc(){} +function YSc(){} +function wTc(){} +function CTc(){} +function vVc(){} +function cWc(){} +function OWc(){} +function tYc(){} +function t$c(){} +function d4c(){} +function k6c(){} +function W6c(){} +function Jbd(){} +function Qbd(){} +function tcd(){} +function Zdd(){} +function yfd(){} +function Gfd(){} +function Pfd(){} +function Rfd(){} +function Ahd(){} +function Dhd(){} +function Yhd(){} +function Did(){} +function fvd(){} +function jvd(){} +function jRd(){} +function xRd(){} +function MCd(){} +function MXd(){} +function EXd(){} +function IXd(){} +function QXd(){} +function lSd(){} +function l_d(){} +function a_d(){} +function g_d(){} +function s_d(){} +function UTd(){} +function X$d(){} +function Vae(){} +function ege(){} +function eye(){} +function vye(){} +function Eye(){} +function Mye(){} +function Uye(){} +function lBe(){} +function qBe(){} +function _Ee(){} +function eFe(){} +function gFe(){} +function iFe(){} +function aHe(){} +function jIe(){} +function mIe(){} +function pIe(){} +function sIe(){} +function NIe(){} +function UIe(){} +function eJe(){} +function Wae(a){} +function au(a){} +function Aec(a){} +function ovd(a){} +function M3d(a){} +function kad(a){lu(a)} +function Ltb(){Itb()} +function iKb(){hKb()} +function eJc(){IIc()} +function jZc(){Zte()} +function Lt(){this.a=0} +function RB(){this.a=8} +function TB(){this.a=8} +function Tf(a){this.a=a} +function ug(a){this.a=a} +function zg(a){this.a=a} +function Rg(a){this.a=a} +function jh(a){this.a=a} +function sh(a){this.a=a} +function kj(a){this.a=a} +function Pl(a){this.a=a} +function to(a){this.a=a} +function Do(a){this.a=a} +function Io(a){this.a=a} +function ep(a){this.a=a} +function Kp(a){this.a=a} +function _p(a){this.a=a} +function Ts(a){this.a=a} +function Hu(a){this.a=a} +function qv(a){this.a=a} +function qC(a){this.a=a} +function mC(a){this.a=a} +function mB(a){this.a=a} +function AB(a){this.a=a} +function ox(a){this.a=a} +function Sx(a){this.a=a} +function SC(a){this.a=a} +function kz(a){this.a=a} +function aE(a){this.a=a} +function uE(a){this.a=a} +function yE(a){this.a=a} +function LE(a){this.a=a} +function DE(a){this.b=a} +function hx(a){this.b=a} +function qA(a){this.b=a} +function _F(a){this.a=a} +function cG(a){this.a=a} +function vG(a){this.a=a} +function TI(a){this.a=a} +function nI(a){this.e=a} +function dJ(a){this.c=a} +function yob(a,b){a.g=b} +function rIb(a,b){a.g=b} +function sIb(a,b){a.k=b} +function LGb(a,b){a.k=b} +function IGb(a,b){a.f=b} +function KGb(a,b){a.o=b} +function NGb(a,b){a.t=b} +function OGb(a,b){a.A=b} +function PGb(a,b){a.C=b} +function QGb(a,b){a.G=b} +function RGb(a,b){a.R=b} +function tIb(a,b){a.s=b} +function uIb(a,b){a.t=b} +function vIb(a,b){a.v=b} +function wIb(a,b){a.C=b} +function xIb(a,b){a.F=b} +function yIb(a,b){a.W=b} +function zIb(a,b){a.$=b} +function n9b(a,b){a.a=b} +function Xjc(a,b){a.k=b} +function X5c(a,b){a.f=b} +function MGc(a,b){a.b=b} +function NGc(a,b){a.c=b} +function uMc(a,b){a.c=b} +function cZc(a,b){a.c=b} +function rZc(a,b){a.b=b} +function rYc(a,b){a.d=b} +function U8c(a,b){a.d=b} +function zqd(a,b){a.J=b} +function Aqd(a,b){a.K=b} +function Cqd(a,b){a.P=b} +function Dqd(a,b){a.R=b} +function Fqd(a,b){a.T=b} +function Gqd(a,b){a.U=b} +function Hqd(a,b){a.V=b} +function Iqd(a,b){a.W=b} +function Jqd(a,b){a.X=b} +function Kqd(a,b){a.Y=b} +function Lqd(a,b){a.Z=b} +function NBd(a,b){a.c=b} +function OBd(a,b){a.d=b} +function O$d(a,b){a.f=b} +function T$d(a,b){a.g=b} +function V$d(a,b){a.j=b} +function iSd(a,b){a.n=b} +function jSd(a,b){a.p=b} +function j_d(a,b){a.c=b} +function i_d(a,b){a.b=b} +function k_d(a,b){a.d=b} +function o2d(a,b){a.k=b} +function B2d(a,b){a.k=b} +function p2d(a,b){a.c=b} +function t2d(a,b){a.g=b} +function v2d(a,b){a.i=b} +function A2d(a,b){a.j=b} +function jbe(a,b){a.A=b} +function cme(a,b){a.a=b} +function dme(a,b){a.e=b} +function GIe(a,b){a.b=b} +function mjb(a,b){a.kb=b} +function Rkb(a){this.b=a} +function nlb(a){this.b=a} +function clb(a){this.a=a} +function _lb(a){this.a=a} +function pmb(a){this.a=a} +function Imb(a){this.a=a} +function lob(a){this.a=a} +function Vob(a){this.a=a} +function Xob(a){this.a=a} +function lpb(a){this.a=a} +function $rb(a){this.a=a} +function Lre(a){this.a=a} +function ytb(a){this.a=a} +function Atb(a){this.a=a} +function Cvb(a){this.a=a} +function sxb(a){this.a=a} +function szb(a){this.a=a} +function Kzb(a){this.a=a} +function Mzb(a){this.a=a} +function Pzb(a){this.a=a} +function Vzb(a){this.a=a} +function fAb(a){this.a=a} +function IBb(a){this.a=a} +function LDb(a){this.a=a} +function oEb(a){this.a=a} +function DEb(a){this.a=a} +function lHb(a){this.a=a} +function qHb(a){this.a=a} +function sHb(a){this.a=a} +function uHb(a){this.a=a} +function wHb(a){this.a=a} +function yHb(a){this.a=a} +function Wvd(){this.a=1} +function Sm(a){a.c=a.d.d} +function PIb(a,b){a.cd=b} +function IIb(a,b){a.Bd=b} +function QIb(a,b){a.wd=b} +function RIb(a,b){a.Ed=b} +function AIb(a,b){a.jb=b} +function CIb(a,b){a.vb=b} +function GIb(a,b){a.Wb=b} +function HIb(a,b){a.bc=b} +function KIb(a,b){a.vc=b} +function LIb(a,b){a.Ac=b} +function NIb(a,b){a.Tc=b} +function XKb(a){this.a=a} +function ILb(a){this.a=a} +function uMb(a){this.a=a} +function zMb(a){this.a=a} +function LMb(a){this.a=a} +function tNb(a){this.a=a} +function eQb(a){this.a=a} +function oQb(a){this.a=a} +function SRb(a){this.a=a} +function bSb(a){this.a=a} +function CWb(a){this.a=a} +function HWb(a){this.a=a} +function UWb(a){this.a=a} +function _Yb(a){this.a=a} +function xZb(a){this.a=a} +function x0b(a){this.a=a} +function o0b(a){this.a=a} +function i$b(a){this.a=a} +function B$b(a){this.a=a} +function K1b(a){this.a=a} +function Q1b(a){this.a=a} +function Q4b(a){this.a=a} +function h2b(a){this.a=a} +function j2b(a){this.a=a} +function R2b(a){this.a=a} +function X2b(a){this.a=a} +function E3b(a){this.a=a} +function c5b(a){this.a=a} +function $6b(a){this.a=a} +function q7b(a){this.a=a} +function a9b(a){this.a=a} +function g9b(a){this.a=a} +function o9b(a){this.b=a} +function P1b(a){this.b=a} +function Hac(a){this.a=a} +function qbc(a){this.a=a} +function qgc(a){this.a=a} +function jcc(a){this.a=a} +function ncc(a){this.a=a} +function Xdc(a){this.a=a} +function mfc(a){this.a=a} +function tic(a){this.a=a} +function wic(a){this.a=a} +function Bic(a){this.a=a} +function Jic(a){this.a=a} +function Pic(a){this.a=a} +function Sic(a){this.d=a} +function Fjc(a){this.b=a} +function bkc(a){this.a=a} +function Ekc(a){this.a=a} +function Ikc(a){this.a=a} +function _kc(a){this.a=a} +function Glc(a){this.a=a} +function Olc(a){this.a=a} +function $lc(a){this.a=a} +function smc(a){this.a=a} +function wmc(a){this.a=a} +function Emc(a){this.a=a} +function Nmc(a){this.a=a} +function anc(a){this.a=a} +function dnc(a){this.a=a} +function lnc(a){this.a=a} +function rnc(a){this.a=a} +function znc(a){this.a=a} +function Knc(a){this.a=a} +function Mqc(a){this.a=a} +function qrc(a){this.a=a} +function trc(a){this.a=a} +function zrc(a){this.a=a} +function Atc(a){this.a=a} +function Jtc(a){this.a=a} +function xuc(a){this.a=a} +function Buc(a){this.a=a} +function Ouc(a){this.a=a} +function Tuc(a){this.a=a} +function evc(a){this.a=a} +function nvc(a){this.a=a} +function Cvc(a){this.a=a} +function izc(a){this.a=a} +function zzc(a){this.a=a} +function vEc(a){this.a=a} +function yEc(a){this.a=a} +function OEc(a){this.a=a} +function REc(a){this.a=a} +function JFc(a){this.a=a} +function WFc(a){this.a=a} +function fGc(a){this.a=a} +function GGc(a){this.a=a} +function QGc(a){this.a=a} +function QQc(a){this.a=a} +function FIc(a){this.a=a} +function cMc(a){this.a=a} +function iMc(a){this.a=a} +function fRc(a){this.a=a} +function kRc(a){this.a=a} +function kUc(a){this.a=a} +function mUc(a){this.a=a} +function EUc(a){this.a=a} +function DSc(a){this.a=a} +function dTc(a){this.a=a} +function ITc(a){this.a=a} +function WTc(a){this.a=a} +function WWc(a){this.a=a} +function _Wc(a){this.a=a} +function gVc(a){this.a=a} +function iVc(a){this.a=a} +function lVc(a){this.a=a} +function nVc(a){this.a=a} +function AYc(a){this.a=a} +function EYc(a){this.a=a} +function UZc(a){this.a=a} +function U$c(a){this.a=a} +function R$c(a){this.a=a} +function k_c(a){this.a=a} +function g4c(a){this.a=a} +function $7c(a){this.a=a} +function w9c(a){this.a=a} +function WPc(a){this.b=a} +function sUc(a){this.b=a} +function fTc(a){this.c=a} +function fad(a){this.a=a} +function jbd(a){this.a=a} +function jgd(a){this.a=a} +function egd(a){this.a=a} +function Rcd(a){this.a=a} +function Idd(a){this.a=a} +function Odd(a){this.a=a} +function iid(a){this.a=a} +function Mkd(a){this.a=a} +function nod(a){this.a=a} +function Vqd(a){this.a=a} +function vrd(a){this.a=a} +function Ard(a){this.a=a} +function mrd(a){this.d=a} +function VJd(a){this.d=a} +function ysd(a){this.a=a} +function jud(a){this.a=a} +function bvd(a){this.a=a} +function bVd(a){this.a=a} +function PAd(a){this.a=a} +function tUd(a){this.a=a} +function LUd(a){this.a=a} +function LWd(a){this.a=a} +function zWd(a){this.a=a} +function DWd(a){this.a=a} +function PWd(a){this.a=a} +function TWd(a){this.a=a} +function XWd(a){this.a=a} +function _Wd(a){this.a=a} +function dXd(a){this.a=a} +function hXd(a){this.a=a} +function UXd(a){this.a=a} +function lZd(a){this.a=a} +function h3d(a){this.a=a} +function k3d(a){this.a=a} +function F3d(a){this.a=a} +function I3d(a){this.a=a} +function mOd(a){this.j=a} +function tVd(a){this.d=a} +function Y$d(a){this.c=a} +function rfe(a){this.g=a} +function ige(a){this.b=a} +function vme(a){this.b=a} +function mqe(a){this.a=a} +function Lqe(a){this.a=a} +function bse(a){this.a=a} +function _te(a){this.a=a} +function yue(a){this.a=a} +function Nue(a){this.d=a} +function dve(a){this.a=a} +function jve(a){this.a=a} +function nve(a){this.a=a} +function sve(a){this.a=a} +function Qve(a){this.a=a} +function _ve(a){this.b=a} +function ewe(a){this.a=a} +function kwe(a){this.a=a} +function lxe(a){this.c=a} +function _ye(a){this.a=a} +function jze(a){this.a=a} +function qze(a){this.b=a} +function Gze(a){this.b=a} +function kAe(a){this.d=a} +function PAe(a){this.a=a} +function TAe(a){this.a=a} +function uBe(a){this.a=a} +function bCe(a){this.a=a} +function UCe(a){this.a=a} +function gEe(a){this.a=a} +function KFe(a){this.a=a} +function JHe(a){this.a=a} +function hJe(a){this.a=a} +function $d(a){this.c=a.c} +function Zg(){this.a='%s'} +function y_c(){w_c(this)} +function z_c(){w_c(this)} +function idd(){Tcd(this)} +function O3d(){M3d(this)} +function Owe(){rwe(this)} +function nue(){lue(this)} +function CJ(){cH.call(this)} +function Kv(){Kv=cjb;LC()} +function ff(a){return !a} +function Tre(a){return a&-a} +function hYb(a,b){this.a=a} +function JGb(a,b){a.T.T=b} +function Oqd(a,b){a.db=b} +function C$d(a,b){a.a|=b} +function Mxe(a,b){a.sort(b)} +function nFb(a,b){ie(a.r,b)} +function xAb(a,b){b&&a.Uh()} +function WAb(a){a.d=new JCe} +function cqc(a){a.d=new JCe} +function p6c(a){a.d=new RDe} +function mXc(a){a.j=new RDe} +function r4b(a){a.g=new idd} +function Fu(){this.a=new idd} +function Nu(){this.b=new idd} +function vv(){this.a=new idd} +function vre(){CJ.call(this)} +function qse(){CJ.call(this)} +function ld(a){Ac();this.a=a} +function ar(a){Qq();this.a=a} +function Vu(a){Qq();this.a=a} +function $u(a){Qq();this.a=a} +function xv(a){lr();this.a=a} +function yA(a){lr();this.a=a} +function sG(a){rG();this.a=a} +function jK(a){iK();hK.ig(a)} +function Vc(a){return a<=127} +function Td(a,b){return a==b} +function rJ(a,b){return a[b]} +function Gzb(a,b){zEe(a.a,b)} +function zFb(a,b){OCe(a.B,b)} +function mFb(a,b){Vcd(a.d,b)} +function GHb(a,b){Vcd(a.d,b)} +function HHb(a,b){Vcd(a.e,b)} +function Rmb(a,b){Vcd(a.b,b)} +function Vmb(a,b){cdd(a.b,b)} +function CGb(a,b){cdd(a.d,b)} +function hNb(a,b){OCe(a.d,b)} +function dNb(a,b){OCe(a.e,b)} +function eNb(a,b){OCe(a.c,b)} +function YAb(a,b){sAb(a.c,b)} +function fgc(a,b){Zec(a.d,b)} +function Dsc(a,b){OCe(a.s,b)} +function Zzc(a,b){FGb(a.c,b)} +function j_c(a,b){yob(a.a,b)} +function Xed(a,b){bfd(a,b,b)} +function BIb(a,b){a.nb=Xs(b)} +function fy(a,b){a.e=b;b.b=a} +function iF(a,b){a.i=b;b.f=a} +function Bvd(a){this.a=js(a)} +function sEb(){this.a=new Nu} +function _qc(){this.a=new bu} +function fI(){this.a=new RDe} +function OH(){OH=cjb;NH=PH()} +function Zte(){Zte=cjb;gJe()} +function Hte(){CJ.call(this)} +function Hre(){CJ.call(this)} +function rqe(){CJ.call(this)} +function vqe(){CJ.call(this)} +function BBe(){CJ.call(this)} +function MBe(){CJ.call(this)} +function lFe(){CJ.call(this)} +function noc(){CJ.call(this)} +function mRd(){CJ.call(this)} +function zqe(){cH.call(this)} +function cJe(a,b){a.length=b} +function CIe(a,b){Vcd(a.a,b)} +function iIb(a,b){JKb(a.Fd,b)} +function acc(a,b){Hn(a.a,b,1)} +function zPb(a,b){tf(b);a.a=b} +function JPb(a,b){tf(b);a.a=b} +function KPb(a,b){tf(b);a.b=b} +function AI(a){return a.bb?a:b} +function ose(a,b){return a=65&&a<=90} +function gu(a,b){return a>b&&b=97&&a<=122} +function Kg(a,b){return a.c.de(a,b)} +function up(a,b){return new zp(b,a)} +function $I(a,b){return b.b+a.c.i.b} +function Iib(a,b){return Dib(a,b)>0} +function Kib(a,b){return Dib(a,b)<0} +function sjb(a,b){$b.call(this,a,b)} +function lD(a){kD();et.call(this,a)} +function qrb(a,b){$b.call(this,a,b)} +function gsb(a,b){$b.call(this,a,b)} +function kkb(a,b){this.a=a;this.b=b} +function Xlb(a,b){this.a=a;this.b=b} +function Cob(a,b){this.a=a;this.b=b} +function xvb(a,b){this.a=a;this.b=b} +function lAb(a,b){this.a=a;this.b=b} +function $wb(a,b){this.c=a;this.b=b} +function ilb(a,b){this.b=a;this.a=b} +function zCb(a,b){this.b=a;this.a=b} +function oAb(a,b){this.b=a;this.d=b} +function FCb(a,b){$b.call(this,a,b)} +function iEb(a,b){this.a=a;this.b=b} +function nEb(a,b){this.b=a;this.a=b} +function _Eb(a,b){$b.call(this,a,b)} +function eHb(a,b){this.d=a;this.c=b} +function Bzb(a,b){return gue(a.c,b)} +function AHb(a,b){return OCe(a.d,b)} +function QCb(a){return B1d(a,37)!=0} +function TCb(a){return B1d(a,30)!=0} +function Txb(a){H2d(a,a.b);return a} +function gyd(a,b,c){p2d(a,c.c-b.c)} +function HRd(a,b,c){tte(a.c,b,0,c)} +function _Ib(a,b){$b.call(this,a,b)} +function jJb(a,b){$b.call(this,a,b)} +function oJb(a,b){$b.call(this,a,b)} +function xJb(a,b){$b.call(this,a,b)} +function CJb(a,b){$b.call(this,a,b)} +function PJb(a,b){$b.call(this,a,b)} +function bKb(a,b){$b.call(this,a,b)} +function oKb(a,b){$b.call(this,a,b)} +function wKb(a,b){$b.call(this,a,b)} +function FKb(a,b){$b.call(this,a,b)} +function JMb(a,b){$b.call(this,a,b)} +function ePb(a,b){$b.call(this,a,b)} +function xPb(a,b){this.b=a;this.a=b} +function VNb(a,b){this.b=a;this.a=b} +function GRb(a,b){this.b=a;this.a=b} +function jSb(a,b){this.b=a;this.a=b} +function vSb(a,b){this.a=a;this.b=b} +function ASb(a,b){this.a=a;this.b=b} +function FNb(a,b){this.a=a;this.b=b} +function FUb(a,b){this.a=a;this.b=b} +function BOb(a,b){this.a=a;this.b=b} +function EOb(a,b){this.a=a;this.b=b} +function LTb(a,b){this.a=a;this.b=b} +function GVb(a,b){this.a=a;this.b=b} +function QVb(a,b){this.a=a;this.b=b} +function UVb(a,b){this.a=a;this.b=b} +function mWb(a,b){this.a=a;this.b=b} +function tWb(a,b){this.a=a;this.b=b} +function yWb(a,b){this.a=a;this.b=b} +function $Wb(a,b){this.a=a;this.b=b} +function cXb(a,b){this.a=a;this.b=b} +function S$b(a,b){this.a=a;this.b=b} +function iVb(a,b){this.b=a;this.a=b} +function tXb(a,b){this.b=a;this.a=b} +function bZb(a,b){this.b=a;this.a=b} +function BZb(a,b){this.c=a;this.d=b} +function e1b(a,b){this.a=a;this.b=b} +function e2b(a,b){this.a=a;this.b=b} +function m2b(a,b){this.a=a;this.b=b} +function y2b(a,b){this.e=a;this.a=b} +function p3b(a,b){this.b=a;this.a=b} +function Y0b(a,b){$b.call(this,a,b)} +function e4b(a,b){return b6b(b,a.b)} +function f4b(a,b){return b6b(b,a.i)} +function g4b(a,b){return b6b(b,a.o)} +function h4b(a,b){return b6b(b,a.r)} +function i4b(a,b){return b6b(b,a.s)} +function j4b(a,b){return b6b(b,a.t)} +function k4b(a,b){return b6b(b,a.u)} +function _Mb(a,b){return PCe(a.e,b)} +function bNb(a,b){return PCe(a.d,b)} +function E8b(a,b){$b.call(this,a,b)} +function i8b(a,b){this.a=a;this.b=b} +function U4b(a,b){this.a=a;this.b=b} +function W4b(a,b){this.a=a;this.b=b} +function j9b(a,b){this.a=a;this.b=b} +function eac(a,b){this.a=a;this.b=b} +function iac(a,b){this.a=a;this.b=b} +function ibc(a,b){this.a=a;this.b=b} +function ndc(a,b){this.a=a;this.b=b} +function A4b(a,b){this.b=a;this.a=b} +function _4b(a,b){this.b=a;this.a=b} +function Kgc(a,b){this.b=a;this.a=b} +function Zjc(a,b){this.a=a;this.b=b} +function dkc(a,b){this.b=a;this.a=b} +function ikc(a,b){this.a=a;this.b=b} +function skc(a,b){this.a=a;this.b=b} +function Gkc(a,b){this.a=a;this.b=b} +function dlc(a,b){this.a=a;this.b=b} +function Qmc(a,b){this.a=a;this.b=b} +function hnc(a,b){this.b=a;this.a=b} +function qnc(a,b){this.b=a;this.a=b} +function wnc(a,b){this.b=a;this.a=b} +function sac(a,b){$b.call(this,a,b)} +function yec(a,b){$b.call(this,a,b)} +function Qec(a,b){$b.call(this,a,b)} +function Cac(){sac.call(this,iTe,4)} +function cC(a,b){a.a.Je().remove(b)} +function Yec(a,b){return PCe(a.a,b)} +function Lpc(a,b){return Gkb(a.a,b)} +function agc(a,b){return Uec(a.d,b)} +function Loc(a,b){return b6b(b,a.b)} +function Moc(a,b){return b6b(b,a.e)} +function Noc(a,b){return b6b(b,a.f)} +function Stc(a,b){return ZLb(a.i,b)} +function ftc(a,b){return MDe(a.k,b)} +function jtc(a,b){return PCe(a.s,b)} +function Nrc(a){return a.e?u1d(a):a} +function rsc(a){this.a=new LCe(a.a)} +function jsc(a,b){this.a=a;this.b=b} +function Dqc(a,b){this.a=a;this.b=b} +function ezc(a,b){this.a=a;this.b=b} +function Oqc(a,b){this.b=a;this.a=b} +function Jvc(a,b){this.b=a;this.a=b} +function tAc(a,b){this.b=a;this.a=b} +function BEc(a,b){this.b=a;this.a=b} +function iFc(a,b){this.b=a;this.a=b} +function AFc(a,b){this.b=a;this.a=b} +function GFc(a,b){this.b=a;this.a=b} +function LFc(a,b){this.b=a;this.a=b} +function pMc(a,b){this.b=a;this.a=b} +function quc(a,b){this.b=a;this.c=b} +function ENc(a,b){this.b=a;this.a=b} +function yNc(a,b){this.a=a;this.b=b} +function ONc(a,b){this.a=a;this.b=b} +function CJc(a,b){this.a=a;this.b=b} +function yKc(a,b){this.j=a;this.i=b} +function kOc(a,b){this.b=a;this.a=b} +function FOc(a,b){this.b=a;this.a=b} +function bPc(a,b){this.b=a;this.a=b} +function JRc(a,b){this.b=a;this.a=b} +function uVc(a,b){this.b=a;this.a=b} +function ZXc(a,b){this.b=a;this.a=b} +function VVc(a,b){this.a=a;this.b=b} +function GYc(a,b){this.a=a;this.b=b} +function OGc(a,b){this.d=b;this.a=a} +function lZc(a,b){this.b=a;this.a=b} +function lvc(a,b){$b.call(this,a,b)} +function CPc(a,b){$b.call(this,a,b)} +function BUc(a,b){$b.call(this,a,b)} +function PYc(a,b){$b.call(this,a,b)} +function UYc(a,b){$b.call(this,a,b)} +function xZc(a,b){$b.call(this,a,b)} +function HZc(a,b){$b.call(this,a,b)} +function JZc(){HZc.call(this,NVe,0)} +function $J(a){$wnd.clearTimeout(a)} +function YLc(){this.b=(lr(),new Fu)} +function n5c(a,b){this.b=a;this.a=b} +function D9c(a,b){this.b=a;this.a=b} +function b8c(a,b){this.a=a;this.b=b} +function Obd(a,b){this.b=a;this.a=b} +function Oad(a,b){$b.call(this,a,b)} +function Vad(a,b){$b.call(this,a,b)} +function $bd(a,b){$b.call(this,a,b)} +function Mdd(a,b){this.c=a;this.a=b} +function $dd(a,b){this.b=a;this.a=b} +function Scd(a,b){this.a=a;this.b=b} +function Wfd(a,b){this.a=a;this.b=b} +function Mid(a,b){this.a=a;this.b=b} +function Sjd(a,b){$b.call(this,a,b)} +function Opd(a,b){this.b=a;this.a=b} +function Xpd(a,b){$b.call(this,a,b)} +function Zpd(a,b){this.b=a;this.a=b} +function oIc(a,b){return XDc(a.j)=48&&a<=57} +function LIe(a){return xIe(zIe(),a)} +function AL(a){return typeof a===bKe} +function BL(a){return typeof a===cKe} +function EL(a){return typeof a===dKe} +function HL(a){return a==null?null:a} +function JL(a){DJe(a==null);return a} +function Yib(){Wib==null&&(Wib=[])} +function Ste(a,b){$b.call(this,a,b)} +function tHe(a,b){$b.call(this,a,b)} +function lCe(a,b){this.b=a;this.a=b} +function Dve(a,b){this.d=a;this.e=b} +function Oce(a,b){zf(!a.oo());a.s=b} +function ate(a,b){return a.substr(b)} +function vi(a,b){return a.re().ue(b)} +function Mr(a,b){return wb(a.Cf(),b)} +function gw(a,b){return Kw(a.$d(),b)} +function lw(a,b){return Tw(a.$d(),b)} +function qH(a,b){return MH(Bib(a,b))} +function BI(a){return Ese(a.a,a.b++)} +function Xk(a){return !a?null:a.te()} +function QH(a){return a<128?NH[a]:-1} +function Gib(a,b){return Dib(a,b)==0} +function Oib(a,b){return Dib(a,b)!=0} +function jIb(a,b){return LKb(a.Fd,b)} +function kIb(a,b){return MKb(a.Fd,b)} +function EPb(a,b){sPb.call(this,a,b)} +function XZb(a,b){GZb.call(this,a,b)} +function YZb(a,b){RZb.call(this,a,b)} +function $Xc(a,b){ZXc.call(this,a,b)} +function aYc(a,b){ZXc.call(this,a,b)} +function dpc(a){cpc.call(this,a.a,a)} +function KZc(){HZc.call(this,'V3',1)} +function rp(){pp.call(this,'OPEN',0)} +function yF(){wF.call(this,'SIZE',0)} +function Led(a,b){Eed.call(this,a,b)} +function m_c(a,b){a.c=r_c(b,a.b,a.c)} +function _Ie(a,b,c){a.splice(b,0,c)} +function nge(a,b,c,d){yt(a.a,b,c,d)} +function PQb(a,b,c,d){QQb(a,b,c,d,d)} +function Kc(a){Ac();this.a=wL(tf(a))} +function b_c(a){this.a=a;this.c=true} +function dfd(a){this.b=this;this.a=a} +function cfd(){this.a=(aB(),new RDe)} +function vDe(){rDe();return new qDe} +function PJe(){PJe=cjb;MJe={};OJe={}} +function kEd(){kEd=cjb;jEd=bc(iEd())} +function ICd(a){JCd.call(this,a,0,0)} +function fKd(a,b,c,d){XCd(a.c,b,c,d)} +function hyd(a,b){jyd(a,b.b.b,b.b.a)} +function a4d(a,b){P2d.call(this,a,b)} +function Jie(a,b,c){dk(a.j,c.go(),b)} +function rte(a,b){return a.a+=''+b,a} +function ySd(a,b){return a.a[b<<1|1]} +function Vvd(a,b){return b+'#'+a.a++} +function jqd(a){return a.W?a.W.r:a.G} +function rqd(a){return a.db?a.db:a.G} +function oqd(a){return a.ab?a.ab:a.q} +function sqd(a){return a.eb?a.eb:a.t} +function M1d(a){return !!a.b&&!a.b.d} +function NKd(a){return MKd(a)&&a!=42} +function Jve(a,b){return Xk(a.Io(b))} +function Fqe(a,b){return wJe(a),a===b} +function Kre(a,b){return Mre(a.a,b.a)} +function Jse(a,b){return wJe(a),a===b} +function Ose(a,b){return a.indexOf(b)} +function Ah(a,b){return a.je().get(b)} +function yEe(a,b){AEe(a,b,a.a,a.a.a)} +function HEe(a,b){AEe(a,b,a.a,a.a.a)} +function zEe(a,b){AEe(a,b,a.c.b,a.c)} +function zxe(a){Exe(a,0,a.length,-1)} +function LCe(a){lue(this);Ok(this,a)} +function Oq(a){this.a=a;Gq.call(this)} +function Hq(a){tf(a);return new Oq(a)} +function jB(a){tf(a);return new mB(a)} +function HF(a){return WF(a.e)-WF(a.g)} +function KK(a){return LK(a.l,a.m,a.h)} +function _pb(a){return !a?null:a.tm()} +function aqb(a){return !a?null:a.Zk()} +function $tb(a){return Ztb(rL(a,691))} +function Jib(a){return typeof a===cKe} +function NJb(a){return a==LJb||a==KJb} +function O_b(a,b){return Fse(a.b,b.b)} +function SGb(a,b){b>1?(a.Y=1):(a.Y=b)} +function Fcc(a,b){Yye(a.a,b)&&b.Vn(a)} +function GCd(a,b){a.q[a.r++]=b;--a.b} +function ste(a,b){a.a+=''+b;return a} +function ute(a,b){a.a+=''+b;return a} +function vte(a,b){a.a+=''+b;return a} +function rGc(a,b){Vcd(a.b,b);return a} +function Vlc(a){a.a=a.b=true;return a} +function Ypc(a){Zpc.call(this,a,true)} +function WGc(a){eHb.call(this,a,true)} +function yRb(a){eHb.call(this,a,true)} +function bpc(a){cpc.call(this,a,null)} +function zZc(){xZc.call(this,'ALL',0)} +function wB(){sB.call(this,'VALUE',1)} +function Npc(a){tf(a);this.a=Ekb(a.a)} +function _Kc(a){this.b=a;this.a=a.b.b} +function vjd(a,b){tf(b);tf(a.B);a.B=b} +function mod(a,b){return Dmd(a.a.e,b)} +function Hpd(a,b){return Tnd(a.a.j,b)} +function Lrc(a,b){return XDc(a.d.j)>>12} +function R9d(a){A7d();T7d.call(this,a)} +function Rle(a){A7d();Aae.call(this,a)} +function Dle(a){A7d();Aae.call(this,a)} +function Dae(a){A7d();Aae.call(this,a)} +function Mme(a){A7d();Aae.call(this,a)} +function Tpe(a){A7d();Aae.call(this,a)} +function ele(a){A7d();Kke.call(this,a)} +function tle(a){A7d();ele.call(this,a)} +function xHe(){tHe.call(this,'Head',1)} +function CHe(){tHe.call(this,'Tail',3)} +function ecd(){ecd=cjb;dcd=new _d('/')} +function Hrd(){Hrd=cjb;Grd=VIe('\\d+')} +function w_c(a){a.a=(Fte(),Hib(fJe()))} +function DIe(a,b){FIe(a,(fIe(),bIe),b)} +function IIe(a,b){FIe(a,(fIe(),dIe),b)} +function JIe(a,b){FIe(a,(fIe(),eIe),b)} +function Ze(a,b){return a!=null?a:tf(b)} +function oFe(a){return a!=null?Ab(a):0} +function Mre(a,b){return ab?1:0} +function HBe(a){return a<10?'0'+a:''+a} +function xdc(a){a.e||Cdc(a);return a.f} +function ydc(a){a.e||Cdc(a);return a.i} +function tv(a,b){tf(b);ru(a,b);return a} +function hv(a,b){lr();this.a=a;this.b=b} +function Gv(a,b){lr();Av.call(this,a,b)} +function $m(a){this.a=a;Vm.call(this,a)} +function DI(a){this.a=a;this.c=a.length} +function $Pb(a){this.a=a;this.b=new Owe} +function jmb(a){this.b=a;this.a=new Owe} +function AOb(a){this.b=a;this.a=new Owe} +function Wmb(a){this.b=new idd;this.a=a} +function kQb(a){this.b=new JCe;this.a=a} +function zQb(a){this.b=new tEe;this.a=a} +function jk(a){kf(a.size()==0);this.c=a} +function nPb(a,b){g2d(a.e,a,b);return b} +function L_b(a,b){iue(J_b,a,b);return b} +function LK(a,b,c){return {l:a,m:b,h:c}} +function Dq(){rq.call(this,(_C(),$C),0)} +function og(){gg.call(this,'IS_NULL',2)} +function TUb(){eHb.call(this,iRe,false)} +function VXb(){eHb.call(this,qRe,false)} +function vXb(){eHb.call(this,bQe,false)} +function vYb(){eHb.call(this,sRe,false)} +function HYb(){eHb.call(this,tQe,false)} +function G1b(a){this.a=a;this.b=new Owe} +function u2b(a){this.a=a;this.b=new Owe} +function N1b(a){this.a=a;this.b=new idd} +function b2b(a){this.b=a;this.a=new LEe} +function S5b(a){this.b=a;this.a=new LEe} +function S6b(a){this.b=a;this.a=new JCe} +function tnc(a){this.b=a;this.a=new JCe} +function qkc(a){this.b=a;this.a=new RCe} +function Luc(a){this.b=a;this.a=new RCe} +function Jqc(a){this.a=a;this.b=new RCe} +function lFc(a){this.b=a;this.a=new RCe} +function hrc(a){this.b=new JCe;this.a=a} +function mrc(a){this.b=new RDe;this.a=a} +function msc(a){this.a=new RCe;this.b=a} +function Amc(a){this.a=new RCe;this.b=a} +function W2b(a){this.b=new tEe;this.a=a} +function sGc(a){this.b=new idd;this.a=a} +function sVc(a){this.b=a;this.a=new idd} +function iad(a){this.b=a;this.a=new idd} +function Gad(a){this.a=a;this.b=new RCe} +function dRc(a){this.a=a;this.b=new JCe} +function jpc(a){a.d=new RDe;a.a=new tEe} +function Edd(a){this.b=new idd;this.a=a} +function Ped(a){this.b=new idd;this.c=a} +function Ffd(a){process.stderr.write(a)} +function rQc(a){return a.d._j(a.c.Lm())} +function Xyc(a){return T1d(a)?G1d(a):''} +function mPc(a,b){return b==a.d||b==a.e} +function gsd(a,b){return !!Hud(a.a,b,0)} +function Tud(a,b){return Yud(a.A,b,a.v)} +function Sud(a){return Yud(a.A,DKe,a.v)} +function EAd(a,b){return Wyd(a.a.u,b.a)} +function Txd(a,b){return yEd(a.a.c.a,b)} +function hHd(a,b){return new qRd(b,a.f)} +function ksd(a,b){Hrd();return a.a==b.a} +function Zbc(a,b){!!b&&(a.e=b);return a} +function fdd(a,b){Nxe(a.a,a.a.length,b)} +function Bfd(a,b){Jfd()?Ffd(b):Dfd(a,b)} +function X1c(a,b,c){W1c(a,b,sie(a.k,c))} +function ske(a,b,c){b.Fj(c,a.e,a.b,a.a)} +function rwe(a){a.a=CK(agb,ZJe,1,8,5,1)} +function Tcd(a){a.a=CK(agb,ZJe,1,0,5,1)} +function kud(a){this.a=(lr(),new UD(a))} +function Jme(a){this.c=new JCe;this.d=a} +function wEe(a){a.a=new _Ee;a.c=new _Ee} +function DCe(a){return a.a=sKe&&a<=56319} +function Sqe(a){return a>=vKe&&a<=57343} +function Fre(a){return Jse(cKe,typeof a)} +function Qse(a){return Jse(dKe,typeof a)} +function lte(a){return mte(a,0,a.length)} +function TIe(a,b){return new SIe(a.a,b)} +function zL(a,b){return a!=null&&qL(a,b)} +function Jk(a,b){return aB(),new tu(a,b)} +function Ese(a,b){return a.charCodeAt(b)} +function GJe(a,b){return a==b?0:a0} +function Wjb(a){Rjb();this.b=a;this.a=true} +function iLb(a){gLb();this.a=rL(tf(a),342)} +function $Lb(a,b){return rL(NDe(a.d,b),87)} +function eMb(a,b){return rL(NDe(a.d,b),87)} +function XOb(a){return bdd(a,a.a.length-1)} +function MGb(a,b){uf(b,JPe);a.q=new k_c(b)} +function Aqb(a,b){kf(!!b.c);a.e=b;return a} +function zBe(a,b){var c;c=a[eZe];b[eZe]=c} +function jF(a,b,c){a.i=b;b.f=a;b.i=c;c.f=b} +function mI(a,b){this.i=a;this.a=new DI(b)} +function Ymc(a){this.a=a;this.b=new yHb(a)} +function cFc(a){this.b=a;this.a=this.b.a.b} +function LNc(a){HNc();this.a=a;this.b=true} +function o5b(a){m5b();p5b.call(this,a,l5b)} +function c$b(a,b){LZb();MZb.call(this,a,b)} +function Rm(a,b,c,d){Gm.call(this,a,b,c,d)} +function Xpc(){Zpc.call(this,new dqc,true)} +function TTd(){TTd=cjb;XSd();STd=new UTd} +function aB(){aB=cjb;_A=new Ye((Hp(),Gp))} +function Vec(a,b){return rL(NDe(a.e,b),20)} +function vSd(a,b){return (qxe(a.a,b)&1)==0} +function nJd(a,b,c){return eKd(a.g,b).c==c} +function DUd(a,b,c,d){return a.d.Cm(b,c,d)} +function Oxd(a,b){return Pxd(a,Mxd(a,b.b))} +function pxe(a,b){return rxe(a,a.length,b)} +function qxe(a,b){return sxe(a,a.length,b)} +function gdd(a){return YIe(a.a,a.a.length)} +function d$d(a){return !!(!a.d?null:a.d.a)} +function Kze(a,b){return a.a.getAtIndex(b)} +function jBe(a){iBe();return a==fBe?null:a} +function cEe(a){dEe.call(this,a,null,null)} +function Kfe(a,b){Lfe.call(this,a,b,false)} +function lbe(a){T7d.call(this,a);Wae(this)} +function Swe(a){if(!a){throw Aib(new BBe)}} +function v6c(a){if(a.c){P7c(a.c);a.c=null}} +function OIe(a){return a.c.exec(a.a)!=null} +function Hse(a){return lte(jJe(a,a.length))} +function KDe(a){a.b=new cEe(a);a.c=new JCe} +function Fte(){Fte=cjb;new yfd;Ete=new yfd} +function BEe(a){tJe(a.b!=0);return a.a.a.c} +function CEe(a){tJe(a.b!=0);return a.c.b.c} +function _qe(a){if(a.o!=null){return}pre(a)} +function tL(a){DJe(a==null||AL(a));return a} +function uL(a){DJe(a==null||BL(a));return a} +function wL(a){DJe(a==null||EL(a));return a} +function $p(a,b){var c;c=a.a;a.a=b;return c} +function Wm(a,b){this.d=a;Sm(this);this.b=b} +function _kb(a,b){this.a=a;Qkb.call(this,b)} +function rj(a){this.a=a;this.b=Xh(this.a.d)} +function Kt(a){return aB(),new SDe(cB(a.a))} +function QB(a){return aB(),new KCe(cB(a.a))} +function vs(a,b){return Ep(a,b),new ND(a,b)} +function MQb(a,b,c){return new TQb(b,c,a.e)} +function VGb(a,b,c,d){FHb(new oHb(a,b,d,c))} +function hn(a,b,c){sm.call(this,a,b,c,null)} +function QHb(a,b){PHb.call(this,a,a.ii(),b)} +function xwb(){vwb();ywb.call(this,new UCb)} +function NUb(a){this.a=a;yRb.call(this,gRe)} +function fWb(a){this.a=a;yRb.call(this,pRe)} +function EVb(a){this.a=a;yRb.call(this,rQe)} +function SVb(a){this.a=a;yRb.call(this,$Pe)} +function PZb(a){LZb();MZb.call(this,a,true)} +function P$b(a){J$b();O$b.call(this,null,a)} +function YSb(){yRb.call(this,'polymerPass')} +function b1b(){Y0b.call(this,'MULTILINE',2)} +function ig(){gg.call(this,'ALWAYS_TRUE',0)} +function Nt(){bi.call(this,new RDe,new JCe)} +function svc(a){this.b=a;this.a=new zzc(36)} +function Fsc(a,b){zf(!a.t);a.w=(Qq(),Xs(b))} +function FIb(a,b){zf(b!=($Jb(),ZJb));a.Vb=b} +function N2b(a){return tCe((E2b(),C2b),a.j)} +function R7b(a,b){return Fse(a.Hi(),b.Hi())} +function N3b(a,b,c){return $5b(a.a,a.q,b,c)} +function Goc(a,b,c){return $5b(a.a,a.d,b,c)} +function bxc(a,b,c,d){return cxc(a,b,c,d,d)} +function imd(a,b){return ild(a,new zte,b).a} +function y6b(a,b){return !a.c?b:a.c.a+'.'+b} +function sTc(a,b){return !a.p||b.ak()<=1000} +function xSc(a,b){lAc(a.a,b,new ISc(a,a.b))} +function X7c(a,b){o2d(a.a,O7d(a.c,a.b.g,b))} +function q3c(a,b){if(!a||!b){return}a.En(b)} +function zsd(a,b){xsd();return wsd[a.a|b.a]} +function Asd(a,b){xsd();return wsd[a.a&b.a]} +function srd(a){rrd();return trd(qrd,'_',a)} +function gtd(a,b){return dsd(a,b)||dsd(b,a)} +function zvd(a,b){return a.a.containsKey(b)} +function Kud(a){return a.g==0?Cud(a):Dud(a)} +function CCd(a){return a.g==a.d?a.c+a.a:a.a} +function BEd(a,b){return new EEd(tD(a.a,b))} +function qod(a,b){smd.call(this,a);this.a=b} +function Wdd(a){Tdd();Xdd.call(this,a,null)} +function RVd(a,b){this.a=b;GVd.call(this,a)} +function eWd(a,b){this.a=b;UVd.call(this,a)} +function GWd(a,b){this.a=a;UVd.call(this,b)} +function uWd(a,b){this.a=a;GVd.call(this,b)} +function YXd(a,b){UVd.call(this,a);this.a=b} +function b4d(a,b){N2d.call(this,a);this.a=b} +function u1d(a){tf(a.e);a2d(a.e,a);return a} +function Vxb(a){!!a&&!!a.e&&u1d(a);return a} +function Nwe(a){return a.c-a.b&a.a.length-1} +function cve(a,b){return a.a.containsKey(b)} +function PCe(a,b){return a.a.containsKey(b)} +function oze(a,b){return a.b.containsAll(b)} +function ome(a,b){return rL(a.b.get(b),292)} +function DL(a,b){return a&&b&&a instanceof b} +function xL(a){return String.fromCharCode(a)} +function ite(a){return EL(a)?a.length:a.to()} +function J9d(a){A7d();return !a?null:a.On()} +function Hqe(a,b){Dqe();return a==b?0:a?1:-1} +function Id(a,b){return a.a.Vd(b)||a.b.Vd(b)} +function Yi(a){this.b=a;this.a=this.b.b.ke()} +function fo(a){this.e=a;this.c=a.a.ke().$d()} +function mvd(){this.b=new bu;this.a=new JCe} +function rrd(){rrd=cjb;qrd=new vrd(new JCe)} +function yrd(){yrd=cjb;xrd=new Ard(new RCe)} +function XHc(){XHc=cjb;WHc=XDc((h7d(),g4d))} +function kFe(){DJ.call(this,'no key found')} +function lg(){gg.call(this,'ALWAYS_FALSE',1)} +function bu(){Mo.call(this,new JCe);au(this)} +function kp(){wk.call(this,new JCe);this.a=3} +function mr(a,b){return new Cu(a,a.size(),b)} +function Xpb(a,b){return a.e&&CFb(a.a).yh(b)} +function Nr(a,b){return a.Cf().getAtIndex(b)} +function Tw(a,b){Hw();return a.Pd()?a.Qd():b} +function MC(a,b){tf(a);tf(b);return Iqe(a,b)} +function Ywb(a){if(a){return a.d}return null} +function UJ(a,b,c){return a.apply(b,c);var d} +function LJ(a){return a==null?null:a.message} +function vsb(a){return !!a&&a.j==(h7d(),C6d)} +function Usb(a){SLb(a.c);RLb(a.c);Tsb(a,a.f)} +function qsb(a){nsb();this.a=a;this.b=CFb(a)} +function ctb(a){btb();this.b=a;this.a=CFb(a)} +function DC(a,b){this.b=a;this.a=b;Fp(b,uLe)} +function YQb(a,b){this.a=a;this.c=b;this.b=0} +function EFb(a,b){tf(a.T);return OKb(a.ib,b)} +function GDb(a){if(a){return a.d}return null} +function wQb(a,b){return !a.b&&!!b&&a.c==b.c} +function OHb(a,b){kf(!b||!a.g||a.g==b);a.g=b} +function wAb(a,b){a.Lh();b&&a.Uh();a.s=false} +function W9b(a,b){var c;c=O9b(a,b);c.Ii(a,b)} +function ABe(a){var b;b=a[eZe]|0;a[eZe]=b+1} +function Jbc(a){return a.i.length==0?sPe:a.i} +function Apc(a,b){return rL(fue(a.f,b),95).a} +function oTc(a,b,c){return !CFb(a.d).uh(b,c)} +function RVc(a,b){return Yb(mIb(a.a.T),b)>=0} +function qTc(a,b){hue(a.s,b,'$'+b.Lm()+'$$')} +function LIc(a,b,c){YDc(c);a2d(b,c);GGb(a.c)} +function hkc(a,b,c,d){Gac.call(this,a,b,c,d)} +function _9c(a){Y9c();aad.call(this,a,false)} +function Aad(a){tad();Bad.call(this,a,false)} +function Yfd(a){this.a=a!=null?a:(Lfd(),Kfd)} +function xoc(a){this.a=new lZd(a.b);this.c=a} +function XXc(a){VXc();this.b=new eu;this.a=a} +function tZc(a){oZc();jye();new JCe;this.a=a} +function vQb(){this.b=new LEe;this.a=new RCe} +function DHb(){this.c=new zte;this.d=new RCe} +function a1b(){Y0b.call(this,'SINGLELINE',1)} +function c1b(){Y0b.call(this,'SOURCELESS',3)} +function ENd(a){dNd.call(this,(GQd(),iPd),a)} +function FNd(a){dNd.call(this,(GQd(),jPd),a)} +function GNd(a){dNd.call(this,(GQd(),hPd),a)} +function ONd(a){dNd.call(this,(GQd(),rPd),a)} +function SNd(a){dNd.call(this,(GQd(),vPd),a)} +function IOd(a){dNd.call(this,(GQd(),UPd),a)} +function MOd(a){dNd.call(this,(GQd(),ZPd),a)} +function NOd(a){dNd.call(this,(GQd(),$Pd),a)} +function QQd(a){dNd.call(this,(GQd(),lQd),a)} +function VQd(a){dNd.call(this,(GQd(),qQd),a)} +function yRd(a){DJ.call(this,'codePoint:'+a)} +function lge(a){ige.call(this,a);this.a=null} +function oge(a){ige.call(this,a);this.a=null} +function LDe(a){lue(a.c);a.b.b=a.b;a.b.a=a.b} +function rne(a){return a.d.size()-a.e.size()} +function QCe(a,b){return a.a.remove(b)!=null} +function FHe(a,b){return a.a.remove(b)!=null} +function Vxd(a,b){return r1d(new N2d(b),a.t)} +function Q_d(a,b){a.e=true;return AZd(a.a,b)} +function be(a,b,c){tf(c);return new Te(c,a,b)} +function Pg(a){tf(a);return new Mg(new Rg(a))} +function Sse(a,b,c){return a.lastIndexOf(b,c)} +function zh(a,b){return a.je().containsKey(b)} +function Wg(a,b,c){this.a=c;Ug.call(this,a,b)} +function _g(a,b,c){this.a=c;Ug.call(this,a,b)} +function Qt(a,b,c){this.a=a;hj.call(this,b,c)} +function Te(a,b,c){this.b=a;this.a=b;this.c=c} +function zD(a,b,c){this.a=a;this.c=b;this.b=c} +function HD(a,b,c){this.b=a;this.a=b;this.c=c} +function SE(a,b,c){this.b=a;this.a=b;this.c=c} +function AH(a,b,c){this.a=a;this.c=b;this.b=c} +function wve(a,b){var c;c=a.e;a.e=b;return c} +function WI(a,b,c){this.j=a;this.b=b;this.a=c} +function Bmb(a){wmb();this.b=new idd;this.a=a} +function et(a){Qq();this.b=(jye(),new DAe(a))} +function DBe(a){this.a=new $wnd.Date(Sib(a))} +function Oz(a){tf(a);return new kdd((Hp(),a))} +function bB(a,b){aB();return new kB(a.$d(),b)} +function SHb(a,b){QHb.call(this,new xoc(a),b)} +function mTb(){eHb.call(this,'j2clPass',true)} +function _Vb(){yRb.call(this,'checkProvides')} +function cLb(a){aLb();this.a=a;this.b=new RCe} +function Lyb(a){IEe(a.g);a.b=rL(FEe(a.g),188)} +function om(a){a.b?om(a.b):a.f.c.put(a.e,a.d)} +function $Qb(a){a.Ec=null;a.Hc=null;a.Gc=null} +function QI(a,b){RI(a,'file',false);a.a+=''+b} +function P$d(a,b){if(!v$d(a)){return}a.b.i=b} +function b6b(a,b){X5b();!!b&&(a.k=b);return a} +function NC(a,b){return MC(rL(a,39),rL(b,39))} +function axc(a,b,c){return cxc(a,b,c,a.r,a.r)} +function JJe(b,c,d){try{b[c]=d}catch(a){}} +function _cc(a){Zcc();this.b=new RCe;this.a=a} +function Fic(a){Eic();this.a=new RDe;this.b=a} +function Nic(a){this.b=a;this.a=new Pic(this)} +function KVc(a){HVc();this.a=a;this.b=new JCe} +function YPc(a){WPc.call(this,a);this.a=false} +function uac(){sac.call(this,'UNSUPPORTED',0)} +function wac(){sac.call(this,'SIMPLE_CALL',1)} +function m7c(a){f7c();n7c.call(this,a,CFb(a))} +function g8c(a,b){this.a=a;T7c.call(this,a,b)} +function Zlc(a){this.e=(Qq(),new vv);this.d=a} +function _Ec(a){zf(a.j==(h7d(),S6d));this.a=a} +function jJc(a){return a.j==(h7d(),H4d)&&!a.b} +function OJb(a){return a==LJb||a==KJb||a==HJb} +function xEd(a,b){return a.a.containsAll(b.a)} +function zEd(a,b){return new EEd(tD(a.a,b.a))} +function o_c(a,b){a.c=r_c(new t_c(b),a.a,a.c)} +function Q7c(a,b,c){Vcd(a.c,new Y7c(a.k,b,c))} +function T8c(a,b){!!a.d&&(a.d=O7d(a.d,b,a.c))} +function $Wd(a,b){return GUd(a.a,b.b,bKe,b.a)} +function WWd(a,b){return GUd(a.a,b.b,dKe,b.a)} +function cXd(a,b){return GUd(a.a,b.b,cKe,b.a)} +function gXd(a,b){return GUd(a.a,b.b,aKe,b.a)} +function hYd(a,b){return mYd((h7d(),f4d),a,b)} +function iYd(a,b){return mYd((h7d(),g4d),a,b)} +function tYd(a,b){return mYd((h7d(),Q4d),a,b)} +function yYd(a,b){return mYd((h7d(),g5d),a,b)} +function KYd(a,b){return mYd((h7d(),H5d),a,b)} +function MYd(a,b){return mYd((h7d(),V5d),a,b)} +function WYd(a,b){return mYd((h7d(),p6d),a,b)} +function aZd(a,b){return mYd((h7d(),H6d),a,b)} +function bZd(a){return new T3d((h7d(),L6d),a)} +function cZd(a){return new T3d((h7d(),M6d),a)} +function eZd(a,b){return mYd((h7d(),O6d),a,b)} +function $Jd(a,b){return b>=0&&b=97&&a<=122?a&95&uKe:a} +function Qq(){Qq=cjb;new ar((jye(),jye(),gye))} +function lme(){lme=cjb;kme=new vme((_C(),$C))} +function $jb(){$jb=cjb;Zjb=LIe((_qe(RR),RR.o))} +function zG(){zG=cjb;yG=CK(LL,qKe,17,XLe,15,1)} +function Qd(){Qd=cjb;Ac();Pd=Ure(31);Od=new Rd} +function ax(a,b){Hw();tf(b);return new ux(a,b)} +function Ejb(a,b,c){$b.call(this,a,b);this.a=c} +function Omb(a,b,c){$b.call(this,a,b);this.a=c} +function Uzb(a,b,c){this.c=a;this.a=b;this.b=c} +function Dlb(a,b,c){this.a=a;this.c=b;this.b=c} +function npb(a,b,c){this.a=a;this.c=b;this.b=c} +function KEb(a,b,c){this.a=a;this.c=b;this.b=c} +function Zxb(a,b,c){this.a=a;this.b=b;this.c=c} +function ayb(a,b,c){this.a=a;this.b=b;this.c=c} +function qNb(a,b,c){this.a=a;this.b=b;this.c=c} +function INb(a,b,c){this.a=a;this.b=b;this.c=c} +function B4b(a,b,c){this.a=a;this.b=b;this.c=c} +function ACb(a,b,c){this.c=a;this.b=b;this.a=c} +function yCb(a,b,c){this.b=a;this.c=b;this.a=c} +function Q_b(a,b,c){this.b=a;this.c=b;this.a=c} +function Jdc(a,b,c){this.a=a;this.c=b;this.b=c} +function Xac(a,b,c){this.c=a;this.a=b;this.b=c} +function bic(a,b,c){this.a=a;this.c=b;this.b=c} +function qic(a,b,c){this.a=a;this.c=b;this.b=c} +function Bjc(a,b,c){this.d=a;this.b=b;this.c=c} +function _fc(a,b,c){return qpd(a.d.o,b,null,c)} +function aJb(a){$Ib();return hc((dJb(),cJb),a)} +function pJb(a){nJb();return hc((sJb(),rJb),a)} +function DJb(a){BJb();return hc((GJb(),FJb),a)} +function xKb(a){vKb();return hc((AKb(),zKb),a)} +function cec(a){return !a.r?(lr(),lr(),kr):a.r} +function ymc(a,b){return !zmc(a,b)&&OCe(a.a,b)} +function mtc(a,b){return PCe(a.s,b)&&!Jsc(a,b)} +function $cc(a,b){zf(njb(a.a.kb));lAc(a.a,b,a)} +function Wnc(a,b){kf(true);b.g=null;cdd(a.d,b)} +function XAc(a,b){HAc();while(a.b){ZAc(a.b,b)}} +function Llc(a,b,c){this.c=a;this.a=b;this.b=c} +function Trc(a,b,c){this.c=a;this.a=b;this.b=c} +function qAc(a,b,c){this.c=a;this.b=b;this.a=c} +function EEc(a,b,c){this.a=a;this.b=b;this.c=c} +function HLc(a,b,c){this.a=a;this.b=b;this.c=c} +function UGc(a,b,c){this.a=a;this.c=b;this.b=c} +function wSc(a,b,c){this.c=a;this.a=b;this.b=c} +function uPc(a,b,c){this.a=b;this.b=a;this.c=c} +function XVc(a,b,c){this.b=a;this.c=b;this.a=c} +function WKc(a,b){this.c=a;this.b=b.d;this.a=b} +function BSc(){this.a=new SQb(new RCe,'',null)} +function dSb(){eHb.call(this,'normalize',true)} +function AWb(){eHb.call(this,'stripCode',true)} +function m0c(){yRb.call(this,'lateConvertEs6')} +function j4c(a,b,c){this.b=a;this.c=b;this.a=c} +function q8c(a,b,c){this.b=a;this.a=b;this.c=c} +function q7c(a,b,c){zf(a.i!=null);Af(b.j==c,b)} +function F9c(a,b,c){this.b=a;this.c=b;this.a=c} +function Iad(a,b,c){this.a=a;this.c=b;this.b=c} +function t9c(){t9c=cjb;s9c=LIe((_qe(S7),S7.o))} +function Okc(){Okc=cjb;Nkc=LIe((_qe(H0),H0.o))} +function ORc(){ORc=cjb;NRc=LIe((_qe(j5),j5.o))} +function pvc(){pvc=cjb;ovc=LIe((_qe(K2),K2.o))} +function xvc(){xvc=cjb;wvc=LIe((_qe(J2),J2.o))} +function iTc(){iTc=cjb;gTc=new wTc;hTc=new CTc} +function wZc(){wZc=cjb;uZc=new zZc;vZc=new CZc} +function GZc(){GZc=cjb;EZc=new JZc;FZc=new KZc} +function TYc(){TYc=cjb;RYc=new WYc;SYc=new XYc} +function evd(){evd=cjb;dvd=new fvd;cvd=new jvd} +function _bd(a){Zbd();return hc((ccd(),bcd),a)} +function Wad(a){Tad();return hc((Zad(),Yad),a)} +function hEd(a){fEd();return hc((kEd(),jEd),a)} +function bAd(a,b){Iyd(a,b);return lyd(a.a,b.a)} +function $cd(a,b){return _cd(a,b,a.a.length-1)} +function Yvd(a){return bte(a,0,Ose(a,hte(35)))} +function Fud(a){return !a.d?(Qq(),kD(),jD):a.d} +function XZd(a){return (hNe&a.a)==mKe?a.i:null} +function _Zd(a){return (hNe&a.a)==mNe?a.i:null} +function a$d(a){return (hNe&a.a)==mKe?a.i:null} +function sTd(a){XSd();kf(a>=0&&a<=99);this.a=a} +function gbd(a,b,c){$b.call(this,a,b);this.a=c} +function Bxd(a,b,c){$b.call(this,a,b);this.a=c} +function $Md(a,b,c){$b.call(this,a,b);this.a=c} +function VBd(a,b,c){this.c=a;this.b=b;this.a=c} +function vNd(a,b,c){this.c=a;this.a=b;this.b=c} +function NTd(a,b,c){this.a=a;this.c=b;this.b=c} +function obd(a,b,c){this.d=a;this.e=b;this.c=c} +function _dd(a,b,c){this.d=b;this.c=a;this.b=c} +function y$d(a){!a.d&&(a.d=new g_d);f_d(a.d,8)} +function D$d(a){!a.d&&(a.d=new g_d);f_d(a.d,2)} +function E$d(a){!a.d&&(a.d=new g_d);f_d(a.d,3)} +function F$d(a){!a.d&&(a.d=new g_d);f_d(a.d,5)} +function G$d(a){!a.d&&(a.d=new g_d);f_d(a.d,4)} +function K$d(a){!a.d&&(a.d=new g_d);f_d(a.d,9)} +function N$d(a){!a.d&&(a.d=new g_d);f_d(a.d,0)} +function Q$d(a){!a.d&&(a.d=new g_d);f_d(a.d,7)} +function R$d(a){!a.d&&(a.d=new g_d);f_d(a.d,6)} +function W$d(a){!a.d&&(a.d=new g_d);f_d(a.d,1)} +function T3d(a,b){N2d.call(this,a);S3d(this,b)} +function mbe(a,b){U7d.call(this,a,b);Wae(this)} +function tge(a,b,c){$b.call(this,a,b);this.a=c} +function wCe(a,b,c){this.a=a;this.b=b;this.c=c} +function GDe(a,b,c){this.a=a;this.b=b;this.c=c} +function TEe(a,b,c){this.d=a;this.b=c;this.a=b} +function N2d(a){this.j=a;this.e=null;this.i=-1} +function MEe(a){wEe(this);KEe(this);ie(this,a)} +function pfe(a,b){a.k=gie(a.g,b,null);return a} +function rL(a,b){DJe(a==null||qL(a,b));return a} +function mie(a,b){return rL(bk(a.j,b.go()),44)} +function xne(a,b,c){return b==c||b==nne(a.c,c)} +function Qn(a,b){if(!a){return 0}return $p(a,b)} +function jw(a,b){tf(a);tf(b);return new uw(a,b)} +function pw(a,b){tf(a);tf(b);return new xw(a,b)} +function sJe(a,b){if(!a){throw Aib(new wqe(b))}} +function nJe(a,b){if(!a){throw Aib(new ooc(b))}} +function Gjb(a,b,c){tf(a.c);return rFb(a.c,b,c)} +function ov(a,b,c){Ep(b,c);dk(a.a,b,c);return a} +function Pz(a){var b;b=new idd;Iw(b,a);return b} +function Qz(a){var b;b=new LEe;fw(b,a);return b} +function FFb(a){!a.T&&gGb(a,new UIb);return a.q} +function Hnb(a,b){Pnb((h7d(),Z5d),b);cob(a,b.b)} +function Hjb(a,b){return HAc(),OAc(b,false,a.c)} +function Dwe(a){return a.a[a.c-1&a.a.length-1]} +function Ewe(a){return a.a[a.c-1&a.a.length-1]} +function Ub(a){return a>=65&&a<=90?(a^32)&uKe:a} +function Utb(a){Udd(new Xdd(a,Rtb),rL(a.b.d,5))} +function Vm(a){this.d=a;Sm(this);this.b=ck(a.d)} +function s4b(a){this.i=a;r4b(this);this.a=false} +function VZb(a,b){RZb.call(this,a.b,b);this.a=a} +function APb(a,b){tf(a);tf(b);this.a=a;this.b=b} +function LPb(a,b){tf(a);tf(b);this.a=a;this.b=b} +function blc(a,b){this.a=a;this.c=b;this.b=true} +function rpc(a,b){this.c=a;this.d=b;this.b=true} +function l9b(a){this.b=a;this.a=new o9b(this.b)} +function jZb(a){Af(a.j,tRe);return new nve(a.f)} +function Q9b(a,b){return new F7b(a.d,a.f,a.e,b)} +function yic(a){return nbe(!a?null:S7d(a.Vm()))} +function U5c(a,b,c,d,e){V5c(a,b,c,d,sie(a.g,e))} +function vpc(a,b,c){rpc.call(this,a,b);this.a=c} +function Eed(a,b){this.d=null;this.b=a;this.c=b} +function Vcd(a,b){a.a[a.a.length]=b;return true} +function yjd(a){zf(a.d==(Rjd(),Qjd));return a.a} +function Cfd(a,b){Jfd()?Ffd(b+_Je):Dfd(a,b+_Je)} +function CEd(a,b){return new EEd(tD(a.a,Zs(b)))} +function C1d(a){return zL(a.k,9)?rL(a.k,9):null} +function KGd(a){HGd();return !!rL(Fs(iGd,a),63)} +function LGd(a){HGd();return !!rL(Fs(hGd,a),63)} +function L$d(a){!a.d&&(a.d=new g_d);f_d(a.d,10)} +function gee(a){return a.Nl()||a.i==(Bfe(),zfe)} +function _Sb(){eHb.call(this,'chromePass',true)} +function _Tb(){yRb.call(this,'convertEs6Typed')} +function g0c(){yRb.call(this,'es6ConvertSuper')} +function j0c(){yRb.call(this,'earlyConvertEs6')} +function Nc(){Kc.call(this,'CharMatcher.any()')} +function XGd(a,b,c){GFd.call(this,a,c);this.a=b} +function p3d(a,b,c){o3d.call(this,a,c);this.a=b} +function A3d(a,b,c){o3d.call(this,a,c);this.a=b} +function dd(a,b){Ac();kf(b>=a);this.b=a;this.a=b} +function Yme(a,b){A7d();Zme.call(this,a,b,null)} +function dEe(a,b,c){this.c=a;Dve.call(this,b,c)} +function uw(a,b){this.b=a;this.a=b;Gq.call(this)} +function xw(a,b){this.a=a;this.b=b;Gq.call(this)} +function Aw(a,b){this.a=a;this.b=b;Gq.call(this)} +function Dw(a,b){this.a=a;this.b=b;Gq.call(this)} +function rx(a,b){this.b=a;this.a=b;Kj.call(this)} +function ev(a){this.b=a;this.a=cs(this.b.a).zf()} +function IEe(a){tJe(a.b!=0);return JEe(a,a.a.a)} +function GEe(a){return tJe(a.b!=0),JEe(a,a.a.a)} +function tMb(a,b,c){return qMb(a.a,b)-qMb(a.a,c)} +function yMb(a,b,c){return qMb(a.a,c)-qMb(a.a,b)} +function Smb(a,b,c){a2d(b,c);EDc(c,a.a);Qmb(a,b)} +function SQb(a,b,c){JQb();UQb.call(this,a,b,c,c)} +function YRb(a){this.a=a;eHb.call(this,XPe,true)} +function nSb(){eHb.call(this,'denormalize',true)} +function jTb(){eHb.call(this,'j2clES6Pass',true)} +function JWb(){eHb.call(this,'checkConsts',true)} +function YWb(a){this.a=a;eHb.call(this,DQe,true)} +function qXb(a){this.a=a;eHb.call(this,pQe,true)} +function AXb(a){this.a=a;eHb.call(this,kQe,true)} +function ITb(a,b){this.a=b;eHb.call(this,a,true)} +function QYb(a){this.a=a;eHb.call(this,_Pe,true)} +function ZYb(a){this.a=a;eHb.call(this,nQe,true)} +function SXb(){eHb.call(this,'generateIjs',true)} +function Ed(){Kc.call(this,'CharMatcher.none()')} +function bxb(a,b){$wb.call(this,a,null);this.a=b} +function cob(a,b){while(b){bob(a,b,false);b=b.d}} +function cHe(a,b){return !!b&&dHe(a,b.d)?b:null} +function bec(a){return !a.p?a.b:bec(a.p)+'.'+a.b} +function CFb(a){var b;b=a.T.H;b=b?b:a.n;return b} +function Izb(a){if(a.c){return a.j}return Hzb(a)} +function ms(a,b){Ep(a,b);return aB(),new tu(a,b)} +function Csc(a,b){Bsc(a,b,new Erd(a.a,G1d(b),b))} +function bcc(a,b){!a.b&&(a.b=new RCe);OCe(a.b,b)} +function ccc(a,b){!a.c&&(a.c=new RCe);OCe(a.c,b)} +function Wzc(a,b){HAc();tCe(xAc,b.j)&&swe(a.b,b)} +function P2c(a,b,c,d,e){Q2c(a,b.$d(),c.$d(),d,e)} +function aJe(a,b,c){ZIe(c,0,a,b,c.length,false)} +function Cqc(a,b,c){a.b.contains(b)&&a.a.Hj(b,c)} +function _uc(a,b,c){this.d=a;this.b=b;this.c=c.e} +function kXc(a){fXc();this.b=a;this.a=new lob(a)} +function N$c(a,b){var c;c=G1d(b);return O$c(a,c)} +function Mfd(a,b,c){Lfd();return _fd(Nfd(a,b,c))} +function Wxd(a,b,c){return r1d(new P2d(b,c),a.t)} +function $xd(a,b,c){return r1d(new T3d(b,c),a.t)} +function r3c(a,b,c){return zae(c|zae(b&(a?2:1)))} +function HUd(a,b){return !b?null:rL(b.Vn(a.f),9)} +function IUd(a,b){return !b?null:rL(b.Vn(a.j),9)} +function Sxd(a,b){return !!a.b&&a.b.a.a.c<=b.b.c} +function x_c(a){return Fte(),Qib(Hib(fJe()),a.a)} +function dKd(a){eKd(a,0);return rL(IEe(a.b),230)} +function hZd(a,b){zf(NYd(b));return new P2d(a,b)} +function Lde(a,b){!a.o&&(a.o=new idd);Vcd(a.o,b)} +function Eie(a,b){Fie(a,b,b.Um(new zte,false).a)} +function xEe(a,b){AEe(a,b,a.c.b,a.c);return true} +function zne(a,b){yne.call(this,a,b);this.b=true} +function KJd(a,b,c){LJd.call(this,a,b,c,0,false)} +function AK(a,b,c,d,e,f){return BK(a,b,c,d,e,0,f)} +function YCd(a,b,c,d){var e;e=WRd(c,d);a.zm(b,e)} +function ire(a,b){var c;c=fre(a,b);c.i=2;return c} +function N3d(a){a.a&=-2;a.a&=-5;a.a&=-3;return a} +function bEe(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null} +function Jde(a){a.e=(lr(),lr(),kr);a.d=(null,kr)} +function EVc(){this.a=(Db(),Db(),Cb);this.d=this} +function W_c(){yRb.call(this,'es6RewriteModule')} +function Wc(){Kc.call(this,'CharMatcher.ascii()')} +function wc(a){rc.call(this,'LOWER_CAMEL',2,a,'')} +function yc(a){rc.call(this,'UPPER_CAMEL',3,a,'')} +function Tv(a){Nu.call(this);this.a=rL(tf(a),118)} +function Ul(a){this.c=a;this.b=this.c.a.ke().$d()} +function xQb(a){kf(T1d(a));this.a=a;this.c=G1d(a)} +function UD(a){lr();this.a=(jye(),new jze(tf(a)))} +function _B(a){return new vC(QB(a.a),new XB(a.b))} +function Eq(a){return Jq(ow(rL(a.c.Nd(a),34),10))} +function Dqe(){Dqe=cjb;Bqe=(Dqe(),false);Cqe=true} +function CSb(){eHb.call(this,'renameLabels',true)} +function iHb(){eHb.call(this,'sanityCheck',false)} +function qVb(){yRb.call(this,'checkMissingSuper')} +function GXb(a){this.a=a;eHb.call(this,yQe,false)} +function MXb(a){this.a=a;eHb.call(this,uQe,false)} +function $Xb(a){this.a=a;eHb.call(this,BQe,false)} +function bYb(a){this.a=a;eHb.call(this,AQe,false)} +function EYb(a){this.a=a;eHb.call(this,sQe,false)} +function JYb(a){this.a=a;eHb.call(this,fQe,false)} +function LYb(a){this.a=a;eHb.call(this,gQe,false)} +function DIc(a,b,c){CIc.call(this,a,b,new Zxe(c))} +function Tmb(a,b,c,d){Umb(a,b,c,(lr(),new UD(d)))} +function MKc(a,b){a.q=b;a.a=cpb(new jpb(a.b),a.e)} +function Ycd(a,b){vJe(b,a.a.length);return a.a[b]} +function fqd(a){if(!a.P){return null}return a.P.s} +function Dmd(a,b){hld();return Wnd(a,1,fld,b,eld)} +function BTc(a,b){return ATc(rL(a,191),rL(b,191))} +function Dec(a){return a.g==(Pec(),Nec)||a.g==Oec} +function rzc(a){var b;b=a.b;qzc(a,false);return b} +function prd(a){var b;b=new mrd(5);b.c=a;return b} +function BUd(a,b){kf(!b.e);a.e=b;b.d=a.d;return b} +function r0d(a,b){I$d(a.a,b);a.e=true;return true} +function rvd(){ovd(this);this.b=(rrd(),rrd(),qrd)} +function a1d(a){_0d.call(this,new Y$d(a),a,false)} +function s0c(){yRb.call(this,'rewriteGenerators')} +function vpe(a,b){A7d();lbe.call(this,a);this.a=b} +function Xhe(a,b,c){return Uhe(a,b,die(a,true,c))} +function $he(a,b,c){return Zhe(a,b,die(a,true,c))} +function i$d(a){return (a.a&512)!=0||(a.a&iNe)!=0} +function R1d(a){return a.j==(h7d(),n6d)||a.j==k4d} +function kBe(a,b){return wJe(a),Iqe(a,(wJe(b),b))} +function pBe(a,b){return wJe(b),Iqe(b,(wJe(a),a))} +function FRd(a){throw Aib(new zRd(a.b.b,yb(a.a)))} +function enb(a){var b;b=y1d(a);0!=b&&nob(OMe+b,a)} +function Cxe(a,b){var c;for(c=0;c0){ote(a.i,10);++a.k;a.n=0}} +function ZB(a){return new tC(a.a.Vf(),new VB(a.b))} +function _Lb(a){return jye(),new qze(new nve(a.d))} +function Dre(a){return BL(a)?IL((wJe(a),a)):a.Bo()} +function Fq(a,b){return Jq(pw(rL(a.c.Nd(a),34),b))} +function rGb(a,b){return sGb(a,CPe+ ++a.db+'] ',b)} +function wGb(a,b){var c;c=new oMc(a);mMc(c,null,b)} +function hMb(a,b){this.d=new RDe;this.f=a;this.e=b} +function Zlb(a,b){this.f=a;this.a=new Owe;this.c=b} +function lOb(a,b){this.c=a;this.a=b;this.b=new Owe} +function R6b(a,b){this.a=a;this.b=b;this.c=new RCe} +function Chc(a,b){this.c=a;this.b=new tEe;this.a=b} +function E9b(a,b){this.d=new RCe;this.c=a;this.a=b} +function pmc(a,b){this.c=new RCe;this.b=a;this.a=b} +function q$b(a,b){a.b.a.clear();ie(a.b,b);return a} +function Inc(a){a.j==(h7d(),A4d)&&(a=a.b);return a} +function Wjc(a,b){a.c=b;if(!b){a.g=null;a.j=false}} +function Rpc(a,b){Aob.call(this);this.a=a;this.b=b} +function Zpc(a,b){this.b=new Owe;this.c=a;this.a=b} +function vMc(a,b){Aob.call(this);this.a=a;this.b=b} +function yPc(a,b){this.d=a;this.e=b;this.b=new idd} +function TYb(){eHb.call(this,'exploitAssign',true)} +function ATb(){eHb.call(this,'optimizeToEs6',true)} +function tUb(){yRb.call(this,'closureCheckModule')} +function B0c(){eHb.call(this,'es6SuperCheck',true)} +function ySc(a){zSc.call(this,a,new BSc,true,true)} +function Toc(a){ujb();Uoc.call(this,a,(TYc(),RYc))} +function Cec(a){return a.c?rL(F1d(a.c,51),28):null} +function KQc(a){return a.removeAtIndex(a.size()-1)} +function bWc(a){return ate(a,a.lastIndexOf('.')+1)} +function Zed(a){return jye(),new DAe(new dve(a.a))} +function ykd(a,b){return Hp(),new Op(a,new Mkd(b))} +function coc(a,b,c){return b!=c&&Gkb(a.c[b.c],c.c)} +function a8c(a,b,c){!b?pAc(a.a,c,a):oAc(a.a,a,b,c)} +function Ucd(a,b,c){yJe(b,a.a.length);_Ie(a.a,b,c)} +function N7d(a,b,c){return a.Cn(b,new oge(true),c)} +function Vhe(a,b,c){return Uhe(a,b,die(a,false,c))} +function sle(a,b,c,d){return l9d(a,b,c,d)||!b.sn()} +function iyd(a,b){W2d(a.i)==-1&&jyd(a,b.o.b,b.o.a)} +function pud(a,b){zf(!a.f);kjd(a,KMe,null,b,false)} +function fBd(a){var b;b=ECd(a.i);a.n=null;return b} +function d2d(a){var b;b=a.b;!!b&&a2d(a,b);return b} +function XJd(a){return a.b.b==0?a.d:eKd(a,0).b.b.c} +function d1d(a){return new f1d(s1d(a.a,false),a.b)} +function jue(a,b){return EL(b)?kue(a,b):jDe(a.d,b)} +function EK(a){return Array.isArray(a)&&a.Po===hjb} +function ume(){lme();vme.call(this,(aB(),new DGe))} +function Qwe(a){Pwe.call(this,a.size());ie(this,a)} +function Axe(a,b,c){pJe(b,c,a.length);Exe(a,b,c,0)} +function Nxe(a,b,c){pJe(0,b,a.length);Kxe(a,0,b,c)} +function OBe(a,b,c){qCe(a.a,b);return QBe(a,b.g,c)} +function sCe(a,b){return zL(b,26)&&tCe(a,rL(b,26))} +function uCe(a,b){return zL(b,26)&&vCe(a,rL(b,26))} +function wDe(a,b){return !(a.a.get(b)===undefined)} +function Eqe(a,b){return Hqe((wJe(a),a),(wJe(b),b))} +function CL(a){return a!=null&&GL(a)&&!(a.Po===hjb)} +function yL(a){return !Array.isArray(a)&&a.Po===hjb} +function FL(a){return typeof a===UJe||typeof a==aKe} +function Fse(a,b){return GJe((wJe(a),a),(wJe(b),b))} +function Ere(a,b){return Gre((wJe(a),a),(wJe(b),b))} +function Lg(a,b){tf(b);return new Ng(a.c,a.b,b,a.a)} +function upe(a,b){this.a=new idd;this.i=a;this.g=b} +function dH(a){ZG(this);this.e=a;$G(this);this.ag()} +function eH(a){ZG(this);this.e=a;$G(this);this.ag()} +function uc(a){rc.call(this,'LOWER_HYPHEN',0,a,'-')} +function Gm(a,b,c,d){this.a=a;sm.call(this,a,b,c,d)} +function ai(a,b,c,d){a.d.b.remove(c);a.d.b.put(d,b)} +function Dxe(a,b,c){var d;for(d=0;d=b){throw Aib(new tqe)}} +function Qw(a,b){Hw();tf(a);tf(b);return new rx(a,b)} +function LI(a,b,c){zf(b>=0);zf(c>=0);a.f=new YH(b,c)} +function qxb(a,b,c){ixb();this.b=a;this.c=b;this.a=c} +function v3d(a){N2d.call(this,(h7d(),k6d));this.a=a} +function hTb(){eHb.call(this,'j2clClinitPass',false)} +function LSb(){eHb.call(this,'sanityCheckVars',true)} +function YTb(){eHb.call(this,'es6ExternsCheck',true)} +function oWb(){eHb.call(this,'checkStrictMode',true)} +function wUb(){yRb.call(this,'closureRewriteModule')} +function kdd(a){Tcd(this);aJe(this.a,0,a.toArray())} +function Unc(a,b){Vcd(a.d,b);kf(!b.g||b.g==a);b.g=a} +function IEb(a,b,c){var d;d=rL(NDe(a.a,c),457);d.b=b} +function zGb(a,b,c){c.b=a;return rL(SHe(a.K,b,c),82)} +function RAc(a,b,c){HAc();return VBc(a,new REc(b),c)} +function EBc(a,b,c){HAc();return kBc(a,new REc(b),c)} +function WCc(a,b,c){HAc();return VBc(a,new OEc(b),c)} +function aic(a,b){return b==a.c?a:new bic(a.a,b,a.b)} +function xNc(a,b){return gue(a.a,b)?wL(fue(a.a,b)):b} +function aRb(a,b){return new b4c(b,PFb(b),a.Gc,a.Hc)} +function P_b(a,b){return zL(b,7)&&Jse(rL(b,7).b,a.b)} +function BVc(a){return a.a.Md()&&Q1d(rL(a.a.Ld(),5))} +function N2c(a,b){return !!b&&!!b.c.b&&b.b&&b.c==a.g} +function Gnc(a,b,c){return c?'{'+Jnc(a,c.a)+'} '+b:b} +function fzc(a,b,c){tf(b);this.a=a;this.c=b;this.b=c} +function yOc(a,b,c){sOc();this.a=a;this.c=b;this.b=c} +function PRc(a,b,c){ORc();this.c=a;this.b=b;this.a=c} +function Fbd(a,b,c){Dbd.call(this,a,b,(Tbd(),Sbd),c)} +function bYd(a,b){this.b=a;GVd.call(this,a);this.a=b} +function eyd(a,b){a.i&&a.d.Ej(zVe,a.r,b.b.b+1,b.b.a)} +function Wlc(a){sv(a.e,a.d.vj((Lhe(),Uge)));return a} +function cod(a){if((a&24)!=0){return a|8|16}return a} +function XH(a){var b;b=(a&1)==1;a=a>>1;return b?-a:a} +function f_d(a,b){var c;c=(lf(b>=0,KYe),1<1?a.O:null} +function HFb(a){return !a.F&&(a.F=new _ec(a,a.B)),a.F} +function Jq(a){return zL(a,179)?rL(a,179):new Lq(a,a)} +function Nq(a){return Hw(),new Gx(ww(pw(a.a,new qw)))} +function eic(){eic=cjb;dic=Hg(Pg((Ac(),new ld(10))))} +function arc(a){this.a=NB(PB((Fp(8,KLe),new RB)),a.a)} +function rh(){nh();return GK(yK(QM,1),PKe,737,0,[mh])} +function jCc(a){HAc();return $Bc(a)&&a.j!=(h7d(),m4d)} +function TCc(a){HAc();return a.j==(h7d(),Z5d)||fCc(a)} +function LPc(a){return Fqe((Dqe(),Cqe),fue(a.jb,hVe))} +function Lkc(a,b,c){if(PCe(a.c,b)){return}dk(a.d,b,c)} +function gRb(a,b,c){if(c.Bd){Vcd(b,a.Cc);Vcd(b,a.Wb)}} +function JIb(a,b){pf(!b||b.a==1||b.a==2,VPe,b);a.qc=b} +function DQc(a,b){var c;c=new jAc(a.c,a,a.g);aAc(c,b)} +function eZc(a,b){ZYc();return new kZc((new jZc,a),b)} +function Zxd(a,b){return r1d(new v3d((wJe(b),b)),a.t)} +function $ld(a,b){return Kvd(a.nl(),b)||Kvd(a.gl(),b)} +function Gld(a){return !a.nl().isEmpty()||Ijd(a.gl())} +function P1d(a){return a.j==(h7d(),r5d)&&B1d(a,60)!=0} +function Q1d(a){return a.j==(h7d(),r5d)&&B1d(a,61)!=0} +function cse(a,b){return Dib(a,b)<0?-1:Dib(a,b)>0?1:0} +function fee(a,b){return eae(a.c,b.c,0,new lge(true))} +function Yye(a,b){return hue(a.a,b,(Dqe(),Cqe))==null} +function OCe(a,b){var c;c=a.a.put(b,a);return c==null} +function REe(a,b){AEe(a.d,b,a.b.b,a.b);++a.a;a.c=null} +function EHe(a,b){return a.a.put(b,(Dqe(),Bqe))==null} +function YIe(a,b){var c;c=a.slice(0,b);return HK(c,a)} +function $Ie(a,b){var c;c=new Array(b);return HK(c,a)} +function FK(a,b,c){rJe(c==null||xK(a,c));return a[b]=c} +function _ed(a,b){b.b!=b&&(b.b=_ed(a,b.b));return b.b} +function fre(a,b){var c;c=new dre;c.j=a;c.d=b;return c} +function gre(a,b,c){var d;d=fre(a,b);tre(c,d);return d} +function e2d(a){var b;b=f2d(a,a.g,29);b!=a.g&&(a.g=b)} +function qc(a,b,c){tf(b);tf(c);return b==a?c:tc(a,b,c)} +function Yd(a){tf(a);return zL(a,574)?rL(a,574):gjb(a)} +function Pwe(a){rwe(this);cJe(this.a,Rre(8>a?8:a)<<1)} +function yed(){this.a=new RDe;this.c=true;this.b=true} +function y0c(){eHb.call(this,'convertEs7ToEs6',true)} +function DRb(){eHb.call(this,'gatherRawExports',true)} +function $Rb(){eHb.call(this,'markUnnormalized',true)} +function OWb(){eHb.call(this,'checkConstParams',true)} +function PXb(){eHb.call(this,'inlineConstants',false)} +function Rd(){Kc.call(this,'CharMatcher.whitespace()')} +function pv(){qv.call(this,ZB(OB((Fp(8,KLe),new TB))))} +function jl(a){var b;b=a.e;return !b?(a.e=new EB(a)):b} +function Xh(a){var b;b=a.e;return !b?(a.e=new kj(a)):b} +function Wh(a){var b;b=a.c;return !b?(a.c=new Yi(a)):b} +function jn(a){var b;b=a.e;!b&&(a.e=b=a.$e());return b} +function cA(a,b){var c;c=a.a.size();xf(b,c);return c-b} +function ikb(a,b){a.a==null&&(a.a=hkb(a,b));return a.a} +function tf(a){if(a==null){throw Aib(new qse)}return a} +function ZF(a,b,c){if(a.a!=b){throw Aib(new BBe)}a.a=c} +function wzb(a){if(a.a==null){return ''}return '.'+a.a} +function UFb(a){!a.bb&&(a.bb=kGb(a,GPe,0));return a.bb} +function VFb(a){!a.cb&&(a.cb=kGb(a,EPe,1));return a.cb} +function Mw(a){Hw();tf(a);while(a.Pd()){a.Qd();a.Rd()}} +function ow(a,b){tf(a);lf(b>=0,LLe);return new Dw(a,b)} +function Pnb(a,b){b.j!=a&&nob(PMe+a+' but was '+b.j,b)} +function wOb(a){this.c=a;this.a=new JCe;this.b=new Owe} +function zvb(a){this.b=new JCe;this.d=new RCe;this.c=a} +function Clc(a){this.c=a;this.b=new RCe;this.a=new JCe} +function zVb(a){this.a=a;yRb.call(this,'resolveTypes')} +function cTb(){yRb.call(this,'dartSuperAccessorsPass')} +function IXb(){eHb.call(this,'markPureFunctions',true)} +function iUb(){eHb.call(this,'inlineTypeAliases',true)} +function roc(a,b,c){ooc.call(this,a);this.b=b;this.a=c} +function Coc(a){this.b=new idd;this.c=new idd;this.a=a} +function TKc(a){this.f=a;this.d=new idd;this.c=new RCe} +function _Oc(a){this.c=a;this.a=new JCe;this.b=new idd} +function Krc(a){return a.a?a:new Prc(a.d,a.b,a.c,true)} +function DB(a){return aB(),ax(a.a.ke().$d(),(rB(),qB))} +function Sec(a,b){return Bpd(a.o,b,a.g,(lr(),lr(),kr))} +function Ksc(a){var b;return Qq(),b=a.f.keySet(),Xs(b)} +function Msc(a){var b;return Qq(),b=new dve(a.k),Xs(b)} +function Nsc(a){var b;return Qq(),b=new dve(a.p),Xs(b)} +function XZc(a,b){var c,d;d=d2d(b);c=WZc(a,d);m1d(b,c)} +function hUc(a,b){zf(a==(AUc(),xUc));return new mUc(b)} +function M5c(a,b,c,d){c.Fn()||U5c(a,b,d,c,(Lhe(),hhe))} +function O5c(a,b,c,d){c.Hn()||U5c(a,b,d,c,(Lhe(),whe))} +function U3d(a,b,c,d){O2d.call(this,a,c,d);S3d(this,b)} +function Dbd(a,b,c,d){Ebd.call(this,null,a,b,c,d,null)} +function Ike(a,b,c,d,e){A7d();tke.call(this,a,b,c,d,e)} +function ule(a,b,c){tle.call(this,a);this.a=b;this.b=c} +function vod(a,b){smd.call(this,a);this.a=rL(tf(b),32)} +function Aod(a,b){smd.call(this,a);this.a=rL(tf(b),32)} +function nte(a,b){return a.a+=String.fromCharCode(b),a} +function ote(a,b){a.a+=String.fromCharCode(b);return a} +function jqe(a,b){iqe(a,b,b+1,String.fromCharCode(32))} +function MFe(a,b,c){SFe(b,a.a.a.length+1);Ucd(a.a,b,c)} +function WJd(a,b,c){return new GFd(b,SGd(a.e.b,c,a.d))} +function eue(a,b){return EL(b)?fue(a,b):Xk(hDe(a.d,b))} +function ef(a,b){return HL(a)===HL(b)||a!=null&&wb(a,b)} +function ywe(a){var b;b=a.a[a.b];tJe(b!=null);return b} +function abe(a){var b;b=new GHe;mme(a.eo(),b);return b} +function wJe(a){if(a==null){throw Aib(new qse)}return a} +function SJe(){if(NJe==256){MJe=OJe;OJe={};NJe=0}++NJe} +function lr(){lr=cjb;Qq();kr=new fD((jye(),jye(),gye))} +function kD(){kD=cjb;Qq();jD=new lD((jye(),jye(),iye))} +function aD(){ku.call(this,new hD(new JCe));this.a=this} +function VG(){UG.call(this,new JG('base16()',cte(RKe)))} +function Mg(a){Ng.call(this,a,false,(Ac(),Dd(),Cd),eKe)} +function vc(a){rc.call(this,'LOWER_UNDERSCORE',1,a,'_')} +function zc(a){rc.call(this,'UPPER_UNDERSCORE',4,a,'_')} +function STb(){yRb.call(this,'closureGoogScopeAliases')} +function LWb(){yRb.call(this,'checkJsDocAndEs6Modules')} +function Lv(a,b){Kv();Gs.call(this,a);this.a=b;this.c=a} +function Dy(a){this.c=a;this.b=this.c.a;this.a=this.c.e} +function led(a){this.b=new idd;this.c=new idd;this.d=a} +function Aob(){this.f=new vFe(1,new Gob);this.d=new RCe} +function y5b(a,b,c){this.a=a;this.c=b;this.d=c;zf(true)} +function UQb(a,b,c,d){JQb();KQb(this);QQb(this,a,b,c,d)} +function vic(a,b,c){!!b&&lAc(a.a,b,a);!!c&&lAc(a.a,c,a)} +function zdc(a,b){a.e||Cdc(a);return rL(fue(a.i,b),139)} +function Adc(a,b){return a.e||Cdc(a),rL(fue(a.i,b),139)} +function OG(a,b){return Tib(Fib(Bib(Mib(a.b.a,b),7),8))} +function Zh(a,b){return a.b.containsKey(b)?$h(a,b):null} +function OCb(a,b){return b&&Jse(a.substr(0,6),'$super')} +function nEc(a){return HAc(),a.j!=(h7d(),Z5d)&&nDc(a.e)} +function lDc(a){HAc();return a.j!=(h7d(),Z5d)&&nDc(a.e)} +function tCc(a){HAc();return a.j==(h7d(),q5d)||a.j==p5d} +function DCc(a){HAc();return a.j==(h7d(),x5d)||a.j==w5d} +function qDc(a){HAc();return a.j==(h7d(),F6d)||a.j==Z5d} +function sBc(a){HAc();kf(a.j==(h7d(),r5d));return a.b.d} +function Jnc(a,b){var c;c=new zte;Enc(a,c,b);return c.a} +function _yc(a,b){var c;c=cmd(a,b);return 0==c.kl()?b:c} +function qZb(a,b){Af(a.j,tRe);return rL(bk(a.a,b.d),44)} +function Ppd(a){if(a.b){return null}return x1d(a.c,a.a)} +function uud(a,b){zf(!a.f);Yud(a.A,DKe,a.v)||OCe(a.o,b)} +function Kkd(a,b,c,d){kf(d.length==1);ikd(a,b,true,c,d)} +function ggd(a,b,c){$wnd.util.objectSet(a,b,c);return a} +function gNd(a,b){dNd.call(this,(GQd(),UOd),a);this.a=b} +function fNd(a,b){dNd.call(this,(GQd(),TOd),a);this.a=b} +function hNd(a,b){dNd.call(this,(GQd(),VOd),a);this.a=b} +function iNd(a,b){dNd.call(this,(GQd(),WOd),a);this.a=b} +function jNd(a,b){dNd.call(this,(GQd(),XOd),a);this.a=b} +function kNd(a,b){dNd.call(this,(GQd(),YOd),a);this.a=b} +function lNd(a,b){dNd.call(this,(GQd(),ZOd),a);this.a=b} +function nNd(a,b){dNd.call(this,(GQd(),_Od),a);this.a=b} +function oNd(a,b){dNd.call(this,(GQd(),aPd),a);this.a=b} +function uNd(a,b){dNd.call(this,(GQd(),gPd),a);this.a=b} +function NNd(a,b){dNd.call(this,(GQd(),qPd),a);this.a=b} +function PNd(a,b){dNd.call(this,(GQd(),sPd),a);this.a=b} +function WNd(a,b){dNd.call(this,(GQd(),zPd),a);this.a=b} +function XNd(a,b){dNd.call(this,(GQd(),APd),a);this.a=b} +function _Nd(a,b){dNd.call(this,(GQd(),BPd),a);this.a=b} +function vOd(a,b){dNd.call(this,(GQd(),HPd),a);this.a=b} +function xOd(a,b){dNd.call(this,(GQd(),JPd),a);this.a=b} +function EOd(a,b){dNd.call(this,(GQd(),QPd),a);this.a=b} +function KOd(a,b){dNd.call(this,(GQd(),XPd),a);this.a=b} +function OOd(a,b){dNd.call(this,(GQd(),_Pd),a);this.a=b} +function POd(a,b){dNd.call(this,(GQd(),aQd),a);this.a=b} +function QOd(a,b){dNd.call(this,(GQd(),bQd),a);this.a=b} +function SOd(a,b){dNd.call(this,(GQd(),dQd),a);this.a=b} +function LQd(a,b){dNd.call(this,(GQd(),gQd),a);this.a=b} +function MQd(a,b){dNd.call(this,(GQd(),hQd),a);this.a=b} +function NQd(a,b){dNd.call(this,(GQd(),iQd),a);this.a=b} +function PQd(a,b){dNd.call(this,(GQd(),kQd),a);this.a=b} +function TQd(a,b){dNd.call(this,(GQd(),oQd),a);this.a=b} +function UQd(a,b){dNd.call(this,(GQd(),pQd),a);this.a=b} +function WQd(a,b){dNd.call(this,(GQd(),rQd),a);this.a=b} +function ZQd(a,b){dNd.call(this,(GQd(),vQd),a);this.a=b} +function $Qd(a,b){dNd.call(this,(GQd(),wQd),a);this.a=b} +function bRd(a,b){dNd.call(this,(GQd(),yQd),a);this.a=b} +function fRd(a,b){dNd.call(this,(GQd(),CQd),a);this.a=b} +function IFd(a,b){GFd.call(this,(XMd(),FLd),a);this.a=b} +function m5c(a,b){G4c();this.a=a;this.b=WFb(a);this.c=b} +function U7d(a,b){this.F=a;this.I=!b?gie(a,null,null):b} +function pEe(a){this.c=a;this.b=a.a.b.a;zBe(a.a.c,this)} +function dHe(a,b){return tGe(a.c,a.f,b,a.b,a.a,a.e,a.d)} +function gne(a,b,c,d){return fne(a,b,c,new lge(true),d)} +function QBe(a,b,c){var d;d=a.b[b];FK(a.b,b,c);return d} +function xGe(a,b){var c;c=new aHe;zGe(a,b,c);return c.d} +function jre(a,b){var c;c=fre('',a);c.n=b;c.i=1;return c} +function Wre(a,b){while(b-->0){a=a<<1|(a<0?1:0)}return a} +function NFe(a,b){SFe(b,a.a.a.length);return Ycd(a.a,b)} +function I9c(a){s8c();t8c.call(this,xRe,null,a,-1,null)} +function rc(a,b,c,d){$b.call(this,a,b);this.a=c;this.b=d} +function my(a,b,c,d){tu.call(this,a,b);this.d=c;this.a=d} +function Ng(a,b,c,d){this.c=a;this.b=b;this.d=c;this.a=d} +function Op(a,b){this.a=rL(tf(a),32);this.b=rL(tf(b),83)} +function FA(a,b){this.a=rL(tf(a),50);this.b=rL(tf(b),83)} +function VA(a,b){this.a=rL(tf(a),50);this.b=rL(tf(b),83)} +function mD(a){et.call(this,a);this.a=(jye(),new cBe(a))} +function gte(a){return String.fromCharCode.apply(null,a)} +function Lf(){Lf=cjb;Kf=new _d(String.fromCharCode(44))} +function Lfd(){Lfd=cjb;Kfd=djb(Pfd.prototype.Qk,Pfd,[])} +function Mx(a){if(!a.a){a.c=a.b.Qd();a.a=true}return a.c} +function $Fb(a,b){if(!a.X){return true}return IKc(a.X,b)} +function bA(a,b){var c;c=a.a.size();sf(b,c);return c-1-b} +function BFb(a,b){var c;c=n_c(a.c,b);o_c(a.c,b);return c} +function jBb(a,b){var c;c=rL(F1d(b,81),5);!!c&&a.di(c,4)} +function fyc(a,b){var c;c=tld(b);return rL(Ze(c,a.r),20)} +function Pqe(a){var b;b=a-10;return (b<0?48+a:97+b)&uKe} +function wD(a,b){return a.a.contains(b)||a.b.contains(b)} +function KWc(a,b){return ODc(a.a,'$jscomp.typecheck.'+b)} +function B3c(a,b){return b?b:rL(sie(a.e,(Lhe(),Hhe)),24)} +function H4c(a,b,c){return Ku(Mu(new Nu,cs(a)),b,c).Pf()} +function Yxd(a,b,c,d,e){return r1d(new S2d(b,c,d,e),a.t)} +function _xd(a,b){return r1d(new T3d((h7d(),L6d),b),a.t)} +function Euc(a,b){lAc(a.b.d,b,new jdc(a.b.d,new Ouc(a)))} +function SKd(a,b){this.c=a;this.a=b;this.b=new TGd(this)} +function hTd(a,b){this.e=a;this.d=b;this.a=this.e.length} +function uJ(a,b,c,d){this.c=a;this.d=b;this.b=c;this.a=d} +function OVb(a){this.a=a;yRb.call(this,'inferJsDocInfo')} +function kec(a){return a.t==(xec(),uec)&&(a.a>0||dec(a))} +function gce(a,b,c,d){return l9d(a,b,c,d)||a.d.Cn(b,c,d)} +function Uhe(a,b,c){return ffe(mfe(lfe(new rfe(a),c),b))} +function mme(a,b){var c;c=pye((aB(),new aDe));nme(a,b,c)} +function bie(a,b){var c;c=new xfe(a);sfe(c,b);return c.b} +function hBd(a,b){a.n=!a.n?DCd(a.i):_Ad(a);return a.n==b} +function iqe(a,b,c,d){a.a=bte(a.a,0,b)+(''+d)+ate(a.a,c)} +function hue(a,b,c){return EL(b)?iue(a,b,c):iDe(a.d,b,c)} +function rye(a){jye();return !a?(iBe(),iBe(),hBe):a.uf()} +function Ubd(){Tbd();return GK(yK(m8,1),PKe,477,0,[Sbd])} +function qp(){op();return GK(yK(HN,1),PKe,279,0,[np,mp])} +function tB(){rB();return GK(yK(CP,1),PKe,357,0,[pB,qB])} +function xF(){vF();return GK(yK(MQ,1),PKe,353,0,[uF,tF])} +function EEe(a){return a.b==0?null:(tJe(a.b!=0),a.a.a.c)} +function FEe(a){return a.b==0?null:(tJe(a.b!=0),a.a.a.c)} +function nFe(a,b){return HL(a)===HL(b)||a!=null&&wb(a,b)} +function gDe(a,b){var c;c=a.a.get(b);return c==null?[]:c} +function yBe(a,b){if(b[eZe]!=a[eZe]){throw Aib(new BBe)}} +function Um(a){pm(a.d);if(a.d.d!=a.c){throw Aib(new BBe)}} +function NBe(a){ke(a.a);a.b=CK(agb,ZJe,1,a.b.length,5,1)} +function fAe(a){!a.b&&(a.b=new JAe(a.d.ke()));return a.b} +function kn(a){var b;b=a.f;!b&&(a.f=b=new Io(a));return b} +function ke(a){var b;for(b=a.$d();b.Pd();){b.Qd();b.Rd()}} +function _we(a){this.d=a;this.a=this.d.c;this.b=this.d.b} +function fxe(a){this.d=a;this.a=this.d.b;this.b=this.d.c} +function bsb(a,b,c,d){this.a=a;this.d=b;this.b=c;this.c=d} +function oHb(a,b,c,d){this.a=a;this.b=b;this.d=c;this.c=d} +function Fmb(a,b,c,d){this.b=a;this.c=b;this.a=c;this.d=d} +function Lub(a,b,c,d){this.d=a;this.c=b;this.a=c;this.b=d} +function zp(a,b){this.a=rL(tf(a),83);this.b=rL(tf(b),253)} +function xSb(a){this.a=a;eHb.call(this,'renameVars',true)} +function RWb(){eHb.call(this,'computeFunctionNames',true)} +function cUb(){eHb.call(this,'Es6StaticInheritance',true)} +function sYb(){eHb.call(this,'inlineSimpleMethods',false)} +function DTb(){yRb.call(this,'whitespaceWrapGoogModules')} +function l8b(a){this.b=a;this.a=new LEe;this.c=this.b.b.a} +function M$b(a){J$b();this.a=null;this.b=(Qq(),new XD(a))} +function Gac(a,b,c,d){this.c=a;this.f=b;this.e=c;this.d=d} +function Wac(a,b,c,d){this.d=a;this.c=b;this.b=c;this.a=d} +function dnb(a,b){var c;c=y1d(a);b!=c&&nob(PMe+b+QMe+c,a)} +function WQb(a){var b;b=new YQb(a.a,a.c);b.b=a.b;return b} +function rRb(a){return new ITb('setFeatureSet:'+AEd(a),a)} +function Sz(a,b){return zL(a,110)?new FA(a,b):new VA(a,b)} +function v6b(a,b){return !b?J2d(new _3d((h7d(),i4d)),a):b} +function $Yd(a){zf(NYd(a));return new P2d((h7d(),C6d),a)} +function fZd(a){zf(NYd(a));return new P2d((h7d(),V6d),a)} +function kZd(a){zf(NYd(a));return new P2d((h7d(),g7d),a)} +function wCc(a){HAc();return a.j==(h7d(),m5d)&&a.b.j==m4d} +function xCc(a){HAc();return a.j==(h7d(),m5d)&&a.b.j==I4d} +function hmc(a){if(!a){return false}return a.Zl()||a.mm()} +function BDc(a){return p7d(),n7d.test(a)&&!m7d(a)&&OCc(a)} +function hmd(a){return a.kl()==2&&a.nl().size()==1?a:null} +function Ncd(a){pG.call(this,(rG(),new sG(tG(a))),32,126)} +function Eac(){sac.call(this,'DECOMPOSABLE_EXPRESSION',5)} +function W3c(a,b){D3c.call(this,a,true);this.b=a;this.c=b} +function CFd(a,b,c,d){$b.call(this,a,b);this.a=c;this.b=d} +function IGd(a,b,c,d){$b.call(this,a,b);this.b=c;this.a=d} +function uQc(a,b,c,d){this.c=a;this.a=b;this.d=c;this.b=d} +function zSc(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} +function yLc(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function aDd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function Prc(a,b,c,d){this.d=a;this.b=b;this.c=c;this.a=d} +function oRd(a,b,c,d){this.d=a;this.c=b;this.b=c;this.a=d} +function eme(a,b,c,d){this.c=a;this.e=b;this.b=c;this.d=d} +function Hke(a,b,c,d){this.b=a;this.d=b;this.a=c;this.c=d} +function Ase(a,b,c){this.a=$Je;this.d=a;this.b=b;this.c=c} +function Pce(a,b,c){Sce.call(this,a,b,c,false,null,false)} +function i7c(a,b,c,d){q6c(b,c,null,sie(a.i,d),null,false)} +function kue(a,b){return b==null?jDe(a.d,null):zDe(a.e,b)} +function EQc(a,b,c){var d;d=new jAc(a.c,a,a.g);gAc(d,b,c)} +function WRd(a,b){var c;c=new VRd;GRd(c,a,b);return c.c.a} +function ord(a,b){var c;c=new mrd(4);c.b=a;c.c=b;return c} +function In(a,b){var c;c=rL(hB(a.a,b),154);return !c?0:c.a} +function c1d(a){if(!a){return new a1d(true)}return b1d(a)} +function XCd(a,b,c,d){var e;a.d=true;e=WRd(c,d);a.ym(b,e)} +function YJd(a){return ZJd(a,a.b.b==0?a.d:eKd(a,0).b.b.c)} +function Yx(a){var b;return b=a.i,!b?(a.i=new dm(a,a.c)):b} +function vk(a){var b;return b=a.f,!b?(a.f=new ql(a,a.c)):b} +function Lo(a){var b;return b=a.f,!b?(a.f=new ql(a,a.c)):b} +function Cyb(a,b,c,d){return d==0?Dzc(b)==a.b.o:c.e==a.b.o} +function Ug(a,b){this.f=a.d;this.d=a.b;this.b=a.a;this.e=b} +function _m(a,b){this.a=a;Wm.call(this,a,rL(a.d,50).be(b))} +function Fzb(){this.c=new JCe;this.a=new bu;this.b=new RCe} +function ARb(a){this.a=a;yRb.call(this,'checkSideEffects')} +function pTb(){eHb.call(this,'j2clAssertRemovalPass',true)} +function uTb(){eHb.call(this,'j2clSourceFileChecker',true)} +function QKb(a){PKb.call(this,(lr(),tf(a),ur(new Zxe(a))))} +function pd(){Kc.call(this,'CharMatcher.javaIsoControl()')} +function YXb(){eHb.call(this,'removeUnusedPolyfills',true)} +function WVb(a){this.a=a;yRb.call(this,'checkControlFlow')} +function NTb(a,b,c,d){this.a=a;this.b=d;eHb.call(this,b,c)} +function l7b(a,b,c){i7b();tf(a);this.a=a;this.c=b;this.b=c} +function mLb(a,b,c,d){ZLb(a.c,b);ZLb(a.c,d);NLb(a.c,b,c,d)} +function Kkc(a,b,c){c.j==(h7d(),r5d)?Lkc(a,b,c):OCe(a.e,b)} +function zmc(a,b){return !!a.b&&(PCe(a.b.a,b)||zmc(a.b,b))} +function Tec(a,b){var c;c=rL(NDe(a.c,b),20);tf(c);return c} +function Gyc(a,b){var c;c=a.k;zf(!c||zL(c,20));!c&&(a.k=b)} +function YFb(a){!a.fb&&(a.fb=new Oie(a.S,a.B));return a.fb} +function YBc(a){HAc();kf(a.j==(h7d(),X6d));return O1d(a,3)} +function NEc(a,b){return b.j==(h7d(),_5d)&&Jse(b.Lm(),a.a)} +function _G(a,b){a.backingJsObject=b;b!=null&&JJe(b,fKe,a)} +function Snc(a,b,c,d,e,f){return new Mnc(a,null,b,c,e,d,f)} +function Tjc(a){if(!a.g){return jye(),jye(),hye}return a.g} +function vL(a){DJe(a==null||GL(a)&&!(a.Po===hjb));return a} +function NHb(a){if(!a.a||!a.a.mi()){return}a.a.mi().c=true} +function CIc(a,b,c){this.a=a;this.b=b;this.c=c;this.d=true} +function ync(a,b,c){this.d=a;this.a=b;this.c=c;this.b=true} +function aSc(a,b,c){var d;for(d=b.b;d;d=d.d){cSc(a,d,b,c)}} +function pHc(a,b){var c,d;for(c=b.b;c;c=d){d=c.d;qHc(a,c)}} +function Dad(a,b,c,d){lAc(a.a.c,b.uk().b.d,new Iad(a,d,c))} +function sXd(a,b,c,d){return tXd(a,b.b,b.b?b.b.f:null,c,d)} +function yXd(a,b,c,d,e,f){return zXd(a,f,b,c,GUd(a,c,d,e))} +function o4c(a,b,c,d,e){!!c&&!!d&&!c.im(d)&&p4c(a,b,c,d,e)} +function mxd(a,b,c,d){lxd.call(this,a,(rxd(),qxd),0,b,c,d)} +function sAd(a,b){return Wxd(a.a,(h7d(),T6d),lyd(a.a,b.a))} +function tAd(a,b){return Wxd(a.a,(h7d(),V6d),lyd(a.a,b.a))} +function DEd(a,b){return new EEd(oD(a.a,(Qq(),new XD(b))))} +function q1d(a){return !a.b?(jye(),jye(),iye):new F3d(a.b)} +function pYd(a){zf(a.j==(h7d(),P5d));return new P2d(H4d,a)} +function zYd(a){Af(NYd(a),a);return new P2d((h7d(),m5d),a)} +function w2d(a,b){var c;a.i=b;for(c=a.b;c;c=c.d){w2d(c,b)}} +function $kd(a,b){tf(b);zf(a.n.a.isEmpty());a.n=b;return a} +function cje(a,b){a.j=b;zL(b,24)?(a.i=rL(b,24)):(a.i=null)} +function KEe(a){a.a.a=a.c;a.c.b=a.a;a.a.b=a.c.a=null;a.b=0} +function SBe(a){this.a=rCe(a.a);this.b=YIe(a.b,a.b.length)} +function TBe(a){this.a=rCe(a.a);this.b=YIe(a.b,a.b.length)} +function bf(a){this.b=new df;this.c=this.b;this.a=wL(tf(a))} +function qm(a){a.b?qm(a.b):a.d.isEmpty()&&a.f.c.remove(a.e)} +function Ou(a){this.b=(Fp(a,'initialArraySize'),new jdd(a))} +function iK(){iK=cjb;var a,b;b=!nK();a=new vK;hK=b?new oK:a} +function iBe(){iBe=cjb;fBe=new lBe;gBe=new lBe;hBe=new qBe} +function Vne(){Vne=cjb;Sne=new Yne;Tne=new coe;Une=new ioe} +function dFe(){dFe=cjb;aFe=new eFe;bFe=new gFe;cFe=new iFe} +function jye(){jye=cjb;gye=new vye;hye=new Mye;iye=new Uye} +function nkb(){nkb=cjb;mkb=LIe((_qe(ZR),ZR.o));lkb=new ykb} +function rG(){rG=cjb;qG=AK(LL,[ZJe,qKe],[90,17],15,[0,0],2)} +function v0c(){eHb.call(this,'rewriteAsyncFunctions',true)} +function VSb(){eHb.call(this,'gatherExternProperties',true)} +function zUb(){eHb.call(this,'closureCheckGetCssName',true)} +function URb(a){this.a=a;eHb.call(this,'aliasStrings',true)} +function gSb(a){this.a=a;yRb.call(this,'closurePrimitives')} +function uz(a){this.b=a;this.c=a;a.e=null;a.c=null;this.a=1} +function U5b(){this.c=new tEe;this.b=new tEe;this.a=new tEe} +function xD(a){return Ys(new lxe(uv(uv(new vv,a.a),a.b).a))} +function Zw(a,b){Hw();return Yw(a,(Lf(),new Yf(new Of(b))))} +function Ww(a,b){Hw();tf(a);lf(b>=0,LLe);return new wx(b,a)} +function _5b(a,b,c){X5b();if(!a){return null}return b.vj(c)} +function Xlc(a,b,c){if(!b.am()){return}!!a.c&&dk(a.c,b,c.a)} +function btc(a,b){return a.g.contains(b)||!!a.t&&btc(a.t,b)} +function hCc(a,b){HAc();return a.j==(h7d(),I4d)&&Y1d(a.b,b)} +function Fzc(a){while(!!a&&a.j!=(h7d(),F6d)){a=a.e}return a} +function I7c(a){if(!!a&&!!a.co()){return a.co()}return null} +function S8c(a){if(!a.g){return ''}return a.g.f.a} +function ZJ(a){TJ();$wnd.setTimeout(function(){throw a},0)} +function Pcd(a,b,c){var d;d=new tEe;d.a.put(c,d);Qcd(a,b,d)} +function Y8b(a,b){var c;a.c=0;c=new j9b(a,b);lAc(a.d.c,b,c)} +function bH(a,b){var c;c=bre(a.No);return b==null?c:c+hKe+b} +function Pud(a,b){zf(b.g==0);return a==b||!!a.p&&$rd(a.p,b)} +function wRd(a,b){tRd();var c;c=vRd(a);++c.a;c.b=Bib(c.b,b)} +function BXd(a){pXd();KUd.call(this,a);this.a=new UXd(this)} +function vfd(){Aob.call(this);this.a=new idd;this.b=new idd} +function bkd(a){zf(!(a==a.a.v||a==a.a.g));return a.i.size()} +function jec(a){var b;a.e=true;for(b=a.p;b;b=b.p){b.k=true}} +function y1d(a){var b,c;b=0;for(c=a.b;c;c=c.d){++b}return b} +function x1d(a,b){var c;c=a.b;while(b>0){c=c.d;--b}return c} +function xte(a,b){a.a=bte(a.a,0,b)+''+ate(a.a,b+1);return a} +function cKc(a,b){if(a){cKc(a.d,b);j1d(b.e,s1d(a,false),b)}} +function DWc(a,b,c,d,e){DGb(a.a,AWc(a,b,c,d,e,(prb(),mrb)))} +function EWc(a,b,c,d,e){DGb(a.a,AWc(a,b,c,d,e,(prb(),orb)))} +function Wsb(a,b,c,d,e){Qsb();Xsb.call(this,a,b,c,d,e,true)} +function F5c(a,b,c,d){!c.Fn()&&!c.Bn(a.a)&&V5c(a,b,d,c,a.a)} +function Fie(a,b,c){lf(c.indexOf('<')==-1,ZYe);iue(a.k,c,b)} +function TXd(a,b){return new Age(IUd(a.a,b.a),IUd(a.a,b.b))} +function jBd(a,b){return r1d(new O2d(b,a.i.g,CCd(a.i)),a.k)} +function gue(a,b){return b==null?!!hDe(a.d,null):wDe(a.e,b)} +function nbe(a){A7d();return !a?null:zL(a,24)?rL(a,24):null} +function Rue(a){tJe(a.b>0);return a.a.getAtIndex(a.c=--a.b)} +function Ezb(a,b){kf(gue(a.c,b));return rL(fue(a.c,b),188).c} +function ZI(a,b){var c,d;d=b.b;c=b.a;return d!=0?c:c+a.c.i.a} +function FEb(a,b){var c;c=rL(NDe(a.a,b),457);return c?c.a:-1} +function qMb(a,b){var c;c=rL(eue(a.a,b),95);tf(c);return c.a} +function uv(a,b){!!b&&a.a.a.length+b.size();su(a,b);return a} +function HBb(a){this.c=new UIb;this.a=new IBb(this);this.g=a} +function gub(a){dub();this.c=new RCe;this.a=new idd;this.b=a} +function vRb(a,b){eRb();kf(!b.isEmpty());return new MEb(a,b)} +function hsb(){fsb();return GK(yK(KS,1),PKe,519,0,[esb,dsb])} +function qJb(){nJb();return GK(yK(CU,1),PKe,409,0,[lJb,mJb])} +function EJb(){BJb();return GK(yK(EU,1),PKe,408,0,[AJb,zJb])} +function GCb(){ECb();return GK(yK(YT,1),PKe,487,0,[CCb,DCb])} +function fPb(){dPb();return GK(yK(xV,1),PKe,346,0,[cPb,bPb])} +function r8b(){p8b();return GK(yK(M$,1),PKe,543,0,[n8b,o8b])} +function F8b(){D8b();return GK(yK(P$,1),PKe,551,0,[B8b,C8b])} +function M_b(a,b){var c;c=new N$b(a,b);iue(J_b,a,c);return c} +function N_b(a,b){var c;c=new O$b(a,b);iue(J_b,a,c);return c} +function L3b(a,b){var c;c=new s4b(a);lAc(a.c,b,c);return c.d} +function puc(a,b){this.a=new RCe;OCe(this.a,a);OCe(this.a,b)} +function M5b(a){G5b();this.c=new RCe;this.a=new RDe;this.b=a} +function Hmc(a){this.c=a;this.b=new Owe;this.a=new Amc(null)} +function rWb(a){this.a=a;eHb.call(this,'processTweaks',true)} +function lUb(){eHb.call(this,'aggressiveInlineAliases',true)} +function tVb(){yRb.call(this,'checkMissingAndExtraRequires')} +function Aac(){sac.call(this,'VAR_DECL_SIMPLE_ASSIGNMENT',3)} +function mvc(){kvc();return GK(yK(D2,1),PKe,538,0,[jvc,ivc])} +function DPc(){BPc();return GK(yK(P4,1),PKe,478,0,[APc,zPc])} +function QYc(){OYc();return GK(yK(x6,1),PKe,522,0,[NYc,MYc])} +function VYc(){TYc();return GK(yK(B6,1),PKe,343,0,[RYc,SYc])} +function yZc(){wZc();return GK(yK(I6,1),PKe,352,0,[uZc,vZc])} +function IZc(){GZc();return GK(yK(L6,1),PKe,351,0,[EZc,FZc])} +function acd(){Zbd();return GK(yK(n8,1),PKe,413,0,[Xbd,Ybd])} +function Uyc(a,b,c){kf(b.indexOf('.')==-1);return qvd(a,b,c)} +function eje(a,b,c){mbe.call(this,a,c);cje(this,rL(tf(b),9))} +function Rce(a,b,c,d,e){A7d();Sce.call(this,a,b,c,d,e,false)} +function lAc(a,b,c){var d;d=new jAc(a,c,new o5b(a));aAc(d,b)} +function pAc(a,b,c){var d;d=new jAc(a,c,new b_c(a));aAc(d,b)} +function BKc(a){var b;b=new zKc;XAb(new pBb(b),a,4);return b} +function Rhe(a,b){var c;c=new Qce(a);c.v=true;c.A=b;return c} +function yAd(a,b){var c;c=lyd(a.a,b.a);Oyd(a,c,b.b);return c} +function hAe(a){!a.c&&(a.c=new DAe(a.d.keySet()));return a.c} +function jAe(a){!a.e&&(a.e=new qze(a.d.values()));return a.e} +function qme(a){if(!a.a){return lr(),lr(),kr}return a.a.$n()} +function uye(a){jye();return zL(a,110)?new $Ae(a):new Mze(a)} +function Gse(a,b){return Fse(a.toLowerCase(),b.toLowerCase())} +function hDe(a,b){return fDe(a,b,gDe(a,b==null?0:a.b.Do(b)))} +function Qk(a,b){return b===a?'(this Map)':b==null?kKe:gjb(b)} +function Uu(a,b){return rL(Rq(cs(a.a)).getAtIndex(b),12).se()} +function IL(a){return Math.max(Math.min(a,eKe),-2147483648)|0} +function yre(a){return Jse(cKe,typeof a)||a instanceof Number} +function mDe(a){this.e=a;this.b=this.e.a.entries();this.a=[]} +function aPb(a,b,c){this.e=new idd;this.f=a;this.d=b;this.g=c} +function cOb(a,b,c){this.c=new JCe;this.a=a;this.b=b;this.d=c} +function Cx(a){this.b=(Hw(),Hw(),Hw(),Fw);this.a=rL(tf(a),53)} +function mIb(a){if(a.Wb==($Jb(),ZJb)){return a.Vb}return a.Wb} +function JFb(a,b){if(!b){return null}return rL(RHe(a.K,b),82)} +function igd(a,b){if(b<0||b>=a.a.length){throw Aib(new rqe)}} +function vWb(a){this.a=a;eHb.call(this,'processDefines',true)} +function aXb(a){this.a=a;eHb.call(this,'replaceStrings',true)} +function ZVb(a){this.a=a;yRb.call(this,'checkAccessControls')} +function fTb(){eHb.call(this,'j2clConstantHoisterPass',false)} +function qSb(){eHb.call(this,'invertContextualRenaming',true)} +function lqc(a,b,c){dqc.call(this);this.a=a;this.c=b;this.b=c} +function _Vc(a,b){this.a=a;this.b=b;this.c=Xs(pw(b.Gf(),YVc))} +function FQc(a,b,c){AQc();GQc.call(this,a,b,c,(Lf(),fg(),cg))} +function kZc(a,b){ZYc();dZc.call(this,a);this.a=b;this.d=null} +function WBc(a){kf(a.j==(h7d(),F4d));return !!a.b&&a.b.j==M4d} +function luc(a){if(a.j==(h7d(),I4d)){return false}return true} +function Qpd(a){if(a.b){return a.b.Pd()}return a.a+1=0,KYe),1<a.length&&(a.length=c,undefined)} +function Izc(a){var b;b=Nwe(a.n)+a.k.a.length;zf(b>0);return b-1} +function nAc(a,b,c,d){var e;e=new jAc(a,b,new o5b(a));gAc(e,c,d)} +function oAc(a,b,c,d){var e;e=new jAc(a,b,new b_c(a));gAc(e,c,d)} +function Rkc(a,b,c,d){var e;e=s1d(d,false);g2d(b,c,e);FGb(a.a,e)} +function hFc(a,b,c){if(a.a){throw Aib(new Ire(HUe+b))}FGb(a.b,c)} +function uFc(a,b,c){if(a.a){throw Aib(new Ire(HUe+b))}FGb(a.b,c)} +function b8b(a,b,c){this.d=a;this.c=wL(tf(b));this.e=rL(tf(c),5)} +function hWd(a,b,c){this.b=a;tVd.call(this,a);this.c=b;this.a=c} +function Ljc(a,b,c){this.a=a;Bjc.call(this,b,c,null);this.c=this} +function fWc(a){Shc();this.b=a;Vhc.call(this,a.a);this.a=new tEe} +function Y7c(a,b,c){this.b=a;tf(b);tf(c);this.a=b;this.c=c;b.k=c} +function cUd(a,b,c,d){XSd();this.a=a;this.d=b;this.c=c;this.b=d} +function KJ(a){IJ();GJ.call(this,a);this.a='';this.b=a;this.a=''} +function iBc(a){HAc();kf(a.j==(h7d(),N4d));return a.b?a.b.f:null} +function ACc(a){HAc();return a.j==(h7d(),F4d)&&!!a.e&&a.e.j==r5d} +function Pad(){Nad();return GK(yK(b8,1),PKe,414,0,[Mad,Lad,Kad])} +function Xad(){Tad();return GK(yK(c8,1),PKe,363,0,[Rad,Qad,Sad])} +function Tjd(){Rjd();return GK(yK(z9,1),PKe,463,0,[Pjd,Ojd,Qjd])} +function Ypd(){Wpd();return GK(yK(N9,1),PKe,437,0,[Upd,Tpd,Vpd])} +function xtd(a,b,c,d,e){return e!=null?qtd(a,b,c,d,e):ytd(b,c,d)} +function E7d(a,b){return zL(b,9)&&D7d(a,rL(b,9),0,new lge(true))} +function K0b(){K0b=cjb;J0b=new Q_b(TRe,(prb(),orb),new _te(URe))} +function JKd(a){return KKd(a)||/\d/.test(String.fromCharCode(a))} +function gkd(a){if(a.n.a.isEmpty()){return a}return ekd(a,a.a.i)} +function _Jd(a){if(!$Jd(a,a.d)){return 0}return Ese(a.e.a,a.d++)} +function c$d(a){if(!a.d||!a.d.s){return _C(),$C}return js(a.d.s)} +function Cj(a){if(a.b>=a.c){throw Aib(new lFe)}return Bu(a,a.b++)} +function B1d(a,b){var c;c=W1d(a,b);if(!c){return 0}return c.Sm()} +function Urd(a,b){var c;c=Gud(a.a,b,0);return !c?null:Utd(c,a.b)} +function ddd(a,b,c){var d;zJe(b,c,a.a.length);d=c-b;bJe(a.a,b,d)} +function $Kc(a){var b;b=a.b.f>a.a;a.a=a.b.b.b;++a.b.b.b;return b} +function Hme(a,b,c,d){a.b=false;iue(a.c,b,new Kme(c,d));return a} +function RIe(a,b){a.a=b;return a.b.lastIndex=0,a.c.lastIndex=0,a} +function xkb(a,b){if(a.b!=b.b){return b.b-a.b}return Fse(a.c,b.c)} +function $qb(a,b){return !!b&&b.j==(h7d(),_5d)&&!!b.b&&Zqb(a,b.b)} +function Cib(a,b){return Eib(XK(Jib(a)?Rib(a):a,Jib(b)?Rib(b):b))} +function Vib(a,b){return Eib(hL(Jib(a)?Rib(a):a,Jib(b)?Rib(b):b))} +function THb(a,b){return Ys(new lxe(uv(uv((Qq(),new vv),a),b).a))} +function gOb(a,b){this.c=new RCe;this.d=new Owe;this.b=a;this.a=b} +function itb(a,b){this.e=a;this.d=new JCe;this.c=new JCe;this.b=b} +function tlb(a){this.b=a;this.a=new _kb(this.b,this.b.c.b.size())} +function sRb(a){eRb();this.Fc=a;fRb(this);this.gc=!!a&&a.Ec&&!a.C} +function lec(a,b,c){this.b=a;this.p=b;this.t=(xec(),vec);this.j=c} +function ND(a,b){ku.call(this,tye(tf(a),tf(b)));this.b=a;this.c=b} +function yne(a,b){D3c.call(this,a,false);this.c=b;this.d=new Owe} +function Qce(a){A7d();Sce.call(this,a,null,null,false,null,true)} +function hXb(a){this.a=a;eHb.call(this,'closureCodeRemoval',true)} +function Drc(a,b){this.b=a;this.a=b.a?b:new Prc(b.d,b.b,b.c,true)} +function oPc(a,b,c,d){rPc.call(this,a,b,c,null,(h7d(),c5d),c5d,d)} +function pPc(a,b,c,d,e){rPc.call(this,a,b,c,d,e,(h7d(),c5d),null)} +function jic(a,b,c){DGb(a.a,Szc(b,hic,GK(yK(fgb,1),pKe,2,6,[c])))} +function sc(){nc();return GK(yK(WL,1),PKe,211,0,[jc,kc,ic,lc,mc])} +function ZBc(a){HAc();return a.j==(h7d(),o5d)||a.j==p5d||a.j==q5d} +function xVc(a){tf(a);this.a=a;this.b=new Owe;swe(this.b,new EVc)} +function tSc(a,b){this.c=new idd;this.d=new idd;this.a=a;this.b=b} +function ztc(a){var b;b=new ytc;b.a=uye(Gtc(new Jtc(a)));return b} +function s7b(a,b){var c;c=G7b(b);if(c){return C7b(a,c,b)}return 0} +function nrd(a,b,c){var d;d=new mrd(0);d.e=a;d.b=b;d.c=c;return d} +function a4c(a,b,c){var d;d=c.e;zf(!!d);zf(!b||K1d(d,b));$3c(a,d)} +function j6c(a,b,c){vte(vte(vte(vte((a.a+='@',a),b),' {'),c),'}')} +function Bmd(a){hld();return Wnd(a.a,2,(Qq(),new XD(a)),null,eld)} +function hud(){fud();return GK(yK(cab,1),PKe,460,0,[cud,dud,eud])} +function Uvd(){Svd();return GK(yK(mab,1),PKe,462,0,[Qvd,Pvd,Rvd])} +function txd(){rxd();return GK(yK(qab,1),PKe,404,0,[qxd,oxd,pxd])} +function aCd(){$Bd();return GK(yK(xab,1),PKe,431,0,[YBd,ZBd,XBd])} +function UJd(){SJd();return GK(yK(Pab,1),PKe,416,0,[RJd,QJd,PJd])} +function Dfe(){Bfe();return GK(yK(Ieb,1),PKe,444,0,[Afe,yfe,zfe])} +function Jfe(){Hfe();return GK(yK(Jeb,1),PKe,445,0,[Efe,Gfe,Ffe])} +function uge(){sge();return GK(yK(Qeb,1),PKe,281,0,[pge,qge,rge])} +function __b(){__b=cjb;$_b=LIe((_qe(tZ),tZ.o));Z_b=VIe('[^\\w$]')} +function nJb(){nJb=cjb;lJb=new oJb(GQe,0);mJb=new oJb('CUSTOM',1)} +function D8b(){D8b=cjb;B8b=new E8b(fTe,0);C8b=new E8b('EXTERN',1)} +function Xse(a,b,c){c=jte(c);return a.replace(new RegExp(b,'g'),c)} +function XSc(a,b){if(a.b!=b.b){return b.b-a.b}return Fse(a.c,b.c)} +function eHd(a,b){if(eKd(a.g,0).c==b){return aHd(a,b)}return null} +function gKd(a,b,c){fKd(a,ZJd(a,a.b.b==0?a.d:eKd(a,0).b.b.c),b,c)} +function FJd(a,b,c,d){!b?XCd(a.c,YJd(a.g),c,d):XCd(a.c,b.b.b,c,d)} +function Wtd(a,b,c,d){kf(!!b);this.c=a;this.d=b;this.b=c;this.a=d} +function uke(a,b,c,d,e,f){A7d();tke.call(this,a,b,c,d,e);this.f=f} +function Bqd(a,b){zf(!a.M);tf(b);a.M=b;a.N=rL(Uw(b.nl().$d()),25)} +function yAb(a){if(a.s){a.Kh(';');a._h();a.Uh();a.s=false}a.t=true} +function MHb(a){if(!a.a||!a.a.mi()){return false}return a.a.mi().c} +function jxe(a){tJe(a.a=0){return c}return -c-2} +function BGe(a,b){var c;c=1-b;a.a[c]=CGe(a.a[c],c);return CGe(a,b)} +function _2c(a,b,c){var d;for(d=b.b;d;d=d.d){c=W2c(a,d,c)}return c} +function nYd(a){var b;zf(OYd(a));b=new P2d((h7d(),F4d),a);return b} +function tte(a,b,c,d){a.a+=''+bte(b==null?kKe:gjb(b),c,d);return a} +function sf(a,b){if(a<0||a>=b){throw Aib(new sqe(gf(a,b)))}return a} +function yf(a,b,c){if(a<0||bc){throw Aib(new sqe(jf(a,b,c)))}} +function QHe(a,b){if(b==null){throw Aib(new qse)}return bue(a.a,b)} +function RHe(a,b){if(b==null){throw Aib(new qse)}return eue(a.a,b)} +function xme(a,b,c,d,e){if(a.b){return false}return Kce(a,b,c,d,e)} +function Sib(a){var b;if(Jib(a)){b=a;return b==-0.?0:b}return eL(a)} +function XJ(a,b,c){var d;d=VJ();try{return UJ(a,b,c)}finally{YJ(d)}} +function qnb(a){var b;Pnb((h7d(),l5d),a);for(b=a.b;b;b=b.d){pnb(b)}} +function ynb(a){var b;Pnb((h7d(),F5d),a);for(b=a.b;b;b=b.d){xnb(b)}} +function mnb(a,b){Pnb((h7d(),d5d),b);Inb(b.b);nnb(a,b.b?b.b.f:null)} +function _Ab(a,b){zf(b.j==(h7d(),F4d));a.c.Oh();ZAb(a,b.b);a.c.Rh()} +function Zqb(a,b){return b.j==(h7d(),N4d)||b.j==I4d&&CFb(a.a).qh(b)} +function Yue(a,b,c){zJe(b,c,a.size());this.c=a;this.a=b;this.b=c-b} +function Mue(a){AJe(a.c!=-1);a.d.removeAtIndex(a.c);a.b=a.c;a.c=-1} +function pKd(a){while(QKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)>=0){_Jd(a)}} +function wKd(a){while(RKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)>=0){_Jd(a)}} +function TEb(a){this.a=a;zL(a,101)?(this.b=rL(a,101)):(this.b=null)} +function QUb(a){this.a=a;eHb.call(this,'earlyInlineVariables',true)} +function mXb(a){this.a=a;eHb.call(this,'rescopeGlobalSymbols',true)} +function UVc(a){PVc();VVc.call(this,a,aWc(zUd('js/polyfills.txt')))} +function UGe(a){VGe.call(this,a,(sHe(),oHe),null,false,null,false)} +function PGe(a){QGe.call(this,a,(sHe(),oHe),null,false,null,false)} +function Yp(a){Kj.call(this);this.a=new Pwe(a.length);kye(this.a,a)} +function Hzb(a){if(!a.i||a.c){return null}return LNe+Vse(a.j,46,36)} +function Ttc(a,b,c){if(c){return Ntc(a,b)}return rL(fue(a.b,b),288)} +function RGd(a,b){var c;c=QGd(a,b);return new oRd(a.b,b,c,b-a.a[c])} +function SFc(a,b,c){var d;d=c.e;zf(!!d);zf(K1d(d,b));nAc(a.b,a,b,c)} +function GJd(a,b,c){!b?XCd(a.c,YJd(a.g),vYe,c):XCd(a.c,b.o.b,vYe,c)} +function hKd(a,b,c){YCd(a.c,ZJd(a,a.b.b==0?a.d:eKd(a,0).b.b.c),b,c)} +function Udd(a,b){MLb(a.b);eMb(a.b,b).vg(Sdd);Pcd(new Rcd(a),a.b,b)} +function mYd(a,b,c){Af(NYd(b),b);Af(NYd(c),c);return new R2d(a,b,c)} +function f$d(a,b){if(!a.d||!a.d.n){return false}return MDe(a.d.n,b)} +function s$d(a,b){if(!a.d.q){return false}return Zcd(a.d.q,b,0)!=-1} +function F1d(a,b){var c;c=W1d(a,b);if(!c){return null}return c.Tm()} +function $ac(a){var b;b=Nac(a);if(!!b&&LCc(b)){return b}return null} +function xue(a,b){if(zL(b,12)){return Lk(a.a,rL(b,12))}return false} +function aCe(a,b){if(zL(b,12)){return Lk(a.a,rL(b,12))}return false} +function eEe(a,b){if(zL(b,12)){return Lk(a.a,rL(b,12))}return false} +function Y2c(a,b,c){c=_2c(a,b,c);o2d(b,I2c(a,(Lhe(),Dge)));return c} +function qKc(a,b,c){swe(a.f,new yKc(b,c));Jse(b,KPe)||(a.d.a=false)} +function $mc(a){lAc(a.g.a,a.f,new anc(a));lAc(a.g.a,a.f,new dnc(a))} +function UI(a){nte(a.b,34);bJ(new dJ(a.j),a);nte(a.b,59);nte(a.b,34)} +function nr(a){var b;b=(tf(a),new kdd((Hp(),a)));qye(b);return Kr(b)} +function Bx(a){if(!Ax(a)){throw Aib(new lFe)}a.c=a.b;return a.b.Qd()} +function snb(a,b,c){yEd(a.a.A,b)||nob('AST should not contain '+b,c)} +function Lfe(a,b,c){Rce.call(this,a,null,null,c,b.I);tf(b);this.a=b} +function Uob(a,b,c,d,e){this.e=a;this.b=b;this.a=c;this.d=d;this.c=e} +function HUb(a){this.a=a;eHb.call(this,'createSyntheticBlocks',true)} +function eYb(a){this.a=a;eHb.call(this,'initNameAnalyzeReport',true)} +function fZb(a,b,c,d,e){this.e=a;this.a=b;this.d=c;this.c=d;this.b=e} +function ajd(a,b){return new cjd(a.a,a.f,a.d,a.g,a.i,a.c,b,a.j,a.b)} +function IAd(a,b){return !b?$xd(a.a,(h7d(),_5d),pXe):Tzd(a,b,false)} +function qBd(a,b){return b==(wCd(),pCd)?jBd(a,(h7d(),x6d)):pBd(a,b)} +function CBe(a,b){return cse(Hib(a.a.getTime()),Hib(b.a.getTime()))} +function A7b(a,b,c){return c?MAc(b,a.b,a.e):(HAc(),OAc(b,false,a.a))} +function F8d(a,b){A7d();return !a||!b?a==b:D7d(a,b,0,new lge(true))} +function _w(a){Hw();return ote(Ud((Hp(),Gp),ote(new zte,91),a),93).a} +function kJb(){iJb();return GK(yK(BU,1),PKe,344,0,[fJb,gJb,hJb,eJb])} +function Z0b(){X0b();return GK(yK(zZ,1),PKe,229,0,[T0b,V0b,U0b,W0b])} +function e0b(a,b){if(!b||!b.k){return a.j.vj((Lhe(),Hhe))}return b.k} +function _oc(a,b,c){zf(!a.d);a.e=new vpc(b,c,a.e);++a.b;OCe(a.a.a,b)} +function nmc(a,b,c){a.c.a.clear();mAc(a.b,b,c,new wmc(a),null,false)} +function jNb(a,b){var c;c=c1d(a);S0d(c,b);S_d(c);return F_d(c,false)} +function kjc(a){var b;tf(a);b=new qjc;return VBc(a,b,(Lf(),fg(),cg))} +function ljc(a){var b;tf(a);b=new xjc;return VBc(a,b,(Lf(),fg(),cg))} +function c8b(a,b,c,d){this.b=a;b8b.call(this,a,c,d);this.a=wL(tf(b))} +function suc(a,b,c){this.a=a;quc.call(this,b,c);zf(c.j==(h7d(),I4d))} +function s8b(a,b){this.a=a;this.b=NBc(a);this.c=b;this.d=G1d(u8b(a))} +function bzc(a,b,c,d,e){this.f=a;this.b=b;this.e=c;this.d=d;this.c=e} +function hLc(a,b,c,d,e){this.e=a;this.b=b;this.d=c;this.c=d;this.a=e} +function v3c(a,b,c,d,e){this.e=a;this.f=b;this.a=c;this.c=d;this.d=e} +function q8b(a,b,c,d,e){$b.call(this,a,b);this.a=c;this.b=d;this.c=e} +function t4b(a,b,c){this.i=a;r4b(this);this.e=b;this.f=c;this.a=true} +function bgd(a,b,c){var d;d=hgd(c);d.length>0&&ggd(a.a,b,d);return a} +function RDc(a){HAc();var b;b=iZd(new v3d(0));!!a&&I2d(b,a);return b} +function GCc(a){HAc();return a.j==(h7d(),x5d)&&Z1d(a,iOe,iOe.length)} +function JCc(a){HAc();return a.j==(h7d(),x5d)&&Z1d(a,jOe,jOe.length)} +function CCc(a){HAc();return a.j==(h7d(),r5d)&&!(a.j!=Z5d&&nDc(a.e))} +function aXc(a){while(a.e.j!=(h7d(),F6d)&&a.e.j!=F4d){a=a.e}return a} +function ZRd(a){while(fSd(a.b=a.c){throw Aib(dSd(a))}return Ese(a.a,a.b++)} +function Lue(a){tJe(a.b=0);c=a;while(!!c&&b-->0){c=c.e}return c} +function Yae(a,b,c,d){var e;e=a.Yn(b,c,false,d);Iie(a.F,b,a);return e} +function Otd(a,b,c,d,e){var f;kf(e.length==1);f=ztd(a,b,c,d,e);kf(!f)} +function XIe(a,b,c,d){Array.prototype.splice.apply(a,[b,c].concat(d))} +function Z5b(a,b,c){X5b();DGb(a,Rnc(b,V5b,GK(yK(fgb,1),pKe,2,6,[c])))} +function tOd(){rOd();return GK(yK(Lbb,1),PKe,312,0,[oOd,pOd,qOd,nOd])} +function wHe(){sHe();return GK(yK(bib,1),PKe,254,0,[oHe,pHe,qHe,rHe])} +function kw(a,b){var c;tf(a);return Rw((c=a.a.ke().$d(),new jve(c)),b)} +function Jy(a,b){var c;c=uye(Pz(new Bz(a,b)));Mw(new Bz(a,b));return c} +function xf(a,b){if(a<0||a>b){throw Aib(new sqe(hf(a,b,$Ke)))}return a} +function qJe(a){if(a<0){throw Aib(new pse('Negative array size: '+a))}} +function uH(a){if(a.length==0){return jye(),jye(),gye}return new zH(a)} +function FJ(a){ZG(this);this.e=!a?null:bH(a,a._f());$G(this);this.ag()} +function lEb(a){this.a=new idd;this.c=new RCe;zf(!njb(a.kb));this.b=a} +function cIb(a){this.a=new DGe;this.c=new idd;this.d=new idd;this.b=a} +function Phc(a,b,c){this.b=b>-1?b:-1;this.a=ose(c,a.a.length);this.c=a} +function uRd(){tRd();this.a='Parse Program';this.b=(Fte(),Hib(fJe()))} +function VAc(){HAc();var a;a=new a1d(false);S_d(a);return F_d(a,false)} +function fjd(a,b){if(!a){return b}else if(!b){return a}return Tnd(a,b)} +function gjd(a,b){if(!a){return b}else if(!b){return a}return Xnd(a,b)} +function Trd(a){zf(a.a.f);if(!a.a.p){return null}return hsd(a.a.p,a.b)} +function iud(a){kf(a.a.size()!=1);return new jud(a.a.Bf(1,a.a.size()))} +function sIc(a){if(a.j==(h7d(),C6d)){return !!a.b&&!a.b.d}return false} +function CHd(a){if(nJd(a,0,(XMd(),xMd))){return ZId(a)}return BHd(a,1)} +function KZd(a,b){if(!a.b||!a.b.e){return null}return wL(NDe(a.b.e,b))} +function LZd(a){if(!a.d||!a.d.e){return lr(),lr(),kr}return uye(a.d.e)} +function PZd(a){if(!a.d||!a.d.f){return lr(),lr(),kr}return uye(a.d.f)} +function ZZd(a){if(!a.d||!a.d.r){return lr(),lr(),kr}return uye(a.d.r)} +function $Zd(a,b){if(!a.b||!a.b.j){return null}return wL(NDe(a.b.j,b))} +function XQb(a,b){var c;c=b.b-a.b;if(c!=0){return c}c=a.c-b.c;return c} +function v7b(a,b){var c,d;d=G7b(b);zf(!!d);c=d.e;w7b(a,d,b);FGb(a.a,c)} +function hjd(a){var b;b=new cld(a);Ykd(b,a.G);Zkd(b,a.G);return ald(b)} +function ECe(a){tJe(a.a36){return ''+a}return a.toString(b)} +function fIe(){fIe=cjb;bIe=new jIe;cIe=new mIe;dIe=new pIe;eIe=new sIe} +function Qsb(){Qsb=cjb;Msb=new Ysb;Psb=new Zsb;Osb=new $sb;Nsb=new _sb} +function X0b(){X0b=cjb;T0b=new $0b;V0b=new a1b;U0b=new b1b;W0b=new c1b} +function pXd(){pXd=cjb;lXd=new EXd;mXd=new IXd;nXd=new MXd;oXd=new QXd} +function Ac(){Ac=cjb;Qd();Uc();ad();sd();xd();od();hd();Md();Mc();Dd()} +function YJ(a){a&&dK((bK(),aK));--QJ;if(a){if(SJ!=-1){$J(SJ);SJ=-1}}} +function qFb(a){var b;if(a.T.zc){b=DFb(a);if(!Jse(b,a.N)){Fte();a.N=b}}} +function Wkb(a){var b;b=a.length-1;for(;b>=0&&(a[b]|0)==0;--b);return b} +function nnb(a,b){var c;Pnb((h7d(),e5d),b);for(c=b.b;c;c=c.d){Tnb(a,c)}} +function Cnb(a,b){var c;Pnb((h7d(),N5d),b);for(c=b.b;c;c=c.d){Bnb(a,c)}} +function inb(a,b){var c;Pnb((h7d(),D6d),b);for(c=b.b;c;c=c.d){_nb(a,c)}} +function Rnb(a,b){var c;Pnb((h7d(),m6d),b);for(c=b.b;c;c=c.d){Snb(a,c)}} +function Nnb(a,b){switch(b.j.g){case 29:Inb(b);break;case 26:unb(a,b);}} +function fNb(a,b,c){var d;kf(T1d(b));Vcd(a.b,(d=PBc(b),new qNb(b,d,c)))} +function hPb(){hPb=cjb;gPb=bc((dPb(),GK(yK(xV,1),PKe,346,0,[cPb,bPb])))} +function sJb(){sJb=cjb;rJb=bc((nJb(),GK(yK(CU,1),PKe,409,0,[lJb,mJb])))} +function GJb(){GJb=cjb;FJb=bc((BJb(),GK(yK(EU,1),PKe,408,0,[AJb,zJb])))} +function ECb(){ECb=cjb;CCb=new FCb('INHERITS',0);DCb=new FCb('MIXIN',1)} +function O$b(a,b){J$b();var c;this.a=a;this.b=(Qq(),c=new Zxe(b),Xs(c))} +function z8b(a,b){y8b();this.c=new RDe;this.d=new tEe;this.b=a;this.a=b} +function lpc(a){var b;jpc(this);b=a.a;this.b=b.b;this.d=Woc(a);this.c=a} +function Duc(a,b){var c;Guc(b)&&OCe(a.a,b);for(c=b.b;c;c=c.d){Duc(a,c)}} +function TAc(a){HAc();var b,c;c=1;for(b=a.b;b;b=b.d){c+=TAc(b)}return c} +function gmc(a){var b;b=a.tm().bl();if(!b){return ''}return SBc(b.yl())} +function v$b(a){var b,c;c=a.k;if(!c){return}b=c.sm();!!b&&B2d(a,b._k())} +function t7b(a,b,c,d){if(!b||b==c){return}t7b(a,b.d,c,d);u7b(a,b.b,c,d)} +function ZOc(a,b,c){SOc();this.a=a;this.c=b;this.b=new DGe;Ok(this.b,c)} +function y6c(a,b){o6c();pXc.call(this,a);p6c(this);this.b=null;this.a=b} +function CUb(a){this.a=a;eHb.call(this,'closureReplaceGetCssName',true)} +function BYb(){eHb.call(this,'deadPropertyAssignmentElimination',false)} +function GNb(a){return a.j==(h7d(),N4d)||(HAc(),a.j==I4d&&Y1d(a.b,sOe))} +function hzd(a,b){return Xxd(a.a,(h7d(),M4d),lyd(a.a,b.b),myd(a.a,b.a))} +function wzd(a,b){return Xxd(a.a,(h7d(),w5d),lyd(a.a,b.b),lyd(a.a,b.a))} +function vzd(a,b){return Xxd(a.a,(h7d(),a5d),myd(a.a,b.a),lyd(a.a,b.b))} +function FAd(a,b){return Xxd(a.a,(h7d(),e7d),lyd(a.a,b.b),myd(a.a,b.a))} +function GAd(a,b){return Xxd(a.a,(h7d(),f7d),lyd(a.a,b.b),myd(a.a,b.a))} +function uKd(a){while(Nqe($Jd(a,a.d)?Ese(a.e.a,a.d):0,16)>=0){_Jd(a)}} +function CWc(a){a=WIe(a);return VIe(Xse(a,'\\{\\d+\\}','\\\\E.*\\\\Q'))} +function Fld(a,b){kf(b.a.size()==1);return Ivd(a.nl(),b)||Ivd(a.gl(),b)} +function DYd(a,b){zf(NYd(a));zf(NYd(b));return new R2d((h7d(),w5d),a,b)} +function sbd(a,b){var c;c=tbd(a,b);if(c){return c}throw Aib(new Gcd(b))} +function zSd(a,b){if(!zL(b,33)){return false}return yxe(a.a,rL(b,33).a)} +function uwe(a){if(a.b==a.c){return}a.a=CK(agb,ZJe,1,8,5,1);a.b=0;a.c=0} +function iI(a,b){b.a.length==0?Vcd(a.i.c,null):Vcd(a.i.c,b);++a.b;a.c=0} +function H2d(a,b){z2d(a,b);_1d(a,40,F1d(b,40));a.i=b.i;a.c=b.c;return a} +function SHd(a){var b;aHd(a,(XMd(),cMd));b=BHd(a,1);aHd(a,hLd);return b} +function $G(a){if(a.g){a.backingJsObject!==gKe&&a.ag();a.f=null}return a} +function CDe(a){this.d=a;this.b=this.d.a.entries();this.a=this.b.next()} +function RDe(){JCe.call(this);KDe(this);this.b.b=this.b;this.b.a=this.b} +function AEe(a,b,c,d){var e;e=new _Ee;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b} +function sye(a){jye();var b;b=new SCe(1);b.a.put(a,b);return new DAe(b)} +function $w(a){Hw();var b;b=0;while(Hj(a)){Ij(a);b=Bib(b,1)}return MH(b)} +function Yse(a,b,c){var d;c=jte(c);d=new RegExp(b);return a.replace(d,c)} +function pA(a){if(!a.b.ye()){throw Aib(new lFe)}a.a=true;return a.b.ze()} +function PJ(){if(Date.now){return Date.now()}return (new Date).getTime()} +function WJ(b){TJ();return function(){return XJ(b,this,arguments);var a}} +function QJb(){MJb();return GK(yK(FU,1),PKe,305,0,[IJb,LJb,JJb,KJb,HJb])} +function Fjb(){Djb();return GK(yK(LR,1),PKe,316,0,[zjb,Cjb,Ajb,yjb,Bjb])} +function KMb(){IMb();return GK(yK(ZU,1),PKe,217,0,[FMb,EMb,HMb,DMb,GMb])} +function yKb(){vKb();return GK(yK(KU,1),PKe,273,0,[qKb,tKb,rKb,uKb,sKb])} +function ccd(){ccd=cjb;bcd=bc((Zbd(),GK(yK(n8,1),PKe,413,0,[Xbd,Ybd])))} +function hld(){hld=cjb;fld=(Qq(),kD(),jD);eld=(null,jD);gld=new _d('|')} +function BPc(){BPc=cjb;APc=new CPc(NMe,0);zPc=new CPc('ALL_UNQUOTED',1)} +function tZb(a){mZb.call(this,a,false);this.a=new Zx(16,2);this.b=new bu} +function ZUb(a){this.a=a;eHb.call(this,'latePeepholeOptimizations',true)} +function TSb(a){this.a=a;eHb.call(this,'instrumentForCodeCoverage',true)} +function gvc(a,b,c){this.a=a;_uc.call(this,a,b,c.b);zf(c.j==(h7d(),m4d))} +function RNb(a,b,c){var d;tf(b);tf(c);while(b.d!=c){d=u1d(b.d);l1d(a,d)}} +function xCb(a){var b;if(!a.a){return 0}b=a.a.e;return y1d(b)-A1d(b,a.a)} +function lBb(a,b){if(b.j==(h7d(),L4d)){return lBb(a,b.b)}return XDc(b.j)} +function s9b(a){if(a.j!=(h7d(),C6d)&&a.j!=m5d){return true}return z9b(a)} +function CDc(a){HAc();return a.j==(h7d(),r5d)&&!(a.j==r5d&&B1d(a,60)!=0)} +function VCc(a){HAc();return !!a&&(a.j==(h7d(),b7d)||a.j==T5d||a.j==S4d)} +function Ssc(a){var b;return !a.t?null:(HAc(),b=CBc(a.v),!b?null:G1d(b))} +function Vsb(a){var b;Usb(a);b=Ssb(a,a.f,a.b);QLb(a.c);PLb(a.c);return b} +function O1b(a,b){var c;a.a=false;c=new Q1b(a);lAc(a.b.a,b,c);return a.a} +function Bld(a,b){var c;c=Hvd(a.gl(),b);c.addAll(Hvd(a.nl(),b));return c} +function edd(a,b,c){var d;d=(vJe(b,a.a.length),a.a[b]);a.a[b]=c;return d} +function _cd(a,b,c){for(;c>=0;--c){if(nFe(b,a.a[c])){return c}}return -1} +function C_d(a,b){if(zZd(a.a,b)){a.e=true;return true}else{return false}} +function E_d(a,b){if(DZd(a.a,b)){a.e=true;return true}else{return false}} +function X_d(a,b){if(z$d(a.a,b)){a.e=true;return true}else{return false}} +function e0d(a,b){if(BZd(a.a,b)){a.e=true;return true}else{return false}} +function m0d(a){if(!j$d(a.a)){D$d(a.a);a.e=true;return true}return false} +function n0d(a){if(!k$d(a.a)){E$d(a.a);a.e=true;return true}return false} +function o0d(a){if(!l$d(a.a)){F$d(a.a);a.e=true;return true}return false} +function p0d(a){if(!m$d(a.a)){G$d(a.a);a.e=true;return true}return false} +function N0d(a,b){if(S$d(a.a,b)){a.e=true;return true}else{return false}} +function J0d(a,b){if(EZd(a.a,b)){a.e=true;return true}else{return false}} +function O0d(a,b){if(vZd(a.a,b)){a.e=true;return true}else{return false}} +function X0d(a,b){if(GZd(a.a,b)){a.e=true;return true}else{return false}} +function pvd(a){if(!a.a||a.a.a.a.size()==0){return a}return new svd(a.b)} +function Mrd(a){if(a.b.d.d.isEmpty()){return a.a.b}return ekd(a.a.b,a.b)} +function nGe(a,b){this.b=BKe;this.d=a;this.e=b;this.c=this.d+(''+this.e)} +function SIe(a,b){this.b=a;this.c=new $wnd.RegExp(a.source,'g');this.a=b} +function b2d(a,b){var c;c=b.d;uf(c,'no next sibling.');a2d(a,c);return c} +function O1d(a,b){var c,d;c=0;for(d=a.b;!!d&&c<=b;d=d.d){++c}return c==b} +function txe(a,b){var c,d;c=(d=a.slice(0,b),HK(d,a));c.length=b;return c} +function lMc(a,b){var c;kMc(a,b);for(c=b.b;c;c=c.d){zf(c.e==b);lMc(a,c)}} +function Nj(a,b,c){var d;d=rL(a.Be().get(b),32);return !!d&&d.contains(c)} +function lI(a,b){if(AI(a.a)&&CI(a.a)==b){BI(a.a);return true}return false} +function Ob(a){a.i=3;a.g=a.Od();if(a.i!=2){a.i=0;return true}return false} +function Jj(a){a.d=3;a.c=a.Od();if(a.d!=2){a.d=0;return true}return false} +function JK(a){var b,c,d;b=a&fMe;c=a>>22&fMe;d=a<0?gMe:0;return LK(b,c,d)} +function qEb(a,b){var c;for(c=b.b;c;c=c.d){zf(c.j==(h7d(),F6d));rEb(a,c)}} +function DZb(a,b){BZb.call(this,b,nZb(a.b));kf(a.j==(h7d(),m4d));this.a=a} +function GZb(a,b){BZb.call(this,b,nZb(a.b));kf(a.j==(h7d(),N4d));this.a=a} +function RZb(a,b){BZb.call(this,b,nZb(a.b));kf(a.j==(h7d(),r5d));this.b=a} +function exb(){$wb.call(this,'goog.asserts.assertInstanceof',(Lhe(),nhe))} +function xlb(){xlb=cjb;wlb=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[DMe,EMe,FMe])))} +function CUc(){AUc();return GK(yK(I5,1),PKe,333,0,[vUc,wUc,xUc,yUc,zUc])} +function Ow(a,b){Hw();return Vw(a,(Lf(),b==null?(fg(),dg):new Tf(b)))!=-1} +function B9b(a,b){SCc(b)&&++a.b;return !(a.e&&a.c.a.size()==a.d.a.size())} +function t8b(a){var b;if(!v8b(a)){return null}b=a.b.b;return new s8b(b,a)} +function Sjc(a){if(!a.f){return jye(),jye(),iye}return jye(),new DAe(a.f)} +function Wbc(a,b){if(b.i!=(Bfe(),zfe)&&!!a.a){nee(b,a.a,null);Sde(b,a.a)}} +function RI(a,b,c){c||(a.a+=',\n',a);a.a+='"';a.a+=''+b;a.a+='"';a.a+=':'} +function C0b(a){var b;b=!a.d;a.d=true;a.f=null;a.g=null;a.c=null;return b} +function cyc(a,b){var c;c=a.C.d.i;!c?(c=b):a.t&&(c=emd(c,c.e.i));return c} +function Ric(a,b){var c,d;d=new Sic(b);c=new pBb(d);XAb(c,a,4);return d.b} +function cTc(a,b){var c;c=b.Lm();if(!PCe(a.a.c,c)){Vcd(a.a.k,b);bTc(a,c)}} +function Wrd(a,b){var c;c=Eud(a.a,b);if(!c){return null}return emd(c,a.b)} +function vTc(a,b){if(a.a!=b.a){return b.a-a.a}return BTc((iTc(),hTc,a),b)} +function Yrd(a,b){kf(b.a.size()==1);return Nud(a.a,wL(b.a.getAtIndex(0)))} +function $ed(a,b){pf(MDe(a.a,b),ORe,b);return _ed(a,rL(NDe(a.a,b),389)).a} +function EYd(a,b){zf(NYd(a));zf(b.j==(h7d(),L6d));return new R2d(x5d,a,b)} +function IYd(a,b){zf(NYd(a));zf(b.j==(h7d(),F4d));return new R2d(B5d,a,b)} +function jZd(a,b){zf(b.j==(h7d(),F4d));zf(NYd(a));return new R2d(e7d,a,b)} +function WZd(a,b){if(!a.d||!a.d.n){return null}return rL(NDe(a.d.n,b),56)} +function kpc(a,b){return a.d.containsKey(b)?rL(a.d.get(b),226):t6c(a.b,b)} +function _2d(a,b){return a<0||b<0?-1:(b&-4096)!=0?a<<12|kMe:a<<12|b&kMe} +function dge(a,b){return Fse(a.Um(new zte,false).a,b.Um(new zte,false).a)} +function Tse(a){return (new RegExp('^(window.[A-Z][A-Za-z]+)$')).test(a)} +function Iq(a,b){return Hq((lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[a,b])))))} +function hw(a,b){return Hq((lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[a,b])))))} +function KDc(a){HAc();return H2d((Af(NYd(a),a),new P2d((h7d(),m5d),a)),a)} +function DNd(){BNd();return GK(yK(kbb,1),PKe,302,0,[wNd,zNd,yNd,ANd,xNd])} +function B_d(){z_d();return GK(yK(geb,1),PKe,197,0,[w_d,v_d,x_d,y_d,u_d])} +function FIe(a,b,c){var d;b.Bo()>=(EIe(a),800)&&(d=new AIe(b,c),BIe(a,d))} +function ylb(a){var b;b=new kdd(new nve(a.j));Xcd(b,new nve(a.n));return b} +function sD(a,b){var c;c=false;while(b.Pd()){c=c|a.remove(b.Qd())}return c} +function KKb(a,b){var c,d;for(d=b.$d();d.Pd();){c=rL(d.Qd(),169);JKb(a,c)}} +function Nkb(a,b){var c;Skb(b);c=b/31|0;Ykb(a.b,c);a.b[c]=a.b[c]|0|1<b){throw Aib(new sqe('Index: '+a+', Size: '+b))}} +function CJe(a,b,c){if(a<0||b>c||b 0'))}return a} +function CK(a,b,c,d,e,f){var g;g=DK(e,d);e!=10&&GK(yK(a,f),b,c,e,g);return g} +function mG(a,b,c){var d;d=CK(LL,qKe,17,c,15,1);b>0&&Gte(a,0,d,0,b);return d} +function cpb(a,b){var c;Uh(a.a);a.c=a.b.b;c=s1d(b,false);apb(a,b,c);return a} +function _Jb(a){switch(a.g){case 0:case 1:return false;default:return true;}} +function jdd(a){Tcd(this);nJe(a>=0,'Initial capacity must not be negative')} +function QLb(a){uf(a.i,'Popping node annotations without pushing.');ULb(a.i)} +function PLb(a){uf(a.g,'Popping edge annotations without pushing.');ULb(a.g)} +function GGb(a){if(a.f){zf(a.f.j==(h7d(),F6d)||a.f.j==r5d);BGb(a,a.f)}mGb(a)} +function tGb(a){if(a.T.hd){$Gb(a);pIb(a.T,(wEd(),oEd))&&YGb(a)}else{sFb(a)}} +function TMb(a,b){QMb();if(b.j!=(h7d(),_5d)){return null}return a._j(b.Lm())} +function dJb(){dJb=cjb;cJb=bc(($Ib(),GK(yK(AU,1),PKe,345,0,[YIb,XIb,ZIb])))} +function Zad(){Zad=cjb;Yad=bc((Tad(),GK(yK(c8,1),PKe,363,0,[Rad,Qad,Sad])))} +function tac(){rac();return GK(yK(j_,1),PKe,189,0,[pac,oac,nac,qac,mac,lac])} +function zec(){xec();return GK(yK(L_,1),PKe,285,0,[rec,uec,sec,tec,wec,vec])} +function lrc(a){var b;b=new kdd(new nve(a.b));qye(b);return jye(),new qze(b)} +function gJe(){gJe=cjb;new kJe;new iJe('ISO-LATIN-1');new iJe('ISO-8859-1')} +function kvc(){kvc=cjb;jvc=new lvc('REGULAR',0);ivc=new lvc('INHERITANCE',1)} +function ycd(){ycd=cjb;xcd=new zcd('','',(lr(),lr(),kr),(null,kr),(_C(),$C))} +function bRb(a,b,c){a.Ec=new m7c(b);a.Hc=new mrc(a.Ec);a.Gc=krc(a.Hc,c,null)} +function Avb(a,b,c){this.a=new idd;this.b=new idd;this.c=a;this.d=b;this.e=c} +function Gdc(a,b,c){this.f=new idd;this.i=new JCe;this.a=a;this.c=b;this.j=c} +function OD(a,b,c){ku.call(this,tye(tf(a),tf(b)));this.b=a;this.c=b;this.a=c} +function ZYd(a,b){zf(a.j==(h7d(),M6d));zf(!a.b);zf(NYd(b));m1d(a,b);return a} +function U4c(a,b,c){if(b.j==(h7d(),m6d)){return T4c(a,b,c)}return N4c(a,b,c)} +function eae(a,b,c,d){if(!D7d(a.b,b.b,c,d)){return false}return fae(a,b,c,d)} +function G0d(a,b,c){if(CZd(a.a,b,c)){a.e=true;return true}else{return false}} +function Q0d(a,b,c){if(FZd(a.a,b,c)){a.e=true;return true}else{return false}} +function U0d(a,b,c){if(xZd(a.a,b,c)){a.e=true;return true}else{return false}} +function yZd(a,b){if(YZd(a).isEmpty()){U$d(a,b,lKe);return true}return false} +function aod(a,b){hld();if(!a){return b}else if(!b){return a}return Tnd(a,b)} +function G2c(a,b,c){var d;if(c==a.b){return c}d=Xoc(c);d=W2c(a,b,d);return d} +function JFe(a,b){var c;c=sUd(a.a,b);if(c==null){throw Aib(new kFe)}return c} +function yGe(a,b){var c;c=new aHe;c.c=true;c.d=b.te();return zGe(a,b.se(),c)} +function rCe(a){var b;b=rL(YIe(a.b,a.b.length),21);return new wCe(a.a,b,a.c)} +function pl(a,b){var c;c=b.se();return aB(),new tu(c,hk(a.b,c,rL(b.te(),32)))} +function Pv(a){Kv();return aB(),new EGe((zL(a,253)?rL(a,253):new Tp(a)).tf())} +function cu(a){Mo.call(this,(aB(),new KCe(cB(a))));au(this);kf(true);this.a=1} +function SDe(a){oue.call(this,a,0);KDe(this);this.b.b=this.b;this.b.a=this.b} +function _ie(a,b,c){A7d();see.call(this,a,gNe,null,b,c,null,true,true,false)} +function e8b(a,b,c){var d;b8b.call(this,a,b,c);d=G1d(c);d!=null&&iue(a.i,d,b)} +function Nnc(a,b,c,d){Mnc.call(this,a,b,b?W2d(b.i):-1,b?V2d(b.i):-1,c,null,d)} +function ukb(a,b,c,d){DGb(a.a,Rnc(b,(I0b(),H0b),GK(yK(fgb,1),pKe,2,6,[c,d])))} +function R3b(a,b,c,d){var e;b.j==c&&d.add(b);for(e=b.b;e;e=e.d){R3b(a,e,c,d)}} +function anb(a,b){var c;Pnb((h7d(),F4d),b);for(c=b.b;c;c=c.d){bob(a,c,false)}} +function z7b(a,b,c){return b.j==(h7d(),_5d)&&(mCc(b,a.e)||c.contains(b.Lm()))} +function _he(a,b){return iie(a,GK(yK(Web,1),oTe,9,0,[b,sie(a,(Lhe(),bhe))]))} +function tkd(a){return new ukd(a.a,a.i,a.e,a.j,a.k,a.d,a.a.G,a.f,a.n,a.c,a.b)} +function jzc(a){return a.a.a.a.length>=2?rL(NFe(a.a,a.a.a.a.length-2),5):null} +function OAb(a){return a==95||a==36||/[A-Z\d]/i.test(String.fromCharCode(a))} +function Tkb(a){if(a<0||0>a){throw Aib(new sqe('fromIndex: 0, toIndex: '+a))}} +function vJe(a,b){if(a<0||a>=b){throw Aib(new sqe('Index: '+a+', Size: '+b))}} +function WRc(a,b,c){if(a.k){tf(c);a.d=new tSc(a.g,c)}_Rc(a,b);!!a.d&&kSc(a.d)} +function H$c(a,b,c){var d,e,f;d=c.Lm();e=Hzc(b);f=e._j(d);return PCe(a.a.f,f)} +function bBd(a,b){if(b==(wCd(),bCd)){a.g=($Bd(),YBd);return b}return aBd(a,b)} +function ECc(a){HAc();switch(a.j.g){case 86:case 87:return true;}return false} +function ZEb(a,b){switch(a.g){case 2:b.db=true;b.f=true;b.Hb=true;b.Dd=true;}} +function ZNd(a,b,c,d){dNd.call(this,(GQd(),DPd),a);this.c=b;this.b=c;this.a=d} +function INd(a,b,c,d){dNd.call(this,(GQd(),lPd),a);this.c=b;this.b=c;this.a=d} +function YNd(a,b,c,d){dNd.call(this,(GQd(),CPd),a);this.c=b;this.b=c;this.a=d} +function MNd(a,b,c,d){dNd.call(this,(GQd(),pPd),a);this.a=b;this.b=c;this.c=d} +function mNd(a,b,c,d){dNd.call(this,(GQd(),$Od),a);this.a=b;this.b=c;this.c=d} +function XQd(a,b,c,d){dNd.call(this,(GQd(),sQd),a);this.a=b;this.b=c;this.c=d} +function KNd(a,b,c,d){dNd.call(this,(GQd(),nPd),a);this.a=b;this.c=c;this.b=d} +function yOd(a,b,c,d){dNd.call(this,(GQd(),KPd),a);this.a=b;this.c=c;this.b=d} +function cRd(a,b,c,d){dNd.call(this,(GQd(),zQd),a);this.b=b;this.c=c;this.a=d} +function eRd(a,b,c,d){dNd.call(this,(GQd(),AQd),a);this.c=b;this.a=c;this.b=d} +function dZd(a,b){var c;zf(NYd(b));c=new T3d((h7d(),M6d),a);m1d(c,b);return c} +function xQc(a){var b;b=a.e;return HAc(),(b.j==(h7d(),q5d)||b.j==p5d)&&b.b==a} +function x0d(a){if(p$d(a.a)){return false}else{N$d(a.a);a.e=true;return true}} +function u0d(a){if(n$d(a.a)){return false}else{K$d(a.a);a.e=true;return true}} +function v0d(a){if(o$d(a.a)){return false}else{L$d(a.a);a.e=true;return true}} +function H0d(a){if(q$d(a.a)){return false}else{Q$d(a.a);a.e=true;return true}} +function I0d(a){if(r$d(a.a)){return false}else{R$d(a.a);a.e=true;return true}} +function Z0d(a){if(u$d(a.a)){return false}else{W$d(a.a);a.e=true;return true}} +function U_d(a){if(h$d(a.a)){return false}else{y$d(a.a);a.e=true;return true}} +function nEe(a){yBe(a.c.a.c,a);tJe(a.b!=a.c.a.b);a.a=a.b;a.b=a.b.a;return a.a} +function m2d(a,b){var c;c=f2d(a,a.g,53);c!=a.g&&(a.g=c);a.g=new A3d(53,b,a.g)} +function K1d(a,b){var c;for(c=a.b;c;c=c.d){if(b==c){return true}}return false} +function c0d(a,b){if(!!b&&pZd(a.a,b)){a.e=true;return true}else{return false}} +function i0d(a,b){if(!!b&&qZd(a.a,b)){a.e=true;return true}else{return false}} +function HK(a,b){zK(b)!=10&&GK(yb(b),b.Oo,b.__elementTypeId$,zK(b),a);return a} +function vxe(a,b,c){var d,e;e=a.length;d=c=c;e--){if(a[e]==b){return e}}return -1} +function fk(a,b){var c,d;c=rL(iB(a.c,b),32);if(c){d=c.size();c.clear();a.d-=d}} +function bnb(a,b){var c;Pnb((h7d(),I4d),b);Gnb(b);for(c=b.b;c;c=c.d){rnb(a,c)}} +function Onb(a,b){var c;Pnb((h7d(),f6d),b);Gnb(b);for(c=b.b;c;c=c.d){rnb(a,c)}} +function NCb(a){return a.j==(h7d(),m4d)&&Y1d(a.b,bOe)&&(a.b?a.b.f:null).j==U6d} +function wjc(a){tf(a);return a.j==(h7d(),Y4d)&&(HAc(),!!nBc(a.e,new vEc(Y4d)))} +function Dxd(){Axd();return GK(yK(rab,1),PKe,248,0,[uxd,vxd,wxd,xxd,yxd,zxd])} +function Zcc(){Zcc=cjb;Ycc=GK(yK(fgb,1),pKe,2,6,[bOe,'top','goog$global',mOe])} +function syc(a,b){if(b.j!=(h7d(),I4d)){return false}return T1d(b.b)&&a.B.Ah(b)} +function rDc(a,b){HAc();return a.j==(h7d(),X6d)&&O1d(a,3)&&b==(a.b?a.b.f:null)} +function mBc(a){HAc();while(!!a&&!(a.j==(h7d(),F6d)||a.j==r5d)){a=a.e}return a} +function Shd(a){if(!!a.b&&!a.b.d&&a.b.j==(h7d(),V6d)){return true}return false} +function lGb(a){a.T.wd!=(vKb(),sKb)&&!!a.eb&&qKc(a.eb,KPe,true);return new z_c} +function ojd(a){var b;b=new tEe;ie(b,a.C.keySet());ie(b,new dve(a.D));return b} +function qJc(a,b,c,d){(c.b?c.b.f:null).Qm('charAt');u1d(d.d);GGb(a.c);return b} +function Bud(a){var b;b=new tEe;ie(b,new dve(a.c));ie(b,new dve(a.k));return b} +function tvd(a,b){ovd(this);zf((new yue(a.a)).a.size()>=100);this.b=a;this.a=b} +function ycc(a){this.c=new Gcc(this);this.a=a;this.b=!a.t?new tEe:new vEe(a.t)} +function RQb(){JQb();var a;KQb(this);a=new SCe(cB(0));QQb(this,a,'',null,null)} +function QZb(a,b,c){LZb();MZb.call(this,b,c);kf(a.j==(h7d(),r5d));kf(b.j==_5d)} +function BAd(a,b){var c,d;d=Gyd(b.b.c);c=lyd(a.a,b.a);return Jyd(a,d,b.c==1,c)} +function L7d(a,b,c){var d;d=c?new lge(true):new lge(false);return D7d(a,b,0,d)} +function MBd(a,b,c,d,e){var f,g;if(d){g=a.i.g;f=CCd(a.i);M_d(a.e,d,b,c,g,f,e)}} +function mfd(a,b,c,d,e){return {file:a,description:b,type:c,lineNo:d,charNo:e}} +function nie(a,b){return MDe(a.c,b)?rL(NDe(a.c,b),59).values():(lr(),lr(),kr)} +function K7d(a){return a.sn()||a.qn()||a.rn()||rL(sie(a.F,(Lhe(),Zge)),68)==a} +function xld(a){return a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null} +function xkc(a){var b,c;for(c=a.a.t.$d();c.Pd();){b=wL(c.Qd());iue(a.c,b,ukc)}} +function Mu(a,b){var c,d;for(d=b.$d();d.Pd();){c=rL(d.Qd(),12);Lu(a,c)}return a} +function JAd(a,b){var c;c=$xd(a.a,(h7d(),P5d),b.a);jyd(c,b.b.b,b.b.a);return c} +function nl(a,b){var c;c=rL(hB(a.a,b),32);if(!c){return null}return hk(a.b,b,c)} +function tD(a,b){var c;uf(a,'set1');uf(b,'set2');c=oD(b,a);return new zD(a,c,b)} +function JI(a,b,c,d){var e,f;LI(a,b,c);e=new fI;f=sJ(d);bI(e,f);eI(e,new TI(a))} +function prb(){prb=cjb;mrb=new qrb(qMe,0);orb=new qrb(rMe,1);nrb=new qrb(NMe,2)} +function pye(a){jye();nJe(a.d.c+a.e.c==0,'map is not empty');return new _ye(a)} +function akd(a){kf(!(a==a.a.v||a==a.a.g));return a.j?eKe:a.i.size()+a.e.size()} +function w$d(a,b){if(b.d){!a.d&&(a.d=new g_d);a.d.o|=(!b.d?null:Zre(b.d.o)).a}} +function qAb(a,b){return !!b&&b.j==(h7d(),_5d)&&Jse(a.ji(),b.Lm())&&!UCc(b,b.e)} +function Xnb(a,b){var c;b.j==(h7d(),c5d)?(c=y1d(b),0!=c&&nob(OMe+c,b)):rnb(a,b)} +function Egc(a,b){var c;c=Psc(a.b.d.g,bOe);if(c){$1d(b.e,76,true);Bsc(a.a,b,c)}} +function fu(a){var b;a=a>2?a:2;b=Rre(a);if(a>b){b<<=1;return b>0?b:mKe}return b} +function MCb(a){var b,c;c=a.ji();b=Rse(c,hte(47));return b==-1?'':c.substr(0,b)} +function d0b(a,b){gue(a.g,b)||iue(a.g,b,new E0b(a,b));return rL(fue(a.g,b),516)} +function SUc(a,b){var c;JL(fue(a.b,b));b=Vse(b,36,46);c=JL(fue(a.b,b));return c} +function lsc(a,b){var c;if(!zL(b,221)){return false}c=rL(b,221);return c.b==a.b} +function Xsc(a,b){var c;kf(b.indexOf('.')==-1);c=Isc(a,b,false);return !!c&&c.b} +function Lx(a){var b;if(!a.a){return a.b.Qd()}b=a.c;a.a=false;a.c=null;return b} +function _Bb(a,b,c){if(b){return 2}if(c||mIb(a)==($Jb(),UJb)){return 1}return 0} +function Nvd(a,b){Af(T1d(a),a);this.a=a;this.b=(Svd(),Qvd);this.c=null;this.d=b} +function Nlb(a,b,c,d,e,f){this.b=a;this.f=b;this.c=c;this.a=d;this.e=e;this.d=f} +function gEd(a,b,c,d,e,f){$b.call(this,a,b);this.d=c;this.c=d;this.b=e;this.a=f} +function dE(a){this.d=a;this.c=new pEe(new gEe(this.d.a));this.a=(Hw(),Hw(),Gw)} +function XEb(){XEb=cjb;WEb=new _Eb(tPe,0);VEb=new _Eb(uPe,1);UEb=new _Eb(vPe,2)} +function TIc(a,b){if(OBc(b)==(Vne(),Tne)){h2d(b,new N2d((h7d(),c5d)));GGb(a.c)}} +function Xyd(a,b){Uyd(a,b,(BFd(),KEd));return Wxd(a.a,(h7d(),W4d),lyd(a.a,b.a))} +function _yd(a,b){Ryd(a,b,(BFd(),LEd));return Wxd(a.a,(h7d(),A6d),nyd(a.a,b.a))} +function jAd(a,b){Ryd(a,b,(BFd(),tFd));return Wxd(a.a,(h7d(),J6d),lyd(a.a,b.a))} +function KWd(a,b){return b.a?IUd(a.a,b.b):b.b?EUd(a.a,(Lhe(),Khe)).$m(b.b):null} +function OWd(a,b){return b.a?b.b?EUd(a.a,(Lhe(),bhe)).$m(b.b):null:HUd(a.a,b.b)} +function x2c(a,b,c){var d;d=M2c(a,b,c);d&&(c=C1d(b.b).On());l3c(a,b,c);j3c(a,b)} +function iRb(a,b,c,d){var e,f;e=Zcd(a,b,0);f=Zcd(a,c,0);e!=-1&&f!=-1&&Af(e>>c;a[b]=d&eKe} +function LCd(a){if((a&57296)!=0){return false}return a==10||a==13||a==jPe||a==kPe} +function g0d(a){if((a.a.a&8)!=0){return false}else{a.a.a|=8;a.e=true;return true}} +function nRd(a){if(!a.d){return ''}return wL(mw(Ig(Pg((Ac(),new ld(47))),a.d.c)))} +function oJe(a,b){if(!a){throw Aib(new ooc(FJe('Enum constant undefined: %s',b)))}} +function qf(a,b,c,d){if(!a){throw Aib(new ooc(Jf(b,GK(yK(agb,1),ZJe,1,5,[c,d]))))}} +function Gf(a,b,c,d){if(!a){throw Aib(new Ire(Jf(b,GK(yK(agb,1),ZJe,1,5,[c,d]))))}} +function HKd(a,b,c,d){this.b=new LEe;this.c=a;this.a=b;this.e=c;this.d=d;this.f=0} +function SNb(a,b,c){QNb();this.c=new Owe;this.e=new idd;this.a=a;this.d=b;this.b=c} +function vtb(a,b,c){ttb();this.c=new idd;this.b=new RCe;this.a=a;this.e=b;this.d=c} +function PPb(){DJ.call(this,'Analysis did not terminate after 800000 iterations')} +function Gzc(a){var b,c;b=a.e;while(b){c=W2d(b.i);if(c>=0){return c}b=b.e}return 0} +function jhc(a,b){var c;c=khc(a,b);if(!c||$ld(c,(Yfc(),xfc))){return null}return c} +function su(a,b){var c,d;tf(b);for(d=b.$d();d.Pd();){c=d.Qd();a.Of(tf(c))}return a} +function YC(a,b){var c,d,e;e=0;for(d=a.$d();d.Pd();){c=d.Qd();FK(b,e++,c)}return b} +function oSc(a,b){var c,d;d=iZb(a.b,b);tf(d);c=d.a;zf(!d.b);zf(c.Bi()==b);return c} +function bzb(a){var b;kf(a.j==(h7d(),M6d));if(!a.b){b=H2d(RYd(a.Lm()),a);l1d(a,b)}} +function Yzc(a){var b;b=a.f;zf(!!b&&(HAc(),b.j==(h7d(),F6d)||b.j==r5d));EGb(a.c,b)} +function gCc(a){HAc();var b;b=a.e;return !!b&&(b.j==(h7d(),I4d)||b.j==f6d)&&b.b!=a} +function IBc(a){HAc();var b;b=JBc(a);if(b){return b.Lm()}throw Aib(new Ire(RNe+a))} +function eEc(a,b,c){HAc();var d;if(c.Td(a)){for(d=a.b;d;d=d.d){eEc(d,b,c)}}b.Rg(a)} +function B5c(a,b,c){c.vn()||U5c(a,b,'instanceof requires an object',c,(Lhe(),nhe))} +function pie(a,b){var c;c=zL(b.k,9)?rL(b.k,9):null;return !c?sie(a,(Lhe(),Hhe)):c} +function mId(a){var b,c;c=eKd(a.g,0).b.b;b=bHd(a);return new xOd(new qRd(c,a.f),b)} +function wId(a){var b,c;c=eKd(a.g,0).b.b;b=nHd(a);return new EOd(new qRd(c,a.f),b)} +function LXd(a){var b;if(!a.a||!a.b){return null}return b=a.a.$m(a.b),new Age(b,b)} +function ppd(a,b,c,d){if(!b){return null}return Cpd(a,(hNe&b.a)==mNe?b.i:null,c,d)} +function ktc(a,b){kf(b.indexOf('.')==-1);return !$sc(a,b,false)&&!!a.t&&ntc(a.t,b)} +function Psc(a,b){var c;kf(b.indexOf('.')==-1);c=Isc(a,b,false);return !c?null:c.d} +function NDe(a,b){var c;c=rL(eue(a.c,b),304);if(c){PDe(a,c);return c.e}return null} +function A1d(a,b){var c,d;d=a.b;c=0;while(d){if(b==d){return c}d=d.d;++c}return -1} +function aSd(a,b){var c,d;c=YRd(a);b.b=c;if(c==116||c==84){d=YRd(a);b.c=d}return b} +function hAd(a,b){var c;c=Vxd(a.a,(h7d(),C6d));!!b.a&&l1d(c,lyd(a.a,b.a));return c} +function j3d(a){var b;if(!a.a.a){throw Aib(new lFe)}b=a.a.a;a.a.a=a.a.a.e;return b} +function tFe(a){var b;b=a.b.a.length==0?null:Ycd(a.b,0);b!=null&&uFe(a,0);return b} +function ope(a){if(!a.j){a.j=spe(a);!a.j&&(a.j=new Eoe(a.i,ur(ppe(a))))}return a.j} +function bx(a){Hw();var b;tf(a);if(zL(a,163)){b=rL(a,163);return b}return new ox(a)} +function _I(a,b){var c,d,e,f;e=a.a.b;f=b.e.b;c=a.a.a;d=b.e.a;return e==f&&c>=d||e>f} +function L_d(a,b,c,d,e,f){var g;if(a.b){g=new p_d;g.d=b;sYc(g,c,d,e,f);i_d(a.b,g)}} +function dK(a){var b,c;if(a.b){c=null;do{b=a.b;a.b=null;c=gK(b,c)}while(a.b);a.b=c}} +function cK(a){var b,c;if(a.a){c=null;do{b=a.a;a.a=null;c=gK(b,c)}while(a.a);a.a=c}} +function V_b(a){var b;this.b=a;this.c=CFb(this.b);b=this.c.jh();this.a=(Qq(),Xs(b))} +function rjb(){rjb=cjb;ojb=new sjb(pMe,0);qjb=new sjb('OTI',1);pjb=new sjb('NTI',2)} +function AKb(){AKb=cjb;zKb=bc((vKb(),GK(yK(KU,1),PKe,273,0,[qKb,tKb,rKb,uKb,sKb])))} +function nf(a,b,c){if(!a){throw Aib(new ooc(Jf(b,GK(yK(agb,1),ZJe,1,5,[Zre(c)]))))}} +function mf(a,b,c){if(!a){throw Aib(new ooc(Jf(b,GK(yK(agb,1),ZJe,1,5,[Xqe(c)]))))}} +function Bf(a,b,c){if(!a){throw Aib(new Ire(Jf(b,GK(yK(agb,1),ZJe,1,5,[Zre(c)]))))}} +function fEc(a,b,c){HAc();var d;b.Rg(a);if(c.Td(a)){for(d=a.b;d;d=d.d){fEc(d,b,c)}}} +function RBc(a){HAc();var b;b=null;while(!b&&!!a){b=rL(F1d(a,51),28);a=a.e}return b} +function gMb(a,b,c,d){var e,f;e=rL(OLb(a,b),87);f=rL(OLb(a,d),87);return fMb(e,c,f)} +function Zic(a,b){var c;c=rL(NDe(a.f,b),219);if(!c){c=new Yjc;ODe(a.f,b,c)}return c} +function Ukd(a){if(a.j);else a.e.a.length==0?Vcd(a.i,a.a.G):Vcd(a.e,a.a.G);return a} +function Xec(a,b){a.g=new stc(b,null,(lr(),lr(),kr),a.d);Fsc(a.g,a.p);Vcd(a.n,a.g)} +function Ddc(a,b,c,d,e){(e.j==(h7d(),_5d)||e.j==x5d)&&Ddc(a,b,c,d,e.e);Mdc(b,c,d,e)} +function nBd(a,b,c,d,e,f){var g;f?(g=JBd(a,b)):(g=GBd(a,b));MBd(a,c,d,g,e);return g} +function N5c(a,b,c,d){if(!c.Gn()){U5c(a,b,d,c,(Lhe(),nhe));return false}return true} +function dec(a){var b;if(!a.g){b=a.d;!!b&&(a.g=mec(b))}return !!a.g&&(a.g.a&nNe)!=0} +function Xrd(a){var b;zf(a.a.f);return b=rL(Xk(Nk(a.a.D,KMe,false)),52),!b?null:b.b} +function PHd(a,b){var c;c=(lr(),new Fu);while(rJd(a)){Du(c,OHd(a,b))}return ur(c.a)} +function xXd(a,b,c,d){var e;e=JUd(a,b,c);if(e){return zXd(a,c,b,e,e.bn(d))}return c} +function zXd(a,b,c,d,e){var f;if(!!e&&e!=d){f=Xoc(b);CUd(a,f,c,e);return f}return b} +function f0d(a){if((a.a.a&32)!=0){return false}else{a.a.a|=32;a.e=true;return true}} +function E0d(a){if((a.a.a&64)!=0){return false}else{a.a.a|=64;a.e=true;return true}} +function Yie(a){var b,c;c=new jdd(5);for(b=a;b;b=b.ao()){c.a[c.a.length]=b}return c} +function CCe(a){var b;++a.a;for(b=a.c.a.length;a.a0){return eKe}if(Dib(a,lKe)<0){return lKe}return Tib(a)} +function fuc(b){Mtc();tf(b);try{Zte()}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}} +function TDe(a){JCe.call(this);KDe(this);this.b.b=this.b;this.b.a=this.b;Ok(this,a)} +function OJd(a,b){this.d=a==5;this.a=!(a==0||a==1);this.b=a==4;this.c=b;this.e=a==0} +function q_c(){this.a=new JCe;this.b=new JCe;this.c=new s_c(new t_c('-beginning-'))} +function Fub(a){vub();this.a=a;this.b=new TCe(new Zxe(GK(yK(fgb,1),pKe,2,6,['cr'])))} +function hc(a,b){var c;wJe(b);c=a[':'+b];oJe(!!c,GK(yK(agb,1),ZJe,1,5,[b]));return c} +function _mb(a,b){var c;c=y1d(b);2!=c&&nob(RMe+c,b);rnb(a,b.b);rnb(a,b.b?b.b.f:null)} +function t9b(a){var b,c;b=x9b(a);c=new RCe;return u9b(a.b?a.b.f:null,null,b,c,false)} +function D9b(a,b){var c;if(b.j==(h7d(),_5d)){c=b.Lm();return PCe(a.a,c)}return false} +function wDc(a){HAc();switch(a.g){case 63:case 64:return true;default:return false;}} +function Tsc(a,b){var c,d;d=(c=Hsc(a,new kud(b),false),!c?null:c.a);zf(!!d);return d} +function t3c(a){!a.b&&(a.c==a.d?(a.b=a.d):(a.b=rL(rPb(a.e,a.c,a.d),269)));return a.b} +function ZAc(a,b){HAc();var c;c=a.e;EDc(a,b);tf(a.e);a2d(a.e,a);BGb(b,AFb(c));mGb(b)} +function Vdd(a,b){var c;c=eMb(a.b,b);zf(c.ug()!=Sdd);c.vg(Sdd);Pcd(new Rcd(a),a.b,b)} +function uRb(a){var b,c;for(c=new lxe(a);c.a>>b%31&1)==1} +function tRb(a){var b,c;for(c=new lxe(a);c.a=14&&b<=16)));return a} +function hUd(a){var b;if(a<0){throw Aib(new zqe)}b=1;while(a>=10){++b;a=a/10|0}return b} +function e1d(a,b,c){var d;if(c){d=The(c,a.a,a.b,b,true);o2d(a.a,d);return d}return null} +function djb(a,b,c){var d=function(){return a.apply(d,arguments)};b.apply(d,c);return d} +function Fue(a){var b;yBe(a.e,a);tJe(a.b);a.c=a.a;b=rL(a.a.Qd(),12);a.b=Eue(a);return b} +function j0d(a){if((a.a.a&8192)!=0){return false}else{a.a.a|=8192;a.e=true;return true}} +function tre(a,b){var c;if(!a){return}b.n=a;var d=nre(b);if(!d){_ib[a]=[b];return}d.No=b} +function Bc(a,b){var c,d;c=0;for(d=0;d=0);if(Iwe(a.d,a.c)<0){a.a=a.a-1&a.d.a.length-1;a.b=a.d.c}a.c=-1} +function zOd(a,b,c,d,e){dNd.call(this,(GQd(),LPd),a);this.a=b;this.b=c;this.d=d;this.c=e} +function wOd(a,b,c,d,e){dNd.call(this,(GQd(),IPd),a);this.c=b;this.b=c;this.d=d;this.a=e} +function COd(a,b,c,d,e){dNd.call(this,(GQd(),OPd),a);this.c=b;this.b=c;this.d=d;this.a=e} +function qNd(a,b,c,d,e){dNd.call(this,(GQd(),cPd),a);this.c=b;this.b=c;this.a=d;this.d=e} +function JNd(a,b,c,d,e){dNd.call(this,(GQd(),mPd),a);this.d=b;this.c=c;this.a=d;this.b=e} +function LNd(a,b,c,d,e){dNd.call(this,(GQd(),oPd),a);this.d=b;this.b=c;this.c=d;this.a=e} +function $Nd(a,b,c,d,e){dNd.call(this,(GQd(),EPd),a);this.d=b;this.b=c;this.c=d;this.a=e} +function zRd(a,b){DJ.call(this,'ConvertionType = '+String.fromCharCode(a)+' class = '+b)} +function pc(a,b){return a==ic?Vb(b):b.length==0?b:xL(Wb(b.charCodeAt(0)))+Vb(b.substr(1))} +function CHb(a){return a.c.a.length>_Je.length&&Jse(_Je,lqe(a.c,a.c.a.length-_Je.length))} +function fEe(a,b){var c;if(eEe(a,b)){c=rL(b,12).se();QDe(a.a,c);return true}return false} +function zib(a){var b;if(zL(a,70)){return a}b=a&&a[fKe];if(!b){b=new KJ(a);jK(b)}return b} +function Vre(a){var b,c;if(a==0){return 32}else{c=0;for(b=1;(b&a)==0;b<<=1){++c}return c}} +function Fp(a,b){if(a<0){throw Aib(new ooc(b+' cannot be negative but was: '+a))}return a} +function xh(a){tf(a);if(zL(a,42)){throw Aib(rL(a,42))}if(zL(a,146)){throw Aib(rL(a,146))}} +function V6b(a){this.c=new jh(rL(tf(new $6b(this)),193));this.b=a;this.a=(rjb(),pjb)==a.R} +function iNb(){this.c=new RCe;this.d=new RCe;this.e=new RCe;this.a=new idd;this.b=new idd} +function Jzb(){this.p=new RCe;this.a=new LEe;this.n=new JCe;this.k=new RCe;this.f=new JCe} +function $8b(a,b,c,d,e){this.d=a;kf(d.j==(h7d(),_5d));this.g=b;this.b=c;this.e=d;this.f=e} +function Fec(a,b,c,d,e,f){Aec(this);this.c=c;this.b=d;this.a=a;this.g=e;this.e=b;this.d=f} +function H7c(a,b){var c,d;c=t6c(a.g,b);if(c){d=c.d;return nbe(!d?null:d.Jn())}return null} +function Ntc(a,b){var c;c=rL(fue(a.b,b),288);if(!c){c=new Yuc;c.e=b;iue(a.b,b,c)}return c} +function Mxd(a,b){var c;c=null;while(!!a.b&&a.b.a.a.c<=b.b.c){c=a.b;a.b=Byd(a.k)}return c} +function Uxd(a,b,c,d){b.p==(GQd(),dQd)&&(c.a&hNe)==mNe&&(d=Wxd(a,(h7d(),L4d),d));return d} +function edc(){edc=cjb;ddc=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[(h7d(),F4d),F6d,b7d,m5d,C6d])))} +function vzb(){vzb=cjb;uzb=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[(h7d(),b7d),S4d,T5d,r5d,N4d])))} +function rPb(a,b,c){return rL(a.k.Xd((lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[b,c]))))),204)} +function Hrc(a){return Krc(Qrc(H2d(new N2d((h7d(),h6d)),a.d),GK(yK(b2,1),ZJe,132,0,[a])))} +function eJd(a){var b,c;b=eKd(a.g,0).b.b;c=cHd(a);return new ZQd(new qRd(b,a.f),ZGd(a,c))} +function pJd(a){switch(eKd(a.g,0).c.g){case 63:case 64:return true;default:return false;}} +function DJd(a){switch(eKd(a.g,0).c.g){case 68:case 69:return true;default:return false;}} +function iDc(a){HAc();switch(a.j.g){case 8:case 9:case 6:case 7:return true;}return false} +function Hj(a){zf(a.d!=3);switch(a.d){case 2:return false;case 0:return true;}return Jj(a)} +function Mb(a){zf(a.i!=3);switch(a.i){case 0:return true;case 2:return false;}return Ob(a)} +function Xs(a){Qq();var b;if(zL(a,144)&&!zL(a,439)){b=rL(a,144);return b}return Ys(a.$d())} +function NBc(a){HAc();var b,c,d;d=G1d(a);c=d.lastIndexOf(LMe);b=c+10+1;return d.substr(b)} +function Xib(){Yib();var a=Wib;for(var b=0;b=100&&(this.a=(yrd(),yrd(),xrd))} +function PCc(a){HAc();return a.j==(h7d(),F6d)&&!!a.b&&a.b.j==Z5d&&HCc(a.b.b)&&ICc(a.b.b.d)} +function F$c(a,b){return !!b&&(b.j==(h7d(),I4d)||b.j==f6d)&&!!b.b&&(N$c(a,b.b)||M$c(a,b.b))} +function vQc(a,b,c){qQc();uQc.call(this,a,c,Hzc(b),(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d).f)} +function dAd(a,b){var c;c=Yzd(a,b.a);A2d(c,(h7d(),M6d));!!b.b&&m1d(c,lyd(a.a,b.b));return c} +function M$d(a,b){!a.d&&(a.d=new g_d);if(a.d.k){return false}a.d.k=(Qq(),Xs(b));return true} +function S$d(a,b){!a.d&&(a.d=new g_d);if(a.d.p){return false}a.d.p=(Qq(),Xs(b));return true} +function M4b(a){kf(a.j==(h7d(),F6d));if(B1d(a,87)!=0){return false}return !!a.b&&a.b.j==Z5d} +function lJd(a){var b,c;c=eKd(a.g,0).b.b;b=kJd(a,1);fHd(a);return new fRd(new qRd(c,a.f),b)} +function uFe(a,b){var c;c=bdd(a.b,a.b.a.length-1);if(b=0){return true}else{c=~c-1;return c>=0&&b<=a.b[c]}} +function Fnc(a,b,c){var d;d=new zte;d.a+='@';d.a+=b;d.a+=' {';Enc(a,d,c);d.a+='}';return d.a} +function Tad(){Tad=cjb;Rad=new Vad('QUIET',0);Qad=new Vad(NVe,1);Sad=new Vad('VERBOSE',2)} +function Hfe(){Hfe=cjb;Efe=new Ife('ANY',0);Gfe=new Ife('STRUCT',1);Ffe=new Ife('DICT',2)} +function J9b(){throw Aib(new Ite('FunctionInformationMap.Entry.newBuilder not implemented'))} +function vyd(a){if(a>=48&&a<=49){return a-48}throw Aib(new Ire(tMe+String.fromCharCode(a)))} +function Ayd(a){if(a>=48&&a<=55){return a-48}throw Aib(new Ire(tMe+String.fromCharCode(a)))} +function UBb(a){if(a.n>0){a.e=a.i.a.length;a.f=a.b;ote(a.i,10);a.n=0;++a.k;a.b=a.i.a.length}} +function vud(a,b){zf(!a.f);zf(!a.p);if(Pud(b.a,a)){return false}a.p=b;uud(b.a,a);return true} +function DKd(a){if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==92){return EKd(a,false)}_Jd(a);return true} +function t6c(a,b){var c,d;c=a;while(c){d=rL(NDe(c.d,b),243);if(d){return d}c=c.b}return null} +function ASd(a){var b,c,d;b=0;for(c=0,d=ose(16,a.a.length);cc} +function Apd(a,b,c,d){var e;e=Bpd(a,b,c,d);return e.kl()==34&&e.nl().size()==1?amd(e,a.a.j):e} +function HAd(a,b){var c;c=Vxd(a.a,(h7d(),g7d));!!b.a&&l1d(c,lyd(a.a,b.a));D2d(c,b.b);return c} +function qD(a){var b,c,d;b=0;for(d=a.$d();d.Pd();){c=d.Qd();b+=c!=null?Ab(c):0;b=~~b}return b} +function VZd(a){var b;if(!a.d||!a.d.n){return Qq(),kD(),jD}return Qq(),b=new dve(a.d.n),Xs(b)} +function mud(a){return a.indexOf('.')!=-1?new jud(tr(Ig(Pg((Ac(),new ld(46))),a))):new kud(a)} +function n2d(a,b){var c;c=f2d(a,a.g,29);c!=a.g&&(a.g=c);!!b&&(a.g=new A3d(29,b,a.g));return a} +function oEe(a){AJe(!!a.a);yBe(a.c.a.c,a);bEe(a.a);jue(a.c.a.c,a.a.d);zBe(a.c.a.c,a);a.a=null} +function TF(a,b){kf(b>0);this.b=a;this.c=b;this.j=b;this.a=1;this.d=1;this.e=null;this.g=null} +function qz(a){this.e=a;this.d=new SCe(cB(Oj(this.e).size()));this.c=this.e.a;this.b=this.e.c} +function U2b(a){this.e=a;this.c=new RDe;this.b=new Zx(16,2);this.a=new bu;this.d=new Zx(16,2)} +function VGe(a,b,c,d,e,f){var g;this.c=a;g=new idd;sGe(a,g,b,a.b,c,d,e,f);this.a=new Sue(g,0)} +function oye(a){jye();var b,c;c=new idd;for(b=0;b '),c),10)} +function Nxd(a,b){var c;c=Mxd(a,b);return !!c&&c.c.indexOf('@')==-1?dyd(a,b,cyd(a,c)):Pxd(a,c)} +function zDc(a,b){HAc();return p7d(),n7d.test(b)&&!m7d(b)&&OCc(b)||yEd(a,(BFd(),gFd))&&m7d(b)} +function Iqe(a,b){Dqe();return EL(a)?Fse(a,wL(b)):BL(a)?Ere(a,uL(b)):AL(a)?Eqe(a,tL(b)):a.Sd(b)} +function Mf(a,b){Lf();return new ug(new Zxe(GK(yK(xM,1),ZJe,61,0,[rL(tf(a),61),rL(tf(b),61)])))} +function wf(a,b,c,d){if(a==null){throw Aib(new sse(Jf(b,GK(yK(agb,1),ZJe,1,5,[c,d]))))}return a} +function vRd(a){var b;if(gue(sRd,a)){b=rL(fue(sRd,a),601)}else{b=new xRd;iue(sRd,a,b)}return b} +function hmb(a,b){if(!!b&&b.j==(h7d(),m4d)&&b.b!=a&&a.j!=(h7d(),r5d)){return dmb(a)}return null} +function Kw(a,b){Hw();var c;tf(b);while(a.Pd()){c=a.Qd();if(!Nf(b,c)){return false}}return true} +function Lq(a,b){this.a=b;tf(a);this.c=!(this!=a?a:null)?(Db(),Db(),Cb):new zg(this!=a?a:null)} +function Spd(a,b){kf(!!a||!!b);if(a){this.c=a;this.b=null}else{this.c=null;this.b=VZd(b).$d()}} +function ozb(a,b){Ayb();var c;if(a.j!=(h7d(),I4d)){return false}c=a.b;return c.j==x5d&&X1d(c,b)} +function blb(a,b,c){var d,e;d=b.Lm();if(!a.a.b.contains(d)){Vcd(a.a.k,b);e=rkb(a.a,d);flb(e,c)}} +function JF(a,b,c){var d;d=b.sf(c,a.b);return d<0?!a.e?0:JF(a.e,b,c):d>0?!a.g?0:JF(a.g,b,c):a.c} +function arb(a,b,c,d){var e;DGb(a.a,new Nnc(!b?null:(e=rL(F1d(b,51),28),!e?null:e.ji()),b,c,d))} +function u5b(a,b,c){var d,e;for(e=new lxe(ABc(c));e.a1&&Tqe(a.charCodeAt(0))&&!Jse(a,a.toLocaleUpperCase())} +function VGd(a){switch(a){case 10:case 13:case jPe:case kPe:return true;default:return false;}} +function LKd(a){switch(a){case 10:case 13:case jPe:case kPe:return true;default:return false;}} +function fJc(a){switch(a.j.g){case 74:case 75:case 0:case 39:return true;default:return false;}} +function qCc(a){HAc();switch(a.j.g){case 155:case 108:return true;default:return tCe(zAc,a.j);}} +function Ukc(a){Okc();this.b=new RCe;this.c=new RCe;this.e=new RCe;this.d=new Zx(16,2);this.a=a} +function TOb(a,b){this.i=new JCe;this.c=new RDe;this.a=new idd;this.g=new idd;this.b=a;this.d=b} +function lxd(a,b,c,d,e,f){this.a=nxd(a);this.d=b;this.b=c;this.f=(Qq(),Xs(d));this.c=e;this.e=f} +function O2d(a,b,c){this.j=a;this.e=null;this.i=b<0||c<0?-1:(c&-4096)!=0?b<<12|kMe:b<<12|c&kMe} +function Q2d(a,b,c,d){P2d.call(this,a,b);this.i=c<0||d<0?-1:(d&-4096)!=0?c<<12|kMe:c<<12|d&kMe} +function qPc(a,b){rPc.call(this,'REGISTER_BOOLEAN',0,'goog.tweak.registerBoolean',bKe,a,b,null)} +function Njd(a,b){if(a.isEmpty()){return b}if(b.isEmpty()||pD(a,b)){return a}return xD(tD(a,b))} +function Byd(a){var b;while(a.Pd()){b=rL(a.Qd(),398);if(b.b==(BNd(),yNd)){return b}}return null} +function eYc(a){var b;b=!a.e?null:a.e.e;if(b.j==(h7d(),I4d)&&Y1d(b.b,GNe)){return b}return null} +function r2d(a,b){var c;c=f2d(a,a.g,37);c!=a.g&&(a.g=c);(b?1:0)!=0&&(a.g=new p3d(37,b?1:0,a.g))} +function C2d(a,b){var c;c=f2d(a,a.g,30);c!=a.g&&(a.g=c);(b?1:0)!=0&&(a.g=new p3d(30,b?1:0,a.g))} +function x2d(a,b){var c;c=f2d(a,a.g,58);c!=a.g&&(a.g=c);(b?1:0)!=0&&(a.g=new p3d(58,b?1:0,a.g))} +function D2d(a,b){var c;c=f2d(a,a.g,62);c!=a.g&&(a.g=c);(b?1:0)!=0&&(a.g=new p3d(62,b?1:0,a.g))} +function $1d(a,b,c){var d;d=f2d(a,a.g,b);d!=a.g&&(a.g=d);(c?1:0)!=0&&(a.g=new p3d(b,c?1:0,a.g))} +function Kjb(a,b,c){var d;if(b){d=b.tl(c);if(d){return rL(F1d(d,51),28)}}return rL(F1d(a,51),28)} +function l5c(a,b,c,d){var e;DGb(a.a,new Nnc(!b?null:(e=rL(F1d(b,51),28),!e?null:e.ji()),b,c,d))} +function Ok(a,b){var c,d;wJe(b);for(d=b.ke().$d();d.Pd();){c=rL(d.Qd(),12);a.put(c.se(),c.te())}} +function oD(a,b){var c;uf(a,'set1');uf(b,'set2');c=(Lf(),new Yf(new Of(b)));return new HD(a,c,b)} +function REb(a,b,c){c.a.length==1?lAc(a,b,(vJe(0,c.a.length),rL(c.a[0],14))):LEb(new MEb(a,c),b)} +function hRb(a,b,c){if(c.B||c.Bb){Vcd(b,a.sc);Vcd(b,a.wb);c.B?Vcd(b,a.A):Vcd(b,a.vb);Vcd(b,a.G)}} +function kzd(a,b){return a.a.d.Ej(qXe,a.a.r,(Jxd(),b.o.b.b+1),b.o.b.a),$xd(a.a,(h7d(),_5d),pXe)} +function lzd(a,b){return a.a.d.Ej(qXe,a.a.r,(Jxd(),b.o.b.b+1),b.o.b.a),$xd(a.a,(h7d(),_5d),pXe)} +function mzd(a,b){return a.a.d.Ej(qXe,a.a.r,(Jxd(),b.o.b.b+1),b.o.b.a),$xd(a.a,(h7d(),_5d),pXe)} +function Kqb(a,b){var c;c=b.e;if(a.a){return true}return !!c&&(HAc(),c.j==(h7d(),x5d)||c.j==w5d)} +function pfd(a,b){var c=a[b];if(c==null){return []}else if(Array.isArray(c)){return c}return [c]} +function $td(a,b){if(a==(fud(),dud)||b==dud){return dud}if(a==eud||b==eud){return eud}return cud} +function _td(a,b){if(a==(fud(),cud)||b==cud){return cud}if(a==eud||b==eud){return eud}return dud} +function wtc(a,b){if($sc(a,b,false)){return}while(a){if($sc(a,b,false)){a.e.add(b);return}a=a.t}} +function Ztc(a,b,c,d){var e,f;if(Jse(b,c)){return}e=Ttc(a,b,true);f=Ttc(a,c,true);YLb(a.i,e,d,f)} +function _jd(a){var b;if(a.n.a.isEmpty()){return a.d}b=xkd(a.d);return !b?null:Prd(hsd(b,a.a.i))} +function qIc(a){var b;if(a.j==(h7d(),F4d)){if(!!a.b&&!a.b.d){b=a.b;return b.j==C6d}}return false} +function Y_d(a,b){if(b!=null&&JZd(a.a)==null){A$d(a.a,b);a.e=true;return true}else{return false}} +function t0d(a,b){if(b!=null&&SZd(a.a)==null){J$d(a.a,b);a.e=true;return true}else{return false}} +function qt(a,b){var c,d;if(!a.c){return false}d=a.g;c=a.a.sf(b,d);return c>0|c==0&a.f==(op(),np)} +function rt(a,b){var c,d;if(!a.b){return false}d=a.e;c=a.a.sf(b,d);return c<0|c==0&a.d==(op(),np)} +function bzd(a,b){var c;Ryd(a,b,(BFd(),NEd));c=Vxd(a.a,(h7d(),z4d));l1d(c,lyd(a.a,b.a));return c} +function zIe(){var a;if(!vIe){vIe=new yIe;a=new KIe('');GIe(a,(fIe(),cIe));wIe(vIe,a)}return vIe} +function Hid(){Hid=cjb;Gid=new Q_b('JSC_UNUSED_LABEL',(prb(),nrb),new _te('Unused label {0}.'))} +function kjb(){kjb=cjb;new Q_b('JSC_READ_ERROR',(prb(),mrb),new _te('Cannot read file {0}: {1}'))} +function Wpd(){Wpd=cjb;Upd=new Xpd('REQUIRED',0);Tpd=new Xpd('OPTIONAL',1);Vpd=new Xpd('REST',2)} +function qQc(){qQc=cjb;pQc=ct((h7d(),b7d),T5d,S4d,r6d,r5d,N4d,GK(yK(xeb,1),PKe,29,0,[M4d,A6d]))} +function cie(a,b){return zL(b,337)||b.hn()?b:iie(a,GK(yK(Web,1),oTe,9,0,[b,sie(a,(Lhe(),Khe))]))} +function Rz(a){return zL(a,152)?nr(rL(a,152)):zL(a,206)?rL(a,206).a:zL(a,110)?new oA(a):new dA(a)} +function eDd(a){return dDd(a)&&hEd(Xb(a)).a==2||dDd(a)&&hEd(Xb(a)).a==3||dDd(a)&&hEd(Xb(a)).a==4} +function Z1b(a){var b;this.b=a;b=new RCe;this.c=new F7b(a,new yHb(a),b,qXc(new N2d((h7d(),F6d))))} +function eVc(a,b){bVc();this.d=new RCe;this.g=new RCe;this.c=a;this.f=b;this.a=true;this.b=false} +function _Ob(a,b){this.g=a;this.e=b.f;this.c=b.d;this.f=b.g;this.d=uye(b.e);this.a=b.b;this.b=b.c} +function ice(a,b,c,d){lbe.call(this,a);this.d=b;this.c=zL(b,24)?rL(b,24):null;this.b=c;this.a=d} +function z3b(a,b,c,d){!!d&&d.j==(h7d(),$4d)&&(d=d.e);switch(c.j.g){case 93:case 94:D3b(a,b,c,d);}} +function o7b(a){HAc();if(!(!!a&&(a.j==(h7d(),b7d)||a.j==T5d||a.j==S4d))){return null}return a.b.b} +function Qkc(a,b){var c;for(c=b.b.d;c;c=c.d){HAc();if(OAc(c,false,a.a)){return true}}return false} +function Dcc(a,b){var c,d;for(d=b.b.$d();d.Pd();){c=rL(d.Qd(),9);Yye(a.a,c)&&c.Vn(a)}return a.b.b} +function HOb(a){var b,c;for(c=new fxe(a.c);c.a!=c.b;){b=rL(dxe(c),190);b.f<0&&IOb(a,b)}return a.e} +function Lrb(a){lue(a.i);a.j.a.clear();lue(a.g);a.a.a.clear();OCe(a.a,ANe);a.f.a.clear();a.d=null} +function jGb(a){var b;if(a.T.wd!=(vKb(),sKb)){b=a.U;a.eb=new sKc(a.w,a.L,a.T.wd,b);mFb(a,a.eb.d)}} +function Ozc(a){var b;b=Czc(a);b.j==(h7d(),r5d)&&(b=b.b?b.b.f:null);return HAc(),b.j==Z5d||fCc(b)} +function pIc(a){var b;b=a.k;if(!b){return false}b=b.qm();return !b.lm()&&!b.Ll()&&!b.jm()&&b.am()} +function Lld(a){var b;b=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null;return !!b&&!!b.e} +function Xoc(a){a.d=true;if(a.b>250){!a.c&&(a.c=new lpc(a));return new bpc(a.c)}return new dpc(a)} +function opc(a,b){a.d=true;b.d=true;if(apc(a)==apc(b)){return Xoc(a)}return new bpc(new mpc(a,b))} +function xud(a,b,c,d){zf(!a.f);if(Hud(a,b,0)){return}a.c=trd(a.c,b,new Wtd(d,c,null,(fud(),eud)))} +function Z7c(a,b,c){!!c&&T1d(b)&&((c.a&hNe)==UQe?yie(a.a,G1d(b)):(c.a&hNe)==lKe&&yie(a.a,G1d(b)))} +function yvc(a,b){var c;c=new Imb(new Cvc(a));lAc(a.b,b,c);DIe(wvc,'Named '+a.d+dUe+a.a+' bytes')} +function A7d(){A7d=cjb;y7d=new Vae;z7d=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[DKe,BTe,lOe])));x7d=new ege} +function ttb(){ttb=cjb;stb=new Q_b('JSC_USELESS_CODE',(prb(),orb),new _te('Suspicious code. {0}'))} +function wFb(a){var b;b=new OKc(a,a.eb);a.T.ab==(iJb(),eJb)&&MKc(b,a.$);a.T.r&&(b.k=true);return b} +function cee(a){var b;kf(a.Nl()||a.i==(Bfe(),zfe));b=aee(a).ao();if(!b){return null}return b.Zn()} +function Eib(a){var b;b=a.h;if(b==0){return a.l+a.m*iMe}if(b==gMe){return a.l+a.m*iMe-jMe}return a} +function OLb(a,b){var c;c=a.qg(b);if(!c){throw Aib(new ooc(b+' does not exist in graph'))}return c} +function xRb(a){eRb();var b;b=new JCe;(a.$b||a.F)&&iue(b,'COMPILED',new N2d((h7d(),W6d)));return b} +function vLb(a,b){this.j=new ILb(this);this.f=new Owe;this.g=new bu;this.d=a;this.o=false;this.e=b} +function zvc(a){xvc();var b;this.b=a;b=(jye(),jye(),iye);this.c=new SQb(b,'$',null);this.e=new JCe} +function TGb(a,b,c){var d;d=(Fte(),Qib(Hib(fJe()),b.a));a.T.wd!=(vKb(),sKb)&&!!a.eb&&rKc(a.eb,c,d)} +function Bjd(a,b,c,d,e){wjd.call(this,a,b,c);tf(d);this.d=(Rjd(),Pjd);this.e=d;this.c=(Qq(),Xs(e))} +function Dmc(a,b){var c;if(b.j!=(h7d(),_5d)){return false}c=Hzc(a)._j(b.Lm());return c.uk().j==r6d} +function L0b(a,b){var c;if(!Z1d(b,VRe,VRe.length)){return false}c=Hzc(a)._j(VRe);return !c||c.gk()} +function rld(a){var b;b=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null;return !b?null:b.b} +function AJd(a){switch(eKd(a.g,0).c.g){case 70:case 71:case 72:return true;default:return false;}} +function wJd(a){switch(eKd(a.g,0).c.g){case 65:case 94:case 67:return true;default:return false;}} +function EJd(a){switch(eKd(a.g,0).c.g){case 25:case 30:case 38:return true;default:return false;}} +function v1b(a){switch(a.j.g){case 98:case 86:case 87:case 114:return true;default:return false;}} +function iCc(a){HAc();switch(a.g){case 15:case 1:case 2:case 3:return true;default:return false;}} +function KId(a,b){switch(eKd(a.g,0).c.g){case 49:return yHd(a,b);case 45:default:return GId(a,b);}} +function Utd(a,b){if(b.isEmpty()){return a}return new Wtd(a.c,emd(a.d,b),!a.b?null:emd(a.b,b),a.a)} +function Hib(a){if(lMe0){c.a+=':';c.a+=b}c.a+=hKe}return c.a} +function VJc(a,b){var c,d;c=true;for(d=b.b;d;d=d.d){d.j==(h7d(),L6d)||(c=false)}return c?WJc(a,b):b} +function q2d(a,b){var c;c=V2d(a.i);c==-1&&(c=0);a.i=b<0||c<0?-1:(c&-4096)!=0?b<<12|kMe:b<<12|c&kMe} +function Syc(a,b){lf(b.indexOf('.')==-1,b);return kf(b.indexOf('.')==-1),rL(Xk(Nk(a.b,b,false)),20)} +function Mvd(a,b){tf(b);if(a.b==(Svd(),Rvd)){return}Ef(a.b==Pvd,tWe,Zb(a.b));a.b=Rvd;a.d=null;a.c=b} +function tNd(a,b,c,d,e,f){dNd.call(this,(GQd(),fPd),a);this.d=b;this.b=c;this.e=d;this.c=e;this.a=f} +function UNd(a,b,c,d,e,f){dNd.call(this,(GQd(),xPd),a);this.d=b;this.e=c;this.a=d;this.b=e;this.c=f} +function HOd(a,b,c,d,e,f){dNd.call(this,(GQd(),TPd),a);this.e=b;this.d=c;this.c=d;this.a=e;this.b=f} +function OQd(a,b,c,d,e,f){dNd.call(this,(GQd(),jQd),a);this.d=b;this.b=c;this.c=d;this.e=e;this.a=f} +function WNc(a){this.g=a;this.i=new idd;this.e=new idd;this.b=new idd;this.d=new RCe;this.a=new idd} +function SJd(){SJd=cjb;RJd=new TJd(NQe,0);QJd=new TJd('GENERATOR',1);PJd=new TJd('ASYNCHRONOUS',2)} +function fKb(){fKb=cjb;eKb=bc(($Jb(),GK(yK(GU,1),PKe,196,0,[RJb,SJb,TJb,VJb,UJb,WJb,XJb,YJb,ZJb])))} +function wJ(){wJ=cjb;vJ=GK(yK(LL,1),qKe,17,15,[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102])} +function kqe(a,b){var c;c=a.a.length;bc&&(a.a+=lte(CK(LL,qKe,17,b-c,15,1)))} +function EG(a,b){var c;if(b==a.length){return a}else{c=CK(KL,ZLe,17,b,15,1);Gte(a,0,c,0,b);return c}} +function kie(a,b,c){if(gue(a.k,b)){return false}lf(b.indexOf('<')==-1,ZYe);iue(a.k,b,c);return true} +function Lie(a,b){var c;if(zL(a,121)){c=rL(a,121);c.Xn();zf(!c.oo());c.s=b;return true}return false} +function PIe(a){var b,c;c=a.b.exec(a.a);if(c!=null){b=c[0];if(Jse(b,a.a)){return true}}return false} +function oDc(a){HAc();switch(a.j.g){case 4:case 5:case 36:case 37:case 15:return true;}return false} +function MKd(a){switch(a){case 47:return false;case 92:case 91:return true;default:return !LKd(a);}} +function T0d(a){if(!NZd(a.a,16)&&!NZd(a.a,HPe)){C$d(a.a,16);a.e=true;return true}else{return false}} +function cB(a){aB();if(a<3){Fp(a,'expectedSize');return a+1}if(a=0;c--){if(!Id(a,b.charCodeAt(c))){return false}}return true} +function dL(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(c>>22);e=a.h-b.h+(d>>22);return LK(c&fMe,d&fMe,e&gMe)} +function WK(a,b){var c,d,e;c=a.l+b.l;d=a.m+b.m+(c>>22);e=a.h+b.h+(d>>22);return LK(c&fMe,d&fMe,e&gMe)} +function KDb(a,b){var c,d,e;e=b.b;if(e.Lm().length==0){return false}c=e.d;d=c.d;return JDb(a,d,e.Lm())} +function Txc(a,b,c){var d,e;d=b.b;e=bxc(a,d,c,a.i);wqd(a.w,e.b)||Qyc(a,d,b.j,a.i,e.b);e.b=a.i;return e} +function R9b(a,b,c,d){var e;zf(njb(a.d.kb));b.d==0?(e=T9b(a,b,d)):(e=S9b(a,b,d,c));FGb(a.d,e);return e} +function y9c(a,b){var c;c=xLb(b,b,null);while(!!c&&c.j==(h7d(),F4d)){c.b?(c=c.b):(c=y9c(a,c))}return c} +function cdd(a,b){var c;c=Zcd(a,b,0);if(c==-1){return false}vJe(c,a.a.length);bJe(a.a,c,1);return true} +function zUd(a){yUd();var b;b=xUd[a];if(b!=null){return b}throw Aib(new DJ('Resource not found: '+a))} +function Gre(a,b){if(ab){return 1}if(a==b){return 0}return isNaN(a)?isNaN(b)?0:1:-1} +function s3c(a,b,c){var d,e;e=rL(a.get(b),9);if(!c.lm()){if(!e){a.put(b,c)}else{d=e._m(c);a.put(b,d)}}} +function oNc(a,b,c){if(!c){DGb(a.a,Szc(b,RMc,GK(yK(fgb,1),pKe,2,6,[G1d(b)])));return false}return true} +function qld(a){var b,c,d;for(d=a.nl().$d();d.Pd();){c=rL(d.Qd(),25);b=c.b;if(b){return b}}return null} +function ejd(a){var b,c,d;d=null;for(c=a.$d();c.Pd();){b=rL(c.Qd(),291);!d?(d=b):(d=djd(d,b))}return d} +function foc(a){var b,c,d,e,f;f=new JCe;for(c=a.a,d=0,e=c.length;d2)&&nob(TMe+c,a);for(b=a.b;b;b=b.d){Inb(b)}} +function xnb(a){var b,c;Pnb((h7d(),E5d),a);c=y1d(a);(c<1||c>2)&&nob(TMe+c,a);for(b=a.b;b;b=b.d){Inb(b)}} +function Znb(a){var b,c;Pnb((h7d(),z6d),a);c=y1d(a);(c<1||c>2)&&nob(TMe+c,a);for(b=a.b;b;b=b.d){dob(b)}} +function wpc(a){var b,c,d;b=0;for(d=DEe(a.e,0);d.b!=d.d.c;){c=rL(SEe(d),66);iue(a.f,c.ji(),Zre(b));++b}} +function pnc(a){var b,c;b=new tnc(a);lAc(a.b.a,a.a,b);c=b.a;lAc(a.b.a,a.a,new rnc(c));vnc(new wnc(a,c))} +function Zoc(a,b){var c;if(PCe(a.a.a,b)){for(c=a.e;c;c=c.a){if(Jse(c.c,b)){return c}}}return kpc(a.a,b)} +function DJc(a,b,c){var d;if(b+c.length>a.length){return -1}d=a.indexOf(c,b);if(d<0){return -1}return d} +function J7c(a,b){var c,d;c=QBc(b);if(c.j==(h7d(),_5d)){d=t6c(a.g,c.Lm());if(d){return d.c}}return null} +function gJc(a){if(a.j==(h7d(),m5d)){switch(a.b.j.g){case 60:case 62:case 61:return true;}}return false} +function NGd(a){HGd();switch(a){case hPe:case rNe:case FOe:case gPe:return true;default:return false;}} +function aHd(a,b){var c;c=nHd(a);if(c.c!=b){FJd(a,c,mYe,GK(yK(agb,1),ZJe,1,5,[b]));return null}return c} +function nNc(a,b,c){if(c.d){DGb(a.a,Szc(b,SMc,GK(yK(fgb,1),pKe,2,6,[G1d(b)])));return false}return true} +function wXd(a,b,c,d){var e,f;e=JUd(a,b,c);if(e){f=d?a.g:a.i;return zXd(a,c,b,e,rL(e.Vn(f),9))}return c} +function jyd(a,b,c){var d,e;if(W2d(a.i)==-1){e=b.b+1;q2d(a,e);d=b.a;a.i=_2d(W2d(a.i),d);p2d(a,c.c-b.c)}} +function gNb(a,b,c){var d;kf((HAc(),b.j==(h7d(),I4d)&&Y1d(b.b,SQe)));Vcd(a.b,(d=PBc(b),new qNb(b,d,c)))} +function Otb(a,b){zf(b.j==(h7d(),F4d));!b.b&&B1d(b,39)!=0&&DGb(a.c,Szc(b,Htb,GK(yK(fgb,1),pKe,2,6,[])))} +function ZId(a){var b,c;c=eKd(a.g,0).b.b;aHd(a,(XMd(),xMd));b=BHd(a,1);return new PQd(new qRd(c,a.f),b)} +function lne(a,b){var c,d;for(d=a.d.$d();d.Pd();){c=rL(d.Qd(),125);if(Jse(c.a,b)){return c}}return null} +function lye(a){jye();var b,c,d;d=0;for(c=a.$d();c.Pd();){b=c.Qd();d=d+(b!=null?Ab(b):0);d=d|0}return d} +function Lu(a,b){if(zL(b,130)){tf(b.se());tf(b.te());Vcd(a.b,b)}else{Vcd(a.b,ms(b.se(),b.te()))}return a} +function Rre(a){var b;if(a<0){return lKe}else if(a==0){return 0}else{for(b=mKe;(b&a)==0;b>>=1);return b}} +function eqb(a,b){var c,d;c=dqb(a.pl(b));if(c!=null){return c}d=a.vl();if(d){return eqb(d,b)}return null} +function Jg(a,b){var c,d;tf(b);c=a.c.de(a,b);d=new idd;while(Mb(c)){Vcd(d,Nb(c))}return jye(),new $Ae(d)} +function sPb(a,b){var c;this.j=a;this.k=b;c=this.j.pi(this.wi());c?(this.n=new IHe(c)):(this.n=new tEe)} +function dre(){++$qe;this.o=null;this.k=null;this.j=null;this.d=null;this.b=null;this.n=null;this.a=null} +function cpc(a,b){this.a=a;if(!b){this.e=null;this.b=0;this.f=a.c}else{this.e=b.e;this.b=b.b+1;this.f=b}} +function sde(a,b,c){A7d();Pce.call(this,a,'enum{'+b+'}',null);this.a=new RCe;this.b=new ice(a,c,b,this)} +function HOc(a,b){var c;zf(!!a||(c=rL(F1d(b,51),28),!!c&&c.lk()));this.b=b;this.a=a;this.d=a;this.c=true} +function XRc(a,b){var c,d;for(d=rL(bk(a.c,b),50).$d();d.Pd();){c=rL(d.Qd(),563);FGb(a.g,c.a);hSc(c,a.g)}} +function YLb(a,b,c,d){var e,f;f=ZLb(a,b);e=ZLb(a,d);fMb(f,(Lf(),!c?(fg(),dg):new Tf(c)),e)||WLb(a,f,c,e)} +function TAd(a,b,c){var d;a.b.Fj('Missing type declaration.',(d=rL(F1d(a.k,51),28),!d?null:d.ji()),b,c)} +function Amd(a,b){hld();return Wnd(a.a,2,(Qq(),new XD(Ftd(a.a,b,null,a,null,a.c,(xsd(),vsd)))),null,eld)} +function oue(a,b){nJe(a>=0,'Negative initial capacity');nJe(b>=0,'Non-positive load factor');lue(this)} +function ene(a,b){var c;c=a.d.size()-a.e.size();c0&&b=a.d&&b<=a.c){return null}return Mcd(b)} +function bC(a,b){var c;if(b===a){return true}if(zL(b,194)){c=rL(b,194);return wb(a.Be(),c.Be())}return false} +function IJd(a,b){switch(b.p.g){case 28:case 29:a.f=b.o.b,oKd(a.g,a.f.c);return KId(a,1);default:return b;}} +function m4b(){var a,b;a=new N2d((h7d(),H4d));b=f2d(a,a.g,67);b!=a.g&&(a.g=b);a.g=new p3d(67,1,a.g);return a} +function azb(a,b){var c,d;for(d=new lxe(b$d(b));d.a1)&&nob(VMe+c,b);!!b.b&&!b.b.d&&rnb(a,b.b)} +function $Ab(a,b){var c,d;c=false;for(d=b;d;d=d.d){d!=b&&a.c.Yh();aBb(a,d,1,4);c=d.j==(h7d(),c5d)}c&&a.c.Yh()} +function hec(a){var b,c;c=a.d;if(c){b=c.c;if(!!b&&B1d(b,58)!=0&&b.e.j==(h7d(),O4d)){return true}}return false} +function pNc(a,b,c,d){if(c.j!=d){DGb(a.a,Szc(b,GMc,GK(yK(fgb,1),pKe,2,6,[G1d(b)])));return false}return true} +function b$b(a){LZb();MZb.call(this,EYd(VYd(GK(yK(veb,1),MMe,5,0,[])),a.Jm(false)),true);kf(a.j==(h7d(),L6d))} +function yyc(a,b,c){if(Xld(c)){hzc(a.Q,Rnc(b,ewc,GK(yK(fgb,1),pKe,2,6,["'.'",sUe])));return true}return false} +function U1d(a){switch(a.j.g){case 29:return a.Lm().length!=0;case 26:return U1d(a.b);default:return false;}} +function eDc(a){HAc();var b;if(a.j!=(h7d(),r5d)){return false}b=a.e;if(b.j!=m4d){return false}return gDc(b.e)} +function Xld(a){var b,c;for(c=a.nl().$d();c.Pd();){b=rL(c.Qd(),25);if((b.f.a&2)!=0){return true}}return false} +function Yld(a){var b,c;for(c=a.nl().$d();c.Pd();){b=rL(c.Qd(),25);if((b.f.a&1)!=0){return true}}return false} +function SBc(a){HAc();var b,c;c=null;while(c==null&&!!a){c=(b=rL(F1d(a,51),28),!b?null:b.ji());a=a.e}return c} +function UAd(a,b,c,d){var e;a.b.Fj(e4d(b,GK(yK(agb,1),ZJe,1,5,[])),(e=rL(F1d(a.k,51),28),!e?null:e.ji()),c,d)} +function Ndd(a,b,c){var d;d=a.a.c.sg(c.te())-a.a.c.sg(b.te());return d==0&&!!a.a.a?a.a.a.sf(b.te(),c.te()):d} +function Rsc(a,b){var c,d;c=Qsc(a,b);if(c){return ujd(c)}d=Vsc(a,b);return !d?null:(zf(d.b==(Svd(),Rvd)),d.c)} +function Pj(a,b){var c,d,e;c=false;for(e=b.kf().$d();e.Pd();){d=rL(e.Qd(),12);c=c|a.Ke(d.se(),d.te())}return c} +function dyd(a,b,c){if(!!c&&(c.a&hNe)!=0){a.i=true;Jse(AEd(a.e),'ts')&&a.d.Ej(zVe,a.r,b.b.b+1,b.b.a)}return c} +function wjd(a,b,c){this.C=(_C(),$C);this.F=$C;this.D=(rrd(),rrd(),qrd);this.A=b;this.u=a;this.v=rL(tf(c),5)} +function ykc(a){vkc();this.c=new JCe;this.a=a;this.b=new Rlc(Slc(Ulc(Wlc(new Zlc(WFb(a)))),XFb(a)));xkc(this)} +function Zx(a,b){Mo.call(this,new SDe(a));Fp(b,NLe);this.b=b;this.a=new my(null,null,0,null);fy(this.a,this.a)} +function ymb(a,b){var c;kf(b.j==(h7d(),r5d));c=(HAc(),kf(b.j==r5d),b.b.d);if(c){return zmb(a,c)}return new idd} +function zC(a,b,c,d){Fp(c,'oldCount');Fp(d,'newCount');if(a.Ze(b)==c){a.cf(b,d);return true}else{return false}} +function dqb(a){if(!!a&&(a.a&256)!=0){if((!a.d?null:a.d.b)!=null){return !a.d?null:a.d.b}return ''}return null} +function of(a,b){if(!a){throw Aib(new ooc(Jf('too many occurrences: %s',GK(yK(agb,1),ZJe,1,5,[kse(b)]))))}} +function ISd(a,b){uSd();if(a>b){throw Aib(new sqe(a+' > '+b))}return new FSd(GK(yK(NL,1),ULe,17,15,[a,b+1]))} +function qFe(a,b){var c;if(b*2+1>=a.b.a.length){return}qFe(a,2*b+1);c=2*b+2;c=mue(a.d.n.c)){return null}return wL(kw(new dve(a.d.n),b))} +function CWd(a,b){var c;if(!b.b){return b.a?EUd(a.a,(Lhe(),nhe)):null}c=b.a?a.a.b:a.a.a;return rL(b.b.Vn(c),9)} +function yWd(a,b){var c;if(!b.b){return b.a?EUd(a.a,(Lhe(),Dge)):null}c=b.a?a.a.g:a.a.i;return rL(b.b.Vn(c),9)} +function due(a,b,c){var d,e;for(e=c.$d();e.Pd();){d=rL(e.Qd(),12);if(a.Co(b,d.te())){return true}}return false} +function J2d(a,b){if(!rL(F1d(a,51),28)){z2d(a,b);a.i=b.i;a.c=b.c}F1d(a,40)==null&&_1d(a,40,F1d(b,40));return a} +function Prd(a){return !a.a.q.isEmpty()&&!a.b.d.d.isEmpty()?Bmd(Ftd(a.a.u,a,null,null,null,false,a.a.i)):a.a.r} +function Qrd(a){return !a.a.q.isEmpty()&&!a.b.d.d.isEmpty()?Ftd(a.a.u,a,null,null,null,false,a.a.i):xld(a.a.r)} +function yb(a){return EL(a)?fgb:BL(a)?Ofb:AL(a)?Kfb:yL(a)?a.No:EK(a)?a.No:a.No||Array.isArray(a)&&yK(BR,1)||BR} +function MZb(a,b){BZb.call(this,b,nZb(a));tf(a);pf(KZb.contains(a.j),'Unexpected lValue type %s',a.j);this.a=a} +function bi(a,b){zf(!this.b);zf(!this.d);kf(mue(a.c)==0);kf(b.d.c+b.e.c==0);kf(true);this.b=a;this.d=this.pe(b)} +function Y9b(a,b,c,d){this.e=new RCe;this.g=new bac;tf(a);tf(b);this.d=a;this.f=b;this.a=true;this.c=c;this.b=d} +function pJe(a,b,c){if(a>b){throw Aib(new ooc(xKe+a+yKe+b))}if(a<0||b>c){throw Aib(new uqe(xKe+a+zKe+b+AKe+c))}} +function NLb(a,b,c,d){gMb(a,b,(Lf(),!c?(fg(),dg):new Tf(c)),d)||gMb(a,d,!c?(fg(),dg):new Tf(c),b)||XLb(a,b,c,d)} +function Smc(a,b,c){tf(a.e);a2d(a.e,a);tf(b.e);a2d(b.e,b);return c==0?mYd((h7d(),g5d),a,b):mYd((h7d(),H6d),a,b)} +function F3b(a,b){return HYd(aZd(a,(Ef(Ose(mMe,hte(46))==-1,xMe,mMe),new T3d((h7d(),_5d),mMe))),b,s1d(a,false))} +function Lbc(a){var b,c,d;b=Ose(a.i,hte(46));if(b!=-1){d=bte(a.i,0,b);c=t6c(a.u,d);if(c){return c.c}}return a.u} +function K$b(a,b){var c,d;for(d=b.b.$d();d.Pd();){c=rL(d.Qd(),7);if(!a.b.contains(c)){return false}}return true} +function Pxd(a,b){var c;if(b){c=Lxd(a,b);OCe(a.n,b);if(!Rxd(a,c)){return dyd(a,b.a,F_d(c.e,false))}}return null} +function Hsd(a){if(a.e){return a.e.v}if(!!a.b&&!!a.b.d){return Ald(_jd(a.b))}if(a.d){return a.d.a.v}return null} +function dDd(a){var b,c,d,e;for(c=iEd(),d=0,e=c.length;d0){return SFe(b-1,a.a.a.length),Ycd(a.a,b-1)}else{throw Aib(new MBe)}} +function jGe(a){var b;b=a.a.a.length;if(b>0){return SFe(b-1,a.a.a.length),bdd(a.a,b-1)}else{throw Aib(new MBe)}} +function dHd(a){var b;b=eKd(a.g,0);switch(b.c.g){case 101:case 100:return nHd(a);case 2:default:return cHd(a);}} +function SCc(a){HAc();switch(a.j.g){case 72:case 73:case 101:case 71:case 70:return true;default:return false;}} +function rfd(a,b){for(var c in b){!(c in a)&&(a[c]=b[c])}var d=[];for(var c in a){!(c in b)&&d.push(c)}return d} +function Ymb(a,b){var c,d;Pnb((h7d(),j4d),b);for(c=b.b;c;c=c.d){c.j==c5d?(d=y1d(c),0!=d&&nob(OMe+d,c)):rnb(a,c)}} +function Brb(a,b){var c,d;for(c=Ose(b,hte(46));c!=-1;c=Pse(b,hte(46),c+1)){d=b.substr(0,c);OCe(a.j,d)}OCe(a.j,b)} +function elb(a,b){if(a.e||Qlc(a.f.d,b)){a.e=true;return}if(!Gkb(a.d,qkb(a.f,b))){pkb(a.f,b);Lkb(a.d,skb(a.f,b))}} +function IF(a,b,c){var d;d=b.sf(c,a.b);return d<0?!a.e?a:rL(Ze(IF(a.e,b,c),a),354):d==0?a:!a.g?null:IF(a.g,b,c)} +function wt(a,b,c){var d,e;return !b||c==null?null:(e=rL(hB((d=a.c,!d?(a.c=new yE(a)):d),b),59),!e?null:hB(e,c))} +function Dqb(a,b,c){while(!!b.p&&b.p.i+b.p.n==0){b=b.p}DGb(a.a,Qnc(c.c,a.d,wqb,GK(yK(fgb,1),pKe,2,6,[bec(b)])))} +function Cf(a,b,c){if(!a){throw Aib(new Ire(Jf('line=%s, lineCount=%s',GK(yK(agb,1),ZJe,1,5,[Zre(b),Zre(c)]))))}} +function oIb(a){var b;b=a.i.a;!!a.qc&&a.qc.a>1&&(b==null?(b=gIb):(b=vH(GK(yK(LL,2),ZJe,90,0,[b,gIb]))));return b} +function tBb(a,b){var c,d;d=0;c=a.b;for(;!!c&&da.size()?Xw(a.$d(),b):sD(a,b.$d())} +function $5b(a,b,c,d){X5b();var e,f;if(!a){return null}e=rL(b.vj(c),106);f=e.wl();return b.yj(f,(lr(),new UD(d)))} +function e7b(a,b){switch(a.j.g){case 26:return !b||a.b.j==(h7d(),U6d);case 29:return true;default:return LCc(a);}} +function Ujc(a){var b,c;for(c=Tjc(a).values().$d();c.Pd();){b=rL(c.Qd(),327);if(b.d==1){return true}}return false} +function Slc(a,b){var c,d;for(d=new lxe(b);d.a127){return false}}return true} +function aCc(a){HAc();switch(a.g){case 15:case 62:case 61:case 1:case 2:case 3:return true;default:return false;}} +function yyd(a){switch(a.j.g){case 72:case 73:case 101:case 70:case 71:case 67:return true;default:return false;}} +function Kr(a){lr();switch(a.size()){case 0:return kr;case 1:return new UD(a.$d().Qd());default:return new fD(a);}} +function Zs(a){Qq();tf(a);switch(a.length){case 0:return kD(),jD;case 1:return new XD(a[0]);default:return $s(a);}} +function eub(a){switch(a.j.g){case 26:return (a.b?a.b.f:null).Lm();case 98:return a.Lm();}throw Aib(new DJ(RNe+a))} +function $Eb(a,b){b._c=false;switch(a.g){case 1:RIb(b,(Nad(),Kad));b.I=true;b.Cb=true;DIb(b,0);EIb(b,0);MIb(b,0);}} +function dGc(a,b){var c,d;d=a.b?a.b.f:null;if(!d||d.j!=(h7d(),F6d)){d=(c=new N2d((h7d(),F6d)),c);l1d(a,d)}l1d(d,b)} +function dVc(a,b,c){var d;if(b.length==0){return false}d=Hzc(c)._j(b);return !d||d.Bk()||d.k.gk()&&a.e.contains(b)} +function _lc(a){var b;if(!T1d(a)){return false}b=E1d(a);return b.indexOf('Asserts')!=-1&&b.indexOf('.$assert')!=-1} +function Nld(a){return a.kl()==2&&a.nl().size()==1&&!!Msd(a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null)} +function gmd(a){if(512==a.kl()||8==a.kl()){return a.e.w}else if(XLe==a.kl()||16==a.kl()){return a.e.e}return a.e.a} +function fdc(a,b){pf(b.j==(h7d(),f6d),'Expected: NEW, Got: %s',b.j);if(!QAc(b)){return true}a.a.jj(b);return false} +function Dzd(a,b){var c;c=Yxd(a.a,(h7d(),o5d),NAd(a,b.d,b),NAd(a,b.b,b),NAd(a,b.c,b));l1d(c,myd(a.a,b.a));return c} +function Szd(a,b){var c;c=$xd(a.a,(h7d(),X5d),b.e.a);Oyd(a,c,b.b);x2d(c,b.d);$1d(c,80,b.c);Myd(a,b,c,b.a);return c} +function AHd(a,b,c){var d,e;twe(a.e,c);oJd(a,(XMd(),aMd))?(d=gId(a)):(d=BHd(a,b));e=Gwe(a.e);tJe(e!=null);return d} +function bId(a,b,c){var d,e;aHd(a,(XMd(),JLd));e=oHd(a,1);aHd(a,gLd);d=XId(a);return new YNd(new qRd(b,a.f),c,e,d)} +function J1d(a){var b,c;b=rL(F1d(a,51),28);if(!b){return -1}c=W2d(a.i);if(c==-1){return -1}return b.kk(c)+V2d(a.i)} +function PG(a,b){this.b=rL(tf(a),323);pf(!b||!IG(a,b.a),'Padding character %s was already in alphabet',b);this.c=b} +function pOb(a,b){this.i=a;this.a=new Owe;this.e=new Qkb(this.i.b.a.length);this.g=new tEe;this.c=new Owe;this.j=b} +function $pb(a,b){Gpb();this.b=new Owe;this.a=a;this.i=WFb(a);this.f=new bu;this.e=b;this.g=this.i.vj((Lhe(),ahe))} +function btb(){btb=cjb;atb=new Q_b('JSC_MISSING_PROVIDE',(prb(),orb),new _te("missing goog.provide(''{0}'')"))} +function Ttb(){Ttb=cjb;Stb=new Q_b('JSC_UNREACHABLE_CODE',(prb(),orb),new _te('unreachable code'));Rtb=new _tb} +function HVc(){HVc=cjb;GVc=new Q_b('JSC_JSON_UNEXPECTED_TOKEN',(prb(),mrb),new _te('Unexpected JSON token'))} +function IYc(a){JYc.call(this,GK(yK(fgb,1),pKe,2,6,['the_longest_path_that_cannot_be_expressed_as_a_string']),a)} +function lHd(a,b,c){b==(XMd(),kLd)?HJd(a,nYe,GK(yK(agb,1),ZJe,1,5,[])):bNd(c)&&HJd(a,oYe,GK(yK(agb,1),ZJe,1,5,[]))} +function jpd(a,b){if(b.b){Af(b.b.j==(h7d(),F4d),b);OCe(a.i,Rnc(b,bpd,GK(yK(fgb,1),pKe,2,6,['','0',''+y1d(b.b)])))}} +function hqb(a){var b;if(a.j==(h7d(),r5d)){return dqb((HAc(),b=eBc(a),!b?null:rL(F1d(b,29),11)))!=null}return false} +function eB(a,b){aB();var c;if(a===b){return true}else if(zL(b,59)){c=rL(b,59);return pD(cs(a),c.ke())}return false} +function yJ(b,c){wJ();var d;try{xJ(c,b)}catch(a){a=zib(a);if(zL(a,147)){d=a;throw Aib(new FJ(d))}else throw Aib(a)}} +function Dib(a,b){var c;if(Jib(a)&&Jib(b)){c=a-b;if(!isNaN(c)){return c}}return YK(Jib(a)?Rib(a):a,Jib(b)?Rib(b):b)} +function ngc(a){Yfc();var b;if(a.j!=(h7d(),x5d)){return false}b=a.b;return b.j==x5d&&Jse((b.b?b.b.f:null).Lm(),KMe)} +function dDc(a){HAc();var b;if(a.j!=(h7d(),x5d)){return false}b=a.e;return b.j==m4d&&b.b==a&&Jse(D1d(b.b).Lm(),KMe)} +function fDc(a){HAc();var b;if(a.j!=(h7d(),x5d)){return false}b=a.b;return b.j==x5d&&Jse((b.b?b.b.f:null).Lm(),KMe)} +function rIc(a){var b;if(a.j==(h7d(),F4d)){if(!!a.b&&!a.b.d){b=a.b;if(b.j==C6d){return !!b.b&&!b.b.d}}}return false} +function tIc(a){var b;if(a.j==(h7d(),F4d)){if(!!a.b&&!a.b.d){b=a.b;if(b.j==b7d){return !!b.b&&!b.b.d}}}return false} +function ALb(a,b){var c,d,e,f;for(c=a;c;c=c.d){for(e=0,f=b.length;e>>0).toString(16)}return a.toString()} +function Vld(a){if(-1==a.kl()){return a}if(eKe==a.kl()){return a.e.f}return Wnd(a.e,a.kl()&-9&-3,fld,a.Dl(),a.gl())} +function yRc(a){wRc();if(a.j==(h7d(),_5d)){return a.Lm()}else if(a.j==x5d){return (a.b?a.b.f:null).Lm()}return null} +function aBd(a,b){do{if(b==(wCd(),iCd)||b==gCd||b==hCd){a.g=($Bd(),YBd);return b}b=!a.n?DCd(a.i):_Ad(a)}while(true)} +function cId(a,b,c){var d,e;gHd(a,'of');e=oHd(a,1);aHd(a,(XMd(),gLd));d=XId(a);return new ZNd(new qRd(b,a.f),c,e,d)} +function sZd(a,b){!a.d&&(a.d=new g_d);!a.d.p?(a.d.p=(Qq(),new XD(b))):(a.d.p=Ys(new lxe(sv(uv(new vv,a.d.p),b).a)))} +function N6b(a,b,c,d){var e;e=B1d(b,58)!=0?c:d;e=s1d(e,false);return b.j==(h7d(),R4d)?DYd(e,d2d(b)):NDc(a,e,b.Lm())} +function $mb(a,b){var c,d;d=j7d(b.j);d!=-1&&(c=y1d(b),d!=c&&nob(PMe+d+QMe+c,b));Dnb(a,b.j,b.b);rnb(a,b.b?b.b.f:null)} +function knb(a,b,c){var d;snb(a,(BFd(),VEd),c);$mb(a,c);d=c.b;d.j==(h7d(),_5d)?Inb(d):d.j==k4d?Zmb(a,b,d):Vnb(a,b,d)} +function WH(a,b){var c;b=b<0?(-b<<1)+1:b<<1;do{c=b&31;b>>>=5;b>0&&(c|=32);nte(a,(TH(),YLe.charCodeAt(c)))}while(b>0)} +function MI(a,b){var c,d,e;e=0;d=0;for(c=0;c=0,'numberToAdvance must be nonnegative');for(c=0;cc){throw Aib(new sqe(xKe+a+zKe+b+', size: '+c))}if(a>b){throw Aib(new ooc(xKe+a+yKe+b))}} +function CG(b,c){var d;try{return DG(b,c)}catch(a){a=zib(a);if(zL(a,535)){d=a;throw Aib(new qoc(d))}else throw Aib(a)}} +function ohc(a,b,c){var d,e,f;f=lud(b);d=Hsc(a.a,f,false);if(d){e=d.d;if(zL(e,79)){return Lud(rL(e,79),c)}}return null} +function Vpc(a,b){var c,d,e;for(e=new fxe(a.b);e.a!=e.b;){d=rL(dxe(e),299);c=d.Kj(b);if(c!=null){return c}}return null} +function TYd(a,b){var c,d,e,f;f=new P2d((h7d(),f6d),a);for(d=0,e=b.length;d-129&&a<128){b=a+128;c=(_re(),$re)[b];!c&&(c=$re[b]=new Lre(a));return c}return new Lre(a)} +function Jzc(a){var b,c;b=a.k.a.length;if(b>0){return rL(Ycd(a.k,b-1),5)}else{c=rL(Awe(a.n),171);return c?c.$j():null}} +function SBb(a,b){var c;vte(a.i,b);a.n+=b.length;c=(Ac(),Bc(new ld(10),b));if(c>0){a.k+=c;a.n=b.length-Rse(b,hte(10))}} +function l1d(a,b){var c;rf(!b.e,b,a.e,a);kf(!b.d);kf(!b.f);if(!a.b){b.f=b;a.b=b}else{c=a.b.f;c.d=b;b.f=c;a.b.f=b}b.e=a} +function thc(a,b){var c,d;kf(b.j==(h7d(),x5d));_gc(a,b);if(Vgc(a,b)){return}d=b.b;c=(b.b?b.b.f:null).Lm();uhc(a,b,d,c)} +function iob(a,b){var c,d;snb(a,(BFd(),zFd),b);Pnb((h7d(),Z6d),b);d=j7d(b.j);d!=-1&&(c=y1d(b),d!=c&&nob(PMe+d+QMe+c,b))} +function DGb(a,b){var c,d;c=b.b;if(a.ib){d=OKb(a.ib,b);!!d&&(c=d)}if(c!=(prb(),nrb)){!a.T&&gGb(a,new UIb);i_c(a.q,c,b)}} +function lvb(a,b,c){var d,e;for(e=new lxe(b$d(c));e.ab&&d.sf(a[f-1],a[f])>0;--f){g=a[f];FK(a,f,a[f-1]);FK(a,f-1,g)}}} +function NOb(a,b,c,d){LOb();this.b=a;this.c=b;this.d=!!a.O&&a.Q.a.length>1?a.O:null;this.a=new Blb(a,this.d,c,false);this.e=d} +function B$c(a,b,c,d,e){z$c();this.a=a;this.e=new TCe(b);this.c=new TCe(c);this.d=new TCe(d);this.b=new TCe(e);this.f=new RCe} +function z_d(){z_d=cjb;w_d=new A_d(_We,0);v_d=new A_d($We,1);x_d=new A_d(aXe,2);y_d=new A_d(bXe,3);u_d=new A_d('INHERITED',4)} +function pZd(a,b){!a.d&&(a.d=new g_d);!a.d.e&&(a.d.e=new jdd(2));if(Zcd(a.d.e,b,0)!=-1){return false}Vcd(a.d.e,b);return true} +function qZd(a,b){!a.d&&(a.d=new g_d);!a.d.f&&(a.d.f=new jdd(2));if(Zcd(a.d.f,b,0)!=-1){return false}Vcd(a.d.f,b);return true} +function FZd(a,b,c){if(!v$d(a)){return true}!a.b.j&&(a.b.j=new RDe);if(!MDe(a.b.j,b)){ODe(a.b.j,b,c);return true}return false} +function bqd(a,b){var c;if(!a.K){return a.G}c=a.K.q;if(c.size()==1){return Bmd(ltd(_rd(a.K.s,(lr(),new UD(b)))))}return a.K.r} +function otc(a,b){var c;c=a;while(c.t){c=c.t}if(c.w.contains(b)){return new Vid(a.a.G,null,null,null,false,false)}return null} +function iqb(a){if(!a||a.lm()){return a}else if(a.Nl()||a.Wl()){return a.sm().il()}else if(a.cm()){return a.tm().pm()}return a} +function Wld(a){if(-1==a.kl()){return a}if(eKe==a.kl()){return a.e.A}return Wnd(a.e,a.kl()&-33&-17&-257,a.nl(),a.Dl(),a.gl())} +function wwb(a){if(a.j==(h7d(),x5d)){return X1d(a,uwb)}else if(a.j==_5d){return Jse(a.Lm(),'goog$reflect$cache')}return false} +function G_d(a,b){if((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe){return false}else{x$d(a.a,b);a.e=true;return true}} +function NK(a,b){if(a.h==hMe&&a.m==0&&a.l==0){b&&(IK=LK(0,0,0));return KK((mL(),kL))}b&&(IK=LK(a.l,a.m,a.h));return LK(0,0,0)} +function mHd(a,b){if(b){a.d=CEd(a.d,GK(yK(Hab,1),PKe,67,0,[(BFd(),xFd)]));a.b.e&&YCd(a.c,b.b.b,AVe,GK(yK(agb,1),ZJe,1,5,[]))}} +function Qpb(a,b,c){if(Xpb(a,c.Lm())){b!=(z_d(),w_d)&&b!=u_d&&DGb(a.a,Rnc(c,wpb,GK(yK(fgb,1),pKe,2,6,[])));return w_d}return b} +function ZHc(a,b,c,d){var e;e=new v3d(d);if(!u3d(e,b,false,true,false,false)){g2d(c,b,e);EDc(b,a.c);GGb(a.c);return e}return b} +function URc(a,b){var c,d;if(OCe(a.o,b)){for(d=rL(bk(a.i,b),50).$d();d.Pd();){c=rL(d.Qd(),336);vSc(c)}return true}return false} +function Hvd(a,b){var c,d,e;if(!a){return Qq(),kD(),jD}e=new RCe;for(d=a.$d();d.Pd();){c=rL(d.Qd(),393);ie(e,c.Uk(b))}return e} +function eAd(a,b){var c,d,e;e=new _3d((h7d(),y6d));for(d=b.a.$d();d.Pd();){c=rL(d.Qd(),18);l1d(e,lyd(a.a,c))}return Kxd(a.a,e)} +function gAd(a,b){var c;Ryd(a,b,(BFd(),rFd));c=nyd(a.a,b.a);(c.j==(h7d(),n6d)||c.j==k4d)&&Ryd(a,b.a,WEd);return Wxd(a.a,A6d,c)} +function bIb(a,b){var c,d;aIb(a,b,null);kf(b.j==(h7d(),F6d));c=rL(F1d(b,89),148);if(c){d=AEd(c);Jse(d,TPe)||wGe(a.a,'lang',d)}} +function ANc(a,b,c,d){if(d){zf(!a.c);kf(b.j==(h7d(),m5d));a.c=b;a.b=c}!a.f?(a.f=c):a.j.f?(a.f=eoc(a.j.f,a.f,c)):Af(c==a.f,dVe)} +function YYd(a){var b,c,d,e;e=new N2d((h7d(),r6d));for(c=0,d=a.length;cc&&FK(b,c,null);return b} +function zCd(a,b){var c,d;c=a.p;if(c==a.o.length){d=CK(LL,qKe,17,a.o.length*2,15,1);Gte(a.o,0,d,0,c);a.o=d}a.o[c]=b&uKe;a.p=c+1} +function bSd(a,b){var c;YRd(a);c=a.b=48&&c<=57){iSd(b,$Rd(a));return aSd(a,b)}else{throw Aib(dSd(a))}} +function kne(a,b){var c,d;d=ose(a.d.size(),a.e.size());for(c=d-1;c>=0;c--){if(rL(a.d.getAtIndex(c),125)==b){return c}}return -1} +function sBb(a){var b,c;for(b=a.b;b;b=b.d){if(b.j==(h7d(),F4d)){c=sBb(b);if(c){return c}}else if(b.j!=c5d){return b}}return null} +function YId(a){var b;b=(lr(),new Fu);while(nJd(a,0,(XMd(),DLd))||BJd(a)||oJd(a,PLd)||nJd(a,0,dLd)){Du(b,XId(a))}return ur(b.a)} +function $Id(a){var b;b=(lr(),new Fu);while(nJd(a,0,(XMd(),DLd))||BJd(a)||oJd(a,PLd)||nJd(a,0,dLd)){Du(b,XId(a))}return ur(b.a)} +function v7d(a,b){var c,d,e;if(nw(b)){return a}c=new a4d((h7d(),q6d),a);for(e=b.$d();e.Pd();){d=rL(e.Qd(),75);l1d(c,d)}return c} +function ZWc(a,b){var c,d;d=aXc(b);c=d.d;while(!!c&&(HAc(),c.j==(h7d(),m5d)&&c.b.j==I4d&&!!CFb(a.a).dh(c.b))){d=c;c=c.d}return d} +function Tbc(a,b,c){var d;Sbc(a,b);if(!a.w){d=(A7d(),!c?null:zL(c,24)?rL(c,24):null);!!d&&(!b||(b.a&hNe)!=mNe)&&(a.w=d)}return a} +function Qbc(a,b,c){var d;if(b){d=c?(hNe&b.a)==mNe?b.i:null:(hNe&b.a)==mKe?b.i:null;if(d){a.s=e1d(d,a.u,a.A);a.t=false}}return a} +function RKc(a){var b,c;for(c=new lxe(a.d);c.a-1){Du(b,Zre(c-d));d=c+1;c=Pse(a,hte(10),d)}return ur(b.a)} +function wob(a){var b,c;b=new idd;for(c=rL(tFe(a.f),300);c;c=rL(tFe(a.f),300)){a.Kg(c.b,c.a);b.a[b.a.length]=c}pFe(a.f,b);a.Jg()} +function eOb(a){var b,c;for(c=new fxe(a.d);c.a!=c.b;){b=rL(dxe(c),220);if(!(!!b.a&&ROb(b.g,b.a.d,b.b))){return false}}return true} +function JBb(a,b,c){var d,e,f;if(a.j){d=NBb(b);for(f=new lxe(a.g);f.a0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return XJe in new Error} +function hae(a){var b,c;if(a.a){for(b=a.a.b;b;b=b.d){c=zL(b.k,9)?rL(b.k,9):null;if(!c||c.lm()){return true}}}return !a.b||a.b.lm()} +function Pkc(a,b){var c,d,e;c=null;for(e=b.$d();e.Pd();){d=rL(e.Qd(),5);if(!c){c=d}else if(!rFb(a.a,c,d)){return false}}return true} +function BRc(a){wRc();var b,c;for(c=tRc.$d();c.Pd();){b=wL(c.Qd());if(Jse(a.substr(0,b.length),b)){return ate(a,b.length)}}return a} +function BBc(a){HAc();switch(a.j.g){case 72:case 73:case 101:case 70:return a.b?a.b.f:null;case 71:return a.b;default:return null;}} +function i3c(a,b,c){switch(b.j.g){case 61:case 62:return h3c(a,b,c);default:c=W2c(a,b,c);return T2c(a,zL(b.k,9)?rL(b.k,9):null,c);}} +function a6b(a,b){X5b();return xFb(a,$Re+dte(_Re,(dFe(),bFe)),false),qYd(ODc(a,'$jscomp.makeIterator'),GK(yK(veb,1),MMe,5,0,[b]))} +function Urb(a,b){zrb();this.f=new RCe;this.g=new JCe;this.a=new RCe;this.i=new JCe;this.j=new RCe;this.c=a;this.e=b;this.b=CFb(a)} +function _mc(a,b,c,d,e){this.g=a;this.c=new JCe;this.f=b;this.a=c;this.b=d;this.e=e;this.d=new Y9b(a.a,a.b,true,true);X9b(this.d,d)} +function st(a,b,c){this.a=rL(tf(a),118);this.b=false;this.c=false;this.e=null;this.d=rL(tf(b),279);this.g=null;this.f=rL(tf(c),279)} +function wub(a,b,c){var d,e,f;f=yub(a,c);for(e=new lxe(f);e.a2000){RJ=a;SJ=$wnd.setTimeout(_J,10)}}if(QJ++==0){cK((bK(),aK));return true}return false} +function BWc(a,b){var c,d;for(d=cs(a.b).$d();d.Pd();){c=rL(d.Qd(),12);if(PIe(TIe(rL(c.se(),584),b))){return rL(c.te(),7)}}return null} +function myc(a){var b,c,d,e;b=new Nu;for(d=cs(a).$d();d.Pd();){c=rL(d.Qd(),12);e=Yvd(wL(c.se()));Ku(b,e,rL(c.te(),60))}return ps(b.b)} +function UUc(a){var b,c,d;b=new Nu;for(c=tw(jw(new nve(a.e),QUc));Hj(c);){JL(Ij(c));Ku(b,null.Ro,null.Ro)}d=new kad(ps(b.b));return d} +function cjc(a){var b,c,d,e;for(d=(e=(new nve(a.f)).a.ke().$d(),new sve(e));d.a.Pd();){c=(b=rL(d.a.Qd(),12),rL(b.te(),219));djc(a,c)}} +function mRc(a,b){var c,d;for(d=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();d.Pd();){c=rL(d.Qd(),5);c.j==(h7d(),R4d)||OCe(a.d,IBc(c))}} +function b3c(a,b,c){var d,e;d=b.b;e=b.b?b.b.f:null;c=_2c(a,b,c);o2d(b,J2c(a,zL(d.k,9)?rL(d.k,9):null,e.Lm(),b,c));return B2c(a,b.b,c)} +function rYd(a,b){var c;zf(NYd(a));zf(b.j==(h7d(),F4d));c=f2d(b,b.g,39);c!=b.g&&(b.g=c);b.g=new p3d(39,1,b.g);return new R2d(K4d,a,b)} +function uhd(a,b){var c,d;c=(HAc(),d=eBc(b),!d?null:rL(F1d(d,29),11));if(!c){return}(c.a&2)!=0&&Xzc(a,b,$gd,GK(yK(fgb,1),pKe,2,6,[]))} +function Dzc(a){var b,c,d;d=a.k.a.length;for(b=d;b>0;b--){c=rL(Ycd(a.k,b-1),5);if(HXc(c)){return c}}return rL(Awe(a.n),171).Vj().$j()} +function eie(a,b){var c,d,e;c=new Jme(a);for(e=b.ke().$d();e.Pd();){d=rL(e.Qd(),12);Hme(c,wL(d.se()),rL(d.te(),9),null)}return Ime(c)} +function rxe(a,b,c){var d,e,f,g;e=0;d=b-1;while(e<=d){f=e+(d-e>>1);g=a[f];if(gc){d=f-1}else{return f}}return -e-1} +function sxe(a,b,c){var d,e,f,g;e=0;d=b-1;while(e<=d){f=e+(d-e>>1);g=a[f];if(gc){d=f-1}else{return f}}return -e-1} +function VH(a){var b,c,d,e,f,g;f=0;g=0;do{b=Ese(a.a,a.b++);d=(TH(),e=SH[b],e);c=(d&32)!=0;d&=31;f=f+(d<0);for(c=0,d=a.length;c=0){f=f.a[1]}else{e=f;f=f.a[0]}}return e} +function X4c(a,b,c){var d,e,f,g;f=h5c(b);e=f.size();g=CK(fgb,pKe,2,e,6,1);for(d=0;d0){return}a.X=null} +function Bpc(a){var b,c;c=sBc(a.c.$j());for(b=c.b;b;b=b.d){b.j==(h7d(),A6d)||b.j==Y4d?OCe(a.b,a.c._j(b.b.Lm())):OCe(a.b,a.c._j(b.Lm()))}} +function QBc(a){HAc();var b;for(b=a;true;b=b.b){if(b.j==(h7d(),_5d)||b.j==U6d||b.j==P6d){return b}Ef(b.j==x5d,'Not a getprop node: ',b)}} +function c5c(a,b,c){var d,e,f,g;f=h5c(b);e=f.size();g=CK(yeb,ZJe,60,e,0,1);for(d=0;da.c||c=f){Lwe(a,b);return -1}else{Mwe(a,b);return 1}} +function krc(a,b,c){var d,e;kf(!c||zL(c,166));e=rL(c,166);d=rL(NDe(a.b,b),166);if(!d){d=g7c(a.a,b,e);ODe(a.b,b,d)}else{zf(e==d.b)}return d} +function DG(a,b){var c,d;b=(!a.c?(Ac(),Dd(),Cd):(Ac(),new ld(a.c.a))).Wd(b);d=CK(KL,ZLe,17,OG(a,b.length),15,1);c=WG(a,d,b);return EG(d,c)} +function apb(a,b,c){var d,e;(b.j==(h7d(),D6d)||(HAc(),b.j==F6d||b.j==r5d))&&Yh(a.a,b,c,false);d=b.b;e=c.b;while(d){apb(a,d,e);d=d.d;e=e.d}} +function K2b(a,b,c,d){E2b();var e;if(a.j==(h7d(),S4d)&&!(b.j==p5d&&a==b.b)){J2b(a,c,d);e=c1d(rL(F1d(d,29),11));S_d(e);n2d(d,F_d(e,false))}} +function cBc(a,b,c,d,e){HAc();var f,g;zf(a.d.c+a.e.c==0);zf(b.b==0);Af(e.$j().j==(h7d(),r5d),e);f=new EEc(a,b,e);g=new jAc(c,f,d);bAc(g,e)} +function yCd(){wCd();return GK(yK(Aab,1),PKe,137,0,[hCd,iCd,kCd,qCd,vCd,nCd,tCd,lCd,rCd,mCd,sCd,eCd,dCd,bCd,oCd,uCd,gCd,pCd,fCd,cCd,jCd])} +function tZd(a,b){var c;c=new X$d;c.d=!a.d?null:b_d(a.d,b);c.b=a.b;c.j=a.j;c.a=a.a;c.i=$$d(a.i,b);c.g=$$d(a.g,b);c.c=a.c;c.f=a.f;return c} +function Zyd(a,b){var c,d,e;Ryd(a,b,(BFd(),WEd));e=Vxd(a.a,(h7d(),k4d));for(d=b.a.$d();d.Pd();){c=rL(d.Qd(),18);l1d(e,nyd(a.a,c))}return e} +function $zd(a,b){var c,d,e;Ryd(a,b,(BFd(),WEd));e=Vxd(a.a,(h7d(),n6d));for(d=b.a.$d();d.Pd();){c=rL(d.Qd(),18);l1d(e,nyd(a.a,c))}return e} +function ZGd(a,b){var c;c=(lr(),new Fu);Du(c,b?b.a:'');while(oJd(a,(XMd(),hMd))){aHd(a,hMd);b=bHd(a);if(!b){break}Du(c,b.a)}return ur(c.a)} +function Anb(a){var b,c,d;Pnb((h7d(),M5d),a);for(b=a.b;b;b=b.d){Pnb(a6d,b);c=j7d(b.j);c!=-1&&(d=y1d(b),c!=d&&nob(PMe+c+QMe+d,b));Inb(b.b)}} +function sGb(a,b,c){var d,e;!a.T&&gGb(a,new UIb);d=(ZYc(),new kZc((new jZc,b),c));lr();new UD(d);return e=new RHb(d),zGb(a,e.f,e),JHb(e,a)} +function e5c(a,b,c){var d,e;e=b.Lm();d=rL(c.b.get(e),60);if(!d){l5c(a,b,E4c,GK(yK(fgb,1),pKe,2,6,[e]));return a.b.uj((Lhe(),Hhe))}return d} +function jRc(a){var b,c;b=a.b.k;if(!b||!b.Sl()){return false}c=b.sm().xl();if(!!c&&!c.mm()&&!c.lm()){return a.e.j==(h7d(),C6d)}return true} +function dac(a,b){if(b.j==(h7d(),_5d)){return Jse(b.Lm(),XOe)||a.a.length!=0&&Jse(b.Lm(),a.a)||a.b.length!=0&&Jse(b.Lm(),a.b)}return false} +function h1b(){h1b=cjb;g1b=new Q_b('ES6_MODULE_REFERENCES_THIS',(prb(),orb),new _te("The body of an ES6 module cannot reference 'this'."))} +function Osc(a,b){var c;c=Psc(a,wL(b.a.getAtIndex(0)));return !c||b.a.size()==1?c:rjd(c,(kf(b.a.size()!=1),new jud(b.a.Bf(1,b.a.size()))))} +function aad(a,b){Y9c();this.e=new RCe;this.a=a;this.d=EFb(a,new Mnc('',null,0,0,T9c,null,GK(yK(fgb,1),pKe,2,6,[])))==(prb(),mrb);this.c=b} +function Hvb(a,b,c){var d;this.e=a;this.a=new idd;this.c=b;this.d=c;d=c;do{d=d.e;Vcd(this.a,d)}while(d.j==(h7d(),m4d)&&T1d(d.b));this.b=d.e} +function qBb(a,b){WAb(this);this.c=a;this.f=b.sc;this.j=b.xd;this.g=b.vc;this.i=b.Fc||b.Wb==($Jb(),RJb);this.k=false;this.e=new Knc(this.k)} +function q_d(a,b){if(!a&&!b){return true}if(!a&&!!b||!!a&&!b){return false}return wL(a.d)==wL(b.d)&&a.f==b.f&&a.e==b.e&&a.c==b.c&&a.b==b.b} +function kee(a,b){var c,d;if(a.i==(Bfe(),zfe)){a.d=ur(b);for(d=a.d.$d();d.Pd();){c=rL(d.Qd(),24);F7d(a.p,c.cn())}}else{throw Aib(new Hte)}} +function job(a,b){var c;HAc();if(!!b&&(b.j==(h7d(),b7d)||b.j==T5d||b.j==S4d)){c=y1d(b);1!=c&&nob(SMe+c,b);Knb(a,b.j,b)}else{Dnb(a,b.e.j,b)}} +function mge(a,b,c){!a.a&&(a.a=new Ht(new RDe,new Lt));if(Ft(a.a,b,c)){return rL(Gt(a.a,b,c),281)}else{nge(a,b,c,(sge(),rge));return null}} +function Lhc(a,b){var c,d,e;a.b=new RDe;for(d=new pEe(new gEe(b));d.b!=d.c.a.b;){c=nEe(d);e=rL(c.d,66);e.gk()&&ODe(a.b,e.ji(),rL(c.e,151))}} +function Rv(a){var b,c,d;b=Pv(a.a);for(d=new lxe(a.b);d.a=0;d=Mkb(b,d-1)){e[d]+=1}}return e} +function kse(a){var b,c;if(Dib(a,-129)>0&&Dib(a,128)<0){b=Tib(a)+128;c=(mse(),lse)[b];!c&&(c=lse[b]=new bse(a));return c}return new bse(a)} +function _Bc(a){HAc();var b;b=a.e;if($Bc(b)&&b.b==a||b.j==(h7d(),I5d)||b.j==(h7d(),V4d)||b.j==(h7d(),p5d)&&b.b==a){return true}return false} +function g2b(a,b,c){var d,e;for(e=c.$d();e.Pd();){d=rL(e.Qd(),5);d.j==(h7d(),L6d)&&f2b(a,b,d);g2b(a,b,!d.b?(jye(),jye(),iye):new F3d(d.b))}} +function a7b(a,b,c,d){var e,f;e=b.b;f=e.d;e7b(e,true)&&b7b(c,d,e)?GGb(a.c):e7b(f,false)&&b7b(c,d,f)?GGb(a.c):f.j==(h7d(),m4d)&&a7b(a,f,c,d)} +function Nf(b,c){try{return b.a.contains(c)}catch(a){a=zib(a);if(zL(a,104)){return false}else if(zL(a,185)){return false}else throw Aib(a)}} +function lPb(a){while(a){if(a.j==(h7d(),W5d)||a.j==y5d||a.j==G6d||a.j==R4d){return B1d(a,58)==0}if(a.j==N4d){return false}a=a.e}return false} +function Rxb(a,b){var c,d;for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);if(Jse(c.Lm(),b)){return c.b}}return null} +function LId(a,b){var c,d,e;e=eKd(a.g,0).b.b;c=MId(a,b);if(oJd(a,(XMd(),uLd))){aHd(a,uLd);d=BHd(a,1);c=new QNd(new qRd(e,a.f),c,d)}return c} +function SDc(a,b){HAc();var c,d;c=(Ef(Ose(a,hte(46))==-1,xMe,a),new T3d((h7d(),_5d),a));if(b){l1d(c,b);H2d(c,b)}d=H2d(xYd(c,b7d),c);return d} +function mCc(a,b){HAc();var c;if(B1d(a,43)!=0){return true}if(a.j!=(h7d(),_5d)||!b){return false}c=b._j(a.Lm());return !!c&&(c.Ck()||c.zk())} +function ct(a,b,c,d,e,f,g){Qq();var h,i;i=g.length+6;h=new jdd(i);kye(h,GK(yK(agb,1),ZJe,1,5,[a,b,c,d,e,f]));kye(h,g);return Ys(new lxe(h))} +function Shc(){Shc=cjb;Rhc=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[IKe,GKe])));Qhc=Au(pCe((h7d(),g4d),GK(yK(xeb,1),PKe,29,0,[p6d,A5d,B5d,F4d,F6d])))} +function qyc(a){if(a.j!=(h7d(),I4d)){return false}a=a.b;return a.j==x5d&&a.b.j==_5d&&Jse(a.b.Lm(),ANe)&&Jse((a.b?a.b.f:null).Lm(),'typeOf')} +function MPc(a){if(!a){return false}switch(a.j.g){case 65:return true;case 60:return MPc(a.b.d)&&MPc(a.b?a.b.f:null);default:return false;}} +function GDc(a){HAc();switch(a){case 5:case 1:case 3:case 4:case 2:return false;case 6:case 0:return true;default:throw Aib(new Ire(UPe));}} +function MGd(a){HGd();switch(a.g){case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:return true;default:return false;}} +function IKd(a){switch(a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return true;default:return false;}} +function Vqe(a,b,c){mJe(a>=0&&a<=dMe);if(a>=rKe){b[c++]=sKe+(a-rKe>>10&tKe)&uKe;b[c]=vKe+(a-rKe&tKe)&uKe;return 2}else{b[c]=a&uKe;return 1}} +function Qzc(a,b){var c,d,e;c=mBc(b);a.f=c;IGb(a.c,c);e=Fzc(c);e?$zc(a,rL(F1d(e,53),127),(d=rL(F1d(e,51),28),!d?null:d.ji())):$zc(a,null,'')} +function hAc(b,c){var d;try{Qzc(b,c);b.e=c;Pzc(b,c.e);cAc(b,c,c.e)}catch(a){a=zib(a);if(zL(a,146)||zL(a,72)){d=a;_zc(b,d)}else throw Aib(a)}} +function UJc(a,b){var c;zf(b.j==(h7d(),f6d));if(NJc(a,b)){A2d(b,I4d);c=f2d(b,b.g,50);c!=b.g&&(b.g=c);b.g=new p3d(50,1,b.g);GGb(a.c)}return b} +function GRc(a,b){var c,d;d=BRc(G1d(b));if(!Thc(a,d)){kue(a.e,d);jue(a.d,(c=d.indexOf(LMe),c<0?null:new JRc(d.substr(0,c),d.substr(c+11))))}} +function N1c(a,b,c){var d,e;if(c.j==(h7d(),x5d)){d=Z1c(a,c.b);e=c.b?c.b.f:null;d.zn()&&!d.Hl(e.Lm())&&c2c(b,e,j1c,GK(yK(fgb,1),pKe,2,6,[]))}} +function uad(a,b,c,d){c.c.e.j!=(h7d(),b7d)&&B1d(z1d(c.c),39)!=0&&lad.contains(z1d(c.c).e.j)&&DGb(a.c,Rnc(d,mad,GK(yK(fgb,1),pKe,2,6,[b.i])))} +function fub(a,b){var c,d,e;for(d=new lxe(a.a);d.a=0){++a.b;d=c}d==-1?(a.a+=b.length):(a.a=b.length-(d+1));return a} +function xAd(a,b){var c,d;d=b.a.zf();c=$xd(a.a,(h7d(),_5d),wL(d.Qd()));while(d.Pd()){c=EYd(c,bZd(wL(d.Qd())))}return Kxd(a.a,new a4d(Y6d,c))} +function mTc(a,b){var c,d;d=b.Lm();c=rL(fue(a.c,d),191);if(c.c!=null&&!Jse(c.c,d)){if(a.s){return wL(eue(a.s,b))}return c.c}else{return null}} +function VBc(a,b,c){HAc();var d;if(b.Td(a)){return true}if(!c.Td(a)){return false}for(d=a.b;d;d=d.d){if(VBc(d,b,c)){return true}}return false} +function hB(b,c){aB();tf(b);try{return b.get(c)}catch(a){a=zib(a);if(zL(a,185)){return null}else if(zL(a,104)){return null}else throw Aib(a)}} +function $Rd(a){var b;b=0;while(a.b0){return ZRd(a)}}return Tib(b)} +function Wzd(a,b){var c,d,e;e=Wxd(a.a,(h7d(),f6d),lyd(a.a,b.b));if(b.a){for(d=b.a.a.$d();d.Pd();){c=rL(d.Qd(),18);l1d(e,lyd(a.a,c))}}return e} +function Pgc(a){var b,c,d,e;for(d=(e=(new dve(a.b.a)).a.ke().$d(),new jve(e));d.a.Pd();){c=(b=rL(d.a.Qd(),12),rL(b.se(),5));fhc(a,c)}a.b=null} +function Ime(a){var b;if(a.b){return rL(sie(a.d,(Lhe(),nhe)),24)}b=(Kv(),new Tv((LC(),KC)));Sv(b,new yue(a.c));return new Ame(a.d,Rv(b),a.a)} +function Osd(a,b,c){var d,e;e=new kud(b);d=c?Jsd(a,e):Ksd(a,e);!d&&(d=Ksd(a,new kud(CTe+b)));!d&&(d=Ksd(a,new kud(DTe+b)));return !d?null:d.c} +function ODe(a,b,c){var d,e,f;e=rL(eue(a.c,b),304);if(!e){d=new dEe(a,b,c);hue(a.c,b,d);aEe(d);return null}else{f=wve(e,c);PDe(a,e);return f}} +function J2b(a,b,c){E2b();var d,e,f;e=rL(F1d(a,29),11);if(!e){e=rL(F1d(b,29),11);f=f2d(b,b.g,29);f!=b.g&&(b.g=f)}d=c1d(e);n2d(c,F_d(d,false))} +function YAc(a,b){HAc();var c,d;zf(a.j==(h7d(),I4d));d=a.e;if(d.j==m5d){c=d.e;a2d(c,d);d=c}else{g2d(d,a,RDc(a))}EDc(a,b);BGb(b,AFb(d));mGb(b)} +function kob(a,b){var c;HAc();!!b&&(b.j==(h7d(),b7d)||b.j==T5d||b.j==S4d)?Knb(a,b.j,b):b.j==(h7d(),c5d)?(c=y1d(b),0!=c&&nob(OMe+c,b)):rnb(a,b)} +function vjb(a,b){switch(b.g){case 0:return wjb(a,qMe,(Djb(),zjb));case 1:return wjb(a,rMe,(Djb(),Cjb));default:return b.f!=null?b.f:''+b.g;}} +function vJd(a){var b;b=eKd(a.g,0);switch(b.c.g){case 18:case 2:case 49:case 65:case 54:case 47:return true;default:return HGd(),!!JGd(b.c);}} +function wuc(a,b){var c;do{c=Ttc(a.a,b,true);if(c.d){return}else{c.d=true}if(Ose(b,hte(46))==-1){return}b=bte(b,0,Rse(b,hte(46)))}while(true)} +function Bl(a,b){var c;if(b===a){return true}if(!zL(b,44)){return false}c=rL(b,44);if(c.size()!=a.size()){return false}return a.containsAll(c)} +function Thc(a,b){var c;if(In(a.i,b)>0){return true}c=rL(Awe(a.g),198);if(!c.c){return false}while(!!c&&!!c.a){dk(a.k,c.a,b);c=c.b}return true} +function Ztd(a,b){var c,d,e;d=a.b;e=b.b;!d||!e?(c=null):kld(d,e)?(c=d):(c=null);return new Wtd(a.c==b.c?a.c:null,Tnd(a.d,b.d),c,$td(a.a,b.a))} +function RId(a){var b,c;b=eKd(a.g,0).b.b;if(oJd(a,(XMd(),aMd))){aHd(a,aMd);c=new LQd(new qRd(b,a.f),uId(a));aHd(a,fLd)}else{c=fJd(a)}return c} +function OIc(a,b){var c,d,e;d=b.e;c=b.b;e=c.d;c=dJc(a,c,true);if(!c||(HAc(),!OAc(c,false,a.c))){a2d(b,e);g2d(d,b,e);GGb(a.c);return e}return b} +function wlc(a,b,c){var d,e,f;if(!a.c.b&&!b.Ak()){e=b.pk().Lm().length+2;f=8+e+4*(c.a.length-1);d=(e-1)*(c.a.length-1);return f>=d}return true} +function rCc(a){HAc();var b;if(!!a&&(a.j==(h7d(),b7d)||a.j==T5d||a.j==S4d)){for(b=a.b;b;b=b.d){if(b.j==(h7d(),$4d)){return true}}}return false} +function P0d(a,b){if(!!b&&!((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)&&!a.a.g){T$d(a.a,b);a.e=true;return true}else{return false}} +function DEe(a,b){var c,d;yJe(b,a.b);if(b>=a.b>>1){d=a.c;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c100){throw Aib(new Ire('DecomposeExpression depth exceeded on :\n'+G2d(b)))}}} +function kbc(a,b){var c,d;d=(Ef(Ose(a,hte(46))==-1,xMe,a),new T3d((h7d(),_5d),a));c=lYd(d,b);return HAc(),H2d((Af(NYd(c),c),new P2d(m5d,c)),c)} +function prc(a,b){var c,d,e;switch(b.j.g){case 26:case 27:d=b.b.d;e=!b.e?null:b.e.e;if(d.j==(h7d(),L6d)&&e.j==m4d){c=e.b.d;Kkc(a.a,d.Lm(),c)}}} +function iUc(a,b){eUc();var c;Af(b.j==(h7d(),L6d)||b.j==M6d,b);return a?b.Lm():(c=rL(F1d(b,51),28),(!c?null:c.ji())+':'+W2d(b.i)+':'+V2d(b.i))} +function Vgd(a){var b,c;if(a.j!=(h7d(),r5d)){return false}b=(HAc(),c=eBc(a),!c?null:rL(F1d(c,29),11));return !!b&&((b.a&512)!=0||(b.a&iNe)!=0)} +function EBd(a,b){var c;c=FBd(a,b);if(c){if(hBd(a,(wCd(),oCd))){!a.n?DCd(a.i):_Ad(a);PBd(a);b=!a.n?DCd(a.i):_Ad(a);return KBd(a,b,c)}}return c} +function qne(a,b,c){var d,e,f;f=c-b.size();if(f>0){d=(lr(),new Fu);su(d,b);for(e=0;e1){b.a+='(?:';a.a.Am(b);b.a+=')'}else{a.a.Am(b)}} +function KUd(a){this.j=new LUd(this);this.f=new bVd(this);this.g=new RVd(this,this);this.i=new eWd(this,this);this.k=a;this.d=this;this.e=null} +function KPc(a,b){this.e=new JCe;this.i=new hMb(false,false);this.b=rL(tf(a),342);this.c=b;this.f=new kp;this.a=new idd;this.d=null;this.g=null} +function nc(){nc=cjb;jc=new uc((Ac(),new ld(45)));kc=new vc(new ld(95));ic=new wc(new dd(65,90));lc=new yc(new dd(65,90));mc=new zc(new ld(95))} +function Ff(a,b,c){if(!a){throw Aib(new Ire(Jf('Bad binary operator "%s": expected 2 arguments but got %s',GK(yK(agb,1),ZJe,1,5,[b,Zre(c)]))))}} +function okb(a,b,c){var d;pf(b.Fl(),'Constructor %s without instance type.',b);d=b.il();Nkb(c,qkb(a,d.vl()));pkb(a,d);Lkb(c,rL(eue(a.g,d),170))} +function KQb(a){var b,c,d,e,f;a.e=(aB(),new KCe(cB(IQb.length)));f=0;for(c=IQb,d=0,e=c.length;d0?(d=rL(bdd(a.k,c-1),5)):(d=rL(Jwe(a.n),171).$j());HAc();tCe(xAc,d.j)&&Jwe(a.b)} +function MCc(a){switch(a.j.g){case 29:return Jse(a.Lm(),DKe);case 26:return Z1d(a,DUe,DUe.length)||Z1d(a,EUe,EUe.length);default:return false;}} +function yae(a,b){switch(a){case 0:return false;case 1:return b;case 2:return !b;case 3:return true;default:throw Aib(new sqe('Ordinal: '+a));}} +function wPc(a){var b,c;for(c=new lxe(a.b);c.a>>4&uKe;b[2]=Icd[a&15];b[1]=120;b[0]=92;return b}return Lcd(a)} +function $jd(a,b){var c;zf(!(a==a.a.v||a==a.a.g));c=a.i.size();return bc.b){EDd(a,c.d);return false}return true} +function aKc(a,b){var c,d;Af(b.j==(h7d(),S6d),b);c=UBc(b);if(c==null||b.e.j==R6d){return b}d=H2d(new T3d(L6d,c),b);g2d(b.e,b,d);GGb(a.c);return d} +function gzd(a,b){var c;Uyd(a,b,b.c?(BFd(),TEd):(BFd(),QEd));c=Wxd(a.a,(h7d(),J4d),lyd(a.a,b.a));Oyd(a,c,b.d);Nyd(a,c,b.b);$1d(c,83,b.c);return c} +function TId(a,b){var c;c=MId(a,b);oJd(a,(XMd(),uLd))&&HJd(a,"A default value cannot be specified after '...'",GK(yK(agb,1),ZJe,1,5,[]));return c} +function Hzc(a){var b,c;c=rL(Awe(a.n),171);for(b=0;b>4&uKe}return mte(c,0,c.length)} +function uGb(a){var b;zf(TIb(a.T));b=(!a.W&&(a.W=new sRb(a.T)),nRb(a.W));if(b.a.length==0){return}a.X=wFb(a);HKc(a.X,b);LKc(a.X,a.w,a.L);a.X=null} +function auc(a){var b,c,d,e;b=new nvc(a);Rmb(a.c,b);for(e=new lxe(a.g);e.a=a.length){throw Aib(new DRd(bte(c.a,c.d,c.b)))}if(b==-2){return d}return a[b]} +function Lce(a,b){var c,d,e;if(a.t){return false}e=a.fo(b);d=a.On()?rL(sie(a.F,(Lhe(),Sge)),24):rL(sie(a.F,(Lhe(),mhe)),24);c=d.fo(b);return e!=c} +function gfe(a,b){a.e=b.go();a.j=b.n;a.f=b.c.a;a.i=b.c.b;a.n=K7d(b.p)?rL(sie(b.F,(Lhe(),Hhe)),24):b.p;a.k=b.I;a.c=b.Nl();a.d=b.t;a.b=b.f;return a} +function xwe(a){var b,c,d;if(a.b!=a.c){return}d=a.a.length;c=Rre(8>d?8:d)<<1;if(a.b!=0){b=$Ie(a.a,c);wwe(a,b,d);a.a=b;a.b=0}else{cJe(a.a,c)}a.c=d} +function Ab(a){return EL(a)?RJe(a):BL(a)?IL((wJe(a),a)):AL(a)?(wJe(a),a)?1231:1237:yL(a)?a.Jd():EK(a)?LJe(a):!!a&&!!a.hashCode?a.hashCode():LJe(a)} +function Vse(a,b,c){var d,e,f;d=(b>>>0).toString(16);e='\\u'+ate('0000',d.length)+d;f=String.fromCharCode(c);return a.replace(new RegExp(e,'g'),f)} +function Jp(b,c){Hp();tf(b);try{return b.remove(c)}catch(a){a=zib(a);if(zL(a,185)){return false}else if(zL(a,104)){return false}else throw Aib(a)}} +function flb(a,b){var c,d;if(a.e){return}++a.b;if(b.km()){b=b.qm();if(b.km()){for(d=b.El().$d();d.Pd();){c=rL(d.Qd(),60);elb(a,c)}return}}elb(a,b)} +function ZPc(a,b){var c,d;if(!a){return false}if(a.k==b){return true}c=(HAc(),nBc(a.k.i,new vEc((h7d(),r5d))));d=nBc(b.i,new vEc(r5d));return c==d} +function Wmc(a){var b,c;if(!T1d(a)){return false}b=E1d(a);return c='.$same'.length,Jse(b.substr(b.length-c,c),'.$same')&&b.indexOf('Equality')!=-1} +function uob(a,b){var c;this.c=a;this.d=b;this.a=b.j==(h7d(),r5d);if(b.e){c=b.e.j;this.b=c==a5d||c==e7d||c==o5d||c==q5d||c==p5d}else{this.b=false}} +function mNb(a){if(!a){return false}return (a.a&hNe)==mNe||(a.a&hNe)==mKe||TZd(a)>0||(a.a&2)!=0||(a.a&512)!=0||(a.a&iNe)!=0||!!a.g||(a.a&hNe)==UQe} +function VPc(a,b,c){var d,e;if(a.a&&Cnc(a.b)){return}LPc(a.b)||ljb(a.b,hVe,(Dqe(),Cqe));d=new mZb(a.b,true);lZb(d,b,c);e=new KPc(a.b,d);JPc(e,b,c)} +function RRc(a,b){var c,d,e,f;for(f=(d=(new nve(b.j)).a.ke().$d(),new sve(d));f.a.Pd();){e=(c=rL(f.a.Qd(),12),rL(c.te(),66));TRc(a,e)&&Vcd(a.j,e)}} +function ptc(a,b){var c,d,e,f;for(d=(f=(new dve(a.j.a)).a.ke().$d(),new jve(f));d.a.Pd();){c=(e=rL(d.a.Qd(),12),rL(e.se(),100));Kpd(b,c,a)}a.j=null} +function A2c(a){var b,c,d;d=new RDe;for(c=new Gue((new yue(a)).a);c.b;){b=Fue(c);!!rL(b.se(),125).b||ODe(d,rL(b.se(),125).a,rL(b.te(),9))}return d} +function B2c(a,b,c){var d,e,f;if(T1d(b)){f=(d=zL(b.k,9)?rL(b.k,9):null,!d?a.i:d);e=f.Jn();!!e&&D7d(f,e,0,new lge(true))||(c=S2c(a,c,b,e))}return c} +function tyd(a,b){var c;if(b.j==(h7d(),C6d)){c=b;while(c=c.e){if(c.j==r5d){return}}a.d.Ej('return must be inside function',a.r,W2d(b.i),V2d(b.i))}} +function CKd(a,b){var c,d,e;d=a.d;while($Jd(a,a.d)&&!LKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){_Jd(a)}c=SGd(a.e.b,d,a.d);e=bte(a.e.a,d,a.d);MJd(a.a,b,c,e)} +function Mxb(a,b){if(b.j==(h7d(),M6d)){DGb(a.a,Rnc(b,Cxb,GK(yK(fgb,1),pKe,2,6,[])))}else{zf(b.j==I4d);DGb(a.a,Rnc(b,xxb,GK(yK(fgb,1),pKe,2,6,[])))}} +function V1c(a,b){var c;c=zL(b.k,9)?rL(b.k,9):null;if(!c){++a.d}else if(c.lm()){a.f&&DGb(a.a,Szc(b,A1c,GK(yK(fgb,1),pKe,2,6,[])));++a.o}else{++a.n}} +function IMb(){IMb=cjb;FMb=new JMb('ON_TRUE',0);EMb=new JMb('ON_FALSE',1);HMb=new JMb('UNCOND',2);DMb=new JMb('ON_EX',3);GMb=new JMb('SYN_BLOCK',4)} +function imc(a,b){var c,d;if(!a){return false}a=a.qm();if(!a.tm()){return false}c=gmc(a);return c!=null&&(d=b.length,Jse(c.substr(c.length-d,d),b))} +function Hvc(a,b,c){var d,e,f;d=zZb(c,false);if(d){e=d.d;if(e!=null){f=d.Bi();!!f&&!LCc(f)&&!Gvc(a,f)&&(d=new c$b(d.Ai(),false));gZb(a.b,e,d,c,b)}}} +function JBc(a){HAc();switch(a.j.g){case 91:case 86:case 87:case 98:return a;case 114:return a.b.j==(h7d(),L6d)?a.b:null;}throw Aib(new Ire(RNe+a))} +function hdd(a,b){var c,d,e;e=a.a.length;b.lengthe&&FK(b,e,null);return b} +function Yxe(a,b){var c,d,e;e=a.a.length;b.lengthe&&FK(b,e,null);return b} +function jId(a){var b,c,d,e;d=eKd(a.g,0).b.b;if(uJd(a)){b=fId(a,0);aHd(a,(XMd(),WKd));c=bJd(a);e=new uOd(new qRd(d,a.f),b,c)}else{e=zHd(a)}return e} +function tfe(a,b){var c,d,e,f;c=D1d(a.b);if(!!c&&(B1d(c,37)!=0||B1d(c,30)!=0)){return false}for(e=0,f=b.length;e=0&&a<=dMe);return a>=rKe?GK(yK(LL,1),qKe,17,15,[sKe+(a-rKe>>10&tKe)&uKe,vKe+(a-rKe&tKe)&uKe]):GK(yK(LL,1),qKe,17,15,[a&uKe])} +function wb(a,b){return EL(a)?Jse(a,b):BL(a)?(wJe(a),a===b):AL(a)?(wJe(a),a===b):yL(a)?a.Hd(b):EK(a)?a===b:!!a&&!!a.equals?a.equals(b):HL(a)===HL(b)} +function Df(a,b,c){if(!a){throw Aib(new Ire(Jf('Bad GETELEM node: Expected 2 children but got %s. For node: %s',GK(yK(agb,1),ZJe,1,5,[Zre(b),c]))))}} +function Qg(){lf('%s'.length!=0,'The separator may not be the empty string.');if('%s'.length==1){return Og('%s'.charCodeAt(0))}return new Mg(new Zg)} +function Ip(b,c){Hp();tf(b);try{return b.contains(c)}catch(a){a=zib(a);if(zL(a,185)){return false}else if(zL(a,104)){return false}else throw Aib(a)}} +function iyc(a,b){var c,d;c=Tsc(a.C,b);d=rL(NDe(a.M,c),20);if(d){return d}d=Jsc(a.C,b);if(!qld(d)){zf(eKe==d.kl());return yqd(a.w)}return Xxc(a,c,d)} +function DDc(a){HAc();var b,c;for(c=new k3d(new h3d(rL(tf(a.e),5)));c.a.a;){b=j3d(c);if(SCc(b)){return true}if(b.j==(h7d(),r5d)){break}}return false} +function zGc(a,b,c){var d;if(c){zGc(a,b,c.d);FGb(a.a,c);u1d(c);d=J2d(xYd(c,(h7d(),b7d)),c);m1d(b.b?b.b.f:null,d);FGb(a.a,d);return true}return false} +function rBd(a,b){var c,d;switch(b.g){case 4:d=a.i.n;c=r1d(new U3d((h7d(),M6d),d,a.i.g,CCd(a.i)),a.k);p2d(c,d.length);return c;default:return null;}} +function eBd(a){var b,c,d;HCd(a.i);d=a.i.g;b=CCd(a.i)+1;c=fte(fBd(a));c.length>0&&L_d(a.e,c,d,b,d,b+c.length);return new WBd(c,!a.n?DCd(a.i):_Ad(a))} +function m8c(a,b){var c,d,e;d=b.b;c=d.Lm();if(c.length!=0){e=t6c(a.g,c);(!e||!!e.j&&PBc(e.j)!=b)&&A7c(a,d,b,zL(b.k,9)?rL(b.k,9):null,false)}k8c(a,b)} +function Syd(a,b){if(m7d(b.Lm())){a.a.e=CEd(a.a.e,GK(yK(Hab,1),PKe,67,0,[(BFd(),gFd)]));a.a.a.c==(Axd(),uxd)&&a.a.d.Fj(yVe,a.a.r,W2d(b.i),V2d(b.i))}} +function HHd(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=YHd(a,b);while(oJd(a,(XMd(),TKd))){d=aHd(a,TKd);e=YHd(a,b);c=new mNd(new qRd(f,a.f),c,d,e)}return c} +function IHd(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=JHd(a,b);while(oJd(a,(XMd(),YKd))){d=aHd(a,YKd);e=JHd(a,b);c=new mNd(new qRd(f,a.f),c,d,e)}return c} +function JHd(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=HHd(a,b);while(oJd(a,(XMd(),_Kd))){d=aHd(a,_Kd);e=HHd(a,b);c=new mNd(new qRd(f,a.f),c,d,e)}return c} +function xId(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=IHd(a,b);while(oJd(a,(XMd(),VKd))){d=aHd(a,VKd);e=IHd(a,b);c=new mNd(new qRd(f,a.f),c,d,e)}return c} +function yId(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=xId(a,b);while(oJd(a,(XMd(),dMd))){d=aHd(a,dMd);e=xId(a,b);c=new mNd(new qRd(f,a.f),c,d,e)}return c} +function MRd(a,b){var c,d,e;d=a.b.n;e=gjb(a.a);if(e.indexOf('.')!=-1){c=Ose(e,hte(46));c+d127||a.e[b]==-1){throw Aib(new nH('Unrecognized character: '+(Yc((hd(),gd),b)?'0x'+(b>>>0).toString(16):Xqe(b))))}return a.e[b]} +function jxb(a,b,c){if(b.j==(h7d(),k6d)||b.j==L6d){b.j==k6d&&(b=H2d(bZd(''+b.Km()),b));A2d(b,M6d);b.Pm();l1d(a,ZYd(b,c))}else{l1d(a,H2d(uYd(b,c),b))}} +function yLb(a){var b;if(a.j==(h7d(),F4d)&&a.e.j==X6d&&a.e.b==a){for(b=a.d;b;b=b.d){HAc();kf(b.j==F4d);if(!!b.b&&b.b.j==M4d){return b.b}}}return null} +function lZb(a,b,c){Af(!a.j,'The definition provider is already initialized.');a.j=true;lAc(a.d,b,new Jvc(a,true));hZb(a);lAc(a.d,c,new Jvc(a,false))} +function R5b(a,b){var c,d,e;c=b.b;if(!c.b){return}e=G1d(c.b);if(MDe(a.b.a,e)){d=G1d(c);d!=null&&(kf(MDe(a.b.a,e)),ODe(a.b.a,d,rL(NDe(a.b.a,e),259)))}} +function Dyc(a,b,c,d){kf(c.j==(h7d(),x5d));if(Qld(d,b)){hzc(a.Q,Rnc(c,fwc,GK(yK(fgb,1),pKe,2,6,[Wd(new _d('.'),b.a.$d())])));return true}return false} +function AUc(){AUc=cjb;vUc=new BUc('CONSISTENT',0);wUc=new BUc('INCONSISTENT',1);xUc=new BUc('MAPPED',2);yUc=new BUc('STABLE',3);zUc=new BUc('XID',4)} +function S1c(a,b,c){var d,e;if(!!c&&!!C1d(c.a)){e=C1d(c.a);d=Y1c(a,e,new RCe);!!d&&DGb(a.a,Szc(b,v1c,GK(yK(fgb,1),pKe,2,6,[d.Um(new zte,false).a])))}} +function Qsd(a,b){var c,d;kf(b.a.size()==1);c=Jsd(a,b);d=wL(b.a.getAtIndex(0));!c&&(c=Jsd(a,new kud(CTe+d)));!c&&(c=Ksd(a,new kud(DTe+d)));return !!c} +function Fvd(a,b){var c,d,e,f;if(!a){return null}d=null;for(f=a.$d();f.Pd();){e=rL(f.Qd(),393);if(e.Xk(b)){c=e.Sk(b);!!c&&(d=!d?c:Tnd(d,c))}}return d} +function bD(a){_C();var b,c,d,e;ku.call(this,a);c=new Nu;for(e=cs(a).$d();e.Pd();){d=rL(e.Qd(),12);Ku(c,d.te(),d.se())}b=ps(c.b);this.a=new cD(b,this)} +function czd(a,b){(b.b.c==(XMd(),AMd)||b.b.c==BMd)&&Ryd(a,b,(BFd(),ZEd));return Sxd(a.a,b.c.o)?Xxd(a.a,Cyd(b.b.c),lyd(a.a,b.a),lyd(a.a,b.c)):dzd(a,b)} +function iEd(){fEd();return GK(yK(Fab,1),PKe,123,0,[JDd,KDd,LDd,NDd,ODd,PDd,QDd,RDd,MDd,TDd,SDd,UDd,VDd,WDd,XDd,$Dd,ZDd,YDd,_Dd,aEd,bEd,cEd,dEd,eEd])} +function d_d(a,b){var c,d,e,f;e=null;if(a){e=new RDe;for(d=new pEe(new gEe(a));d.b!=d.c.a.b;){c=nEe(d);f=rL(c.e,56);ODe(e,wL(c.d),$$d(f,b))}}return e} +function Yoc(a,b){var c,d,e;e=null;for(c=a;c!=b;c=c.f){for(d=c.e;!!d&&(!c.f||c.f.e!=d);d=d.a){if(!e){e=d}else if(!Jse(d.c,e.c)){return null}}}return e} +function Kde(a,b,c){var d,e,f;d=b.Zn();if(d){if(d.i!=(Bfe(),zfe)){return}if(!c.add(b)){return}for(f=b.$n().$d();f.Pd();){e=rL(f.Qd(),24);Kde(a,e,c)}}} +function Rx(a,b,c){var d,e,f;d=b.$d();f=c.$d();while(d.Pd()){if(!f.Pd()){return 1}e=NC(d.Qd(),f.Qd());if(e!=0){return e}}if(f.Pd()){return -1}return 0} +function Enb(a){var b,c;Pnb((h7d(),P5d),a);a.Lm()==null&&nob(WMe,a);a.Lm().length==0&&nob(XMe,a);c=j7d(a.j);c!=-1&&(b=y1d(a),c!=b&&nob(PMe+c+QMe+b,a))} +function Inb(a){var b,c;Pnb((h7d(),_5d),a);a.Lm()==null&&nob(WMe,a);a.Lm().length==0&&nob(XMe,a);c=j7d(a.j);c!=-1&&(b=y1d(a),c!=b&&nob(PMe+c+QMe+b,a))} +function ipb(a,b,c){var d,e;d=b.length==0?'':b+hKe;e=new RCe;fEc(rL(Ah(a.a,c),5),new lpb(e),(Lf(),fg(),cg));fEc(c,new npb(a,e,d),(null,cg));dpb(a,d,e)} +function HCb(a){if(a.j==(h7d(),m5d)){if(a.b.j!=I4d){return false}}else if(a.j!=I4d){return false}a.j==m5d&&(a=a.b);return Y1d(a.b,'goog.asserts.fail')} +function Lyd(a){var b,c;kf(a.j==(h7d(),F6d));if(!a.b){return false}c=a.b;if(c.j!=m5d){return false}b=c.b;if(b.j!=I4d){return false}return Y1d(b.b,_Ne)} +function CHc(a,b,c,d){kf(b.j==(h7d(),w5d));if(c.j==m6d){return HHc(a,b,c,d)}if(c.j==j4d){return vHc(a,b,c,d)}if(c.j==L6d){return JHc(a,b,c,d)}return b} +function l3b(a,b,c){var d,e;d=B1d(a,58)!=0?b:c;d=s1d(d,false);if(a.j==(h7d(),R4d)){return DYd(d,d2d(a))}else{e=a.b.b;return I2d(EYd(d,bZd(a.Lm())),e)}} +function Y5b(a,b){X5b();return xFb(a,$Re+dte('arrayFromIterable',(dFe(),bFe)),false),qYd(ODc(a,'$jscomp.arrayFromIterable'),GK(yK(veb,1),MMe,5,0,[b]))} +function Blc(a,b,c,d){var e,f;f=rL(F1d(c,79),60);if(f){e=f2d(d,d.g,79);e!=d.g&&(d.g=e);!!f&&(d.g=new A3d(79,f,d.g));B2d(d,c.k)}g2d(b,c,d);EDc(c,a.c.a)} +function DGc(a,b){var c,d,e;e=Oz((Af(b.j,tRe),new nve(b.f)));for(d=new lxe(e);d.a0&&(hqe(b,b.a.length-1)!=10||d==0)&&(b.a+=' ',b)} +function UBd(a){var b,c;c=0;while(cd&&a.charCodeAt(b-1)<=32){--b}return d>0||b0);Eqb(a,d,f);yqb(a,d,f)}}} +function euc(a){var b,c,d;b=null;for(d=new lxe(a);d.a0&&c<=100?(this.i=c):(this.i=100)} +function b4c(a,b,c,d){Z3c();var e,f;this.b=a;this.c=b;this.e=c;this.d=d;this.a=new JCe;for(f=CFb(a).bh().$d();f.Pd();){e=rL(f.Qd(),186);iue(this.a,e.c,e)}} +function iSc(a,b,c){zf($Bc(a));this.a=a;this.e=b;this.b=c;this.d=yCc(a);this.c=this.d||(HAc(),OAc(a.b,false,null))||(HAc(),OAc(a.b?a.b.f:null,false,null))} +function Vid(a,b,c,d,e,f){this.e=a;this.f=b;this.d=c;this.a=d;this.c=e;this.b=f;!!this.f&&zf(!this.d&&!this.a);!!this.d&&zf(!this.f);!!this.a&&zf(!this.f)} +function lPc(a){switch(a.g){case 0:return new N2d((h7d(),n5d));case 1:return new v3d(0);case 2:return new T3d((h7d(),L6d),'');default:throw Aib(new Hre);}} +function _Rc(a,b){var c,d,e;e=n5b(a.q,b,null);cSc(a,b,null,e);a.p&&RRc(a,e);SRc(a);ZRc(a);for(d=new lxe(a.a);d.af&&FK(b,f,null);return b} +function UG(a){var b;PG.call(this,a,null);this.a=CK(LL,qKe,17,512,15,1);kf(a.c.length==16);for(b=0;b<256;++b){this.a[b]=a.c[b>>>4];this.a[b|256]=a.c[b&15]}} +function UH(a){TH();var b,c;b=CK(LL,qKe,17,6,15,1);for(c=0;c<5;c++){b[c]=YLe.charCodeAt(a>>26-c*6&63)}b[5]=YLe.charCodeAt(a<<4&63);return mte(b,0,b.length)} +function xBb(a){var b,c,d;d=a.length;if(d==0){return false}for(c=0;c57){return false}}return d==1||a.charCodeAt(0)!=48} +function XNb(a,b){var c,d,e,f;for(d=new fxe(b);d.a!=d.b;){c=rL(dxe(d),190);for(f=new fxe(c.c);f.a!=f.b;){e=rL(dxe(f),1867);oOb(c,e.yg())||WNb(a,e.qi().c)}}} +function YNb(a){var b,c;c=a.e;if(c.j==(h7d(),K5d)&&(c.b?c.b.f:null).Mm(a,false,true,false,false)){b=c.e;return !!b&&b.j==g4d&&$Nb(b.b,a)}else{return false}} +function n4b(a){var b;if(!a.b){return null}for(b=a.b.b;b;b=b.d){if(b.j==(h7d(),r5d)&&Jse('$jscomp$generator$function$name',b.b.Lm())){return b}}return null} +function vqc(a,b){if(b.length==0){return b}b.indexOf(dTe)!=-1&&(b=bte(b,0,b.lastIndexOf(dTe)));a.a.th(b)&&(b='JSCompiler_'+b);return b+dTe+a.d+wL(a.f.Ld())} +function XBc(a){HAc();switch(a.j.g){case 1:case 2:case 3:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:return true;default:return false;}} +function BLb(a,b){switch(a.j.g){case 72:case 73:case 101:case 71:case 70:case 67:return true;case 82:case 81:case 66:case 44:return b;default:return false;}} +function D$c(a,b,c){var d;d=CFb(a.a.a).dh(c);if(d){if(O$c(a,d.a)){return true}O$c(a,d.b)&&Xzc(b,c,(z$c(),y$c),GK(yK(fgb,1),pKe,2,6,[d.a,d.b]))}return false} +function Cud(a){var b;zf(a.g==0);zf(a.f);if(!a.a){b=(Qq(),new vv);!!a.p&&uv(b,Kud(a.p.a));a.a=Ys(new lxe(uv(uv(b,new dve(a.c)),new dve(a.k)).a))}return a.a} +function l0d(a){if((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe||NZd(a.a,2)||i$d(a.a)||NZd(a.a,jNe)){return false}C$d(a.a,512);a.e=true;return true} +function Lnb(a,b,c){var d,e;snb(a,(BFd(),lFd),b);Pnb((h7d(),b6d),b);e=j7d(b.j);e!=-1&&(d=y1d(b),e!=d&&nob(PMe+e+QMe+d,b));Nnb(a,b.b);Mnb(a,b.b?b.b.f:null,c)} +function yNb(a,b){var c,d;kf(b.j==(h7d(),N4d)||(HAc(),b.j==I4d&&Y1d(b.b,sOe)));for(d=q1d(b.b?b.b.f:null).$d();d.Pd();){c=rL(d.Qd(),5);ANb(a,c.b?c.b.f:null)}} +function Eyb(a){var b,c;c=!a.e?null:a.e.e;if(c.j!=(h7d(),b7d)||!(!!c.b&&!!c.b.d)){return}b=a.e;tf(b.e);a2d(b.e,b);tf(a.e);a2d(a.e,a);k1d(c.e,wYd(b,a,b7d),c)} +function Iuc(a,b,c,d,e){var f,g;f=guc(c);g=f.j==(h7d(),m4d)&&fDc(f.b);if((f.j==_5d||f.j==m4d)&&!g&&!!d&&Nj(a.b.k,f,d)){Xtc(a.b,e,b);return true}return false} +function Fsd(a,b){var c;if(b==null){return false}if(a===b){return true}kf(zL(b,25));c=rL(b,25);return nFe(a.b,c.b)&&nFe(a.e,c.e)&&nFe(a.d,c.d)&&nFe(a.g,c.g)} +function rxd(){rxd=cjb;qxd=new sxd('TYPES_ONLY',0);oxd=new sxd('INCLUDE_DESCRIPTIONS_NO_WHITESPACE',1);pxd=new sxd('INCLUDE_DESCRIPTIONS_WITH_WHITESPACE',2)} +function _Gd(a,b){var c,d,e;d=b.b;c=b.a;if(d.o.a.b' unexpected",GK(yK(agb,1),ZJe,1,5,[]));e=b}return e} +function aYd(a,b){var c;if(a.a.lm()){return b}c=a.a.On();if(c.Nl()||c.i==(Bfe(),zfe)){return b.$m((Ef(c.Nl()||c.i==(Bfe(),zfe),hOe,c),S7d(c.p)))}return null} +function $_d(a,b){var c,d;for(d=new Gze(b.b.$d());d.b.Pd();){c=wL(d.b.Qd());if((f$d(a.a,c)||Jse(c,'*'))&&B$d(a.a,c)){a.e=true}else{return false}}return true} +function Eoe(a,b){A7d();var c,d,e;T7d.call(this,a);this.b=b;e=new tpe(a);for(d=b.$d();d.Pd();){c=rL(d.Qd(),9);npe(e,c,true)}this.a=ppe(e);this.c=this.b.Jd()} +function ssc(a){var b,c,d,e;qsc.call(this);for(e=(c=a.a.ke().$d(),new sve(c));e.a.Pd();){d=(b=rL(e.a.Qd(),12),rL(b.te(),66));hue(this.a,d,new msc(d.k.$j()))}} +function VK(a,b){var c,d,e;e=a.h-b.h;if(e<0){return false}c=a.l-b.l;d=a.m-b.m+(c>>22);e+=d>>22;if(e<0){return false}a.l=c&fMe;a.m=d&fMe;a.h=e&gMe;return true} +function ftb(a,b){var c,d,e;c=(HAc(),d=eBc(b),!d?null:rL(F1d(d,29),11));if(!!c&&c.j==(z_d(),w_d)){return true}return CFb(a.e.b).yh((e=CBc(b),!e?null:G1d(e)))} +function D1b(a,b){var c;switch(b){case gSe:case hSe:case iSe:case jSe:case kSe:case lSe:case mSe:return c=Hzc(a)._j(b),!(!!c&&!c.Bk());default:return false;}} +function F4b(a,b){var c,d;if(M4b(b)){return true}c=new S4b;lAc(a.c,b,c);if(c.a){return false}d=H2d(new N2d((h7d(),Z5d)),b);o1d(d,c2d(b));l1d(b,d);return true} +function M7b(a,b){var c,d,e,f;if(y1d(b)!=4){return}e=b.b;d=e.d;c=d.d;f=c.d;if(!T1d(d)){return}if(c.j!=(h7d(),L6d)){return}Vcd(a.f,new c8b(a,G1d(d),c.Lm(),f))} +function rKc(a,b,c){var d;d=rL(Jwe(a.f),216);zf(Jse(b,d.j));Vcd(a.w,d);d.n=c;d.a=0;d.k=1;a.d.a&&(d.d=1);Jse(b,LPe)?pKc(a,d):a.d.a&&a.D!=(vKb(),uKb)&&oKc(a,d)} +function cLc(){cLc=cjb;bLc=ct('created','attached','detached','attributeChanged','configure','ready',GK(yK(fgb,1),pKe,2,6,[MUe,'listeners','observers',NUe]))} +function h5c(a){var b,c;pf(a.j==(h7d(),I4d),UVe,a);b=new Fu;for(c=0;c<(pf(a.j==I4d,UVe,a),y1d(a)-1);c++){Du(b,(pf(a.j==I4d,UVe,a),x1d(a,c+1)))}return ur(b.a)} +function Mld(a,b){var c,d;kf(b.a.size()==1);for(d=a.nl().$d();d.Pd();){c=rL(d.Qd(),25);kf(b.a.size()==1);if(Sud(c.d.a)||esd(c.d,b)){return true}}return false} +function xyc(a,b,c,d){kf(d.a.size()==1);if((Ivd(c.nl(),d)||Ivd(c.gl(),d))&&B1d(b,77)==0){hzc(a.Q,Rnc(b,Xvc,GK(yK(fgb,1),pKe,2,6,[])));return true}return false} +function G2d(b){var c,d;try{d=new zte;g3d(b,0,d);return d.a}catch(a){a=zib(a);if(zL(a,147)){c=a;throw Aib(new DJ('Should not happen\n'+c))}else throw Aib(a)}} +function lae(a,b,c,d){A7d();T7d.call(this,a);this.a=!b?die(a,true,GK(yK(Web,1),oTe,9,0,[H7d(this,(Lhe(),Hhe))])):b;this.b=!c?H7d(this,(Lhe(),Hhe)):c;this.c=d} +function iee(a){var b;if(!(a.Nl()||a.i==(Bfe(),zfe))){return false}if(a.j==(Hfe(),Gfe)){return true}b=cee(a);if(!!b&&iee(b)){a.j=Gfe;return true}return false} +function spe(a){var b,c;c=qpe(a);if(c){return a.c?null:c}b=a.a.a.length;return b>a.g?sie(a.i,(Lhe(),Hhe)):b>1?null:b==1?rL(Ycd(a.a,0),9):sie(a.i,(Lhe(),ahe))} +function tGe(a,b,c,d,e,f,g){var h,i;if(b.Lo()&&(i=a.a.sf(c,d),i<0||!e&&i==0)){return false}if(b.Mo()&&(h=a.a.sf(c,f),h>0||!g&&h==0)){return false}return true} +function KI(a){var b,c,d,e,f;bJ(new dJ(a),new eJ);c=0;f=0;for(e=new lxe(a.e);e.ab?f:b}}return f+a.i.b} +function aOb(a){var b,c;c=a.e;if(c.j==(h7d(),K5d)&&(c.b?c.b.f:null).Mm(a,false,true,false,false)){b=c.e;return !(!!b&&b.j==g4d&&$Nb(b.b,a))}else{return false}} +function lbc(a,b){var c,d;if(SCc(a)){return}if(a.j==(h7d(),b7d)&&!!a.b&&!a.b.d){d=a.b;if(!d.b){l1d(d,RDc(d));m1d(b,u1d(a))}return}for(c=a.b;c;c=c.d){lbc(c,b)}} +function Ezc(a){var b,c,d,e,f;e=Cwe(a.b);if(zL(e,5)){c=rL(e,5);b=new vLb(a.c,true);uLb(b,c);f=b.c;d=Fwe(a.b);tJe(d!=null);swe(a.b,f)}else{f=rL(e,441)}return f} +function dCc(a){HAc();if(a.j==(h7d(),_5d)){switch(a.e.j.g){case 100:case 88:case 78:return true;case 96:return a.e.b==a;case 65:return eCc(a.e);}}return false} +function $Cc(a,b){HAc();var c,d,e;if(a.j==(h7d(),I4d)){c=a.b;if(c.j==x5d||c.j==w5d){d=c.b?c.b.f:null;if(!!d&&d.j==L6d){e=d.Lm();return Jse(e,b)}}}return false} +function AWc(a,b,c,d,e,f){var g;g=BWc(a,b);if(g){return new Mnc(c,null,d,e,g,null,GK(yK(fgb,1),pKe,2,6,[b]))}return Snc(c,d,e,f,sWc,GK(yK(fgb,1),pKe,2,6,[b]))} +function L5c(a,b,c,d,e,f){if(!d.sn()&&!d.lm()&&d.Bn(a.e)&&!Z5c(d)){if(c.j==(h7d(),x5d)&&Izc(b)!=0&&d.Zl()){return true}V5c(a,c,e,d,f);return false}return true} +function _rd(a,b){var c,d,e;e=a.a.q;zf(b.size()==e.size());d=new RDe;for(c=0;c31&&b<127?(d.a+=String.fromCharCode(b),d):yJ(d,b)}return d.a} +function YDb(a,b,c,d,e){var f,g,h,i;i=c.j;h=i==(h7d(),_5d)||i==x5d;g=aDc(c);zf(g||h);if(h){for(f=1;f',vSe),fcd(c)),a.d))} +function Ajd(a,b){tf(b);kf(!Tld(b));if(a.d==(Rjd(),Qjd)){return}Ef(a.d==Ojd,tWe,Zb(a.d));a.d=Qjd;a.e=null;a.a=b;a.b=(hld(),Wnd(a.u,4,fld,null,(Qq(),new XD(a))))} +function UCd(){var a;if(PCd){return}a=LFe(IXe);PCd=TCd(JFe(a,'jsdoc.annotations'));RCd=TCd(JFe(a,'jsdoc.suppressions'));QCd=TCd(JFe(a,'compiler.reserved.vars'))} +function cNd(a){var b;b=a;while(b.p==(GQd(),dQd)){b=rL(b,424).a}switch(b.p.g){case 26:case 46:case 55:case 59:case 61:case 73:return true;default:return false;}} +function ZIe(a,b,c,d,e,f){var g,h,i;if(HL(a)===HL(c)){a=a.slice(b,b+e);b=0}for(h=b,i=b+e;h=d){return -1}e=(a.b[c]|0)&eKe<=d){return -1}e=a.b[c]|0}return c*31+Vre(e)} +function Jnb(a,b,c){if(c.j==(h7d(),_5d)){c.Lm()==null&&nob(WMe,c);c.Lm().length==0&&nob(XMe,c);Fnb(c);!!c.b&&rnb(a,c.b)}else c.j==$4d?lnb(a,b,c):nob(YMe+b+UMe,c)} +function Obc(a,b){var c,d,e;c=new N2d((h7d(),r6d));for(e=VZd(b).$d();e.Pd();){d=wL(e.Qd());l1d(c,(Ef(Ose(d,hte(46))==-1,xMe,d),new T3d(_5d,d)))}return Pbc(a,c,b)} +function _bc(a){Gbc();var b,c,d;kf(a.lm());b=a.Zn();if(b){for(d=b.d.$d();d.Pd();){c=rL(d.Qd(),24);if(!c.H){return true}}}if(a.ao()){return !a.ao().H}return false} +function TUc(a,b,c){var d,e,f,g;if(!b.Ll()&&!b.lm()){for(f=c.$d();f.Pd();){e=wL(f.Qd());d=WUc(e);g=a.d.xj(d);if(!!g&&b.hm(g)){return JL(fue(a.b,e))}}}return null} +function xGc(a,b,c,d){var e;lf(b.j==(h7d(),r5d),'Node must be a function.');e=(HAc(),zf(b.j==r5d),FBc(b.b.d.b,c));if(e){FGb(a.a,e);sZb(d,e);a2d(b.b.d,e)}return e} +function e6c(a,b,c,d,e){var f,g;g=rL(b.getAtIndex(c),60);if(ca.length&&(a.length=f,undefined);c=b%31;if(0==e){Xkb(a,0,c)}else{Xkb(a,0,31);Xkb(a,e,c);for(d=1;d0}d=ose(a.b.length,b.b.length);for(c=0;c>19;j=b.h>>19;if(i!=j){return j-i}e=a.h;h=b.h;if(e!=h){return e-h}d=a.m;g=b.m;if(d!=g){return d-g}c=a.l;f=b.l;return c-f} +function PFb(a){var b;if(!a.a){b=new BXd((!a.fb&&(a.fb=new Oie(a.S,a.B)),a.fb));a.T.F&&(b=BUd(new sWd((!a.fb&&(a.fb=new Oie(a.S,a.B)),a.fb)),b).d);a.a=b}return a.a} +function DIb(a,b){switch(b){case 0:a.Db=true;a.Fb=true;break;case 1:a.Db=false;a.Fb=true;break;case 2:a.Db=false;a.Fb=false;break;default:throw Aib(new Ire(UPe));}} +function EIb(a,b){switch(b){case 0:a.Ib=true;a.Gb=true;break;case 1:a.Ib=false;a.Gb=true;break;case 2:a.Ib=false;a.Gb=false;break;default:throw Aib(new Ire(UPe));}} +function MIb(a,b){switch(b){case 0:a.Rc=true;a.Oc=true;break;case 1:a.Rc=false;a.Oc=true;break;case 2:a.Rc=false;a.Oc=false;break;default:throw Aib(new Ire(UPe));}} +function JQb(){JQb=cjb;HQb=cte('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$');IQb=cte('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789$')} +function f7b(a,b){var c,d;for(c=b.b;c;c=c.d){if(f7b(a,c)){return true}}if(b.j==(h7d(),_5d)){d=b.e;if(d.j==m4d&&d.b==b){if(Jse(a,b.Lm())){return true}}}return false} +function V9b(a,b){var c;if(b.b.j!=(h7d(),_5d)){HAc();if($Cc(b,vRe)){if(!a.c){c=b.b.d;if(!c||c.j!=U6d){return false}}}else{if($Cc(b,uRe)){return false}}}return true} +function _9b(a){var b;b=(HAc(),lf(a.j==(h7d(),r5d),a),a.b?a.b.f:null);if(b.b){if(!!b.b&&!b.b.d){if(b.b.j==C6d&&!!b.b.b){return true}}}else{return true}return false} +function igc(a){if(a.j==(h7d(),x5d)){return a.b?a.b.f:null}if(a.j==_5d||a.j==M6d||a.j==y5d||a.j==G6d||a.j==W5d){return a}throw Aib(new DJ('Unknown defsite: '+a.j))} +function Qwc(a,b,c){var d,e,f,g;f=c;d=a.c;for(e=b.b?b.b.f:null;e;e=e==e.e.b?null:e.f){g=_wc(a,e,f,a.r);f=g.a;d=Tnd(d,g.b)}d=Wyc(d,a.r);return new ezc(f,bqd(a.w,d))} +function uzc(a,b,c){kf((HAc(),!!b&&(b.j==(h7d(),b7d)||b.j==T5d||b.j==S4d)));kf(b.j!=(h7d(),Z5d)&&nDc(b.e));return new szc(a,new mzc(GK(yK(veb,1),MMe,5,0,[a,b,c])))} +function h7c(a,b,c){var d;d=rL(sie(a.i,c),68);q6c(b,(Ef(d.Nl()||d.i==(Bfe(),zfe),hOe,d),S7d(d.p)).go(),null,d,null,false);q6c(b,aee(d).go(),null,aee(d),null,false)} +function Hld(a,b){if(!a.nl().isEmpty()&&!Jvd(a.nl(),b)){return false}if(!a.gl().isEmpty()&&!Jvd(a.gl(),b)){return false}return !a.gl().isEmpty()||!a.nl().isEmpty()} +function Jsd(a,b){var c,d;d=wL(b.a.getAtIndex(0));c=rL(Xk(Nk(a.g,d,false)),52);if(!!c&&!gsd(a.d,d)){return c}if(a.e){c=qjd(a.e,d);if(c){return c}}return Urd(a.d,d)} +function Nqe(a,b){if(b<2||b>36){return -1}if(a>=48&&a<48+(b<10?b:10)){return a-48}if(a>=97&&a=65&&a=0;e--){if((vJe(e,b.a.length),rL(b.a[e],260)).d){f=xGc(a,c,e,d);uGc(a,c,f,(vJe(e,b.a.length),rL(b.a[e],260)).a)}}} +function qye(a){var d;jye();var b,c;for(c=0,b=a.a.length-1;c '+a[b-1]))}}return new FSd(a)} +function wYd(a,b,c){if(a.j==(h7d(),_5d)){zf(!a.b)}else{zf(a.j==k4d||a.j==n6d);a=new P2d($4d,a)}Ef(NYd(b),"%s can't be an expression",b);l1d(a,b);return new P2d(c,a)} +function wne(a,b,c){var d,e,f,g;g=c.Jn().Sn();if(!g){return false}f=g.b;for(e=f.$d();e.Pd();){d=rL(e.Qd(),9);if(!!d.Rn()&&xne(a,b,d.Rn())){return true}}return false} +function Upb(a,b,c){var d,e,f;e=(d=rL(Bwe(a.b),60),d==a.g?null:d);if(!e||!e.hm(c)){f=(b.b?b.b.f:null).Lm();DGb(a.a,Szc(b,tpb,GK(yK(fgb,1),pKe,2,6,[f,a.i.wj(b.b)])))}} +function $Nb(a,b){var c,d;if(a.j==(h7d(),d6d)){d=a.b;c=a.b?a.b.f:null;return d.j==L6d&&Jse(d.Lm(),mMe)&&c.j==Y6d&&c.b.Mm(b,false,true,false,false)}else{return false}} +function O3b(a,b){var c;c=N3b(a,(Lhe(),Xge),b.k);return b6b(VYd(GK(yK(veb,1),MMe,5,0,[ZYd(new T3d((h7d(),M6d),JSe),b),ZYd(new T3d(M6d,MSe),i4b(a,new N2d(W6d)))])),c)} +function Ykc(a){Okc();var b,c;b=Vkc(a);if(!(!!b.b&&!b.b.d)){return null}c=b.b;if(c.j!=(h7d(),C6d)){return null}if(!(!!c.b&&!c.b.d)){return null}return c.b?c.b.f:null} +function $Bc(a){HAc();switch(a.j.g){case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 59:case 57:case 58:return true;}return false} +function Gud(a,b,c){var d;d=rL(Xk(Nk(a.c,b,false)),52);if(d){return d}if(c==0&&!!Nk(a.n,b,false)){return rL(Xk(Nk(a.n,b,false)),52)}return rL(Xk(Nk(a.k,b,false)),52)} +function nyd(a,b){var c,d,e;c=Nxd(a,b.o);d=Wyd(a.u,b);!!c&&(e=f2d(d,d.g,29),e!=d.g&&(d.g=e),!!c&&(d.g=new A3d(29,c,d.g)),d);W2d(d.i)==-1&&jyd(d,b.o.b,b.o.a);return d} +function Oyd(a,b,c){var d;if(c){dyd(a.a,c.o,rL(F1d(b,29),11));d=(Uyd(a,c,(BFd(),AFd)),lyd(a.a,c));d.j==(h7d(),L6d)&&(d=Kxd(a.a,new b4d(L6d,d.Lm())));k2d(b,rL(d,75))}} +function k0d(a){if(!((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)&&!i$d(a.a)&&!NZd(a.a,2)){C$d(a.a,512);C$d(a.a,iNe);a.e=true;return true}else{return false}} +function Sce(a,b,c,d,e,f){mbe.call(this,a,e);this.w=new ume;tme(this.w,this);this.r=b;this.t=d;this.q=f;d||!!c?(zf(!this.oo()),this.s=c):Oce(this,rie(a,(Lhe(),nhe)))} +function Ode(a,b,c,d){!!c.Tn()&&(c=toe(c.Tn(),sie(a.F,(Lhe(),Khe))));b.a+=OOe;d&&c.vn()&&!c.lm()&&!c.Rn()&&!c.Qn()&&!c.On()&&!c.Tn()&&!M7d(c)&&(b.a+='!',b);c.Um(b,d)} +function tp(a,b){var c,d,e;c=new lxe(b);if(c.a0){return false}e=d}}return true} +function Alb(a,b,c){var d;zf(njb(a.d.kb));a.c||lAc(a.d,b,new _lb(a));lAc(a.d,c,new jmb(a));d=new Rcd(new pmb(a));Qcd(d,a.k,(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[a.e,a.g]))))} +function hub(a){var b;b=a.e;if(a==b.b){if(b.j==(h7d(),m5d)){return false}else if(b.j==m4d){return false}else if($Bc(b)||b.j==I5d||b.j==V4d){return yCc(b)}}return true} +function T1b(){T1b=cjb;S1b=new Q_b('JSC_MISSING_ES6_EXTERNS',(prb(),mrb),new _te('Missing externs definition for Symbol. Did you forget to include the ES6 externs?'))} +function ZYc(){ZYc=cjb;YYc=new Q_b('JSC_DUPLICATE_ZIP_CONTENTS',(prb(),orb),new _te('Two zip entries containing the same relative path.\nEntry 1: {0}\nEntry 2: {1}'))} +function g8b(a,b){var c,d,e,f;if(a.b==(p8b(),n8b)){c=LFb(a.a,null);f=K2d(SDc(a.c,null),c);m1d(c,f);FGb(a.a,f)}for(e=DEe(b.a,0);e.b!=e.d.c;){d=rL(SEe(e),717);h8b(a,d)}} +function kgc(a){Yfc();var b,c,d;if(a.j!=(h7d(),_5d)&&a.j!=x5d){return false}b=(HAc(),c=eBc(a),!c?null:rL(F1d(c,29),11));d=PBc(a);return !!b&&(b.a&2)!=0&&!!d&&d.j==I4d} +function Fyc(a,b,c){var d;d=b.j==(h7d(),w5d)&&(b.b?b.b.f:null).j==L6d;eKe==c.kl()&&a.L&&b.e.j!=m5d&&(b.j!=w5d||d)&&hzc(a.Q,Rnc(b,Hwc,GK(yK(fgb,1),pKe,2,6,[Zb(b.j)])))} +function $Hc(a,b){if(!a.b){return b}switch(b.j.g){case 61:case 62:$Hc(a,b.b);$Hc(a,b.b?b.b.f:null);break;case 4:case 5:case 36:case 37:return iIc(a,b,false);}return b} +function Z2c(a,b,c){var d,e,f,g,h;e=b.b;g=b.b?b.b.f:null;c=_2c(a,b,c);f=zL(e.k,9)?rL(e.k,9):null;h=(d=zL(g.k,9)?rL(g.k,9):null,!d?a.i:d);b.k=h;k3c(a,c,e,f,h);return c} +function j5c(a,b){var c,d,e,f,g,h;f=new RDe;for(h=b.$d();h.Pd();){g=rL(h.Qd(),106);for(d=g.ql().$d();d.Pd();){c=wL(d.Qd());e=g.ul(c);k5c(a,f,c,e)}}return I4c(a,js(f))} +function s1d(a,b){var c,d,e,f,g;g=a.Jm(b);c=null;d=null;if(a.b){for(e=a.b;e;e=e.d){f=s1d(e,b);f.e=g;if(!c){c=f;d=c}else{d.d=f;f.f=d;d=f}}c.f=d;d.d=null;g.b=c}return g} +function hbe(a){var b,c,d;if(a.B){b=a.ao();if(!b||b.jo()){a.B=false;for(d=a.$n().$d();d.Pd();){c=rL(d.Qd(),24);if(c.lm()){a.B=true;break}}}else{a.B=b.lm()}}return a.B} +function aee(a){var b;if(!a.k){b=a.go();b==null?oee(a,rie(a.F,(Lhe(),Hhe)),null):mee(a,new Rce(a.F,a.go()+HMe,rie(a.F,(Lhe(),nhe)),a.t,null),null)}return rL(a.k.e,24)} +function qy(a){var b,c,d,e,f;if(gu(a.f,a.b.length)){d=CK(cP,FLe,286,a.b.length*2,0,1);a.b=d;e=d.length-1;for(c=a.a;c!=a;c=c.Sf()){f=rL(c,286);b=f.d&e;f.a=d[b];d[b]=f}}} +function Gmb(a,b,c){var d,e,f,g;for(e=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();e.Pd();){d=rL(e.Qd(),5);if(d.j==(h7d(),W5d)){g=d.b;f=a.a.Gg(c,a.a.Hg(d));a.a.Ig(f,g)}}} +function _Zb(a){switch(a.j.g){case 87:case 86:case 91:return EYd(VYd(GK(yK(veb,1),MMe,5,0,[])),a3d(a.Lm()));default:throw Aib(new Ire('Unexpected left Token: '+a.j));}} +function bgc(a,b,c){var d;while(Wrd(b,c)){kf(b.a.f);kf(b.a.g==0);if(wt(a.f,b.a,c)!=null){d=rL(wt(a.f,b.a,c),208);return b.a.q.isEmpty()?d:Ehc(d,b)}b=Trd(b)}return null} +function Ulc(a){uv(a.e,(lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[a.d.vj((Lhe(),Qge)),a.d.vj(Rge),a.d.vj(Sge),a.d.vj(nhe),a.d.vj(mhe),a.d.vj(jhe),a.d.vj(Ahe)])))));return a} +function gtc(a,b){var c;if(!b){return false}c=wL(b.a.getAtIndex(0));return itc(a,c)&&(b.a.size()==1||!!rjd(Psc(a,c),(kf(b.a.size()!=1),new jud(b.a.Bf(1,b.a.size())))))} +function aBc(a){HAc();var b;if(a.j!=(h7d(),r5d)){return false}if(rL(F1d(a.b,29),11)){return true}b=a.b.d.b;while(b){if(rL(F1d(b,29),11)){return true}b=b.d}return false} +function p2c(a,b,c,d){E1c();this.i=(xge(),wge);this.a=a;this.p=(!a.gb&&(a.gb=new Y5c(a)),a.gb);this.k=b;this.j=c;this.g=d;this.f=kIb(a.T,(K_b(),A_b));this.c=new wic(a)} +function ijc(a,b,c,d,e,f,g){this.f=new RDe;this.a=new JCe;kf(!!a);kf(true);this.d=a;this.i=c;this.j=d;this.c=true;this.b=f;this.k=g;this.e=g!=-1;this.g=new Y9b(a,b,e,f)} +function Mde(a,b,c,d){!!c.Tn()&&(c=toe(c.Tn(),sie(a.F,(Lhe(),Khe))));vte((d&&c.vn()&&!c.lm()&&!c.Rn()&&!c.Qn()&&!c.On()&&!c.Tn()&&!M7d(c)&&(b.a+='!',b),c.Um(b,d)),'=')} +function Fib(a,b){var c;if(Jib(a)&&Jib(b)){c=a/b;if(lMe0&&q7d(a.charCodeAt(b-1))==(Vne(),Tne)){--b}while(c=0;d--){if(Jse(a[d].d,b)||Jse(a[d].d,c)){a.length>=d+1&&(a.splice(0,d+1),undefined);break}}return a} +function BK(a,b,c,d,e,f,g){var h,i,j,k,l;k=e[f];j=f==g-1;h=j?d:0;l=DK(h,k);d!=10&&GK(yK(a,g-f),b[f],c[f],h,l);if(!j){++f;for(i=0;i>24}for(a=0;a<=26;a++){c[65+a]=10+a<<24>>24;c[97+a]=10+a<<24>>24}return c} +function Hkb(a){var b,c,d,e;d=Wkb(a.b);b=-2128831035^d;for(c=0;c<=d;c++){e=a.b[c]|0;b=b*AMe&-1^e&255;b=b*AMe&-1^e>>>8&255;b=b*AMe&-1^e>>>16&255;b=b*AMe&-1^e>>>24}return b} +function Npb(a,b,c,d,e,f,g,h){var i;if(!!g&&!!h&&Jse(g.ji(),h.ji())){return}i=iqb(f);switch(d.g){case 1:Ppb(a,b,g,h);break;case 0:Rpb(a,b,c,e,i);break;case 2:Upb(a,b,i);}} +function cEb(a,b,c,d){var e;e=b.d;if(!e){return}if(e.f){return}switch(e.c.e.j.g){case 47:dEb(a,b,c,d);break;case 76:case 100:case 88:eEb(a,b,d);break;case 65:bEb(a,b,d);}} +function Wpb(a,b,c){var d,e,f,g,h;h=rL(F1d(b.j,51),28);f=rL(F1d(c,51),28);d=CFb(a.a);if(!!h&&!!f){g=d.lh(h);e=d.lh(f);return g!=null&&e!=null&&Jse(g,e)}else{return false}} +function hzb(a,b){var c,d,e,f,g;f=b.b.d;e=f.Lm();FGb(a.a,b);c=Dzb(a.f,e);d=I2d(ODc(a.a,c),b);g=f2d(d,d.g,40);g!=d.g&&(d.g=g);e!=null&&(d.g=new A3d(40,e,d.g));g2d(b.e,b,d)} +function nIb(a){var b;b=a.i.a;!!a.qc&&a.qc.a>1?b==null?(b=fIb):(b=vH(GK(yK(LL,2),ZJe,90,0,[b,fIb]))):a.g&&(b==null?(b=dIb):(b=vH(GK(yK(LL,2),ZJe,90,0,[b,dIb]))));return b} +function aLb(){aLb=cjb;_Kb=new Q_b('JSC_CONSTANT_REASSIGNED_VALUE_ERROR',(prb(),orb),new _te('constant {0} assigned a value more than once.\nOriginal definition at {1}'))} +function cMb(a){var b,c,d,e,f;f=new idd;for(d=(e=(new nve(a.d)).a.ke().$d(),new sve(e));d.a.Pd();){c=(b=rL(d.a.Qd(),12),rL(b.te(),199));Xcd(f,c.c)}return jye(),new $Ae(f)} +function utd(a,b){var c,d,e,f;for(f=(d=(new dve(a.g)).a.ke().$d(),new jve(d));f.a.Pd();){e=(c=rL(f.a.Qd(),12),wL(c.se()));if(!Wsd(b,new kud(e))){return false}}return true} +function rZb(a,b){var c,d,e;d=b.Ai();if(!d){return true}if(d.j==(h7d(),x5d)){e=(d.b?d.b.f:null).Lm()}else if(d.j==_5d){e=d.Lm()}else{return true}c=CFb(a.d);return c.th(e)} +function THd(a,b){var c,d,e,f;f=eKd(a.g,0).b.b;c=yId(a,b);if(oJd(a,(XMd(),pMd))){aHd(a,pMd);d=BHd(a,b);aHd(a,iLd);e=BHd(a,b);return new MNd(new qRd(f,a.f),c,d,e)}return c} +function _Hd(a){var b,c,d;d=eKd(a.g,0).b.b;c=cHd(a);b=null;if(nJd(a,0,(XMd(),FLd))&&Jse(rL(eKd(a.g,0),129).a,'as')){gHd(a,'as');b=cHd(a)}return new VNd(new qRd(d,a.f),c,b)} +function vZd(a,b){!a.d&&(a.d=new g_d);if(t$d(a,b)||(a.a&hNe)==lKe){return false}if(!a.d.q){a.d.q=new idd}else if(Zcd(a.d.q,b,0)!=-1){return false}Vcd(a.d.q,b);return true} +function aw(a,b){var c,d;tf(a);if(!b.Pd()){return tf(a),Xv==a?Wv:new mD(new IHe(a))}c=new IHe(a);while(b.Pd()){d=b.Qd();tf(d);c.a.put(d,(Dqe(),Bqe))==null}return new mD(c)} +function x4b(a,b,c){if(c.e.j==(h7d(),m5d)){return}if(s7b(a.b,c)!=0){v7b(a.b,c);Yzc(b)}else{DGb(a.a,Rnc(c,(X5b(),V5b),GK(yK(fgb,1),pKe,2,6,['Undecomposable expression'])))}} +function hjc(a){var b,c;for(c=Tjc(a).values().$d();c.Pd();){b=rL(c.Qd(),327);if(!b.a){throw Aib(new Ire('Call site missed.\n call: '+G2d(b.c)+'\n parent: '+G2d(b.c.e)))}}} +function LAc(a){var b,c,d,e;c=a.b;e=new zte;for(d=c;d;d=d.d){b=d.j==(h7d(),i6d)||vDc(d)||d.j==c5d?'':UBc(d);if(b==null){return null}d!=c&&(e.a+=',',e);e.a+=''+b}return e.a} +function _Cc(a){HAc();var b,c;if(a.j!=(h7d(),I4d)||!O1d(a,3)){return false}b=a.b;if(b.j!=x5d){return false}c=b.b?b.b.f:null;return Jse(c.Lm(),'defineProperties')&&MCc(b.b)} +function Hdd(a,b){var c,d;uf(a.b,'No coloring founded. color() should be called first.');c=rL(a.c.qg(b).ug(),458);d=a.b[c.a];if(d==null){a.b[c.a]=b;return b}else{return d}} +function Qud(a,b){var c,d;zf(b.g!=0);if(a==b){return true}else if(!a.d){return false}else{for(d=a.d.$d();d.Pd();){c=rL(d.Qd(),99);if(Qud(c.a,b)){return true}}return false}} +function Oob(a,b){var c,d,e,f,g;d=b.f;c=b.b;if(c!=(prb(),mrb)&&d!=null){e=false;for(g=a.c.$d();g.Pd();){f=wL(g.Qd());e=e|d.indexOf(f)!=-1}if(e==a.a){return a.b}}return null} +function W0d(a){if((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe||i$d(a.a)||NZd(a.a,yOe)||NZd(a.a,iMe)||NZd(a.a,xOe)){return false}C$d(a.a,xOe);a.e=true;return true} +function a2d(a,b){var c,d,e;zf(b.e==a);tf(b.f);c=a.b.f;e=b.f;d=b.d;if(a.b==b){a.b=d;!!d&&(d.f=c)}else if(b==c){a.b.f=e;e.d=null}else{e.d=d;d.f=e}b.d=null;b.f=null;b.e=null} +function ufe(a,b){var c;c=D1d(a.b);if(!!c&&B1d(c,30)!=0){return false}b.sn()||b.qn()||b.rn()||rL(sie(b.F,(Lhe(),Zge)),68)==b||(b=cie(a.a,b));C2d(vfe(a,b),true);return true} +function Zib(b,c,d,e){Yib();var f=Wib;$moduleName=c;$moduleBase=d;yib=e;function g(){for(var a=0;a0){a.k+=d;a.n=b.length-Rse(b,hte(10))}} +function TFb(a,b,c,d){var e,f,g;if(b==null){return null}g=rL(RHe(a.I,b),474);if(!g){return null}e=NZc(g,a.q);if(!e){return null}f=ZH(e,c,d+1);if(!f){return null}return null} +function tDc(a){HAc();var b,c;if(a.j==(h7d(),b7d)||a.j==_5d&&a.e.j==b7d||a.j==x5d&&a.e.j==m5d){b=(c=eBc(a),!c?null:rL(F1d(c,29),11));return !!b&&(b.a&hNe)==lKe}return false} +function Lcd(a){Kcd();var b;b=CK(LL,qKe,17,6,15,1);b[0]=92;b[1]=117;b[5]=Icd[a&15];a=a>>>4&uKe;b[4]=Icd[a&15];a=a>>>4&uKe;b[3]=Icd[a&15];a=a>>>4&uKe;b[2]=Icd[a&15];return b} +function bfd(a,b,c){var d,e,f;d=afd(a,b);e=afd(a,c);if(d==e){return d.a}if(d.c>=e.c){e.b=d;d.d+=e.d;d.c==e.c&&++d.c;return d.a}d.b=e;e.d+=d.d;f=e.a;e.a=d.a;d.a=f;return e.a} +function wid(a,b){var c,d,e,f,g;d=new RCe;for(g=new lxe(b);g.a1)&&nob(VMe+e,c);if(!!c.b&&!c.b.d){d=c.b;switch(d.j.g){case 118:knb(a,b,d);break;default:Dnb(a,b,d);}}} +function Rpb(a,b,c,d,e){var f,g,h;if(d&&c.j!=(h7d(),f6d)){return}f=b.b.k;g=(b.b?b.b.f:null).Lm();h=wb(e,f)?a.i.wj(b.b):gjb(e);DGb(a.a,Szc(b,rpb,GK(yK(fgb,1),pKe,2,6,[g,h])))} +function Urc(a){var b,c,d,e;d=a;Jse(a.substr(0,5),RPe)&&(d=a.substr(5));c=d;b=d;e=Ose(d,hte(58));if(e!=-1){b=d.substr(0,e);c=ate(d,ose(e+1,d.length-1))}return new Trc(d,c,b)} +function fHc(a){var b,c,d;if(!a){return false}HAc();if(!(a.j==(h7d(),m5d)&&a.b.j==m4d)){return false}b=a.b;c=b.b;if(!(c.j==x5d||c.j==w5d)){return false}d=c.b;return d.j==_5d} +function jXc(a,b,c){var d,e;d=new q9b;mFb(a.b,d);mMc(new pMc(a.b,true),null,c);if(njb(a.b.kb)){gFc(new iFc(a.b,true),b,c);if(a.b.kb==1){e=new TFc(a.b);SFc(e,b,c)}}CGb(a.b,d)} +function K$c(a,b,c){var d,e,f;d=b.b;if(M$c(a,d)||(f=G1d(d),O$c(a,f))){if(c.j==(h7d(),m5d)){e=c.e;$Dc(e,c);EDc(c,a.a.a);FGb(a.a.a,e)}else{$Dc(c,b);EDc(b,a.a.a);FGb(a.a.a,c)}}} +function k5c(a,b,c,d){if(!gue(b.c,c)||!d.dm()||!rL(NDe(b,c),60).dm()){ODe(b,c,d);return}ODe(b,c,j5c(a,(lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[rL(NDe(b,c),106),rL(d,106)]))))))} +function tld(a){var b,c,d,e;if((a.kl()&2)==0){return null}d=a.e.b;for(c=a.nl().$d();c.Pd();){b=rL(c.Qd(),25);e=Ord(b.d);if(!e){return null}d=Tnd(d,e)}return 0==d.kl()?null:d} +function Aie(a,b){var c,d,e;if(b.Sn()){e=(lr(),new Fu);for(c=b.cn().d.$d();c.Pd();){rL(c.Qd(),125);Du(e,sie(a,(Lhe(),Hhe)))}return new Dne(a,(d=b.Sn(),d.i),ur(e.a))}return b} +function tDe(){function b(){try{return (new Map).entries().next().done}catch(a){return false}} +if(typeof Map===aKe&&Map.prototype.entries&&b()){return Map}else{return uDe()}} +function zre(a){xre==null&&(xre=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/);if(!xre.test(a)){throw Aib(new zse(jKe+a+'"'))}return parseFloat(a)} +function Xb(a){var b,c,d,e;e=a.length;for(d=0;d=97&&b<=122&&(c[d]=b&95&uKe)}return mte(c,0,c.length)}}return a} +function Pk(a){var b,c,d;d=new nGe('{','}');for(c=a.ke().$d();c.Pd();){b=rL(c.Qd(),12);mGe(d,Qk(a,b.se())+'='+Qk(a,b.te()))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} +function TBb(a){var b;if(a.n>a.o){if(a.d>a.b&&a.da.length||e+f>d.length){return false}g=a.substr(c,f);h=d.substr(e,f);return b?Kse(g,h):Jse(g,h)} +function Vb(a){var b,c,d,e;e=a.length;for(d=0;d=65&&b<=90&&(c[d]=(b^32)&uKe)}return mte(c,0,c.length)}}return a} +function ZE(a,b,c){var d,e,f;Fp(c,uLe);if(!pt(a.b,b)){kf(c==0);return 0}f=a.c.a;if(!f){c>0&&TE(a,b,c);return 0}e=CK(NL,ULe,17,1,15,1);d=SF(f,a.d,b,c,e);ZF(a.c,f,d);return e[0]} +function LF(a){switch(WF(a.e)-WF(a.g)){case -2:HF(a.g)>0&&(a.g=QF(a.g));return PF(a);case 2:HF(a.e)<0&&(a.e=PF(a.e));return QF(a);default:a.d=1+nse(WF(a.e),WF(a.g));return a;}} +function tlc(a,b,c,d){var e,f,g;f=(vJe(0,d.a.length),rL(d.a[0],86));for(g=1;g=0?$wnd.Math.floor(a):$wnd.Math.ceil(a);a=a%4294967296;c=Hib(a);return Tib(c)} +function hJc(a){HAc();if(a.j==(h7d(),m5d)&&a.b.j==m4d&&a.b.b.j==_5d){return true}else{if(!!a&&(a.j==b7d||a.j==T5d||a.j==S4d)&&!!a.b&&!a.b.d&&!!a.b.b){return true}}return false} +function _5c(a){var c,d;z5c();var b;b=(c=!a?null:a.d,d=!c?null:S7d(c.Vm()),A7d(),!d?null:d.On());if(!!b&&b.Nl()){return Ef(b.Nl()||b.i==(Bfe(),zfe),hOe,b),S7d(b.p)}return null} +function MIe(a){var b,c,d;b=typeof console!='undefined'?new eJe:null;if(!b){return}fIe();if(lKe>a.a.Bo()){return}c=(d=a.a.Bo(),d>=1000?'error':d>=900?'warn':d>=800?'info':'log');dJe(c,a.b)} +function Nk(a,b,c){var d,e,f;for(e=a.ke().$d();e.Pd();){d=rL(e.Qd(),12);f=d.se();if(HL(b)===HL(f)||b!=null&&wb(b,f)){if(c){d=new Dve(d.se(),d.te());e.Rd()}return d}}return null} +function xC(a,b){var c,d,e;if(b.isEmpty()){return false}if(zL(b,203)){e=rL(b,203);for(d=e.ke().$d();d.Pd();){c=rL(d.Qd(),177);a.Ye(c.ff(),c.ef())}}else{Iw(a,b.$d())}return true} +function kqb(a,b){var c,d,e;d=(HAc(),e=eBc(a),!e?null:rL(F1d(e,29),11));if((b.j==(h7d(),m4d)||b.j==m5d)&&b.b==a&&!!d){c=d.j;if(c!=(z_d(),w_d)&&c!=u_d){return true}}return false} +function bFb(a){XEb();if(a==null){return null}switch(a){case tPe:case 'WHITESPACE':return WEb;case uPe:case 'SIMPLE':return VEb;case vPe:case 'ADVANCED':return UEb;}return null} +function TQb(a,b,c){var d,e;this.e=(aB(),new KCe(cB(IQb.length)));for(e=new Gue((new yue(c)).a);e.b;){d=Fue(e);hue(this.e,rL(d.se(),119),WQb(rL(d.te(),252)))}QQb(this,a,'',b,b)} +function Z6b(a){var b,c,d,e;d=ODc(a.a.b,'Math.pow');if(a.a.a){c=WFb(a.a.b).xj(bTe);b=c.tm().ul('pow');e=_5b(a.a.a,WFb(a.a.b),(Lhe(),whe));d.k=b;B2d(d.b,c);B2d(d.b.d,e)}return d} +function shc(a,b,c){var d,e,f,g,h;kf(b.j==(h7d(),r5d));f=agc(a.c,b);e=Tsc(a.a,f);g=(HAc(),h=eBc(b),!h?null:rL(F1d(h,29),11));d=e.c;if(!d){d=Ngc(a,g,f,b,c,a.a);rtc(e,d)}return e} +function Uqc(a,b){var c,d,e,f;c=(f=rL(OLb(a.j,b),199),uye(f.c));for(e=new Gze(c.b.$d());e.b.Pd();){d=rL(e.b.Qd(),111);if(HL(d.te())===HL((IMb(),DMb))){return true}}return false} +function Qtc(a,b){var c,d,e,f;for(e=new k3d(new h3d(rL(tf(b.e),5)));e.a.a;){d=j3d(e);f=new hz(a.k,d);c=rL(eue(f.a.b,f.b),200);if((!c?0:c.a)!=0){return f}}return jye(),jye(),gye} +function Huc(a){var b,c;b=a.e;HAc();if(b.j==(h7d(),m4d)&&b.b==a||!!b&&(b.j==b7d||b.j==T5d||b.j==S4d)){c=b.j==b7d?a.b:b.b?b.b.f:null;return !!c&&!$Ac(c,(Mtc(),Ltc))}return false} +function LDc(a,b){var c,d;c=(Ef(Ose(b,hte(46))==-1,xMe,b),new T3d((h7d(),_5d),b));p2d(c,b.length);CFb(a).rh(b)&&(d=f2d(c,c.g,43),d!=c.g&&(c.g=d),c.g=new p3d(43,1,c.g));return c} +function kNc(a,b,c,d){var e,f;e=Ose(b,hte(46));while(e!=-1){f=b.substr(0,e);e=Pse(b,hte(46),e+1);MDe(a.i,f)?ANc(rL(NDe(a.i,f),174),c,d,false):ODe(a.i,f,new DNc(a,f,c,d,false))}} +function bSc(a,b,c){var d,e,f;Af(y1d(b)==3,b);Af(b.j==(h7d(),r5d),b);d=b.b?b.b.f:null;Af(!d.d&&d.j==F4d,d);f=n5b(a.q,b,c);e=n5b(a.q,d,f);aSc(a,d,e);RRc(a,f);RRc(a,e);Vcd(a.a,f)} +function PZc(a,b){var c,d;if(Jse(b.substr(0,29),'data:application/json;base64,')){c=CG((BG(),BG(),AG),b.substr(29));d=Hse((Zte(),c));return eZc(a.b+'.inline.map',d)}return null} +function Kld(a){return 64==a.kl()||128==a.kl()||(a.kl()&-25)==0&&(a.kl()&24)!=0||a.kl()==4&&a.gl().size()==1&&Kld(a.kl()==4&&a.gl().size()==1?yjd(rL(Uw(a.gl().$d()),100)):null)} +function xKd(a){_Jd(a);if(LKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){gKd(a,'New line not allowed in regular expression literal',GK(yK(agb,1),ZJe,1,5,[]));return false}_Jd(a);return true} +function bk(a,b){var c;c=rL(a.c.get(b),32);!c&&(c=a.Pe(b));return zL(c,184)?new hn(a,b,rL(c,184)):zL(c,44)?new fn(a,b,rL(c,44)):zL(c,50)?ik(a,b,rL(c,50),null):new sm(a,b,c,null)} +function Nz(a,b){var c;if(b==null){for(c=a.size()-1;c>=0;c--){if(a.getAtIndex(c)==null){return c}}}else{for(c=a.size()-1;c>=0;c--){if(wb(b,a.getAtIndex(c))){return c}}}return -1} +function zob(a,b){var c,d,e;c=new jdd(a.f.b.a.length);for(e=new Gze(uye(a.f.b).b.$d());e.b.Pd();){d=rL(e.b.Qd(),300);d.b==b&&Vcd(c,d.a)}return rL(hdd(c,CK(r1,aNe,85,0,0,1)),755)} +function OOb(a,b){var c,d,e;for(e=new fxe(a.a);e.a!=e.b;){d=rL(dxe(e),470);if(!zL(d,573)){continue}c=rL(d,573);if(b!=c&&b.Ag()==c.Ag()&&b.yg()!=c.yg()){return true}}return false} +function Tmc(a){var b,c;b=a.b.d;c=a.b?a.b.f:null;HAc();if(b.j==(h7d(),i6d)||vDc(b)||(c.j==i6d||vDc(c))){return Smc(b,c,0)}if(RCc(b,true)||RCc(c,true)){return Smc(b,c,1)}return a} +function Vtc(a,b,c){var d,e;if(CFb(a.d).th(c)){return true}if(b.hk()){return false}for(e=a.f.$d();e.Pd();){d=wL(e.Qd());if(Jse(c.substr(0,d.length),d)){return true}}return false} +function NAc(a){var b;for(b=a.b;b;b=b.d){switch(b.j.g){case 83:if(NAc(b)){continue}else{return false}case 88:case 100:case 96:case 65:return false;default:continue;}}return true} +function GKc(){GKc=cjb;FKc=LIe((_qe(j4),j4.o));EKc=(lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[sQe,uQe,sRe,bQe,CQe,BQe,AQe,iRe,qRe]))));DKc=new fD(Er(GK(yK(agb,1),ZJe,1,5,[iRe,qRe])))} +function LKc(a,b,c){var d,e;a.n=0;a.p=0;if(a.o){a.p=(a.o.b-a.o.a)/a.j.a.length;a.n=a.o.a}for(e=new lxe(a.j);e.a0){return}}} +function $Qc(a){var b,c,d;d=a.a.a.length;for(b=0;bf&&(f=g)}yGc(a,e.Bi(),f)} +function KKc(b,c,d,e){if(!b.q){return}try{gXc(hHb(b.b),d,e);ipb(b.a,c,b.e)}catch(a){a=zib(a);if(zL(a,72)){throw Aib(new Jre('Sanity check failed for pass: '+c))}else throw Aib(a)}} +function Cmd(a,b){hld();var c,d,e,f,g;f=new RDe;for(d=b.ke().$d();d.Pd();){c=rL(d.Qd(),12);e=wL(c.se());g=rL(c.te(),20);ODe(f,e,new Wtd(null,g,g,(fud(),eud)))}return Bmd(mtd(a,f))} +function kYd(a,b,c){var d,e;zf(a.j==(h7d(),_5d));zf(b.j==r6d);zf(c.j==F4d||NYd(c));d=new S2d(r5d,a,b,c);zf(d.j==r5d);e=f2d(d,d.g,60);e!=d.g&&(d.g=e);d.g=new p3d(60,1,d.g);return d} +function poe(a,b,c,d){var e,f,g;g=roe(b);if(c==0&&roe(a).size()!=g.size()){return false}for(e=0;e=rKe){b=sKe+(a-rKe>>10&tKe)&uKe;c=vKe+(a-rKe&tKe)&uKe;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&uKe)}} +function Ccc(a,b){var c,d,e,f;if(b.Qn()){for(f=b.bo().$d();f.Pd();){e=wL(f.Qd());c=rL(F1d((d=b.ho(e),!d?null:d.d),51),28);if(!!c&&c.lk()){OCe(a.b.b,e);Fcc(a,b.fo(e))}}}return a.b.b} +function MBc(a){HAc();var b;if(a.j!=(h7d(),x5d)){return null}if(Jse((a.b?a.b.f:null).Lm(),KMe)){return a.b}b=a.b;if(b.j==x5d&&Jse((b.b?b.b.f:null).Lm(),KMe)){return b.b}return null} +function lLc(a,b){var c,d,e,f;for(f=b.$d();f.Pd();){e=rL(f.Qd(),150);for(d=DEe(a,0);d.b!=d.d.c;){c=rL(SEe(d),150);if(Jse(c.b.Lm(),e.b.Lm())){je(a,c,true);break}}AEe(a,e,a.c.b,a.c)}} +function rTc(a,b,c){var d;if(c!=null&&!Jse(c,b.Lm())){b.Qm(c);if(!Jse(c,eue(a.o,b))){FGb(a.d,b);d=b.e;d.j==(h7d(),r5d)&&(HAc(),d.j==r5d&&qCc(d.e)&&d.j==r5d&&hDc(d.b))&&FGb(a.d,d)}}} +function dYc(a,b){var c,d,e,f,g;if(a.f){return}e=Hzc(b);for(g=(d=e.bk().a.ke().$d(),new sve(d));g.a.Pd();){f=(c=rL(g.a.Qd(),12),rL(c.te(),66));if(PCe(a.d,f.ji())){a.f=true;return}}} +function P$c(a,b,c,d){var e,f,g,h;for(f=c.b;f;f=g){g=f.d;e=f.Lm();if(I$c(a,e)||F$c(a,f.b)){h=Hzc(b);OCe(a.a.f,h._j(e));a2d(c,f);EDc(f,a.a.a)}}if(!c.b){$Dc(d,c);EDc(c,a.a.a);Yzc(b)}} +function mcd(a,b,c){var d,e,f;for(d=0;d=2){c=vte(new zte,f[0]);for(d=1;d0){c=d;d=(d-1)/2|0;if(a.a.sf(Ycd(a.b,d),b)<=0){edd(a.b,c,b);return true}edd(a.b,c,Ycd(a.b,d))}edd(a.b,d,b);return true} +function gI(a,b,c,d){var e,f;while(true){f=((d-c)/2|0)+c;e=(vJe(f,a.a.length),rL(a.a[f],392)).bg()-b;if(e==0){return f}else if(e<0){c=f+1;if(c>d){return d}}else{d=f-1;if(d1&&nob("Expected at most 1 'default' in switch but was "+d,b)} +function s3b(a,b,c,d,e){this.g=a;this.d=VYd(GK(yK(veb,1),MMe,5,0,[]));this.e=VYd(GK(yK(veb,1),MMe,5,0,[]));this.j=new RDe;this.i=new RDe;this.b=new RDe;this.f=b;this.a=c;this.c=d;this.k=e} +function $7b(a){var b,c,d;d=VYd(GK(yK(veb,1),MMe,5,0,[]));B2d(d,a.k);n2d(d,F_d(new a1d(false),true));c=1;for(b=a.b;b;b=b.d){b.j==(h7d(),M6d)&&l1d(d,ZYd(cZd(b.Lm()),new v3d(c++)))}return d} +function bjc(a){var b,c,d,e,f;for(e=(f=(new nve(a.f)).a.ke().$d(),new sve(f));e.a.Pd();){d=(b=rL(e.a.Qd(),12),rL(b.te(),219));if(d.j){c=d.a;zf(d.c);zf(!!c);hjc(d);c.Rd();EDc(c.Cj(),a.d)}}} +function umc(a,b){var c,d;HAc();if(!(a.j==(h7d(),m5d)&&a.b.j==m4d)){return false}c=a.b.b;d=D1d(a.b);return d.j==r5d&&!(d.j!=Z5d&&nDc(d.e))&&sCc(d.b?d.b.f:null)&&b!=null&&Z1d(c,b,b.length)} +function gAc(b,c,d){var e,f;try{e=c.e;tf(e);Qzc(b,e);b.e=e;Vzc(b,e);cAc(b,c,e);zf(d.e==e);cAc(b,d,e);Tzc(b,false)}catch(a){a=zib(a);if(zL(a,146)||zL(a,72)){f=a;_zc(b,f)}else throw Aib(a)}} +function r_c(a,b,c){var d;d=rL(EL(a)?fue(b,a):Xk(hDe(b.d,a)),356);if(c==d){return d}if(d){d.b.a=d.a;d.a.b=d.b;d.a=null}else{d=new s_c(a);EL(a)?iue(b,a,d):iDe(b.d,a,d)}d.b=c;c.a=d;return d} +function AGe(a,b,c,d){var e,f;f=b;e=f.d==null||a.a.sf(c.d,f.d)>0?1:0;while(f.a[e]!=c){f=f.a[e];e=a.a.sf(c.d,f.d)>0?1:0}f.a[e]=d;d.b=c.b;d.a[0]=c.a[0];d.a[1]=c.a[1];c.a[0]=null;c.a[1]=null} +function EPc(a,b,c){var d,e,f;for(e=OPc(b.a.Bi()).$d();e.Pd();){d=rL(e.Qd(),5);if(gue(a.e,c)){f=rL(fue(a.e,c),181)}else{f=new hQc;f.b=ZLb(a.i,f);iue(a.e,c,f)}dk(a.f,d,f);b.b&&gQc(f,d,a.b)}} +function yud(a,b,c,d){var e;zf(!a.f);e=rL(Xk(Nk(a.k,b,false)),52);if(!!e&&!!e.b){return}!!e&&(d=Tnd(e.d,d));a.k=trd(a.k,b,new Wtd(c,d,null,(fud(),eud)));!!Nk(a.n,b,false)&&(a.n=urd(a.n,b))} +function JBd(a,b){var c;if(b==(wCd(),lCd)){PBd(a);c=IBd(a,!a.n?DCd(a.i):_Ad(a));if(c){PBd(a);hBd(a,rCd)?!a.n?DCd(a.i):_Ad(a):(XAd(a,xXe,a.i.g,CCd(a.i)),null)}return c}else{return IBd(a,b)}} +function O_d(a){if(!((a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)&&!i$d(a.a)&&!((a.a.a&jNe)!=0)&&!((a.a.a&32)!=0)&&a.a.j!=(z_d(),w_d)){a.a.a|=jNe;a.e=true;return true}return false} +function xIe(a,b){var c,d,e,f;c=rL(fue(a.a,b),484);if(!c){d=new KIe(b);e=d.c;f=bte(e,0,nse(0,Rse(e,hte(46))));HIe(d,xIe(a,f));d.c.length==0&&CIe(d,new NIe);iue(a.a,d.c,d);return d}return c} +function Yh(a,b,c,d){var e,f;a.le(b);a.me(c);e=a.b.containsKey(b);if(e&&ef(c,a.b.get(b))){return c}d?Zh(a.d,c):pf(!zh(a.d,c),fLe,c);f=a.b.put(b,c);e&&a.d.b.remove(f);a.d.b.put(c,b);return f} +function JDb(a,b,c){var d,e;if(b.j==(h7d(),_5d)&&Jse(b.Lm(),c)){return true}for(e=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();e.Pd();){d=rL(e.Qd(),5);if(JDb(a,d,c)){return true}}return false} +function A$b(a,b,c){var d,e,f;if(b.b||!b.c||!w$b(a,c,b)){return}f=b.e;if(!E$b(f)){return}for(d=f.e;d;d=d.e){if(oCc(d)){return}}e='JSCompiler_StaticMethods_'+C$b(f);z$b(a,f,e);y$b(a,c,b.a,e)} +function Myc(a,b){switch(b.g){case 30:return a.i;case 31:return a.k;case 35:return a.o;case 34:return a.d;case 32:return a.f;default:throw Aib(new DJ("The token isn't a scalar value "+b));}} +function tLc(a){var b,c,d,e;b=(lr(),new Fu);for(d=a.i.$d();d.Pd();){c=rL(d.Qd(),150);if(c.c.j==(h7d(),m6d)){e=qBc(c.c,'reflectToAttribute');!!e&&e.j==W6d&&(Vcd(b.a,tf(c)),b)}}return ur(b.a)} +function zNc(a,b,c){kf(b.j==(h7d(),m5d)||b.j==r5d||(HAc(),!!b&&(b.j==b7d||b.j==T5d||b.j==S4d)));kf(a.c!=b);if(!a.a||b.j!=m5d){a.a=b;!a.f?(a.f=c):a.j.f?(a.f=eoc(a.j.f,a.f,c)):Af(c==a.f,dVe)}} +function YRc(a,b){var c,d,e;if(!a.p){return}d=b.$j();zf(d.j==(h7d(),r5d));if(ECc(d.e)){return}c=(HAc(),kf(d.j==r5d),d.b.d);e=a.k&&mSc(a.d,d);if(e){qSc(a.d,b,a.o)}else{$Rc(a,c,b);VRc(a,c,b)}} +function L4c(a,b,c){var d;d=K4c(a,b.b,c);if(b.j==(h7d(),h6d)){return !d}if(b.j==g4d){return d&&K4c(a,b.b?b.b.f:null,c)}if(b.j==p6d){return d||K4c(a,b.b?b.b.f:null,c)}throw Aib(new Ire(VVe))} +function Jzd(a,b){var c,d,e,f,g;f=Vxd(a.a,(h7d(),v5d));for(e=new pEe(new gEe(b.a));e.b!=e.c.a.b;){d=nEe(e);g=$xd(a.a,u5d,rL(d.d,129).a);c=rL(d.e,18);!!c&&l1d(g,lyd(a.a,c));l1d(f,g)}return f} +function AId(a,b,c,d,e,f){var g;g=fOd(kOd(eOd(hOd(cOd(jOd(gOd(lOd(iOd(new mOd((rOd(),qOd)),c),d),e),false),f),kHd(a)),fId(a,1)),jHd(a)),new SNd(new qRd(b,a.f)));return bOd(g,new qRd(b,a.f))} +function xxe(a,b){var c;if(HL(a)===HL(b)){return true}if(a==null||b==null){return false}if(a.length!=b.length){return false}for(c=0;ca.f.b,b||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)?fHd(a):aHd(a,jLd))}return ur(c.a)} +function qSd(a){pSd();var b,c,d,e;b=BSd(a,nSd);if(b.a.length==0){return a}e=(uSd(),tSd);for(d=bx(new Gze(oSd.a.b.$d()));d.Pd();){c=rL(d.Qd(),27);e=ESd(e,CSd(BSd(b,c.a),-c.b))}return ESd(a,e)} +function aEb(a){var b,c,d,e;e=(c=a.c.e,!!c&&(HAc(),!!c&&(c.j==(h7d(),b7d)||c.j==T5d||c.j==S4d))?a.c:a.c.e);d=e.b?e.b.f:null;if(d.j==(h7d(),p6d)){b=d.b;if(X1d(a.c,b)){return true}}return false} +function WAc(a){HAc();var b;switch(a.j.g){case 82:b=a.e;return !!b&&!(b.j==(h7d(),K4d)||b.j==X4d)&&b.j!=(h7d(),M4d);case 72:case 73:case 101:case 67:case 96:return true;default:return false;}} +function dOc(a){var b,c;zf((HAc(),!!a&&(a.j==(h7d(),b7d)||a.j==T5d||a.j==S4d)));c=new idd;while(a.b.d){b=new P2d(a.j,d2d(a));H2d(b,a);k1d(a.e,b,a);c.a[c.a.length]=b}c.a[c.a.length]=a;return c} +function dSc(a,b,c,d){this.o=new RCe;this.j=new idd;this.a=new idd;this.c=new kp;this.b=new JCe;this.e=new kp;this.i=new kp;this.g=a;this.f=CFb(a);this.p=b;this.n=c;this.k=d;this.q=new o5b(a)} +function nye(a,b){jye();var c,d,e,f,g,h;b=(iBe(),!b?fBe:b);e=(g=a.a.ke().$d(),new jve(g));f=(d=rL(e.a.Qd(),12),d.se());while(e.a.Pd()){h=(c=rL(e.a.Qd(),12),c.se());b.sf(h,f)>0&&(f=h)}return f} +function Ipb(a,b,c,d){var e,f;f=c.k;if(f){e=gqb(f);e!=null&&Zpb(a,b,c,d)&&(e.length==0?DGb(a.a,Szc(c,xpb,GK(yK(fgb,1),pKe,2,6,[gjb(f)]))):DGb(a.a,Szc(c,ypb,GK(yK(fgb,1),pKe,2,6,[gjb(f),e]))))}} +function yFb(a,b){var c,d,e,f,g,h;for(e=(g=b.a.ke().$d(),new sve(g));e.a.Pd();){d=(c=rL(e.a.Qd(),12),rL(c.te(),82));d.b=a;GHb(d,hcd(LHb(d).a));h=JHb(d,a);if(!h){continue}f=new L4b(a);F4b(f,h)}} +function wLb(a){switch(a.j.g){case 71:return wLb(a.b);case 72:case 73:case 101:if(a.j==(h7d(),q5d)||a.j==p5d){return a.b.d}return wLb(a.b);case 83:return wLb(a.b?a.b.f:null);default:return a;}} +function jOb(a,b){var c,d,e,f,g;c=rL(eue(a.c.c,b),5);if(!c){c=LFb(a.c.a,b);hue(a.c.c,b,c)}g=iOb(a);for(e=new fxe(g);e.a!=e.b;){d=rL(dxe(e),220);f=d.f;FGb(a.c.a,f);u1d(f);m1d(c,f);FGb(a.c.a,f)}} +function vmc(a,b){var c,d,e,f;e=(HAc(),f=CBc(b),!f?null:G1d(f));if(!e){return}c=b.b?b.b.f:null;if(!c.b){return}d=c.b;if(!umc(d,e)||!!d.d){return}a2d(c,d);EDc(d,a.a.b);FGb(a.a.b,c);OCe(a.a.c,e)} +function CBc(a){HAc();var b,c,d;zf(a.j==(h7d(),r5d)||a.j==N4d);d=a.e;switch(d.j.g){case 29:return d;case 47:{b=d.b;return T1d(b)?b:null}default:c=a.b;return c.j==c5d||c.Lm().length==0?null:c;}} +function PVc(){PVc=cjb;OVc=new Q_b('JSC_INSUFFICIENT_OUTPUT_VERSION',(prb(),nrb),new _te("Built-in ''{0}'' not supported in output version {1}"));NVc=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[wNe,cTe])))} +function J$c(a,b,c,d){var e,f,g;f=c.b;if(M$c(a,f)||(g=G1d(f),O$c(a,g))){if(d.j==(h7d(),m5d)){e=d.e;$Dc(e,d);EDc(d,a.a.a);FGb(a.a.a,e)}else{Xzc(b,c,(z$c(),x$c),GK(yK(fgb,1),pKe,2,6,[G1d(f)]))}}} +function mmd(a,b,c){var d,e,f;zf(!a.nl().isEmpty());d=(Qq(),new vv);for(f=a.nl().$d();f.Pd();){e=rL(f.Qd(),25);sv(d,dtd(e,b,c,true,false))}return Wnd(a.e,a.kl(),Ys(new lxe(d.a)),a.Dl(),a.gl())} +function Fzd(a,b){var c,d,e,f;f=Vxd(a.a,(h7d(),r6d));if(Hyd(a,b.a)){for(d=b.a.$d();d.Pd();){c=rL(d.Qd(),18);e=nyd(a.a,c);zf(e.j==_5d||e.j==A6d||e.j==k4d||e.j==n6d||e.j==Y4d);l1d(f,e)}}return f} +function LBe(){LBe=cjb;JBe=GK(yK(fgb,1),pKe,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat']);KBe=GK(yK(fgb,1),pKe,2,6,['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'])} +function Mkb(a,b){var c,d;if(b==-1){return -1}Skb(b);c=b/31|0;if(c>=a.b.length){return Jkb(a)-1}d=(a.b[c]|0)&eKe>>>31-b%31-1;while(d==0){if(--c<0){return -1}d=a.b[c]|0}return c*31+(32-Ure(d))-1} +function unb(a,b){var c,d,e;Pnb((h7d(),x5d),b);d=j7d(b.j);d!=-1&&(c=y1d(b),d!=c&&nob(PMe+d+QMe+c,b));rnb(a,b.b);e=b.b?b.b.f:null;Pnb(L6d,e);e.Lm()==null&&nob(WMe,e);e.Lm().length==0&&nob(XMe,e)} +function qqb(){qqb=cjb;pqb=new Q_b('JSC_DEBUGGER_STATEMENT_PRESENT',(prb(),nrb),new _te('Using the debugger statement can halt your application if the user has a JavaScript debugger running.'))} +function Mtb(a,b){HAc();(b.j==(h7d(),_5d)&&Jse(b.Lm(),PNe)||b.j==_4d&&b.b.j==k6d&&b.b.Km()==0&&(b.b?b.b.f:null).j==k6d&&(b.b?b.b.f:null).Km()==0)&&DGb(a.c,Szc(b.e,Dtb,GK(yK(fgb,1),pKe,2,6,[])))} +function fzb(a,b){var c,d,e,f;if(!a.b.i){return}f=b.e;Af(f.j==(h7d(),m4d)||f.j==m5d,f);d=b.b;zf(Jse(d.Lm(),qNe));c=Izb(a.b);czb(a,d,c);e=f.j==m4d?f:b;qzb(e,e);a.b.g||Byb(a,(HAc(),nBc(f,GAc)),0)} +function L8b(a){var b;if(a.j==(h7d(),r5d)){return false}HAc();if(!!a&&(a.j==b7d||a.j==T5d||a.j==S4d)||O8b(a)){if(a.b.j==_5d){return true}}for(b=a.b;b;b=b.d){if(L8b(b)){return true}}return false} +function Mic(a,b,c){var d,e;d=new tEe;while(MDe(a.b.a,b)){e=d.a.put(b,d);if(e!=null){DGb(a.b.b,Rnc(c,(Eic(),Dic),GK(yK(fgb,1),pKe,2,6,[pe(d),b])));QDe(a.b.a,b);break}b=wL(NDe(a.b.a,b))}return b} +function QIc(a,b){var c,d,e;kf(b.j==(h7d(),a5d));c=BBc(b);if(c.j==F4d&&!c.b){d=jBc(b);e=H2d(BYd(H2d(new N2d(c5d),b),u1d(d),H2d(new N2d(c5d),b),u1d(c)),b);g2d(b.e,b,e);GGb(a.c);return e}return b} +function CRc(a,b){var c,d;d=b.b.k;if(fDc(b)){c=b.b.b.k;!!c&&c.Nl()&&(d=c.sm().il())}if(!d){return null}d=d.qm();if(d.lm()||d.Ll()||d.jm()||d.Ql(WFb(a.c.a).vj((Lhe(),nhe)))){return null}return d} +function hcd(a){ecd();Jse(a.substr(0,1),'/')&&(a=a.substr(1));return 'module$'+Wse(Vse(Vse(Vse(Vse(Vse(Vse(Wse(Yse(gcd(a),'^\\./',''),'/','$'),92,36),64,36),43,36),45,95),58,95),46,95),rSe,'_')} +function aL(a,b){var c,d,e;b&=63;if(b<22){c=a.l<>22-b;e=a.h<>22-b}else if(b<44){c=0;d=a.l<>44-b}else{c=0;d=0;e=a.l<=0;){d=0;while(c-d>0&&92==b.charCodeAt(c-d-1)){++d}if(0==(d&1)){return true}}return false} +function ufd(d){var c={'number':'','string':'','boolean':''};Object.keys(d).forEach(function(a){var b=typeof this[a];if(!(b in c)){throw new TypeError('Type of define `'+a+'` unsupported: '+b)}},d)} +function Axd(){Axd=cjb;uxd=new Bxd(KQe,0,(wEd(),mEd));vxd=new Bxd(LQe,1,nEd);wxd=new Bxd(MQe,2,pEd);xxd=new Bxd('ECMASCRIPT7',3,rEd);yxd=new Bxd('ECMASCRIPT8',4,tEd);zxd=new Bxd('TYPESCRIPT',5,vEd)} +function UGd(a){var b,c,d;d=new idd;Vcd(d,Zre(0));for(c=0;c>>b;e=a.m>>b|c<<22-b;d=a.l>>b|a.m<<22-b}else if(b<44){f=0;e=c>>>b-22;d=a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=c>>>b-44}return LK(d&fMe,e&fMe,f&gMe)} +function bEb(a,b,c){var d,e;if(!c||!(!b.j&&!(b.t==(xec(),tec)||b.t==wec)&&!dec(b)&&(b.e||(!b.p||_dc(b.p))&&(b.i>0||b.n>0)&&b.o==0&&b.f==0)&&!hec(b))){return}e=b.d;d=e.c.Lm();RDb(a,b,d,w1d(e.c,2),e.c.e)} +function k8b(a,b,c){var d,e;this.a=new LEe;this.c=c;xEe(this.a,b);this.b=a.b.b+a.b.c;for(d=b.c.d;d;d=d.d){if(d.j==(h7d(),r5d)){continue}e=t8b(d);if(!e||!Jse(b.d,e.d)){break}xEe(this.a,e);this.b+=a.b.c}} +function HBc(a){HAc();var b,c,d,e;kf(_Cc(a));e=new idd;d=a.b?a.b.f:null;for(c=(!d.b?(jye(),jye(),iye):new F3d(d.b)).$d();c.Pd();){b=rL(c.Qd(),5);if(b.j!=(h7d(),M6d)){continue}e.a[e.a.length]=b}return e} +function dEc(a,b){HAc();var c,d,e,f;zf(a.j==(h7d(),F4d));e=a.e;c=b||NAc(a);if((e.j==D6d||e.j==F6d||e.j==F4d||e.j==Z5d)&&c){f=a;while(a.b){d=d2d(a);j1d(e,d,f);f=d}a2d(e,a);return true}else{return false}} +function $Yc(b){var c,d;if(b.d!=null){return}try{d=Zse(b.a,_Je,-1);b.d=CK(NL,ULe,17,d.length,15,1);for(c=1;c',vSe),fcd(c))))),212)} +function Zjd(a,b){var c;if(b==null){return false}if(a===b){return true}pf(zL(b,153),'obj is: %s',b);c=rL(b,153);return nFe(a.i,c.i)&&nFe(a.e,c.e)&&nFe(a.j,c.j)&&nFe(a.k,c.k)&&nFe(a.d,c.d)&&nFe(a.g,c.g)} +function hkd(a,b){var c,d;zf(a.c||b.c);if(a==a.a.v||a==a.a.g||b==b.a.v||b==b.a.g){return true}d=ose(a.i.size(),b.i.size());for(c=0;ca.k} +function aOd(a){dNd.call(this,(GQd(),FPd),a.k);this.k=a.n;this.d=a.d;this.i=a.i;this.f=a.f;this.g=a.g;this.a=a.a;this.j=rL(tf(a.j),312);this.b=rL(tf(a.b),233);this.n=a.o;this.c=rL(tf(a.c),18);this.e=a.e} +function lee(a,b){var c,d;if(a.Nl()){for(d=new lxe(b);d.ac){return hf(a,c,'start index')}if(b<0||b>c){return hf(b,c,'end index')}return Jf('end index (%s) must not be less than start index (%s)',GK(yK(agb,1),ZJe,1,5,[Zre(b),Zre(a)]))} +function Rrb(a,b,c,d){var e,f;Af(c.j==(h7d(),_5d)||c.j==x5d||c.j==M6d,c);f=c.j==M6d?c.Lm():G1d(c);Brb(a,f);if(a.e!=(fsb(),esb)){return}c.j!=M6d&&(HAc(),e=c.e,!(!!e&&e.j==m4d&&e.b==c))&&d.j!=m5d&&Arb(a,c,b)} +function pvb(a,b,c){var d,e,f,g;f=c.b;HAc();if(f.j==(h7d(),m5d)&&f.b.j==I4d){d=f.b;e=d.b;if(Z1d(e,_Ne,_Ne.length)){zf(!a.b);g=qvb(d);g==null?Xzc(b,c,(Ayb(),syb),GK(yK(fgb,1),pKe,2,6,[])):(a.b=new zvb(g))}}} +function sNb(a,b,c){var d,e,f,g;kf((HAc(),!!c&&(c.j==(h7d(),b7d)||c.j==T5d||c.j==S4d)));g=D1d(c.b);d=!!g&&YMb(g);for(f=new lxe(ABc(c));f.a::)*','');return e} +function Yic(a){var b,c,d,e,f,g;for(d=(e=(new nve(a.f)).a.ke().$d(),new sve(e));d.a.Pd();){c=(b=rL(d.a.Qd(),12),rL(b.te(),219));if(c.c){for(g=Tjc(c).values().$d();g.Pd();){f=rL(g.Qd(),327);f.b&&W9b(a.g,f)}}}} +function Cpc(a,b,c,d,e){sPb.call(this,a,new Ipc);Af(b.$j().j==(h7d(),r5d),b);this.c=b;this.d=c;this.b=new RCe;this.f=new JCe;this.a=new JCe;this.e=new LEe;tPb(b,this.b,d,e);cBc(this.a,this.e,d,e,b);wpc(this)} +function Src(a,b){var c,d,e,f;if(b!=null||!a.b){return b}else{f=CK(b2,ZJe,132,y1d(a),0,1);e=0;for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);f[e++]=new Prc(c,null,0,false)}return f}} +function zuc(a,b,c,d){var e,f,g;e=c.b;g=c.e;f=Otc(a.a,b,e);!!f&&(g.j==(h7d(),o5d)?g.b.d!=c?(tf(f),Hy(a.a.k,d,f,null),true):(tf(f),Hy(a.a.k,e,f,null),true):(g.j!=I4d||c!=g.b)&&(tf(f),Hy(a.a.k,d,f,null),true))} +function oBc(a,b){HAc();var c,d;zf(a.j==(h7d(),m6d));for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);if(c.j==R4d&&c.b.Mm(b,false,true,false,false)){return c.b?c.b.f:null}}return null} +function sKc(a,b,c,d){this.d=new jQc;this.f=new Owe;this.w=new idd;lf(c!=(vKb(),sKb),"PerformanceTracker can't work without tracer data.");this.I=(Fte(),Hib(fJe()));this.n=a;this.u=b;this.F=!d?Ete:d;this.D=c} +function VOc(a,b){var c,d,e,f,g;f=H2d(VYd(GK(yK(veb,1),MMe,5,0,[])),b);for(d=(new ZGe(a.b)).b.Ho();d.Pd();){c=rL(d.Qd(),12);e=J2d(cZd(wL(c.se())),b);g=J2d(rL(c.te(),5).Jm(false),b);l1d(e,g);l1d(f,e)}return f} +function L7c(a,b){var c,d,e,f;c=G1d(b);e=t6c(a.g,c);if(!!e&&!e.e){f=e.d;if(!!f&&!f.lm()){return f}}else if(b.j==(h7d(),x5d)){f=L7c(a,b.b);if(!!f&&!!f.Qn()){d=f.Zm((b.b?b.b.f:null).Lm());return d}}return null} +function jjd(a,b,c){var d,e;zf(!tjd(a,b));zf(!a.B);e=b.a.size()==1?a:rjd(a,(kf(b.a.size()!=1),new jud(b.a.Bf(0,b.a.size()-1))));e.C.isEmpty()&&(e.C=new RDe);d=wL(mw(b.a));zf(!e.C.containsKey(d));e.C.put(d,c)} +function xzd(a,b){var c,d,e,f;Uyd(a,b,(BFd(),XEd));f=Tzd(a,b.b,false);c=Vxd(a.a,(h7d(),e5d));W2d(c.i)==-1&&jyd(c,b.o.b,b.o.a);for(e=b.a.$d();e.Pd();){d=rL(e.Qd(),18);l1d(c,lyd(a.a,d))}return Xxd(a.a,d5d,f,c)} +function Kzd(a,b){var c,d,e,f,g;e=Yzd(a,b.c);A2d(e,(h7d(),y5d));c=lyd(a.a,b.a);d=$xd(a.a,_5d,'');iyd(d,b.a);f=Vxd(a.a,r6d);iyd(f,b.a);g=Yxd(a.a,r5d,d,f,c);iyd(g,b.a);m1d(e,g);Oyd(a,g,b.d);x2d(e,b.b);return e} +function rId(a){var b,c,d,e,f;f=eKd(a.g,0).b.b;aHd(a,(XMd(),cMd));d=cHd(a);aHd(a,iLd);c=eJd(a);aHd(a,hLd);aHd(a,iLd);b=bJd(a);e=new HOd(new qRd(f,a.f),d,false,false,null,c);return new BOd(new qRd(f,a.f),e,b)} +function k1d(a,b,c){var d;lf(c.e==a,'The existing child node of the parent should not be null.');lf(!b.d,MYe);lf(!b.f,NYe);lf(!b.e,OYe);if(a.b==c){d=a.b.f;b.e=a;b.d=a.b;b.f=d;a.b.f=b;a.b=b}else{j1d(a,b,c.f)}} +function rme(a,b){var c,d,e,f,g;g=rL(a.b.get(b),292);if(g){return g}f=pme(a);if(f){g=rme(f,b);if(g){return g}}for(d=qme(a).$d();d.Pd();){c=rL(d.Qd(),24);e=c.eo();if(e){g=rme(e,b);if(g){return g}}}return null} +function iDe(a,b,c){var d,e,f,g;g=b==null?0:a.b.Do(b);e=(d=a.a.get(g),d==null?[]:d);if(e.length==0){a.a.set(g,e)}else{f=fDe(a,b,e);if(f){return f.ue(c)}}FK(e,e.length,new Dve(b,c));++a.c;ABe(a.b);return null} +function Gub(a){var b,c,d,e,f,g;e=new JCe;for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);b=c.Lm();g=c.b;if(g.j==(h7d(),_5d)){f=c.b.Lm();f==null?iDe(e.d,null,b):yDe(e.e,f,b)}}return e} +function v9b(a,b){var c;if(a.j==(h7d(),r5d)){HAc();a.j==r5d&&qCc(a.e)&&a.j==r5d&&hDc(a.b)&&b.add(a.b.Lm());return}else if(a.j==_5d){switch(a.e.j.g){case 76:case 78:b.add(a.Lm());}}for(c=a.b;c;c=c.d){v9b(c,b)}} +function Jac(a,b,c){var d,e;d=H2d(qYd((Ef(Ose(a,hte(46))==-1,xMe,a),new T3d((h7d(),_5d),a)),GK(yK(veb,1),MMe,5,0,[])),c);e=f2d(d,d.g,50);e!=d.g&&(d.g=e);d.g=new p3d(50,1,d.g);!!b&&l1d(d,s1d(b,false));return d} +function QAc(a){HAc();var b;pf(a.j==(h7d(),f6d),'Expected NEW node, got %s',a.j);if((B1d(a,42)&15)==15){return false}if((B1d(a,42)&15&11)==11&&IAc(a)){return false}b=a.b;return b.j!=_5d||!wAc.contains(b.Lm())} +function aOc(a){var b,c,d;b=INc(a.a);c=PBc(b);if(!c){return null}HAc();if(c.j==(h7d(),r5d)&&!(c.j!=Z5d&&nDc(c.e))||c.j==N4d&&!(c.j!=Z5d&&nDc(c.e))){return c.b}d=a.b._j(G1d(c));if(!d){return null}return d.sk()} +function IVc(a,b,c){var d,e,f,g;for(e=(!c.b?(jye(),jye(),iye):new F3d(c.b)).$d();e.Pd();){d=rL(e.Qd(),5);g=d.b;zf(d.j==(h7d(),M6d)&&(g.j==L6d||g.j==n5d));f=g.j==L6d?b+(''+g.Lm()):uVe;iue(a.b,b+(''+d.Lm()),f)}} +function MZc(){MZc=cjb;new Q_b('SOURCEMAP_RESOLVE_FAILED',(prb(),orb),new _te('Failed to resolve sourcemap: {0}'));LZc=new Q_b('SOURCEMAP_PARSE_FAILED',orb,new _te('Failed to parse malformed sourcemap: {0}'))} +function S2d(a,b,c,d){kf(!b.e);kf(!b.d);kf(!b.f);kf(!c.e);kf(!c.d);kf(!c.f);kf(!d.e);kf(!d.d);kf(!d.f);this.j=a;this.e=null;this.b=b;b.d=c;b.f=d;b.e=this;c.d=d;c.f=b;c.e=this;d.d=null;d.f=c;d.e=this;this.i=-1} +function Cz(a,b,c){var d,e;this.f=a;d=rL(eue(a.b,b),200);e=!d?0:d.a;xf(c,e);if(c>=(e/2|0)){this.e=!d?null:d.c;this.d=e;while(c++0){zz(this)}}this.b=b;this.a=null} +function gtb(a,b,c){var d,e,f,g;e=null;d=rL(F1d(c,29),11);if(!!d&&(d.a&2)!=0){e=c.b}else{d=rL(F1d(b,29),11);!!d&&(d.a&2)!=0&&(e=b.b)}if(!!e&&T1d(e)){f=G1d(e);if(!a.b.yh(f)){g=d.j;g==(z_d(),w_d)||iue(a.c,f,e)}}} +function _Hb(a,b,c){var d,e;kf(b.j==(h7d(),L6d));kf(c.j==j5d||c.j==D5d);e=b.Lm();if(Jse(e.substr(0,5),RPe)){Vcd(a.d,e.substr(5));return}d=Mbd(a.b,e,a.b.a,W2d(b.i),V2d(b.i));!d&&(d=Nbd(a.b,e));Vcd(a.d,hcd(d.a))} +function Udc(a,b,c,d,e,f,g){var h,i,j;if(Wdc(a,b,c,d,e,f)){return}i=Pdc(a,f,g);j=new Fec(b,c,d,i,(Pec(),Oec),a.a.b++);$dc(i,j);if(e.j==(h7d(),m4d)&&e.e.j!=m5d){h=new Fec(b,c,d,i,Iec,a.a.b++);$dc(i,h);Gec(j,h)}} +function ihc(a,b){var c,d,e;c=b.b;if(Z1d(c,ETe,ETe.length)){return a.c.d.d.t}d=lhc(a,c);if(!d){return null}if(!d.n.a.isEmpty()){d=Rgc(a,b,d,true);if(!d){return null}}e=b.j==(h7d(),f6d)?d.g?d.g:d.d:d.k;return e} +function Mhc(a,b,c){var d,e,f,g;if(!a.b||c.j!=(h7d(),F6d)){Lhc(a,b);return}f=rL(F1d(c,53),127);tf(f);Jhc(a,f);for(e=new pEe(new gEe(b));e.b!=e.c.a.b;){d=nEe(e);g=rL(d.d,66);g.gk()&&Khc(a,g.ji(),f,rL(d.e,151))}} +function joc(a){var b,c,d,e,f,g;b=CK(Pgb,ZJe,170,a.a.length,0,1);for(f=0;f1){qte(c,b.e);c.a+=hKe;vte(c,wL(d.se()));c.a+=_Je}}DIe(Zjb,c.a)} +function Bqb(a,b,c){var d,e;!a.e&&(a.e=new Gdc(a.a,b,c));zf(!!a.e.c);zqb(a,DKe,a.f);zqb(a,gNe,a.c);ie(a.f,a.b.jh());for(e=new lxe(xdc(a.e));e.a0)}} +function OBb(a,b,c,d){var e,f;f=a.b;e=a.a;if(d){return f==b&&e>=c?new YH(f+1,e-c):a}else{if(f==b){return new YH(f-1,e+c)}else if(f>b){throw Aib(new Ire('Cannot undo line cut on a previous line.'))}else{return a}}} +function QFb(a,b){var c,d,e,f;tf(b);if(!a.L){return null}for(d=q1d(a.L).$d();d.Pd();){e=rL(d.Qd(),5);f=rL(F1d(e,51),28);if((!f?null:f.ji())!=null&&Ise((c=rL(F1d(e,51),28),!c?null:c.ji()),b)){return e}}return null} +function kGb(a,b,c){var d,e;d=new e_c(b);if(QHe(a.K,d.a)){throw Aib(new ooc('Conflicting externs name: '+b))}e=new QHb(d,true);zGb(a,e.f,e);if(c==0){m1d(a.w,d.b);Ucd(a.u,0,e)}else{l1d(a.w,d.b);Vcd(a.u,e)}return e} +function HGc(a){var b,c,d,e,f;b=false;e=false;f=false;for(d=a.a.length-1;d>=0;d--){c=(vJe(d,a.a.length),rL(a.a[d],260));c.d&&(e&&c.b||f&&c.c)&&(c.d=false);if(c.d){b=true}else{c.b&&(f=true);c.c&&(e=true)}}return b} +function XIc(a,b){var c,d,e;Af(b.j==(h7d(),X6d),b);c=b.b;d=c.d;e=d.d;if(!d.b&&(!e||!e.b)){a2d(b,c);g2d(b.e,b,c);GGb(a.c);return c}if(!c.b){YDc(d);if(e){a2d(b,e);g2d(b.e,b,e)}else{u1d(b)}GGb(a.c);return e}return b} +function UPc(a){var b,c,d,e;kf(a.j==(h7d(),I4d)||a.j==f6d);e=false;if(a.j==I4d){c=(HAc(),$Cc(a,vRe)||$Cc(a,uRe));d=c?a.b.d:a.b.b;if(!!d&&d.j==_5d&&!c);else !!d&&d.j==U6d&&(e=true)}b=IAc(a);return new TPc(b,e,a.j)} +function DUc(a,b,c,d,e){var f,g,h,i;g=rL(NDe(a.a.d,c),59);h=iUc(d.Sj()!=(AUc(),wUc),b);if(d.Sj()==vUc){f=rL(NDe(a.a.b,c),59);i=wL(f.get(h));if(i==null){i=d.Rj(h,e);f.put(h,i)}}else{i=d.Rj(h,e)}g.put(i,h);return i} +function w7c(a,b){var c,d,e,f,g;q7c(a,b,(h7d(),r5d));g=fBc(b);e=(HAc(),f=eBc(b),!f?null:rL(F1d(f,29),11));c=gBc(g);d=v7c(a,b,c,e,g);Vcd(a.c,new Y7c(a.k,b,d));b.j==r5d&&qCc(b.e)&&b.j==r5d&&hDc(b.b)&&z7c(a,b.b,b,d)} +function nfd(a){var b,c,d,e,f,g;g=(yUd(),$wnd.Object.keys(xUd));b=new JCe;for(e=0,f=g.length;e>1);Lxe(b,a,i,j,-e,f);Lxe(b,a,j,h,-e,f);if(f.sf(a[j-1],a[j])<=0){while(c0,vLe,c);d=rL(a.a.get(b),154);if(!d){g=0;a.a.put(b,new _p(c))}else{g=d.a;f=Bib(g,c);of(Dib(f,eKe)<=0,f);d.a+=c}a.b=Bib(a.b,c);return g} +function f0b(a){var b,c,d,e,f;if(a.km()){return a.El()}else{f=a.tm();b=f?f.bl():null;if(!!b&&b.Wl()){e=new idd;for(d=b.cl().$d();d.Pd();){c=rL(d.Qd(),213);Vcd(e,c.il())}return e.a.length==0?null:e}else{return null}}} +function Omc(a){var b,c,d,e;if(a.j!=(h7d(),r5d)){return false}b=(HAc(),c=CBc(a),!c?null:G1d(c));return b!=null&&b!=null&&(e=OTe.length,Jse(b.substr(b.length-e,e),OTe)||(d=PTe.length,Jse(b.substr(b.length-d,d),PTe)))} +function _Dc(a){HAc();var b,c,d,e;e=new vEe(a);for(d=new lxe(a);d.a=0){g=b.substr(0,d);f=Pdc(a,g,true);e=Zdc(f,b.substr(d+1),a.a.g,c)}else{e=new lec(b,null,a.a.g);Vcd(a.a.f,e)}iue(a.a.i,b,e)}return e} +function Bzc(a,b){var c,d,e,f,g;f=!b?a.o:(d=rL(F1d(b,51),28),!d?null:d.ji());if(f==null){return '[source unknown]\n'}e=W2d(b.i);c=V2d(b.i);g=SFb(a.c,f,e);g==null&&(g='[source unknown]');return f+':'+e+':'+c+_Je+g+_Je} +function dIc(a,b){var c,d,e,f;e=b.b;d=Frc(e);c=d.b.d.j==(h7d(),h6d)||d.b.c<=d.a.c?d.b:Hrc(d.a);if(c.d.j==h6d){f=b.b.d;aIc(a,e,(zf(c.d.j==h6d),Krc(Src(c.d,c.b)[0])));a2d(b,f);l1d(b,f);GGb(a.c)}else{aIc(a,e,c)}return b} +function fIc(a,b){var c,d,e,f;kf(b.j==(h7d(),h6d));f=b.e;e=b.b;switch(e.j.g){case 4:c=d6d;break;case 5:c=g5d;break;case 36:c=I6d;break;case 37:c=H6d;break;default:return b;}d=d2d(b);d.j=c;g2d(f,b,d);GGb(a.c);return d} +function nSc(a,b,c){var d,e,f,g;e=oSc(a,b);for(g=qZb(a.b,e).$d();g.Pd();){f=rL(g.Qd(),168);if(uZb(f)&&(HAc(),!$Cc(f.b.e,uRe))){d=uSc(f,c);if(!!d&&(HAc(),OAc(d,false,a.a))){return false}}else{return false}}return true} +function ryd(a,b){var c,d;if(b.j==(h7d(),O5d)){c=b.b;for(d=b.e;!!d&&d.j!=r5d;d=d.e){if(d.j==O5d&&Jse(d.b.Lm(),c.Lm())){a.d.Ej(WRd('Duplicate label "%s"',GK(yK(agb,1),ZJe,1,5,[c.Lm()])),a.r,W2d(b.i),V2d(b.i));break}}}} +function dJd(a,b,c){var d,e;aHd(a,(XMd(),_Ld));++a.g.f;e=(lr(),new Fu);d=bJd(a);Vcd(e.a,tf(d));while(oJd(a,jLd)){aHd(a,jLd);d=bJd(a);!!d&&(Vcd(e.a,tf(d)),e)}aHd(a,eLd);--a.g.f;return new ROd(new qRd(b,a.f),c,ur(e.a))} +function rFe(a,b){var c,d,e,f,g,h;c=a.b.a.length;e=Ycd(a.b,b);while(b*2+11&&Tqe(d.charCodeAt(0))&&Du(b,Wd(trb,new Gze((new Mze(e.a.subList(0,c+1))).b.$d())))}return ur(b.a)} +function DLb(a){var b;switch(a.j.g){case 28:case 115:case 26:case 27:case 39:case 23:case 47:case 63:case 64:case 41:case 40:return true;case 65:return false;}for(b=a.b;b;b=b.d){if(!oMb(b)&&DLb(b)){return true}}return false} +function m0b(a,b){__b();this.g=new JCe;this.c=a;this.j=WFb(a);this.a=this.j.vj((Lhe(),$ge)).tm();this.i=b;this.f=b.d.c+b.e.c==0?null:new Zx(16,2);this.e=new Rlc(Vlc(Slc(Slc(Ulc(Ylc(new Zlc(this.j),this.f)),XFb(a)),IFb(a))))} +function N0b(a,b,c){var d,e;if(!Z1d(c,WRe,WRe.length)){return}if(L0b(b,c.b)){xFb(a.a,XRe,false);e=(HAc(),nBc(c,GAc));d=zYd(qYd(ODc(a.a,'$jscomp.initSymbolIterator'),GK(yK(veb,1),MMe,5,0,[])));k1d(e.e,I2d(d,e),e);FGb(a.a,d)}} +function nxc(a,b,c,d){var e,f,g,h,i;wyc(a,b);e=b.b;if(e.j==(h7d(),x5d)||e.j==w5d&&(e.b?e.b.f:null).j==L6d){h=e.b;g=(e.b?e.b.f:null).Lm();f=cxc(a,h,c,a.r,a.r);i=f.b;if(xyc(a,e,i,new kud(g))){f.b=d;return f}}return Txc(a,b,c)} +function lzc(a){var b;b=rL(jGe(a.a),5);if(!b.d){b=rL(iGe(a.a),5);if(b.j==(h7d(),r5d)){return lzc(a)}}else{b=b.d;kGe(a.a,b);if(b.j==(h7d(),r5d)){return lzc(a)}while(b.b){b=b.b;kGe(a.a,b);if(b.j==r5d){return lzc(a)}}}return b} +function P7c(a){var b,c,d,e,f,g;for(c=new lxe(a.c);c.aa.f.b;if(b||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)){return}HJd(a,'Semi-colon expected',GK(yK(agb,1),ZJe,1,5,[]))} +function lie(a,b,c){var d,e,f,g,h;g=Yie(b);h=Yie(c);f=rie(a,(Lhe(),nhe));while(g.a.length!=0&&h.a.length!=0){d=rL(bdd(g,g.a.length-1),24);e=rL(bdd(h,h.a.length-1),24);if(D7d(d,e,0,new lge(true))){f=d}else{return f}}return f} +function ry(a,b){var c,d,e,f;f=OLe*Wre((b==null?0:Ab(b))*PLe,15);c=f&a.b.length-1;e=null;for(d=a.b[c];d;e=d,d=d.a){if(d.d==f&&ef(d.i,b)){!e?(a.b[c]=d.a):(e.a=d.a);gy(d.c,d.f);fy(d.b,d.e);--a.f;++a.e;return true}}return false} +function h0b(a,b){var c,d,e,f;b=b.qm();if(b.km()){f=(Qq(),new vv);Vcd(f.a,tf(b));for(d=b.El().$d();d.Pd();){c=rL(d.Qd(),60);uv(f,i0b(c))}return Ys(new lxe(f.a))}else if(b.Ol()){return h0b(a,b.el())}return Qq(),e=i0b(b),Xs(e)} +function j7b(a,b,c,d,e){var f,g,h,i;i=NBc(d.b);$se(G1d(d.b),cTe)&&(i=G1d(d.b).substr(7));h=bte(b,0,Rse(b,hte(46)));g=WRd("%s(%s, '%s', %s);",GK(yK(agb,1),ZJe,1,5,[a.b,h,i,b]));f=c2d(rGb(a.a,g));I2d(f,e);n1d(e,f,c);FGb(a.a,f)} +function doc(a,b,c){var d,e,f,g,h,i;g=b.b;h=c.b;for(d=(g=0;d--){i=rL(Ycd(a.b,d),50);for(e=i.size()-1;e>=0;e--){f=rL(i.getAtIndex(e),149);if(b!=f&&Gkb(a.c[b.c],f.c)&&c!=f&&Gkb(a.c[c.c],f.c)){return f}}}return null} +function lyc(a,b){if(b.j!=(h7d(),L6d)){return a.r}switch(b.Lm()){case cKe:return a.i;case dKe:return a.k;case bKe:return a.b;case mMe:return a.q;case aKe:return omd(Qqd(a.w));case UJe:return Tnd(a.f,a.n);default:return a.r;}} +function FHc(a,b,c,d){var e;kf(b.j==(h7d(),K5d));if(RCc(c,true)&&(HAc(),!OAc(d,false,a.c))){e=null;LCc(c)?(e=new N2d(n5d)):d.j==_5d&&Jse(DKe,d.Lm())&&(e=new N2d(W6d));if(e){g2d(b.e,b,e);EDc(b,a.c);GGb(a.c);return e}}return b} +function l8c(a){var b,c,d,e,f;e=a.g.i;b=rL(F1d(e,51),28);if(!!b&&b.lk())return null;f=zL(e.k,9)?rL(e.k,9):null;if(!f||!f.On())return null;d=f.On();c=K7d(d.p)?rie(d.F,(Lhe(),Hhe)):d.p;return c.lm()?null:zL(c,24)?rL(c,24):null} +function OTd(a){var b,c,d,e,f;b=0;for(d=0,e=a.a.length>>1;d=127?(b+=f>=256?6:4):++b;switch(c-f){case 0:continue;case 1:break;default:b+=1;}c<32||c>=127?(b+=c>=256?6:4):++b}return b} +function FUd(a,b){switch(b){case cKe:return EUd(a,(Lhe(),hhe));case bKe:return EUd(a,(Lhe(),Gge));case dKe:return EUd(a,(Lhe(),whe));case mMe:return EUd(a,(Lhe(),Khe));case aKe:return EUd(a,(Lhe(),Fhe));default:return null;}} +function Rde(a){var b,c;a.B=true;if(a.o){for(c=new lxe(a.o);c.ab.d.length){return null}c<1&&(c=1);e=b.d[c-1];try{d=b.a}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}return Pse(d,hte(10),e)==-1?e>=d.length?null:bte(d,e,d.length):bte(d,e,Pse(d,hte(10),e))} +function $2c(a,b,c){var d,e,f,g;c=_2c(a,b,c);g=b.b;e=(f=zL(g.k,9)?rL(g.k,9):null,!f?a.i:f).Jn();if(e.On()){d=e.On();o2d(b,d.c.b);x2c(a,b,d)}else D7d(e,I2c(a,(Lhe(),Hge)),0,new lge(true))&&o2d(b,I2c(a,Hge));c=V2c(a,c,b);return c} +function Cld(a,b){var c;c=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25).d:null;if(!!c&&c.a.g!=0){c=Zrd(c,b);return !c?null:!c.a.q.isEmpty()&&!c.b.d.d.isEmpty()?Bmd(Ftd(c.a.u,c,null,null,null,false,c.a.i)):c.a.r}return null} +function Fpd(a){var b,c;if(!a||a.j!=(h7d(),s6d)){return false}for(c=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();c.Pd();){b=rL(c.Qd(),5);if(b.j==(h7d(),c7d)||b.j==L6d&&(Jse(b.Lm(),dPe)||Jse(b.Lm(),mMe))){return true}}return false} +function rHd(a){var b;switch(eKd(a.g,0).c.g){case 14:b=sHd(a);fHd(a);break;case 29:b=NHd(a,false,true);break;case 31:b=WHd(a);break;case 110:case 111:b=CId(a,true);break;default:case 25:case 38:case 30:b=vHd(a);fHd(a);}return b} +function qXd(a,b,c,d,e){var f,g,h,i,j,k;g=a.d.Cm(b,d,!e);h=Yoc(g,d);if(!h){return d==g?d:Xoc(d)}i=a.d.Cm(b,d,e);i=a.d.Cm(c,i,!e);j=Yoc(i,d);if(!j||!Jse(h.c,j.c)){return d==i?d:Xoc(d)}k=h.d._m(j.d);f=Xoc(d);_oc(f,h.c,k);return f} +function Mce(a,b){var c,d,e,f,g;for(d=b.bo().$d();d.Pd();){c=wL(d.Qd());e=b.fo(c);f=a.ho(c);if(!(!!f&&!f.b)){g=e;a.sn()||a.qn()||a.rn()||qie(a.F,(Lhe(),Zge))==a||hbe(a)||!!a.ho(c)||(g=H7d(a,(Lhe(),Khe))._m(e));Zae(a,c,g,null)}}} +function vuc(a,b,c){var d,e;d=Ttc(a.a,b,true);e=new _uc(a.a,d,c);Vcd(a.a.g,e);d.c=true;c.j==(h7d(),w5d)||(Mtc(),_Cc(c)&&c.e.j==m5d&&T1d(c.b.d)&&(c.b?c.b.f:null).j==m6d)?wuc(a,b):Ose(b,hte(46))!=-1&&wuc(a,bte(b,0,Rse(b,hte(46))))} +function nCc(a){HAc();var b,c,d;if(!a||a.j!=(h7d(),r5d)){return false}d=a.k;b=(c=eBc(a),!c?null:rL(F1d(c,29),11));return !!d&&d.Nl()||!!b&&(b.a&2)!=0||a.j==(h7d(),r5d)&&!!(!a.e?null:a.e.e)&&(!a.e?null:a.e.e).j==O4d&&Y1d(a.e,IMe)} +function aQc(a,b,c){var d,e,f,g;if(c.j==(h7d(),I4d)&&!_Ac(c,a.d.b)){return}if(c.j==f6d&&!QAc(c)){return}e=HPc(a.d,c);if(!e){b.a|=4;b.a|=2;return}for(g=new lxe(e);g.a>16);b=d>>16&16;c=16-b;a=a>>b;d=a-256;b=d>>16&8;c+=b;a<<=b;d=a-4096;b=d>>16&4;c+=b;a<<=b;d=a-nKe;b=d>>16&2;c+=b;a<<=b;d=a>>14;b=d&~(d>>1);return c+2-b}} +function sAb(a,b){var c;yAb(a);if(b.length==0){return}c=b.charCodeAt(0);(c==95||c==36||/[A-Z\d]/i.test(String.fromCharCode(c))||c==92)&&OAb(a.Xh())?a.Kh(' '):c==47&&a.Xh()==47?a.Kh(' '):(c==34||c==39)&&OAb(a.Xh())&&a.$h();a.Kh(b)} +function NQb(a){var b,c,d;do{c=a.d;b=a.b;if(c.length==0){d=b%a.a.length;c=String.fromCharCode(a.a[d].a);b=b/a.a.length|0}while(b>0){--b;d=b%a.c.length;c+=xL(a.c[d].a);b=b/a.c.length|0}++a.b}while(m7d(c)||a.f.contains(c));return c} +function fbd(){fbd=cjb;abd=new gbd('MAX',0,1);bbd=new gbd('MIN',1,100);cbd=new gbd('STRICT',2,100);$ad=new gbd(NVe,3,50);dbd=new gbd('SUPPRESS_BY_WHITELIST',4,40);ebd=new gbd('SUPPRESS_DOC',5,20);_ad=new gbd('FILTER_BY_PATH',6,1)} +function Vfd(){Vfd=cjb;Ufd=Vd(new _d(''),'(?:[^a-zA-Z0-9_$]|^)','(?:',GK(yK(agb,1),ZJe,1,5,['@modName[\\t\\v\\f ]*([^{\\t\\n\\v\\f\\r ][^\\t\\n\\v\\f\\r ]*)','|','(@[a-zA-Z]+)(?:\\s*\\{\\s*([^}\\t\\n\\v\\f\\r ]+)\\s*\\})?',')']))} +function Vyd(a){var b,c,d,e;c=null;while(Kyd(a.b)){b=d2d(a).b.Lm();!c&&(c=new vv);Vcd(c.a,tf(b))}if(c){e=Ys(new lxe(c.a));e.size()==1&&e.contains(COe)&&(e=(Jxd(),Ixd));d=f2d(a,a.g,48);d!=a.g&&(a.g=d);!!e&&(a.g=new A3d(48,e,a.g))}} +function IEd(a){wEd();switch(a){case TPe:return mEd;case 'es5':return nEd;case 'es6-impl':case SPe:return oEd;case 'es7':return qEd;case 'es8':return sEd;case 'ts':return vEd;default:throw Aib(new ooc('No such FeatureSet: '+a));}} +function Elc(a,b,c){var d,e;this.c=a;this.f=b;this.b=c;d=new zte;for(null.Qo().Qo();null.Qo();){e=null.Qo();vte((d.a+=''+e,d),_Je)}this.g=d.a;this.e=null.Qo();this.j=null.Qo();this.i=null.Qo();this.a=null.Qo();this.d=ur(null.Qo())} +function JDc(a,b){HAc();var c,d,e,f,g,h;d=!(a.j==(h7d(),x5d)||a.j==w5d);c=qYd(a,GK(yK(veb,1),MMe,5,0,[]));h=f2d(c,c.g,50);h!=c.g&&(c.g=h);(d?1:0)!=0&&(c.g=new p3d(50,d?1:0,c.g));for(f=0,g=b.length;f=0;e--){h=(vJe(e,c.a.length),rL(c.a[e],260));if(h.d){wGc(a,b,h,d,e);if(f&&!g&&!LCc(h.a)){g=true;u2d(d,N3d(new P3d(B1d(d,42))).a)}}}} +function YMc(a){var b;kf((a.a&hNe)==mNe);b=((hNe&a.a)==mNe?a.i:null).a;zf(b.j==(h7d(),L6d));switch(b.Lm()){case bKe:return new N2d(n5d);case dKe:return new T3d(L6d,'');case cKe:return new v3d(0);default:throw Aib(new DJ(b.Lm()));}} +function zad(a,b){var c,d,e;if(!a.d){return true}if(xEd(aKb(a.c.T.Vb),(wEd(),oEd))){for(e=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();e.Pd();){d=rL(e.Qd(),5);R_c();c=rL(F1d(d,89),148);if(!!c&&!xEd(nEd,c)){return true}}}return false} +function Dud(a){var b,c,d;if(!a.f){return null}if(a.g==0){Af(Jse(a.A,DKe),a.A);return Cud(a)}if(!a.a){b=(Qq(),new vv);if(a.d){for(d=a.d.$d();d.Pd();){c=rL(d.Qd(),99);uv(b,Kud(c.a))}}a.a=Ys(new lxe(uv(b,new dve(a.k)).a))}return a.a} +function sHd(a){var b,c,d,e;e=eKd(a.g,0).b.b;aHd(a,(HGd(),aGd).a);c=!!eHd(a,(XMd(),yMd));d=bHd(a);return b=fOd(kOd(eOd(hOd(gOd(iOd(new mOd((rOd(),oOd)),d),c),kHd(a)),fId(a,1)),jHd(a)),new SNd(new qRd(e,a.f))),bOd(b,new qRd(e,a.f))} +function efe(a,b){A7d();see.call(this,a,b,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[sie(a,(Lhe(),Bge)),sie(a,Bge),sie(a,Bge)])),null),null,null,true,true,false);this.c.b=(Ef(this.i==(Bfe(),yfe)||this.i==zfe,hOe,this),S7d(this.p))} +function Grb(a,b,c,d){var e,f,g;zf((HAc(),!!c&&(c.j==(h7d(),b7d)||c.j==T5d||c.j==S4d)));if(!!c.b&&!c.b.d&&d==a.d){e=c.b.b;if(!!e&&T1d(e)){f=QBc(e);if(f.j==(h7d(),_5d)){g=Hzc(b)._j(f.Lm());(!g||g.gk()&&!g.Bk())&&iue(a.i,G1d(e),e)}}}} +function aKb(a){switch(a.g){case 0:return wEd(),mEd;case 1:case 2:return wEd(),nEd;case 3:return wEd(),pEd;case 5:return wEd(),rEd;case 6:case 7:return wEd(),tEd;case 4:return wEd(),vEd;case 8:throw Aib(new Hre);}throw Aib(new Hre)} +function s0b(a,b){var c,d,e,f,g,h,i;i=b.b.d;h=e0b(a.a,i);e=i.d;if(e.j!=(h7d(),m6d)){return}for(d=(!e.b?(jye(),jye(),iye):new F3d(e.b)).$d();d.Pd();){c=rL(d.Qd(),5);if(c.Nm()){continue}g=c.Lm();f=d0b(a.a,g);D0b(f,c,w0b(a,f,h,null))}} +function Pec(){Pec=cjb;Nec=new Qec('SET_FROM_GLOBAL',0);Oec=new Qec('SET_FROM_LOCAL',1);Mec=new Qec('PROTOTYPE_GET',2);Iec=new Qec('ALIASING_GET',3);Lec=new Qec('DIRECT_GET',4);Jec=new Qec('CALL_GET',5);Kec=new Qec('DELETE_PROP',6)} +function ajc(a,b){if(!U9b(a.g,b.e,b.a.Cj(),Tjc(b).values(),Sjc(b),b.j,b.i)){if(Ujc(b)){b.j=false;Vjc(b);if(!(!!b.g&&mue(b.g.c)!=0)||!U9b(a.g,b.e,b.a.Cj(),Tjc(b).values(),Sjc(b),b.j,b.i)){return false}}else{return false}}return true} +function Gmc(a,b){var c,d,e,f;c=b.j==(h7d(),I4d)?(d=G1d(b.b),d!=null&&(f=OTe.length,Jse(d.substr(d.length-f,f),OTe)||(e=PTe.length,Jse(d.substr(d.length-e,e),PTe)))?d:null):null;if(c==null){return}if(ymc(a.a,c)){return}YAc(b,a.c.b)} +function oHd(a,b){var c,d,e;e=eKd(a.g,0).b.b;d=BHd(a,b);if(oJd(a,(XMd(),jLd))&&!nJd(a,1,xMd)){c=(lr(),new Fu);Vcd(c.a,tf(d));while(oJd(a,jLd)&&!nJd(a,1,xMd)){aHd(a,jLd);Du(c,BHd(a,b))}return new uNd(new qRd(e,a.f),ur(c.a))}return d} +function pId(a){var b,c,d;d=eKd(a.g,0).b.b;c=cHd(a);b=null;if(nJd(a,0,(XMd(),FLd))&&Jse(rL(eKd(a.g,0),129).a,'as')){gHd(a,'as');b=bHd(a)}else LGd(c.a)&&FJd(a,null,mYe,GK(yK(agb,1),ZJe,1,5,['as']));return new AOd(new qRd(d,a.f),c,b)} +function dk(a,b,c){var d;d=rL(a.c.get(b),32);if(!d){d=a.Pe(b);if(d.add(c)){++a.d;a.c.put(b,d);return true}else{throw Aib(new Aqe('New Collection violated the Collection spec'))}}else if(d.add(c)){++a.d;return true}else{return false}} +function vnb(a,b,c){if(b==(h7d(),S4d)||b==T5d||b==b7d||b==r6d){nob(YMe+b+UMe,c);return}switch(c.j.g){case 26:unb(a,c);break;case 27:_mb(a,c);break;default:throw Aib(new Ire('Expected GETPROP or GETELEM but instead got node '+c.j));}} +function UNc(a,b,c,d){var e,f,g,h;h=c.b.d.Lm();g=Mbd(LHb((!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d)),h,(e=rL(F1d(c,51),28),!e?null:e.ji()),W2d(c.i),V2d(c.i));if(!g){return}f=hcd(g.a);!yCc(c)&&d.j==(h7d(),m5d)&&mDc(d.e)&&u1d(d);OCe(a.d,f)} +function Hhd(b,c){var d,e,f,g,h,i;i=rL(F1d(c,51),28);if(zL(i,178)){h=rL(i,178);try{d=h.a}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}f=c.c;if(f==0){return}g=J1d(c)+f-1;e=d.charCodeAt(g)==59;e||Xzc(b,c,Fhd,GK(yK(fgb,1),pKe,2,6,[]))}} +function Rld(a,b,c){var d,e,f;if(a==b){return true}f=rL(b,20);return e=a.nl(),e.size()==1&&rL(Uw(e.$d()),25).c||(d=f.nl(),d.size()==1&&rL(Uw(d.$d()),25).c)?a.e.$?jnd(jld(a),jld(f)):Sld(jld(a),true,jld(f),c,null):Sld(a,true,f,c,null)} +function gbe(a,b,c,d){var e,f;kf(!a.Tn());kf(!b.Tn());pf(b.An(),'isStructuralSubtype should be called with structural supertype. Found %s',b);e=mge(c,a,b);if(e){return e.a}f=Ybe(a,b,c,d);nge(c,a,b,f?(sge(),pge):(sge(),qge));return f} +function jde(a,b,c,d){var e,f,g,h;for(h=b.w.b.keySet().$d();h.Pd();){g=wL(h.Qd());if(!(a.sn()||a.qn()||a.rn()||qie(a.F,(Lhe(),Zge))==a||hbe(a)||!!a.ho(g))){return false}e=a.fo(g);f=bbe(b,g);if(!e.Cn(f,c,d)){return false}}return true} +function osb(a,b){var c,d,e;d=J9d(zL(b.k,9)?rL(b.k,9):null);if(!d){return null}if(y1d(b)==3&&!b.b.d.d.b){return null}if(d.Nl()){return null}c=d.c.b;if(!c){return null}e=rL(WFb(a.a).vj((Lhe(),Khe)),9);if(!e.Bn(c)){return c}return null} +function cHb(a){var b,c,d,e,f,g,h;f=new idd;d=new JCe;for(h=new lxe(a);h.a=a.size()){return b}Gf(b.a<=rL(a.getAtIndex(c),95).a,'End position %s points to a column larger than line length %s',b,a.getAtIndex(c));if(b.a==rL(a.getAtIndex(c),95).a){return new YH(c+1,0)}return b} +function Ptc(a,b,c,d){var e,f,g,h,i,j;i=d.Lm();j=c._j(i);f=!j&&PCe(a.e,i);g=!!j&&j.gk()||f||Jse(i,bOe);if(!g){return null}h=new cvc(b);e=b.indexOf(LMe);if(e!=-1){h.b=true;h.e=b.substr(0,e);h.f=b.substr(e+11)}h.a=f||Vtc(a,c,b);return h} +function nIc(a){var b,c;if(a.j==(h7d(),F4d)){if(!!a.b&&!a.b.d){c=a.b;if(c.j==m5d){if(c.b.j==I4d){b=c.b.b;if(b.j==w5d){return false}else if(b.j==x5d&&$se((b.b?b.b.f:null).Lm(),'on')){return false}}return true}return false}}return false} +function z$c(){z$c=cjb;y$c=new Q_b('JSC_STRIP_TYPE_INHERIT_ERROR',(prb(),mrb),new _te('Non-strip type {0} cannot inherit from strip type {1}'));x$c=new Q_b('JSC_STRIP_ASSIGNMENT_ERROR',mrb,new _te('Unable to strip assignment to {0}'))} +function uld(a){var b,c,d;zf((d=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null,!!(!d?null:d.b)));b=_jd((c=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null,!c?null:c.b));return !b?null:b.kl()==2&&b.nl().size()==1?b:null} +function Zrd(a,b){var c,d,e,f,g;Ef(a.a.g!=0,'Expected interface, found: %s',a);g=null;f=Gud(a.a,b,0);!!(!f?null:Utd(f,a.b))&&(g=a);for(d=Srd(a).$d();d.Pd();){c=rL(d.Qd(),99);e=Gud(c.a,b,0);!!(!e?null:Utd(e,c.b))&&(g=Zrd(c,b))}return g} +function hsd(a,b){var c,d,e;if(a.a.q.isEmpty()){return a.a.s}if(a.b.d.d.isEmpty()){return asd(a,b)}if(b.isEmpty()){return a}c=new Nu;for(e=a.b.Gf().$d();e.Pd();){d=wL(e.Qd());Ku(c,d,emd(rL(Fs(a.b,d),20),b))}return new jsd(ps(c.b),a.a)} +function VCd(a){var b,c,d;c=a.c;b=a.e==0;switch(c.g){case 5:d=5;break;case 0:d=0;break;case 1:d=1;break;case 2:d=2;break;case 3:d=3;break;case 4:d=4;break;default:throw Aib(new Ire('unexpected language mode: '+c));}return new OJd(d,b)} +function $sc(a,b,c){tf(b);zf(b.indexOf('.')==-1);if(MDe(a.p,b)||a.g.contains(b)||a.n.containsKey(b)||MDe(a.k,b)||Jse(pNe,b)||a.f.containsKey(b)||MDe(a.o,b)){return true}if(c){return a.w.contains(b)||!!a.c&&Yid(a.c,b)!=null}return false} +function jDe(a,b){var c,d,e,f,g;f=b==null?0:a.b.Do(b);d=(c=a.a.get(f),c==null?[]:c);for(g=0;g=0){e=a.c.a;if(e){f=s1d(e,false);for(d=1;d0&(a&a-1)==0);case 1:case 3:return 31-Ure(a);case 0:case 2:return 32-Ure(a-1);case 5:case 4:case 6:d=Ure(a);c=-1257966797>>>d;e=31-d;return e+(~~(c-a)>>>31);default:throw Aib(new zqe);}} +function bL(a,b){var c,d,e,f,g;b&=63;c=a.h;d=(c&hMe)!=0;d&&(c|=-1048576);if(b<22){g=c>>b;f=a.m>>b|c<<22-b;e=a.l>>b|a.m<<22-b}else if(b<44){g=d?gMe:0;f=c>>b-22;e=a.m>>b-22|c<<44-b}else{g=d?gMe:0;f=d?fMe:0;e=c>>b-44}return LK(e&fMe,f&fMe,g&gMe)} +function Xmb(a,b){switch(b.j.g){case 76:case 100:case 88:Knb(a,b.j,b);break;case 65:tnb(a,b,true);break;case 96:fnb(a,b,true),Inb(b.b);break;case 151:mnb(a,b);break;case 159:Lnb(a,b,true);break;case 154:iob(a,b);break;case 108:onb(a,b,true);}} +function gpb(a,b,c){if(b.j==(h7d(),D6d)){return}if(B1d(b,56)>B1d(c,56)){if(kpb(b,c)){throw Aib(new Ire(a+'unchanged scope marked as changed: '+bpb(b)))}}else{if(!kpb(b,c)){throw Aib(new Ire(a+'changed scope not marked as changed: '+bpb(b)))}}} +function pAb(a,b,c){var d;if(b.j==(h7d(),_5d)){if(Jse(a.ji(),b.Lm())&&!!c){if(c.j==r6d){return true}else{HAc();if(!!c&&(c.j==b7d||c.j==T5d||c.j==S4d)){return !!b.b}}}}else if($Bc(b)){d=b.b;return !!d&&d.j==_5d&&Jse(a.ji(),d.Lm())}return false} +function cKb(b){$Jb();var c;if(b==null){return null}c=Yse(Xb(fte(b)),'^ES','ECMASCRIPT');if(Jse(c,MQe)||Jse(c,'ECMASCRIPT6_STRICT')){return VJb}try{return rL(hc((fKb(),eKb),c),196)}catch(a){a=zib(a);if(zL(a,54)){return null}else throw Aib(a)}} +function wRb(a,b){eRb();var c,d;d=a.T.Dd;c=new idd;Vcd(c,new zrc(a));Vcd(c,new lIc(false,d));Vcd(c,new bKc(false));Vcd(c,new CJc(false,d));Vcd(c,new eJc);OJb(a.T.Tb)&&Vcd(c,new Umc);Vcd(c,new PHc(false,d));Vcd(c,new aHc);return new CIc(a,b,c)} +function O5b(a,b,c){var d,e,f,g;f=G1d(c.b?c.b.f:null);if(f!=null&&MDe(a.b.a,f)){d=G1d(c.b);d!=null&&(kf(MDe(a.b.a,f)),ODe(a.b.a,d,rL(NDe(a.b.a,f),259)))}else if(c.b.j==(h7d(),x5d)){g=c.b;e=g.b;K5b(a.b,b,e)&&OCe(rL(NDe(a.b.a,G1d(e)),259).c,c)}} +function oyc(a,b,c){var d,e,f,g,h,i,j,k;k=Avd(b.n);if(k.isEmpty()){return ekd(b,c)}f=myc(c);g=new RDe;Ok(g,c);for(e=cs(k).$d();e.Pd();){d=rL(e.Qd(),12);j=wL(d.se());i=rL(d.te(),5);h=rL(J4c(a.O,i,f,(_C(),$C)),20);ODe(g,j,h)}return ekd(b,js(g))} +function uLc(a,b,c){var d,e,f,g,h,i;f=G1d(b.j)+LMe;g=(lr(),new Fu);for(e=b.i.$d();e.Pd();){d=rL(e.Qd(),150);if(d.c.j==(h7d(),m6d)){h=qBc(d.c,'readOnly');if(!!h&&h.j==W6d){i=sLc(a,d.b.Lm(),f);K2d(i,d.b);l1d(c,i);Vcd(g.a,tf(d))}}}return ur(g.a)} +function W1c(a,b,c){var d,e;zf(b.j!=(h7d(),r5d)||!!c.On()||c.lm());d=rL(F1d(b,29),11);if(!!d&&(d.a&8192)!=0&&!a.b){e=b.j==x5d?(b.b?b.b.f:null).Lm():'(missing)';DGb(a.a,Szc(b,h1c,GK(yK(fgb,1),pKe,2,6,[e])))}!(zL(b.k,9)?rL(b.k,9):null)&&(b.k=c)} +function Q2c(a,b,c,d,e){var f,g,h;while(b.Pd()&&c.Pd()){f=rL(b.Qd(),5);R2c(a,(h=zL(f.k,9)?rL(f.k,9):null,!h?a.i:h),H2c(a,rL(c.Qd(),5)),d,e);if(B1d(f,30)!=0){while(c.Pd()){R2c(a,(g=zL(f.k,9)?rL(f.k,9):null,!g?a.i:g),H2c(a,rL(c.Qd(),5)),d,e)}}}} +function E5c(a,b,c,d,e,f){if(c.Bn(d)){if(!c.Cn(d,new oge(false),(xge(),wge))){m4c(a.c,b,c,d);n4c(a.d,b,c,d)}}else{V5c(a,b,WRd('actual parameter %d of %s does not match formal parameter',GK(yK(agb,1),ZJe,1,5,[Zre(f),uie(a.g,e.b,false)])),c,d)}} +function N7c(a,b,c,d){var e,f,g,h,i,j,k,l;for(g=b.b;g;g=g.d){k=g.b;i=IBc(g);f=rL(F1d(g,29),11);l=F7c(a,f,g,k);h=c.Nn()?c.Nn().b:q2c(g,l);j=gBc(g);if(j!=null){e=!h;B7c(a,g,b,j,h,e)}else !!h&&Vcd(a.c,new Y7c(a.k,g,h));!!h&&!!c&&d&&Yae(c,i,h,g)}} +function _sd(a,b,c,d,e,f){var g,h,i,j,k;for(i=c.$d();i.Pd();){h=wL(i.Qd());j=new kud(h);k=Ksd(a,j);g=Ksd(b,j);if(k.a==(fud(),dud)){if(!!g&&!lmd(k.d,g.d,d,e,f)){return false}}else if(!g||g.a==dud||!lmd(k.d,g.d,d,e,f)){return false}}return true} +function xBd(a){var b,c,d,e,f,g;PBd(a);f=!a.n?DCd(a.i):_Ad(a);c=a.i.g;e=CCd(a.i);g=zBd(a,f);MBd(a,c,e,g,f==(wCd(),lCd));b=!g?null:new f1d(g,(d=rL(F1d(a.k,51),28),!d?null:d.ji()));if(b){S0d(a.e,b);a.e.a.e=true;return F_d(a.e,false)}return null} +function X1d(a,b){if(!b||b.j!=a.j){return false}switch(a.j.g){case 29:return a.Lm().length!=0&&Jse(a.Lm(),b.Lm());case 33:case 99:return true;case 26:return Jse((a.b?a.b.f:null).Lm(),(b.b?b.b.f:null).Lm())&&X1d(a.b,b.b);default:return false;}} +function oLb(a,b){var c,d,e;mLb(a,b,(IMb(),FMb),b.b.d);d=ALb(b.d,GK(yK(xeb,1),PKe,29,0,[(h7d(),K4d)]));if(d){zf(d.j==K4d);mLb(a,b,EMb,d)}else{e=b.e;c=ALb(e.b.d,GK(yK(xeb,1),PKe,29,0,[X4d]));c?mLb(a,b,EMb,c):mLb(a,b,EMb,xLb(b,b,a))}lLb(a,b,b.b)} +function mec(a){var b;if(a.c){b=a.c.e;if(!b){return null}switch(b.j.g){case 65:case 47:case 96:return rL(F1d(b,29),11);case 76:case 100:case 88:return a.c==b.b?rL(F1d(b,29),11):rL(F1d(a.c,29),11);case 43:return rL(F1d(a.c,29),11);}}return null} +function JGc(a,b){var c,d;switch(a.j.g){case 65:case 33:return false;case 29:if(Jse(a.Lm(),xRe)){return false}else{d=b._j(a.Lm());if(!!d&&(d.hk()||d.j.e.j==(h7d(),M4d))){return false}}}for(c=a.b;c;c=c.d){if(!JGc(c,b)){return false}}return true} +function YQc(a,b){var c,d,e;if(b0){c=rL(Ycd(a.a,b-1),86);if(c.c.e.j==(h7d(),b7d)||c.c.e.j==T5d){zf(!(wQc(c.c)&&c.c.e.j!=b7d&&c.c.e.j!=T5d||!!c.c.b));d=rL(Ycd(a.a,b),86);e=d.c.e;if(e.j==m4d&&e.b==d.c){return true}}}return false} +function Q1c(a,b,c,d,e,f,g){var h,i,j,k,l;if(d.j==(h7d(),x5d)){k=d.b;l=UBc(d.b?d.b.f:null);if(Jse(KMe,l)){j=(i=zL(k.k,9)?rL(k.k,9):null,!i?$1c(a,(Lhe(),Hhe)):i);if(j.On()){h=j.On();if(h.Nl()||h.i==(Bfe(),zfe)){J1c(a,c,h,e,f,g);H1c(b,c,h,f)}}}}} +function D7c(a,b,c,d){var e,f,g,h;h=null;g=b.fo(c);if(!!g&&!!g.On()){h=g.On()}else{for(f=b._n().$d();f.Pd();){e=rL(f.Qd(),24);g=e.fo(c);if(!!g&&!!g.On()){h=g.On();break}}}!!h&&!!d&&!d.d.isEmpty()&&(h=rL(h.Vn(new yne(a.k.i,d)),9).On());return h} +function Xfd(a){Vfd();var b,c,d,e,f,g;f=new $wnd.RegExp(Ufd,'g');e=new idd;while((b=f.exec(a))!=null){c=$wnd.util.arrayGet(b,2)==null;d=c?'@modName':wL($wnd.util.arrayGet(b,2));g=hh(wL($wnd.util.arrayGet(b,c?1:3)));Vcd(e,new Wfd(d,g))}return e} +function okd(a){var b,c,d,e;if(a==a.a.v||a==a.a.g||a==a.a.s||a.c){return a.a.s}b=pkd(a);for(e=a.i.$d();e.Pd();){c=rL(e.Qd(),20);Wkd(b,c)}for(d=a.e.$d();d.Pd();){c=rL(d.Qd(),20);Skd(b,c)}Ykd(b,a.j);Zkd(b,a.k);_kd(b,a.n);Pkd(b,a.b);return bld(b)} +function fyd(a,b){var c,d,e;e=F_d(a.f,false);!!e&&(d=f2d(b,b.g,29),d!=b.g&&(b.g=d),!!e&&(b.g=new A3d(29,e,b.g)),b);if(a.g){if(!!rL(F1d(b,29),11)&&RZd(rL(F1d(b,29),11))!=null){c=b1d(a.g);r0d(c,RZd(rL(F1d(b,29),11)));a.g=F_d(c,false)}n2d(b,a.g)}} +function zHd(a){var b,c,d;c=eKd(a.g,0).b.b;d=JId(a);while(b=eKd(a.g,0).b.b.b>a.f.b,!(b||nJd(a,0,(XMd(),uMd))||nJd(a,0,(XMd(),fLd))||nJd(a,0,(XMd(),sLd)))&&nJd(a,0,(XMd(),cMd))){aHd(a,(XMd(),cMd));aHd(a,hLd);d=new jNd(new qRd(c,a.f),d)}return d} +function kId(a,b){var c,d,e,f;gHd(a,GOe);if(yJd(a,0)){e=dHd(a);aHd(a,(XMd(),bMd));aHd(a,gLd);f=jHd(a);c=gId(a);return new wOd(hHd(a,b.d),e,b.c,f,c)}else{d=SHd(a);aHd(a,(XMd(),bMd));aHd(a,gLd);jHd(a);c=gId(a);return new INd(hHd(a,b.d),d,b.c,c)}} +function K_d(a,b,c,d,e){var f,g,h;if(a.b){h=new r_d;lf(b.charCodeAt(0)!=32&&Ese(b,b.length-1)!=32,LYe);h.d=b;sYc(h,d,e,d,e+b.length);g=new n_d;f=new U3d((h7d(),_5d),b,d,e);p2d(f,b.length);!!c&&z2d(f,c);g.d=f;sYc(g,d,e,d,e+b.length);j_d(a.b,g)}} +function PBc(a){HAc();var b;b=a.e;switch(b.j.g){case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 59:case 57:case 58:return a.d;case 76:case 100:case 88:case 43:return a.b;case 65:case 96:return b;}return null} +function EHc(a,b){var c,d,e,f,g;kf(b.j==(h7d(),f6d));d=b.b;if(d.j!=_5d){return b}if(Jse(d.Lm(),IKe)){g=d.d;if(!g){f=''}else{if(!LCc(g)){return b}f=UBc(g)}if(f==null){return b}e=b.e;c=new T3d(L6d,f);g2d(e,b,c);J2d(c,e);GGb(a.c);return c}return b} +function SNc(a){var b,c,d,e,f;for(f=new lxe(a.i);f.a0||(a.a.a&hNe)==mKe||!!HZd(a.a)||MZd(a.a)>0||QZd(a.a)!=null||!!a.a.g||(a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe){return false}else{H$d(a.a,b);a.e=true;return true}} +function V0d(a,b){if(!!b&&!((a.a.a&2)!=0||i$d(a.a)||(a.a.a&jNe)!=0||TZd(a.a)>0||(a.a.a&hNe)==mKe||d$d(a.a)||MZd(a.a)>0||QZd(a.a)!=null||!!a.a.g||(a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)&&yZd(a.a,b)){a.e=true;return true}return false} +function Crb(a){if(a.j==(h7d(),r5d)||a.j==N4d){return true}if(a.j==m4d&&((a.b?a.b.f:null).j==r5d||(a.b?a.b.f:null).j==N4d)){return true}HAc();if(!!a&&(a.j==b7d||a.j==T5d||a.j==S4d)&&!!a.b.b&&(a.b.b.j==r5d||a.b.b.j==N4d)){return true}return false} +function UMb(a){QMb();var b,c,d,e,f;if(VMb(a)){f=a.e;if(f.j==(h7d(),W5d)){b=(!a.e?null:a.e.e).e;zf(b.j==N4d);return HAc(),e=CBc(b),!e?null:G1d(e)}zf(f.j==M6d);c=!f.e?null:f.e.e;zf(c.j==I4d);return G1d(fBc(c))}return HAc(),d=CBc(a),!d?null:G1d(d)} +function Vwc(a,b,c){var d,e,f,g,h,i;wyc(a,b);d=b.b;i=b.b?b.b.f:null;g=vxc(a,d,c,a.i,false);e=g.d;f=false;if(!wqd(a.w,e)){Qyc(a,d,b.j,a.i,e);f=true}h=bxc(a,i,g.b,a.i);wqd(a.w,h.b)||Qyc(a,i,b.j,a.i,h.b);f||(h.a=Pyc(h.a,d,g.c,a.i));h.b=a.i;return h} +function sNc(a,b,c){WMc();this.i=new RDe;this.d=new RCe;this.n=new idd;this.c=new RCe;this.b=new idd;this.k=new idd;this.e=new RCe;this.a=a;this.f=!!a.O&&a.Q.a.length>1?a.O:null;this.j=b;this.g=c;ODe(this.i,ANe,new DNc(this,ANe,null,null,false))} +function rtd(a){var b,c,d,e;if((new yue(a.g.a)).a.size()!=1){return null}b=Fue(new Gue((new yue(a.g.a)).a));c=new kud(wL(b.se()));d=xld(rL(b.te(),52).d);if(!d){return c}e=rtd(d);if(!e){return c}return new jud(ur(Eu(Eu((lr(),new Fu),c.a),e.a).a))} +function cbe(a,b){var c,d,e;c=null;(a.sn()||a.qn()||a.rn()||qie(a.F,(Lhe(),Zge))==a||a.lm()||!!a.ho(b))&&(c=a);for(e=a.$n().$d();e.Pd();){d=rL(e.Qd(),24);(d.sn()||d.qn()||d.rn()||qie(d.F,(Lhe(),Zge))==d||d.lm()||!!d.ho(b))&&(c=cbe(d,b))}return c} +function kZb(a,b){var c,d,e;Af(a.j,tRe);kf(b.j==(h7d(),x5d)||b.j==_5d);if(PCe(a.e,b)){return null}if(b.j==x5d){e=(b.b?b.b.f:null).Lm();(Jse(e,uRe)||Jse(e,vRe))&&(b=b.b)}d=nZb(b);if(d!=null){c=rL(bk(a.i,d),44);return c.isEmpty()?null:c}return null} +function v5b(a,b,c){var d,e,f;Ef(c.j==(h7d(),_5d)||c.j==M6d||c.j==G5d,'Invalid node for declareVar: %s',c);e=c.Lm();f=b.Yj(e);if(!!f&&f.tk()==c){return}d=JFb(a.a,a.b);!!f||!z5b(e,b)||(b.$j().j==r5d||b.fk())&&Jse(e,xRe)?a.c.Gi(b,e,c,d):b.Tj(e,c,d)} +function _dc(a){if(a.t==(xec(),vec)||a.t==tec||a.t==wec||a.i!=1||a.n!=0||a.f!=0){return false}tf(a.d);if(a.d.f){return false}if(dec(a)){return false}if(a.e){return true}if(!!a.p&&kec(a.p)){return false}if(a.a>0){return false}return !a.p||_dc(a.p)} +function r2c(a){var b;kf(a.Nl()||a.i==(Bfe(),zfe));kf(!hbe(a));while(true){b=aee(a).ao();if(!b){return false}if(b.lm()||b.sn()||b.qn()||b.rn()||rL(sie(b.F,(Lhe(),Zge)),68)==b){return true}a=b.Zn();if(!a){return false}zf(a.Nl()||a.i==(Bfe(),zfe))}} +function lgc(a){Yfc();var b,c,d;b=rL(F1d(a,51),28);if(!(!!b&&b.lk())){return false}c=(HAc(),d=eBc(a),!d?null:rL(F1d(d,29),11));if(!c||(c.a&2)==0){return false}if(a.j==(h7d(),_5d)){return a.e.j==b7d&&!a.b}if(a.j==x5d){return a.e.j==m5d}return false} +function Ahc(a,b,c){var d,e,f;kf(b.j==(h7d(),x5d));e=b.e;d=e.j==m4d?e.b?e.b.f:null:null;if(!c){!!d&&d.j==r5d&&shc(a,d,null);return}!!d&&d.j==r5d&&(f=f2d(e,e.g,76),f!=e.g&&(e.g=f),e.g=new p3d(76,1,e.g));bhc(a,c,d);Ygc(a,c,(b.b?b.b.f:null).Lm(),b,d)} +function mmc(a,b){var c,d,e,f,g,h,i,j,k;g=new idd;for(e=(h=(new dve(a.c.a)).a.ke().$d(),new jve(h));e.a.Pd();){d=(f=rL(e.a.Qd(),12),wL(f.se()));k=rL(ek(b,d),44);for(j=k.$d();j.Pd();){i=rL(j.Qd(),5);c=mBc(i.e);YAc(i,a.b);g.a[g.a.length]=c}}return g} +function EJc(a){var b,c;if(!a){return a}c=0;b=a.length-1;while(c=0){while(b>=0&&a.charCodeAt(b)==48){--b}a.charCodeAt(b)==46&&--b}if(c>=b){return a}return a.substr(c,b+1-c)} +function RZc(a,b){switch(b.j.g){case 66:case 39:case 67:case 84:return true;case 0:return !!b.b;case 72:return b.b.j!=(h7d(),b7d);case 73:return !Hjb(a,b.b);case 83:return RZc(a,b.b?b.b.f:null);case 82:return B1d(b,38)==0&&RZc(a,b.b);}return false} +function n7c(a,b){this.d=new idd;this.c=new JCe;this.e=new RDe;this.b=a;this.f=a.T.Bd;this.k=(!a.gb&&(a.gb=new Y5c(a)),a.gb);this.a=b;this.i=(!a.fb&&(a.fb=new Oie(a.S,a.B)),a.fb);this.g=this.f?new MCd:this.i.q;this.j=rL(sie(this.i,(Lhe(),Hhe)),24)} +function Etd(a){var b,c,d,e,f;d=a;for(c=new Gue((new yue(a.a)).a);c.b;){b=Fue(c);f=rL(b.te(),52).d;e=f.kl()==2&&f.nl().size()==1?rL(Uw(f.nl().$d()),25):null;!!e&&!csd(e.d)&&!e.c&&(d=trd(d,wL(b.se()),new Wtd(null,omd(f),null,(fud(),eud))))}return d} +function yC(a,b){var c,d,e;if(b===a){return true}if(zL(b,203)){e=rL(b,203);if(a.size()!=e.size()||a.ke().size()!=e.ke().size()){return false}for(d=e.ke().$d();d.Pd();){c=rL(d.Qd(),177);if(a.Ze(c.ff())!=c.ef()){return false}}return true}return false} +function Mjb(a,b,c,d){var e,f,g,h,i,j,k;k=(a.b?a.b.f:null).Lm();e=Kjb(a,b,k);f=rL(!e?null:hB(c.d,e),197);j=a.e;g=!!rL(F1d(j,29),11)&&j.j==(h7d(),m4d)&&j.b==a;h=Pjb(b,g,k);if(g){i=h?h.pl(k).j:(z_d(),u_d);return Ojb(i,f,k,d)}else{return Njb(a,h,f,d)}} +function kSc(a){var b,c,d;for(d=new lxe(a.c);d.a3)&&nob($Me+d,b);anb(a,b.b);e=false;c=b.b.d;Pnb(F4d,c);Fnb(c);if(c.b){cnb(a,c.b);e=true}if(y1d(b)==3){anb(a,b.b?b.b.f:null);e=true}e||nob('Missing catch or finally for try statement.',b)} +function IHb(a){var b,c;vf(a.b,'Expected setCompiler to be called first: %s',a);vf(FFb(a.b),'Expected compiler to call an error manager: %s',a);b=new cIb(LHb(a));c=JHb(a,a.b);if(!c){return ycd(),xcd}bIb(b,JHb(a,a.b));return new zcd('','',b.c,b.d,b.a)} +function v0b(a,b,c){var d,e,f,g,h,i;if(!c.am()||c.jm()){return}if(c.km()){for(e=c.El().$d();e.Pd();){d=rL(e.Qd(),60);v0b(a,b,d)}return}h=Eq(Fq(Jq(rL(bk(a.a.f,c),44)),(i=(nh(),mh),i)));for(g=h.$d();g.Pd();){f=rL(g.Qd(),85);b.add(c+' at '+f.f+':'+f.d)}} +function Auc(a,b,c,d){var e,f;f=c.e;switch(f.j.g){case 47:c==(f.b?f.b.f:null)&&zuc(a,b,f,d);Auc(a,b,f,d);break;case 29:e=Otc(a.a,b,f);vf(e,cUe,f);tf(e);Hy(a.a.k,d,e,null);break;case 61:Auc(a,b,f,d);break;case 62:case 46:case 60:c!=f.b&&Auc(a,b,f,d);}} +function Twc(a,b,c,d){var e,f,g,h,i,j;if(B1d(b,76)!=0){return new ezc(c,d)}e=b.b;h=b.b?b.b.f:null;if(B1d(e,76)!=0){return _wc(a,h,c,tyc(a,e,c,false))}f=uxc(a,e,c,d,true,false);j=f.a;i=_yc(f.c,d);g=_wc(a,h,j,i);g.a=uxc(a,e,g.a,d,true,false).a;return g} +function mIc(a){while(true){switch(a.j.g){case 66:if(y1d(a)<3){return true}a=a.b?a.b.f:null;continue;case 82:if(!(!!a.b&&!a.b.d)){return false}a=a.b?a.b.f:null;continue;case 77:case 70:case 72:case 73:a=a.b?a.b.f:null;continue;default:return false;}}} +function hSc(a,b){var c,d,e,f;e=a.a.e;if(a.c){f=u1d(D1d(a.a));for(c=a.a.b;c.j!=(h7d(),_5d);c=c.b){if(c.j==w5d){f=tYd(u1d(c.b?c.b.f:null),f);J2d(f,c)}}g2d(e,a.a,f)}else{d=e.e;if(e.j==(h7d(),m5d)){a2d(d,e);EDc(e,b)}else{g2d(e,a.a,H2d(new v3d(0),a.a))}}} +function KF(a){var b,c;c=a.c;a.c=0;iF(a.f,a.i);if(!a.e){return a.g}else if(!a.g){return a.e}else if(a.e.d>=a.g.d){b=a.f;b.e=NF(a.e,b);b.g=a.g;b.a=a.a-1;b.j=Qib(a.j,c);return LF(b)}else{b=a.i;b.g=OF(a.g,b);b.e=a.e;b.a=a.a-1;b.j=Qib(a.j,c);return LF(b)}} +function Zwb(a){var b,c,d;c=null;if(a.j==(h7d(),x5d)){c=(a.b?a.b.f:null).Lm()}else if(a.j==_5d){d=a.Lm();b=Rse(d,hte(36));b!=-1&&(c=d.substr(b+1))}if(c!=null){if(Jse(c,'inherits')){return ECb(),CCb}else if(Jse(c,'mixin')){return ECb(),DCb}}return null} +function Wxb(a){var b,c,d,e,f;f=new idd;for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);e=c;if(c.j==(h7d(),W5d)){e=c.b.b.Jm(false);e.Qm(c.Lm())}Vcd(f,new ayb((HAc(),b=eBc(c),!b?null:rL(F1d(b,29),11)),e,d2d(c)))}v1d(a);return f} +function Ihc(a,b,c){var d,e,f,g,h,i,j;tf(c);f=-1;d=b.a.length;e=0;Af(bue(a.a,c),c.a);j=rL(eue(a.a,c),95).a;for(i=new lxe(b);i.aj){d=e;break}++e}return new Phc(b,f,d)} +function bCc(a){HAc();switch(a.g){case 61:case 62:case 1:case 2:case 3:case 4:case 5:case 36:case 37:case 6:case 8:case 7:case 9:case 41:case 40:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:return true;default:return false;}} +function NZc(b,c){var d,e,f,g,h;if(!b.a){b.a=true;h=b.c.b;try{f=b.c.a;d=new fI;g=sJ(f);bI(d,g);b.b=d}catch(a){a=zib(a);if(!zL(a,147))if(zL(a,227)){e=new Mnc(null,null,-1,-1,LZc,null,GK(yK(fgb,1),pKe,2,6,[h]));i_c(c,e.b,e)}else throw Aib(a)}}return b.b} +function cmd(a,b){var c,d,e,f;f=dmd(a,b);if(0==f.kl()&&(d=a.nl(),d.size()==1&&rL(Uw(d.$d()),25).c||(e=b.nl(),e.size()==1&&rL(Uw(e.$d()),25).c))){f=dmd(jld(a),jld(b));if(0!=f.kl()){return a}}return c=f.nl(),c.size()==1&&rL(Uw(c.$d()),25).c?Htd(f,a.e):f} +function KCd(a){switch(a){case 64:case 42:case 44:case 60:case 62:case 58:case 40:case 41:case 123:case 125:case 91:case 93:case 63:case 33:case 124:case 61:case -1:case 10:return false;default:return p7d(),!(a<=127?a==32||a==9||a==12||a==11:a==160);}} +function CSd(a,b){var c,d,e,f,g;f=a.a.length;if(b==0||f==0){return a}if(b<0){e=a.a[0]+b;if(Dib(e,lKe)<0){throw Aib(new rqe)}}else{d=a.a[f-1]+b;if(Dib(d,eKe)>0){throw Aib(new rqe)}}g=CK(NL,ULe,17,f,15,1);for(c=f;--c>=0;){g[c]=a.a[c]+b}return new FSd(g)} +function jge(a,b,c){!a.a&&(a.a=new aDe);if(bue(a.a,b)&&bue(rL(eue(a.a,b),157),c)){return rL(eue(rL(eue(a.a,b),157),c),281)}else if(bue(a.a,c)&&bue(rL(eue(a.a,c),157),b)){return rL(eue(rL(eue(a.a,c),157),b),281)}else{kge(a,b,c,(sge(),rge));return null}} +function pre(a){if(a.yo()){var b=a.c;b.zo()?(a.o='['+b.n):!b.yo()?(a.o='[L'+b.ji()+';'):(a.o='['+b.ji());a.b=b.wo()+'[]';a.k=b.xo()+'[]';return}var c=a.j;var d=a.d;d=d.split('/');a.o=sre('.',[c,sre('$',d)]);a.b=sre('.',[c,sre('.',d)]);a.k=d[d.length-1]} +function lnb(a,b,c){var d,e;e=y1d(c);(e<1||e>2)&&nob(TMe+e,c);d=c.b;switch(d.j.g){case 93:Zmb(a,b,d);break;case 94:Vnb(a,b,d);break;default:nob('Invalid destructuring lhs first child for '+b+UMe,c);}!!c.b&&!!c.b.d&&c.b.d==(c.b?c.b.f:null)&&rnb(a,c.b.d)} +function nvb(a,b,c,d){zf(c.j==(h7d(),I4d));if((c.b?c.b.f:null).j!=L6d){Xzc(b,c,(WMc(),GMc),GK(yK(fgb,1),pKe,2,6,[CNe]));return}switch(d.j.g){case 84:iue(a.b.b,qvb(c),d);return;case 29:case 95:ovb(a,b,c,d.e);return;}Xzc(b,c,jvb,GK(yK(fgb,1),pKe,2,6,[]))} +function Qyb(a,b,c){var d,e,f,g,h;if(!a.b.i){return}h=c.e;Af(h.j==(h7d(),m4d)||h.j==m5d,h);f=c.b;Af(Jse(f.Lm(),qNe),f);if(TCc(Jzc(b))){d=(c.b?c.b.f:null).Lm();OCe(a.b.k,d);e=c.d;g=zzb(b,d,e);if(!a.b.c&&!a.b.e&&xzb(g,new dve(a.b.f))){Pyb(a,g);u1d(h.e)}}} +function pZb(a,b){var c,d,e,f,g;if(rZb(a,b)){return false}g=(Af(a.j,tRe),rL(bk(a.a,b.d),44));if(g.isEmpty()){return false}for(f=g.$d();f.Pd();){e=rL(f.Qd(),168);c=e.b;d=kZb(a,c);if(d.size()>1){return false}zf(!d.isEmpty());zf(d.contains(b))}return true} +function $9b(a,b,c){var d,e,f,g,h,i,j,k,l;j=y1d((HAc(),kf(a.j==(h7d(),r5d)),a.b.d));g=j>1?j-1:0;h=15+g+j*2;f=a.b?a.b.f:null;if(!f.b){return -h}if(c==0){return -(h+7)}else{d=b.size();l=EBc(f,C6d,new YEc);k=l>0?l-1:0;e=l>0?4:0;i=e+l*2+k*3+d*3;return i-h}} +function ttc(a){var b,c,d,e,f,g,h;if(!a.t){return}f=a.t;e=a.s;while(f.v.j==(h7d(),r5d)){b=false;for(h=(d=(new dve(e.a)).a.ke().$d(),new jve(d));h.a.Pd();){g=(c=rL(h.a.Qd(),12),wL(c.se()));if(!$sc(f,g,false)){b=true;OCe(f.s,g)}}if(!b){break}e=f.s;f=f.t}} +function vFc(a,b){var c,d,e;switch(b.j.g){case 91:if(!b.b){c=IBc(b);d=H2d(new T3d((h7d(),_5d),c),b);l1d(b,d);uFc(a,KUe,b)}break;case 118:if(b.e.j==(h7d(),n6d)){e=H2d(cZd(b.b.Lm()),b);g2d(b.e,b,e);l1d(e,b);uFc(a,KUe,b)}break;default:throw Aib(new Hre);}} +function j2c(a,b,c,d){var e,f,g,h;e=d.j;if(e==(h7d(),r5d)||e==M4d||e==r6d||e==b7d){return false}if(d.j==p5d&&d.b==c){return false}f=zL(c.k,9)?rL(c.k,9):null;if(!f){f=$1c(a,(Lhe(),Hhe));g=t6c(Kzc(b),c.Lm());if(g){h=g.d;!!h&&(f=h)}}W1c(a,c,f);return true} +function mbd(a,b){var c,d,e;e=(ecd(),c=Wse(Wse(Wse(Wse(Wse(Vse(Vse(b,58,45),92,47),' ',rSe),'[',sSe),']',tSe),'<',uSe),'>',vSe),fcd(c));Bbd();if(Jse(b.substr(0,2),WPe)||Jse(b.substr(0,3),bWe)){d=a.lastIndexOf('/');e=fcd(a.substr(0,d+1)+(''+e))}return e} +function o_d(a,b){if(!a&&!b){return true}if(!a&&!!b||!!a&&!b){return false}if(a.d==null&&b.d!=null||a.d!=null&&b.d==null){return false}return (a.d==null&&b.d==null||rL(a.d,5).Mm(rL(b.d,5),false,true,false,false))&&a.f==b.f&&a.e==b.e&&a.c==b.c&&a.b==b.b} +function Ohe(a,b,c){var d,e,f,g;if(zL(c,24)&&rL(c,24).io()){g=rL(NDe(a.c,b),59);if(!g){g=new RDe;ODe(a.c,b,g)}f=rL(c,24);g.put(f.go(),f)}else if(zL(c,222)){Ohe(a,b,rL(c,222).j)}else if(c.Tn()){for(e=qoe(c.Tn()).$d();e.Pd();){d=rL(e.Qd(),9);Ohe(a,b,d)}}} +function XDb(a,b,c,d,e){var f,g,h;qf(c.j==(h7d(),x5d),'Expected GETPROP, found %s. Node: %s',c.j,c);f=MDc(a.a,b,c,e);SAc(c.b?c.b.f:null,f);d.j==I4d&&c==d.b&&(g=f2d(d,d.g,50),g!=d.g&&(d.g=g),d.g=new p3d(50,1,d.g));h=c.k;!!h&&(f.k=h);g2d(d,c,f);FGb(a.a,f)} +function NFb(a,b){switch(b.g){case 0:return Axd(),uxd;case 1:case 2:return Axd(),vxd;case 3:return Axd(),wxd;case 4:return Axd(),zxd;case 5:return Axd(),xxd;case 6:case 7:return Axd(),yxd;default:throw Aib(new Ire('Unexpected language mode: '+a.T.Vb));}} +function WFb(a){switch(a.R.g){case 0:return a.T.Bd?(!a.F&&(a.F=new _ec(a,a.B)),a.F):(!a.fb&&(a.fb=new Oie(a.S,a.B)),a.fb);case 1:return !a.fb&&(a.fb=new Oie(a.S,a.B)),a.fb;case 2:return !a.F&&(a.F=new _ec(a,a.B)),a.F;default:throw Aib(new DJ(yPe+a.R));}} +function jDc(a){HAc();var b,c,d,e;e=a.e;b=e.e;d=CBc(a);if(!!d&&d.j==(h7d(),_5d)){c=d.Lm();if(Jse(c,cOe)||Jse(c,GTe)){return false}}if(a.j==(h7d(),r5d)&&qCc(a.e)&&a.j==r5d&&hDc(a.b)){return true}return a.b.Lm().length==0&&(b.j==m5d&&b.b.j==m4d||e.j==_5d)} +function c3c(a,b,c){var d,e,f,g,h,i,j;d=b.b;h=d.d;e=b.b?b.b.f:null;c=W2c(a,d,c);i=a.f.Cm(d,c,true);f=a.f.Cm(d,c,false);W2c(a,h,Xoc(i));W2c(a,e,Xoc(f));j=zL(h.k,9)?rL(h.k,9):null;g=zL(e.k,9)?rL(e.k,9):null;!!j&&!!g?o2d(b,j._m(g)):(b.k=null);return Xoc(c)} +function AKd(a){_Jd(a);while($Jd(a,a.d)&&($Jd(a,a.d)?Ese(a.e.a,a.d):0)!=93&&!LKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){if(!BKd(a)){return false}}if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)!=93){gKd(a,"']' expected",GK(yK(agb,1),ZJe,1,5,[]));return false}_Jd(a);return true} +function QDc(a,b,c,d){HAc();var e,f,g;e=ODc(a,b);if(e.j==(h7d(),_5d)){g=!c?xYd(e,b7d):wYd(e,c,b7d);f=f2d(g,g.g,29);f!=g.g&&(g.g=f);!!d&&(g.g=new A3d(29,d,g.g))}else if(c){g=zYd(lYd(e,c));n2d(g.b,d)}else{g=(Af(NYd(e),e),new P2d(m5d,e));n2d(g.b,d)}return g} +function $9c(a,b,c){var d,e,f,g,h,i,j;f=Z9c(a);if(!a.c){h=new jAc(a.a,new fad(a),f);aAc(h,b)}g=new jAc(a.a,a,f);gAc(g,b,c);for(j=(e=(new dve(a.e.a)).a.ke().$d(),new jve(e));j.a.Pd();){i=(d=rL(j.a.Qd(),12),wL(d.se()));bad(a.a,i);QCe(a.e,i)}!!a.b&&had(a.b)} +function agd(){this.c=new GHe;this.d=new GHe;this.e=new GHe;this.j=new idd;this.k=new idd;this.o=new $E((LC(),KC));this.p=new $E(KC);this.q=new $E(KC);this.s=new $E(KC);this.a=(Lfd(),new IHe(up(new Sx(KC),new Rfd)));this.i=new IHe(up(new Sx(KC),new Rfd))} +function nkd(a){var b,c,d;if(a==a.a.v||a==a.a.g||a==a.a.s||a.c){return a.a.s}if(!a.n.a.isEmpty()){return nkd(gkd(a))}c=pkd(a);a.i.size()+a.e.size()==0&&!!a.j?(b=(tf(a.j),a.j)):(b=a.a.G);d=hqd(a.a,b);Skd(c,Tnd(a.a.j,d));Zkd(c,a.k);Pkd(c,a.b);return bld(c)} +function Tld(a){if(0==a.kl()||-1==a.kl()||eKe==a.kl()||a.kl()==64||a.kl()==128||a.kl()==32||a.kl()==256||(a.kl()&-25)==0&&(a.kl()&24)!=0||a.kl()==1||a.kl()==4&&a.gl().size()==1||512==a.kl()||XLe==a.kl()){return false}return !(a.kl()==2&&a.nl().size()==1)} +function Epd(a,b,c,d,e,f,g){var h,i,j;i=zud(d,new zte).a;h=qqd(a.a);!e&&!Jse(b,DKe)&&(e=h);!!e&&!vud(d,e)&&OCe(a.i,Rnc(c,apd,GK(yK(fgb,1),pKe,2,6,[i])));(d.i.a&2)!=0&&!f.isEmpty()&&OCe(a.i,Rnc(c,Sod,GK(yK(fgb,1),pKe,2,6,[i])));j=rud(d,f);zf(j);Rkd(g,d.r)} +function Bsd(a,b,c){var d,e,f,g,h;b.a+='{';f=true;for(h=(e=(new ewe((new HHe(new dve(a.g))).a)).a.ke().b.Ho(),new kwe(e));h.a.Pd();){g=(d=rL(h.a.Qd(),12),wL(d.se()));f?(f=false):(b.a+=BKe,b);b.a+=''+g;b.a+=hKe;Std(rL(Xk(Nk(a.g,g,false)),52),b,c)}b.a+='}'} +function fDd(a,b){if(b.j!=(h7d(),_5d)&&b.j!=L6d){a.a.Fj(tXe+e4d(KXe,GK(yK(agb,1),ZJe,1,5,[dKe])),a.b.ji(),a.d,a.c);return false}if(b.Lm().length==0){a.a.Fj(tXe+e4d(KXe,GK(yK(agb,1),ZJe,1,5,['string parameter'])),a.b.ji(),a.d,a.c);return false}return true} +function yKd(a){if(!NKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){gKd(a,'Expected regular expression first char',GK(yK(agb,1),ZJe,1,5,[]));return false}if(!zKd(a)){return false}while($Jd(a,a.d)&&MKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){if(!zKd(a)){return false}}return true} +function LRd(a,b){var c,d,e,f;e=new zte;e.a+='0';if(a.b.n>0){e.a+='.';f=CK(LL,qKe,17,a.b.n,15,1);Dxe(f,f.length,48);e.a+=mte(f,0,f.length)}e.a+='E+00';c=gjb(a.a);vte(b,Vse(c,69,101));if(a.b.i&&a.b.n==0){d=b.a.indexOf('e');b.a=bte(b.a,0,d)+'.'+ate(b.a,d)}} +function __d(a,b){if(!!b&&!((a.a.a&2)!=0||i$d(a.a)||(a.a.a&jNe)!=0||TZd(a.a)>0||(a.a.a&hNe)==mKe||d$d(a.a)||MZd(a.a)>0||QZd(a.a)!=null||!!a.a.g||(a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)){U$d(a.a,b,UQe);a.e=true;return true}else{return false}} +function S0d(a,b){if(!!b&&!((a.a.a&2)!=0||i$d(a.a)||(a.a.a&jNe)!=0||TZd(a.a)>0||(a.a.a&hNe)==mKe||d$d(a.a)||MZd(a.a)>0||QZd(a.a)!=null||!!a.a.g||(a.a.a&hNe)==mNe||(a.a.a&hNe)==lKe||(a.a.a&hNe)==UQe)){U$d(a.a,b,mNe);a.e=true;return true}else{return false}} +function Z7b(a){var b,c,d,e,f;f=s1d((HAc(),kf(a.j==(h7d(),r5d)),a.b.d),false);e=f.b;while(!!e&&e.j==_5d){d=wL(F1d(e,40));d!=null&&e.Qm(d);e=e.d}c=CYd((Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),f,(b=new N2d(F4d),b));if(a.k){B2d(c,a.k);_7b(c)}return c} +function iic(){iic=cjb;hic=new Q_b('JSC_IMPLICITLY_NULLABLE_JSDOC',(prb(),nrb),new _te("Name {0} in JSDoc is implicitly nullable, and is discouraged by the style guide.\nPlease add a '!' to make it non-nullable, or a '?' to make it explicitly nullable."))} +function Qyc(a,b,c,d,e){kf(EL(d)||zL(d,20));kf(EL(e)||zL(e,20));zL(d,20)&&zL(e,20)?hzc(a.Q,Rnc(b,owc,GK(yK(fgb,1),pKe,2,6,[c.f!=null?c.f:''+c.g,Vyc(rL(d,20),rL(e,20))]))):hzc(a.Q,Rnc(b,owc,GK(yK(fgb,1),pKe,2,6,[c.f!=null?c.f:''+c.g,wUe+d+_Je+xUe+e+_Je])))} +function ocd(a,b,c){var d,e,f;f='/'.length;Jse(c.substr(c.length-f,f),'/')&&(c=bte(c,0,c.length-1));for(d=0;de){hzc(a.Q,Rnc(c,Kwc,GK(yK(fgb,1),pKe,2,6,[T1d(d)?G1d(d):'',''+g,''+f,pUe+e])));return false}return true} +function A3c(a,b){var c,d,e,f,g,h,i,j;h=false;j=new idd;for(f=qoe(b).$d();f.Pd();){e=rL(f.Qd(),9);i=rL(e.Vn(a),9);i!=e&&(h=true);j.a[j.a.length]=i}if(h){g=new tpe(a.e);for(d=new lxe(j);d.a '+f.a]))}} +function C5c(a,b,c){var d,e,f,g,h,i,j;g=(Ef(c.Nl()||c.i==(Bfe(),zfe),hOe,c),S7d(c.p));for(f=(h=(new dve(Tde(c).a)).a.ke().$d(),new jve(h));f.a.Pd();){e=(d=rL(f.a.Qd(),12),rL(d.se(),24));if(e.ao()){for(j=e.ao().bo().$d();j.Pd();){i=wL(j.Qd());K5c(a,b,g,e,i)}}}} +function Vrd(a,b,c){var d,e;if(Tud(a.a,lOe)&&PIe(TIe(Grd,b))){if(a.b.d.d.isEmpty()){return new Wtd(null,a.a.u.G,null,(fud(),eud))}zf(a.b.d.d.size()==1);d=rL(Uw(a.b.Hf().$d()),20);return new Wtd(null,d,null,(fud(),eud))}e=Hud(a.a,b,c);return !e?null:Utd(e,a.b)} +function MId(a,b){var c;if(nJd(a,0,(XMd(),cMd))||nJd(a,0,aMd)){c=KId(a,b)}else{c=vId(a);cNd(c)||HJd(a,qYe,GK(yK(agb,1),ZJe,1,5,[]));b==0&&c.p!=(GQd(),JPd)&&HJd(a,'Only an identifier or destructuring pattern is allowed here.',GK(yK(agb,1),ZJe,1,5,[]))}return c} +function tXd(a,b,c,d,e){var f,g,h,i,j;g=JUd(a,b,d);if(g){f=true}else{f=false;g=zL(b.k,9)?rL(b.k,9):null}j=JUd(a,c,d);if(j){i=true}else{i=false;j=zL(c.k,9)?rL(c.k,9):null}h=rL(e.Xd(new Age(g,j)),141);if(h){return AXd(a,d,b,g,f?h.a:null,c,j,i?h.b:null)}return d} +function UE(a,b,c){var d;if(!c){return 0}d=a.d.sf(a.b.g,c.b);if(d>0){return UE(a,b,c.g)}else if(d==0){switch(a.b.f.g){case 0:return Bib(b.Yf(c),b.Zf(c.g));case 1:return b.Zf(c.g);default:throw Aib(new zqe);}}else{return Bib(Bib(b.Zf(c.g),b.Yf(c)),UE(a,b,c.e))}} +function VE(a,b,c){var d;if(!c){return 0}d=a.d.sf(a.b.e,c.b);if(d<0){return VE(a,b,c.e)}else if(d==0){switch(a.b.d.g){case 0:return Bib(b.Yf(c),b.Zf(c.e));case 1:return b.Zf(c.e);default:throw Aib(new zqe);}}else{return Bib(Bib(b.Zf(c.e),b.Yf(c)),VE(a,b,c.g))}} +function bBb(a,b,c,d,e){var f,g;f=e==2;f&&sAb(a.c,'(');YAb(a,b.j==(h7d(),r5d)&&B1d(b,61)!=0?iPe:aKe);if(B1d(b,59)!=0){sAb(a.c,'*');c.Lm().length==0||a.c.$h()}a.di(c,4);g=rL(F1d(c,81),5);!!g&&a.di(g,4);a.di(c.d,4);kBb(a,b);a.di(d,4);a.c.Th(e==0);f&&sAb(a.c,')')} +function eqc(a,b,c,d){cqc(this);Af((HAc(),WAc(a)||a.j==(h7d(),r5d)||a.j==(h7d(),Z5d)||a.j==(h7d(),D6d)&&!a.e||a.j==(h7d(),r6d)),a);a.j==(h7d(),r5d)&&Af(!c,a);this.i=a;this.e=false;this.g=b;if(c){Af(!WAc(a),a);this.f=this}else{Af(WAc(a)||a.j==r5d,a);this.f=d.f}} +function kMc(a,b){var c,d,e,f;if(oCc(b)&&b.j!=(h7d(),O5d)&&b.j!=(h7d(),Q6d)){for(d=b.b;d;d=d.d){if(pCc(b,d)&&d.j!=(h7d(),F4d)){e=H2d((c=new N2d((h7d(),F4d)),c),b);g2d(b,d,e);f=f2d(e,e.g,39);f!=e.g&&(e.g=f);e.g=new p3d(39,1,e.g);d.j==c5d||p1d(e,d);d=e;nMc(a)}}}} +function f6c(a,b){var c,d,e;c=(HAc(),d=eBc(b),!d?null:rL(F1d(d,29),11));if(!c&&b.j!=(h7d(),r5d)){return ''}e=b.k;return !e?'':e.Sl()?d6c(a,b):e.Pl()?'/** @enum {'+e.tm().fl().rm(0)+'} */\n':!e.lm()&&!e.Ll()&&!e.mm()&&!e.cm()?'/** @type {'+b.k.rm(0)+'} */\n':''} +function nAd(a,b){var c,d,e,f,g,h;f=b.a;g=Wxd(a.a,(h7d(),K4d),lyd(a.a,f));c=Vxd(a.a,F4d);h=f2d(c,c.g,39);h!=c.g&&(c.g=h);c.g=new p3d(39,1,c.g);W2d(c.i)==-1&&jyd(c,b.o.b,b.o.a);if(b.b){for(e=b.b.$d();e.Pd();){d=rL(e.Qd(),18);l1d(c,lyd(a.a,d))}}l1d(g,c);return g} +function tee(a,b,c,d){A7d();Rce.call(this,a,b,rL(sie(a,(Lhe(),Rge)),24),false,d);Jde(this);this.v=true;kf(!c||(h7d(),r5d)==c.j);kf(b!=null);this.n=c;this.c=new kae(a,new N2d((h7d(),r6d)),null);this.i=(Bfe(),zfe);this.p=new Kfe(a,this);this.g=false;this.f=false} +function tOb(a,b,c,d){var e,f,g,h,i;for(h=new Gze(uye(b.d).b.$d());h.b.Pd();){g=rL(h.b.Qd(),86);i=sOb(a,g.d._j(g.c.Lm()));if(wb(i,c)){continue}if(a.c.d){f=g.c;if(YNb(f)||_Nb(f)){continue}else if(aOb(f)){e=new EOb(d,g);swe(i.c,e);continue}}OCe(d.c,i);OCe(i.g,c)}} +function I1c(a,b,c){var d,e,f,g;d=CFb(a.a).dh(c);e=Kzc(b);if(d){g=_5c(t6c(e,d.b));f=_5c(t6c(e,d.a));d.c==(ECb(),CCb)&&!!g&&!(g.sn()||g.qn()||g.rn()||rL(sie(g.F,(Lhe(),Zge)),68)==g)&&!!f&&!(f.sn()||f.qn()||f.rn()||rL(sie(f.F,(Lhe(),Zge)),68)==f)&&P5c(a.p,c,g,f)}} +function O2c(a,b,c,d){var e;if(d){if((K7d(c.p)?rL(sie(c.F,(Lhe(),Hhe)),24):c.p).lm()&&!(K7d(b.p)?rL(sie(b.F,(Lhe(),Hhe)),24):b.p).lm()){e=ffe(qfe(gfe(new rfe(a.e),c),K7d(b.p)?rL(sie(b.F,(Lhe(),Hhe)),24):b.p));return e}}else{if(Yde(c)<=Yde(b)){return b}}return c} +function dkb(a){var b,c,d,e,f,g,h,i,j;for(c=(new ZGe(a.g)).b.Ho();c.Pd();){b=rL(c.Qd(),12);e=wL(b.se());d=rL(b.te(),376);if(h=2+e.length,i=d.e*h,j=9+h+d.e*3,j0){return false}if(a.q){for(c=new lxe(a.q);c.a0||b.n>0)&&b.o==0&&b.f==0)&&!hec(b))){return false}}}return true} +function Qlc(a,b){var c,d,e;if(!b){return true}if(b.km()){b=b.qm();if(b.km()){for(d=b.El().$d();d.Pd();){c=rL(d.Qd(),60);if(Qlc(a,c)){return true}}return false}}e=b.tm();if(!e){return !a.b}return a.c.contains(e)||e.Jl()||e.lm()||e.Ll()||!a.a&&e.Pl()||!a.b&&e.Ml()} +function dyc(a){var b,c;for(c=0;c',vSe),fcd(c)))),new Trc(d,g,g)))}return ur(b.a)} +function HBd(a,b,c){var d,e,f,g;f=EBd(a,c);if(!f){return null}g=(d=new N2d((h7d(),F4d)),d);e=1;l1d(g,f);while(hBd(a,(wCd(),eCd))){!a.n?DCd(a.i):_Ad(a);PBd(a);f=EBd(a,!a.n?DCd(a.i):_Ad(a));if(!f){return null}++e;l1d(g,f)}Jse(b,DKe)&&e==1&&m1d(g,jBd(a,x6d));return g} +function bI(a,b){var c;if(b.i!=3){throw Aib(new tJ('Unknown version: '+b.i))}c=b.b;if(c!=null&&c.length==0){throw Aib(new tJ('File entry is empty'))}if(b.f){dI(a,b);return}a.b=b.c;a.e=b.g;a.d=b.e;a.b>=0?(a.c=new jdd(a.b)):(a.c=new idd);Ok(a.a,b.a);hI(new mI(a,b.d))} +function mxb(a,b){var c,d;if(NCc(b)){return}if(b.j==(h7d(),_5d)&&$se(b.Lm(),'goog$dom$TagName$')){d=b.Lm().substr(17)}else if(b.j==x5d&&b.e.j!=x5d&&Y1d(b.b,'goog.dom.TagName')){d=Yse(b.b.d.Lm(),'.*\\$','')}else{return}c=H2d(new T3d(L6d,d),b);g2d(b.e,b,c);FGb(a.b,c)} +function iBb(a,b,c){var d,e,f,g,h,i;h=0;d=0;for(f=0;f=0;l--){if(kld(d,c.getAtIndex(l))){c.removeAtIndex(l)}else{break}}}return new ukd(a,ur(b),ur(c),d,e,f,g,js(h),rL(Ze(i,(yvd(),xvd)),464),j,k)} +function _jb(a){var b,c,d,e,f;for(d=(new ZGe(a.g)).b.Ho();d.Pd();){c=rL(d.Qd(),12);e=rL(c.te(),376);if(!e.c){continue}b=ikb(e,wL(c.se()));f=wYd((Ef(Ose(b,hte(46))==-1,xMe,b),new T3d((h7d(),_5d),b)),bZd(wL(c.se())),b7d);I2d(f,e.g);!e.i?m1d(e.g,f):k1d(e.g,f,e.i);FGb(a.c,f)}} +function qPb(a){var b,c,d,e,f;a.vi();f=0;while(!a.n.isEmpty()){if(f>800000){throw Aib(new PPb)}b=rL(a.n.$d().Qd(),87);a.n.remove(b);a.xi(b);if(a.ti(b)){e=a.wi()?bMb(b):aMb(b);for(d=new lxe(e);d.ab&&(b=h)}return b} +function vPc(a){var b,c,d,e,f;for(c=new lxe(a.b);c.ad){throw Aib(new Ire('Recorded bad position information\nstart-line: '+b+_Je+'end-line: '+d))}else if(b==d&&c>=e){throw Aib(new Ire('Recorded bad position information\nline: '+b+_Je+'start-char: '+c+_Je+'end-char: '+e))}a.f=b;a.e=c;a.c=d;a.b=e} +function zBd(a,b){var c,d;c=false;if(b==(wCd(),fCd)){b=!a.n?DCd(a.i):_Ad(a);if(b==rCd){a.n=b;return RBd(a,(h7d(),b5d),new N2d(c5d))}c=true}d=EBd(a,b);if(d){PBd(a);if(c){d=RBd(a,(h7d(),b5d),d)}else if(hBd(a,jCd)){!a.n?DCd(a.i):_Ad(a);PBd(a);d=RBd(a,(h7d(),h5d),d)}}return d} +function L6b(a,b,c,d){var e,f,g,h,i,j,k;if(a.c){h=c;for(g=(!c.b?(jye(),jye(),iye):new F3d(c.b)).$d();g.Pd();){f=rL(g.Qd(),5);j=f.Lm();k=!a.c?j:a.c.a+'.'+j;e=c1d(rL(F1d(f,29),11));c.j==(h7d(),S4d)&&S_d(e);i=I2d(QDc(a.a,k,d2d(f),F_d(e,false)),c);j1d(d,i,h);h=i}u1d(c);Yzc(b)}} +function Ogc(a,b){var c,d,e,f,g,h,i;kf(a.j==(h7d(),r5d));kf(a.e.j==I4d);if(!b){return null}d=qld(b);if(!d||(g=xkd(d.d),!!g&&g.a.g==0)||(f=xkd(d.d),!!f&&f.a.g!=0)){return null}c=mkd(d);h=y1d(a.b.d);i=c.f.size()+c.d.size();e=!!c.g;if(e&&h<=i+1||!e&&h<=i){return c}return null} +function O7c(a){var b,c,d,e,f,g,h,i,j;for(j=new lxe(a.j);j.a=9223372036854775807){return mL(),iL}e=false;if(a<0){e=true;a=-a}d=0;if(a>=jMe){d=IL(a/jMe);a-=d*jMe}c=0;if(a>=iMe){c=IL(a/iMe);a-=c*iMe}b=IL(a);f=LK(b,c,d);e&&RK(f);return f} +function zmb(a,b){var c,d;d=b.b;c=new idd;while(d){if(d.j==(h7d(),_5d)){Vcd(c,H2d(a3d(d.Lm()),d))}else if(d.j==n6d||d.j==k4d){DGb(a.a,Rnc(d,smb,GK(yK(fgb,1),pKe,2,6,[])));return new idd}else if(d.j==Y4d){DGb(a.a,Rnc(d,rmb,GK(yK(fgb,1),pKe,2,6,[])));return new idd}d=d.d}return c} +function O7b(a){var b,c;this.f=new idd;this.b=a;this.c=new JCe;this.g=(b=new N2d((h7d(),F6d)),b);this.a=new RCe;this.i=new JCe;this.e=new idd;this.d=new idd;c=CFb(this.b);Vcd(this.e,c.hh());Vcd(this.d,c.gh());Vcd(this.e,'google_exportSymbol');Vcd(this.d,'google_exportProperty')} +function Vgc(a,b){var c,d,e;d=(HAc(),e=eBc(b),!e?null:rL(F1d(e,29),11));if(!!d&&(d.a&hNe)==mNe&&(c=(d.a&hNe)==mNe&&((hNe&d.a)==mNe?d.i:null).a.j==(h7d(),r5d),!(c||(d.a&hNe)==mKe||!!d.g||TZd(d)>0||(d.a&2)!=0||(d.a&nKe)!=0&&(d.a&hNe)!=mNe))){return false}return htc(a.a,b)||tDc(b)} +function cuc(a,b,c){var d,e,f,g,h;if(kuc(c,b)){g=huc(c);e=new idd;for(d=0;d';return b} +function Btd(a,b,c,d){var e,f,g,h,i,j;f=(rrd(),rrd(),qrd);for(h=yD(tD(new dve(a),new dve(b)));h.Pd();){g=wL(h.Qd());i=ptd(a,c,g);j=ptd(b,d,g);!i?(e=j.a==(fud(),dud)?j:new Wtd(j.c,j.d,j.b,dud)):!j?(e=i.a==(fud(),dud)?i:new Wtd(i.c,i.d,i.b,dud)):(e=Ztd(i,j));f=trd(f,g,e)}return f} +function DAd(a,b){var c,d,e,f;switch(b.a.g){case 30:Ryd(a,b,(BFd(),UEd));e=(h7d(),S4d);break;case 38:Ryd(a,b,(BFd(),hFd));e=(h7d(),T5d);break;case 25:e=(h7d(),b7d);break;default:throw Aib(new Hre);}f=Vxd(a.a,e);for(d=b.b.$d();d.Pd();){c=rL(d.Qd(),276);l1d(f,nyd(a.a,c))}return f} +function Qrb(a,b,c){var d,e,f,g;e=c.b;if(a.e==(fsb(),esb)&&e.j==(h7d(),_5d)){OCe(a.j,e.Lm());return}if(!T1d(e)){return}f=QBc(e);if(f.j!=(h7d(),_5d)){return}d=f.Lm();g=Hzc(b)._j(d);if(!!g&&(g.Bk()||g.wk()==rL(F1d(c,51),28))){return}iue(a.i,G1d(e),c);for(;e;e=e.b){OCe(a.j,G1d(e))}} +function gBc(a){HAc();var b,c,d,e,f;if(!a||!a.e){return null}if(a.j==(h7d(),W5d)&&a.e.j==O4d){b=(d=CBc(!a.e?null:a.e.e),!d?null:G1d(d));if(b==null){return null}c=a.Lm();return b+LMe+c}if(aDc(a)){e=fBc(a.e);if(e){f=gBc(e);if(f!=null){return f+'.'+IBc(a)}}return null}return G1d(a)} +function LJc(){LJc=cjb;IJc=new pBb(null);HJc=new Q_b('JSC_INVALID_REGULAR_EXPRESSION_FLAGS',(prb(),orb),new _te('Invalid flags to RegExp constructor: {0}'));GJc=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[DKe,lOe,gSe,NNe,bTe])));KJc=$s(GK(yK(agb,1),ZJe,1,5,[DKe,lOe,gSe]));JJc=VIe('^[gmi]*$')} +function $Rc(a,b,c){var d,e,f,g,h,i;e=ABc(b);for(g=aA(new oA(e),0);g.b.ye();){f=rL(pA(g),5);h=f;if(f.e.j==(h7d(),Y4d)){d=f.d;HAc();if(OAc(d,false,null)){continue}h=f.e}if(h.e.j==r6d){continue}i=c._j(f.Lm());if(!PCe(a.o,i)){h.e.j==M6d&&(h=h.e);EDc(h,a.g);FGb(a.g,h.e);$Dc(h.e,h)}}} +function vhd(a,b,c,d){var e,f;e=(HAc(),f=eBc(c),!f?null:rL(F1d(f,29),11));if(!e&&!shd(c)){nhd(b,c)}else{(Izc(b)==0||shd(c)||!VZd(e).isEmpty()||(e.a&hNe)==mKe)&&phd(b,c,e);qhd(a,b,c,e)}d.j==(h7d(),W5d)&&Jse(IMe,d.Lm())&&!!e&&e.j!=(z_d(),u_d)&&Xzc(b,c,_gd,GK(yK(fgb,1),pKe,2,6,[]))} +function Wnd(a,b,c,d,e){hld();rL(tf(e),144).isEmpty()?(b&=-5):(b|=4);rL(tf(c),144).isEmpty()?(b&=-3):(b|=2);if(c.isEmpty()&&e.isEmpty()&&d==null&&(b&1)==0){return Vnd(a,b)}if(!wnd(c)){return a.b}if(b==2){return new Aod(a,c)}if(b==34){return new vod(a,c)}return new Hod(a,b,c,d,e)} +function oc(a,b,c){var d,e,f;f=null;d=0;e=-1;while((e=a.a.Ud(c,++e))!=-1){if(d==0){f=new Ate;vte(f,pc(b,c.substr(0,e)))}else{vte(f,xc(c.substr(d,e-d)))}vte(f,b.b);d=e+a.b.length}return d==0?b==ic?Vb(c):c.length==0?c:xL(Wb(c.charCodeAt(0)))+Vb(c.substr(1)):vte(f,xc(c.substr(d))).a} +function _tc(a){var b,c,d,e,f,g,h,i,j;b=rL(oe(new nve(a.b),CK(z2,aUe,288,0,0,1)),1866);for(e=0,f=b.length;e>>, objs <<<%s>>>, typeVar <<<%s>>>, enums <<<%s>>>',GK(yK(agb,1),ZJe,1,5,[Zre(b),c,d,e]))))}} +function EId(a){var b,c,d,e;if(oJd(a,(XMd(),VLd))){if(nJd(a,1,hMd)){return e=eKd(a.g,0).b.b,aHd(a,VLd),aHd(a,hMd),gHd(a,'target'),new MOd(new qRd(e,a.f))}else{d=eKd(a.g,0).b.b;aHd(a,VLd);c=EId(a);b=null;oJd(a,bMd)&&(b=wHd(a));return new LOd(new qRd(d,a.f),c,b)}}else{return zId(a)}} +function yGb(b,c){var d,e,f,g;f=new KVc(b);for(e=c.$d();e.Pd();){d=rL(e.Qd(),82);if(!Ise(d.a.mi().b,'.json')){continue}d.b=b;try{bZc(d.a.mi(),'('+d.a.mi().a+')')}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}g=JHb(d,b);if(!g){continue}zf(g.j==(h7d(),F6d));lAc(f.a,g,f)}return js(f.b)} +function MAc(a,b,c){HAc();var d;switch(a.j.g){case 102:case 28:case 23:return true;case 29:return !mCc(a,c)&&!b.contains(a.Lm());case 26:case 27:return true;case 65:zf(a.j==(h7d(),r5d)&&!(a.j!=Z5d&&nDc(a.e)));return false;}for(d=a.b;d;d=d.d){if(MAc(d,b,c)){return true}}return false} +function SWc(a,b,c){var d,e,f,g,h;g=jYd(GK(yK(veb,1),MMe,5,0,[]));if(b.Tn()){f=new IHe((JWc(),IWc));f.addAll(qoe(b.Tn()))}else{f=(lr(),new UD(b))}for(e=f.$d();e.Pd();){d=rL(e.Qd(),9);h=TWc(a,d);if(!h){return null}l1d(g,h)}return qYd(KWc(a.a,'checkType'),GK(yK(veb,1),MMe,5,0,[c,g]))} +function BTd(a){var b,c,d;b=xSd((uSd(),sSd),a.b);if(a.a.a.length!=0){if(BSd(b,a.a).a.length==0){return CTd(a,a.b,false)}else if(BSd(a.b,a.a).a.length==0){return CTd(a,b,true)}}d=CTd(a,a.b,false);c=CTd(a,b,true);return (d.a?1:0)+d.b.length+OTd(d.c)<=(c.a?1:0)+c.b.length+OTd(c.c)?d:c} +function xJ(a,b){var c;if(a>=rKe&&a<=dMe){c=(mJe(a>=0&&a<=dMe),a>=rKe?GK(yK(LL,1),qKe,17,15,[sKe+(a-rKe>>10&tKe)&uKe,vKe+(a-rKe&tKe)&uKe]):GK(yK(LL,1),qKe,17,15,[a&uKe]));xJ(c[0],b);xJ(c[1],b);return}nte(nte(nte(nte((b.a+='\\u',b),vJ[a>>>12&15]),vJ[a>>>8&15]),vJ[a>>>4&15]),vJ[a&15])} +function cid(){cid=cjb;_hd=new Q_b('JSC_PRIMITIVE_OBJECT',(prb(),orb),new _te('Explicit creation of a {0} object.'));bid=new Q_b('JSC_PRIMITIVE_OBJECT_DECLARATION',orb,new _te('Declaration of {0} object instead of primitive type.'));aid=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[GKe,HKe,IKe])))} +function jPb(a,b){var c,d,e;kf(b.j==(h7d(),L6d));if(!a.b){return b}c=qYd(H2d((Ef(Ose(cOe,hte(46))==-1,xMe,cOe),new T3d(_5d,cOe)),b),GK(yK(veb,1),MMe,5,0,[b]));H2d(c,b);e=f2d(c,c.g,50);e!=c.g&&(c.g=e);c.g=new p3d(50,1,c.g);d=f2d(c,c.g,43);d!=c.g&&(c.g=d);c.g=new p3d(43,1,c.g);return c} +function emc(){emc=cjb;cmc=new Q_b('JSC_J2CL_REFERENCE_EQUALITY',(prb(),orb),new _te('Reference equality may not be used with the specified type: {0}'));dmc=new iD(GK(yK(Ohb,1),FLe,12,0,[(Ep(ITe,JTe),aB(),new tu(ITe,JTe)),(Ep(KTe,LTe),new tu(KTe,LTe)),(Ep(MTe,NTe),new tu(MTe,NTe))]))} +function fAd(a,b){var c,d,e,f,g,h,i,j,k;i=rL(b.a,134);f=_xd(a.a,(j=i.a,k=Rse(j,hte(47)),j.substr(1,k-1)));jyd(f,i.b.b,i.b.a);g=Wxd(a.a,(h7d(),z6d),f);h=i.a;e=Rse(h,hte(47));c='';ea.a){throw Aib(new ooc('Abbreviated hex escape '+ate(a.e,a.c)))}e=0;while(--b>=0){c=Ese(a.e,a.c);if(48<=c&&c<=57){d=c-48}else if(97<=c&&c<=102){d=c+-87}else if(65<=c&&c<=70){d=c+-55}else{throw Aib(new ooc(ate(a.e,a.c)))}++a.c;e=e<<4|d}return e&uKe} +function BG(){BG=cjb;AG=new YG('base64()',YLe,Xqe(61));new YG('base64Url()','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',Xqe(61));new QG('base32()','ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',Xqe(61));new QG('base32Hex()','0123456789ABCDEFGHIJKLMNOPQRSTUV',Xqe(61));new VG} +function tvb(a,b,c){var d,e,f,g;g=b.Lm();e=ate(c,Rse(c,hte(46))+1);if(Jse(g,e)||e.length==0){return}if(Tb(g.charCodeAt(0))!=Tb(e.charCodeAt(0))){f=Tb(g.charCodeAt(0))?Ub(g.charCodeAt(0)):Wb(g.charCodeAt(0));d=String.fromCharCode(f)+g.substr(1);Xzc(a,b,Zub,GK(yK(fgb,1),pKe,2,6,[g,d]))}} +function $Db(a,b,c){var d,e,f,g,h,i;d=bec(b);for(h=(!b.r?(lr(),lr(),kr):b.r).$d();h.Pd();){g=rL(h.Qd(),124);if(g==b.d){continue}i=g.c.e;!aDc(g.c)&&(!g.f||g.g==(Pec(),Nec)||g.g==(Pec(),Oec))&&XDb(a,c,g.c,i,d)}if(b.q){for(f=new lxe(b.q);f.a0||(d.a&2)!=0||(d.a&nKe)!=0&&(d.a&hNe)!=mNe)){return null}if(egc(a.c,b)&&!chc(a,b)){return Ugc(a,b)}return null} +function loc(a){var b,c;new aDe;this.a=CK(v1,ZJe,149,a.a.length,0,1);for(c=0;c=0,'Invalid module index: %s',c);b.c=c;this.a[c]=b}this.b=hoc(this);this.c=joc(this);this.d=ioc(this)} +function CLc(a,b,c,d){var e,f,g;f=c.e;if(f.j==(h7d(),S4d)){DGb(a.a,Rnc(b,(XLc(),OLc),GK(yK(fgb,1),pKe,2,6,[])));return}e=jLc(b,a.a,a.c);if(e){e.g!=null&&ALc(a,e);g=new yLc(a.a,BLc(a),a.g,a.i);HAc();!!f&&(f.j==b7d||f.j==T5d||f.j==S4d)||c.j==m4d?wLc(g,f,e,Izc(d)==0):wLc(g,c,e,Izc(d)==0)}} +function nbd(a,b,c){var d,e,f,g,h;d=mbd(b,c);f=d;Bbd();!Jse(d.substr(0,'/'.length),'/')&&!(Jse(d.substr(0,WPe.length),WPe)||Jse(d.substr(0,bWe.length),bWe))&&(f='/'+d);if(a.d.contains(f)){return d}for(h=a.e.$d();h.Pd();){g=wL(h.Qd());e=g+(''+f);if(a.d.contains(e)){return d}}return null} +function Dld(a){var b,c,d;d=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null;if(!d?null:d.b){return jmd(a,Rq((c=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null,!c?null:c.b).n.a.Gf()))}b=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25).d:null;uf(b,a);return jmd(a,b.a.q)} +function Jtb(a,b){var c,d;switch(b.j.g){case 66:d=b.b.d;zf(d.j==(h7d(),F4d));!d.b&&B1d(d,39)!=0&&DGb(a.c,Szc(d,Htb,GK(yK(fgb,1),pKe,2,6,[])));c=d.d;!!c&&(zf(c.j==F4d),!c.b&&B1d(c,39)!=0&&DGb(a.c,Szc(c,Htb,GK(yK(fgb,1),pKe,2,6,[]))));break;case 70:case 72:case 73:case 101:Otb(a,BBc(b));}} +function xzb(a,b){var c,d,e,f;if(!a.b||cve(b,a.b)||!uzb.contains(a.b.uk().j)){return false}c=a.b.pk();if(!c||c.j!=(h7d(),I4d)){return true}e=c.b;if(e.j!=(h7d(),x5d)){return true}d=e.b;if(d.j!=_5d||!Jse(d.Lm(),ANe)){return true}f=d.d.Lm();return !Jse(f,IOe)&&!Jse(f,DOe)&&!Jse(f,'getMsg')} +function L7b(a,b,c){var d,e,f,g,h,i,j,k,l;if(c.j!=(h7d(),x5d)||c.b.j!=U6d){return}f=(l=Czc(b),l.j==r5d?l:null);d=(HAc(),g=eBc(f),!g?null:rL(F1d(g,29),11));if(!d||(d.a&2)==0){return}e=(h=CBc(f),!h?null:G1d(h));i=(c.b?c.b.f:null).Lm();k=e+HMe;j=ODc(a.b,'this.'+i);Vcd(a.f,new c8b(a,k,i,j))} +function mdc(a,b){var c,d,e,f;e=new idd;lAc(a.a,b,new jdc(a.a,new ndc(a.a,e)));f=null;for(d=new lxe(e);d.a0){b[d++]='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.charCodeAt(a%62);a=a/62|0}return mte(b,0,d)} +function Hkd(a,b){var c;if(!a){return null}c=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25).d:null;if(!c){return emd(a,b)}if(c.a.q.isEmpty()){return !c.a.q.isEmpty()&&!c.b.d.d.isEmpty()?Bmd(Ftd(c.a.u,c,null,null,null,false,c.a.i)):c.a.r}if(b.isEmpty()){return a}return Bmd(ltd(hsd(c,b)))} +function FId(a){var b,c,d;d=eKd(a.g,0).b.b;c=(lr(),new Fu);aHd(a,(XMd(),aMd));b=null;while(yJd(a,0)||eKd(a.g,0).c==cMd||oJd(a,yMd)||tCe(pCe(oMd,GK(yK(Uab,1),PKe,37,0,[nMd,mMd])),eKd(a.g,0).c)){Du(c,OId(a));b=eHd(a,jLd);if(!b){break}}aHd(a,fLd);mHd(a,b);return new OOd(new qRd(d,a.f),ur(c.a))} +function Rtc(a,b){var c,d,e,f,g;c=(g=Czc(b),g.j==(h7d(),r5d)?g:null);if(!c){return jye(),jye(),gye}f=new hz(a.k,c);d=rL(eue(f.a.b,f.b),200);if((!d?0:d.a)!=0){return f}e=c.e;if(e){while(e.j==A5d){e=e.e}if(e.j==_5d){return new hz(a.k,e)}if(e.j==m4d){return new hz(a.k,e)}}return jye(),jye(),gye} +function Sae(a,b,c){var d,e,f,g,h;h=false;for(g=qoe(b).$d();g.Pd();){f=rL(g.Qd(),9);if(f.mm()||f.Zl());else{h=true;if(EJe(tL(f.Un(a,c)))){return Dqe(),Dqe(),true}}}if(!h){d=H7d(b,(Lhe(),bhe));e=H7d(b,Khe);return Dqe(),EJe(tL(d.Un(a,c)))||EJe(tL(e.Un(a,c)))?true:false}return Dqe(),Dqe(),false} +function $Jb(){$Jb=cjb;RJb=new bKb(KQe,0);SJb=new bKb(LQe,1);TJb=new bKb('ECMASCRIPT5_STRICT',2);VJb=new bKb('ECMASCRIPT_2015',3);UJb=new bKb('ECMASCRIPT6_TYPED',4);WJb=new bKb('ECMASCRIPT_2016',5);XJb=new bKb('ECMASCRIPT_2017',6);YJb=new bKb('ECMASCRIPT_NEXT',7);ZJb=new bKb('NO_TRANSPILE',8)} +function hLb(a,b,c){var d,e,f,g,h;if(c.j==(h7d(),L6d)||c.j==S6d&&!!c.b&&!c.b.d){return true}else if(c.j==f4d){e=c.b;g=c.b?c.b.f:null;return hLb(a,b,e)&&hLb(a,b,g)}else if(c.j==_5d){f=c.Lm();h=b._j(f);if(!h||!h.Ck()){return false}d=h.pk();if(!d){return false}return hLb(a,h.vk(),d)}return false} +function UPb(a,b){var c,d,e,f,g,h;kf((h=Jzc(b),h.j==(h7d(),F4d)&&h.e.j==r5d));zf(!zwe(a.b));if(!$Fb(a.a,Jzc(b).e)){return}f=rL(Bwe(a.b),448);if(f.a){return}if(!f.b){return}d=Hzc(b);g=d.Zj();if(100a.f.b;if(!(e||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd))){d=!!eHd(a,yMd);tJd(a)?(c=BHd(a,b)):d&&HJd(a,'yield* requires an expression',GK(yK(agb,1),ZJe,1,5,[]))}return new iRd(new qRd(f,a.f),d,c)} +function fic(a){eic();var b,c,d,e,f;f=new zte;for(e=new pEe(new gEe(a));e.b!=e.c.a.b;){d=nEe(e);if(!rL(d.e,59).isEmpty()){ote(ote(ote(vte((f.a+='[',f),wL(d.d)),93),10),10);for(c=rL(d.e,59).ke().$d();c.Pd();){b=rL(c.Qd(),12);ote(vte(ote(vte(f,wL(b.se())),58),wL(b.te())),10)}f.a+=_Je}}return f.a} +function mKc(a){var b,c,d,e,f;f=new JCe;for(d=new lxe(a.w);d.a0||(c.a&2)!=0||(c.a&nKe)!=0&&(c.a&hNe)!=mNe))} +function nlc(a,b,c){var d,e,f,g,h,i,j;if(a.c.c!=0){for(i=(f=Hzc(b).bk().a.ke().$d(),new sve(f));i.a.Pd();){h=(d=rL(i.a.Qd(),12),rL(d.te(),66));g=rL(NDe(c.a,h),151);if(!!g&&g.a.a.length>=2&&_Qc(g)&&WQc(g)){e=TQc(g);j=PBc(e.c);!!j&&j.j==(h7d(),_5d)&&!Jse(j.Lm(),h.ji())&&hue(a.a,j,new dlc(h,g))}}}} +function uJd(b){var c;if(b.b.d&&oJd(b,(XMd(),bMd))||oJd(b,(XMd(),_Ld))){c=new LJd(b.b,new jRd,b.g.e,XJd(b.g),HL(Ewe(b.e))===HL((SJd(),QJd)));try{kHd(c);fId(c,2);oJd(c,(XMd(),iLd))&&(aHd(c,iLd),bJd(c));return oJd(c,WKd)}catch(a){a=zib(a);if(zL(a,688)){return false}else throw Aib(a)}}return false} +function fmb(a,b,c,d){var e,f,g,h,i;e=c.b;i=c.e;if(emb(b,i)||!!e&&emb(b,e)){h=c.Lm();twe(zlb(a.b,h,(xlb(),1)).a,new Jlb(c,d,(g=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!g?null:g.g)));(CFb(a.b.d).th(h)||a.b.a)&&bmb(a,h,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g),1);return true}return false} +function t2b(a,b,c,d){var e,f,g,h;zf(c.j==(h7d(),r5d));g=f2d(c,c.g,60);g!=c.g&&(c.g=g);f=f2d(c,c.g,85);f!=c.g&&(c.g=f);c.g=new p3d(85,1,c.g);e=c.b?c.b.f:null;if(e.j!=F4d){tf(e.e);a2d(e.e,e);e=K2d(nYd((zf(NYd(e)),new P2d(C6d,e))),e);l1d(c,e)}h=new z2b;lAc(a.a,e,h);d.d=d.d||h.b;d.c=d.c||h.a;Yzc(b)} +function Wpc(a,b,c,d){var e,f,g;if(!!d&&(d.j==(h7d(),E5d)&&d.b==c||d.j==k5d&&(d.b?d.b.f:null)==c)){return}e=Vpc(a,c.Lm());if(e!=null){f=rL(Awe(a.b),299);f.Lj()&&(g=f2d(c,c.g,43),g!=c.g&&(c.g=g));c.Qm(e);if(a.a){Yzc(b);d.j==(h7d(),r5d)&&(HAc(),d.j==r5d&&qCc(d.e)&&d.j==r5d&&hDc(d.b))&&FGb(b.c,d)}}} +function Y4c(a,b,c){var d,e,f,g;g=X4c(a,b,c);for(d=0;da.f.b,!(c||nJd(a,0,(XMd(),uMd))||nJd(a,0,(XMd(),fLd))||nJd(a,0,(XMd(),sLd))))){e=nHd(a);return new cRd(new qRd(f,a.f),e,1,b)}else{return b}}} +function onb(a,b,c){var d;Pnb((h7d(),j5d),b);if(B1d(b,64)!=0){d=y1d(b);2!=d&&nob(RMe+d,b);Pnb(c5d,b.b);dob(b.b.d)}else if(B1d(b,63)!=0){d=y1d(b);1!=d&&nob(SMe+d,b);rnb(a,b.b)}else{d=y1d(b);(d<1||d>2)&&nob(TMe+d,b);b.b.j==l5d?qnb(b.b):bob(a,b.b,c);!!b.b&&!!b.b.d&&b.b.d==(b.b?b.b.f:null)&&dob(b.b.d)}} +function fMb(a,b,c){var d,e,f,g,h,i,j;i=a.Kk();j=i.a.length;f=c.Jk();g=f.a.length;if(jf.length){return null}return f.substr(d,c-d)} +function gFc(a,b,c){var d,e,f,g,h;lAc(a.b,c,new JFc(a));nAc(a.b,new AFc(a.b,a.a),b,c);f=new NFc;g=new p5b(a.b,new lFc(a));h=new jAc(a.b,f,g);gAc(h,b,c);e=new Xpc;nAc(a.b,e,b,c);FFc(new GFc(a.b,a.a),b,c);d=new nFc;lAc(a.b,c,d);d.a.a.size()==0||lAc(a.b,c,new LFc(a,d.a));njb(a.b.kb)||(a.b.kb=1,undefined)} +function EFc(a,b){var c,d;Af(a.j==(h7d(),r5d),a);HAc();if(a.j==r5d&&qCc(a.e)&&a.j==r5d&&hDc(a.b)&&!KCc(a)&&a.e.j!=j5d){BFc(a,b);return true}else if(a.j==r5d&&(lf(a.j==r5d,a),a.b?a.b.f:null).j!=F4d){d=(lf(a.j==r5d,a),a.b?a.b.f:null);c=nYd($Yd(u1d(d)));K2d(c,d);l1d(a,c);BGb(b,AFb(c));mGb(b)}return false} +function Ebd(a,b,c,d,e,f){Bbd();tf(b);tf(c);tf(d);this.e=d;this.a=!a?new Qbd:a;this.d=Gbd(b);this.b=Ibd(pw(pw(c,Abd),d),this.d);switch(e.g){case 0:this.c=new pbd(this.b,this.d,this.a);break;case 1:this.c=new pcd(this.b,this.d,f,this.a);break;default:throw Aib(new DJ('Unexpected resolution mode '+e));}} +function xHd(a){var b,c,d;c=eKd(a.g,0).b.b;b=(lr(),new Fu);aHd(a,(XMd(),cMd));d=null;while(oJd(a,jLd)||oJd(a,xMd)||tJd(a)){d=null;oJd(a,jLd)?Du(b,new NOd(hHd(a,eKd(a.g,0).b.b))):oJd(a,xMd)?Du(b,ZId(a)):Du(b,BHd(a,1));oJd(a,hLd)||(d=aHd(a,jLd))}aHd(a,hLd);mHd(a,d);return new hNd(new qRd(c,a.f),ur(b.a))} +function PId(a){var b,c,d,e,f;e=eKd(a.g,1).c;if(e==(XMd(),DMd)||e==$Ld||e==FLd||(HGd(),HGd(),!!rL(Fs(iGd,e),63))){return QHd(a,new VJd(eKd(a.g,0).b.b))}else{d=eKd(a.g,0).b.b;aHd(a,yMd);c=SHd(a);b=new mOd((rOd(),pOd));iId(a,b,(SJd(),QJd));f=bOd(b,new qRd(d,a.f));return new KNd(new qRd(d,a.f),null,c,f)}} +function frb(a,b,c){var d,e;if(!c){return}if((!c.d?null:c.d.c)!=null||(c.a&8)!=0||(!c.d?null:c.d.j)!=null){d=false;switch(b.j.g){case 47:case 76:case 100:case 88:d=_qb(b.b);break;case 91:d=_qb(b);break;case 26:e=rL(F1d(b,51),28);!!e&&e.lk()&&T1d(b)&&(d=_qb(b));}d||arb(a,b,Wqb,GK(yK(fgb,1),pKe,2,6,[]))}} +function f3b(a){var b,c,d,e,f;d=rL(F1d(a,29),11);if(d){c=a.j==(h7d(),y5d)||B1d(a,73)!=0;if(c&&!!((hNe&d.a)==mKe?d.i:null)){return (hNe&d.a)==mKe?d.i:null}else{e=VZd(d);if(e.size()==1){f=WZd(d,wL(Uw(VZd(d).$d())));if(f){return f}}}}return new f1d(new N2d((h7d(),x6d)),(b=rL(F1d(a,51),28),!b?null:b.ji()))} +function HKc(a,b){var c,d,e,f,g;c=new TKc(a);f=false;for(e=new lxe(b);e.a127){continue}if(LCd(b)){a.e=b;b=10}}a.a==-1&&(a.a=a.i-a.f-a.r-1);return b}} +function $s(a){Qq();var b,c,d,e,f,g;g=new tEe;kye(g,a);for(c=(f=(new dve(g.a)).a.ke().$d(),new jve(f));c.a.Pd();){b=(d=rL(c.a.Qd(),12),d.se());tf(b)}switch(g.a.size()){case 0:return kD(),jD;case 1:return new XD((e=(new dve(g.a)).a.ke().$d(),d=rL((new jve(e)).a.Qd(),12),d.se()));default:return new lD(g);}} +function Zpb(a,b,c,d){var e,f;if(Izc(b)==0){if(!(d.j==(h7d(),I4d)&&d.b==c||c.j==f6d)){return false}}if(c.j==(h7d(),x5d)&&c==d.b&&$Bc(d)){return false}if(c.j==x5d&&d.j==m5d&&(rL(F1d(c,29),11).a&256)!=0){return false}return !(e=Jzc(b),f=e.e,a.d>0||gqb(s6c(Kzc(b)))!=null||!!f&&f.j==m4d&&gqb(Vpb(e,f))!=null)} +function Rxc(a,b,c,d,e){var f,g,h;zyc(a,b);f=a.C.c;if(!(!!f&&!!(f.c?f.c:f.e))){return new ezc(c,a.r)}g=(lf(true,pNe),kf(true),rL(Xk(Nk(c.b,pNe,false)),20));if(!Rld(g,d,new bvd((rrd(),rrd(),qrd)))){return new ezc(c,g)}h=cmd(g,e);0==h.kl()&&(h=Hyc(a,pNe,g,e));return new ezc((Nwc(),kf(true),qvd(c,pNe,h)),h)} +function $4c(a,b,c){var d,e,f,g,h;g=h5c(b);e=N4c(a,rL(g.getAtIndex(0),5),c);if(e.Rl()){l5c(a,b,s4c,GK(yK(fgb,1),pKe,2,6,[gjb(e)]));return a.b.uj((Lhe(),Hhe))}h=CK(yeb,ZJe,60,g.size()-1,0,1);for(f=0;feKd(a.g,0).b.a.b,!(b||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&nJd(a,1,DLd)){return EHd(a)}if(nJd(a,0,DLd)){return hId(a)}if(nJd(a,0,dLd)){return NHd(a,false,false)}if(oJd(a,PLd)){return lJd(a)}return _Id(a)} +function Nhe(){Lhe();return GK(yK(Teb,1),PKe,57,0,[Dge,Cge,Gge,Fge,Ege,Hge,Jge,Ige,Kge,Lge,Mge,Nge,Oge,Pge,Qge,Rge,Sge,Tge,Xge,Wge,Yge,bhe,hhe,ehe,dhe,nhe,jhe,mhe,ohe,phe,qhe,rhe,the,she,vhe,uhe,whe,yhe,zhe,Bhe,Dhe,Ehe,Hhe,Ihe,Jhe,Khe,Ahe,xhe,ihe,Bge,ahe,$ge,_ge,Uge,Fhe,Ghe,Zge,Vge,che,khe,lhe,ghe,fhe,Che])} +function QNb(){QNb=cjb;PNb=new Q_b('JSC_UNMATCHED_START_MARKER',(prb(),mrb),new _te('Unmatched {0}'));ONb=new Q_b('JSC_UNMATCHED_END_MARKER',mrb,new _te('Unmatched {1} - {0} not in the same block'));NNb=new Q_b('JSC_INVALID_MARKER_USAGE',mrb,new _te('Marker {0} can only be used in a simple call expression'))} +function Pyd(a,b){a.a.e=CEd(a.a.e,GK(yK(Hab,1),PKe,67,0,[(BFd(),cFd)]));if(a.a.a.c==(Axd(),uxd)){a.a.d.Ej('getters are not supported in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.',a.a.r,(Jxd(),b.o.b.b+1),0);return true}return false} +function Qyd(a,b){a.a.e=CEd(a.a.e,GK(yK(Hab,1),PKe,67,0,[(BFd(),sFd)]));if(a.a.a.c==(Axd(),uxd)){a.a.d.Ej('setters are not supported in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.',a.a.r,(Jxd(),b.o.b.b+1),0);return true}return false} +function Anc(a){var b,c,d,e,f;for(f=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();f.Pd();){e=rL(f.Qd(),5);zf(e.j==(h7d(),F6d));c=rL(F1d(e,51),28);if((!c?null:c.ji())!=null&&Ise((d=rL(F1d(e,51),28),!d?null:d.ji()),STe)&&(b=rL(F1d(e,51),28),!b?null:b.ji()).indexOf('.js.zip!')!=-1){return Dqe(),Cqe}}return Dqe(),Bqe} +function $Ic(a,b){var c,d,e,f,g,h;e=b.d;if(hJc(b)&&!!e&&(e.j==(h7d(),B5d)||gJc(e))){d=(zf(hJc(b)),HAc(),b.j==(h7d(),m5d)&&b.b.j==m4d?b.b.b:b.b);c=JIc(e);if(d.j==_5d&&c.j==_5d&&Jse(d.Lm(),c.Lm())){g=(zf(hJc(b)),D1d(b.b));h=tBc(g);if(h!=(Vne(),Une)){f=h.so(true)?new N2d(W6d):new N2d(n5d);g2d(c.e,c,f);GGb(a.c)}}}} +function isd(a,b,c,d,e){var f,g,h,i;b=Lrd(b,a);if(!b){return false}if(a.a.q.isEmpty()){return true}if(a.b.d.d.isEmpty()||b.b.d.d.isEmpty()){return true}g=true;for(i=a.a.q.$d();i.Pd();){h=wL(i.Qd());f=rL(Fs(b.b,h),20);wf(f,'Type variable %s not found in map %s',h,b.b);g=g&&lmd(rL(Fs(a.b,h),20),f,c,d,e)}return g} +function Jxd(){Jxd=cjb;Ixd=(Qq(),new XD(COe));Exd=Ixd;Gxd=ct(TOe,cNe,fPe,POe,UOe,SOe,GK(yK(fgb,1),pKe,2,6,[YOe]));Hxd=ct(TOe,cNe,fPe,POe,UOe,SOe,GK(yK(fgb,1),pKe,2,6,[YOe,VOe,ePe,'let',fXe,gXe,hXe,iXe,kXe,'yield']));Fxd=VIe('(/|(\n[ \t]*))\\*[ \t]*@[a-zA-Z]+[ \t\n{]');new mxd((kD(),jD),(null,jD),(Axd(),zxd),0)} +function Q$c(a,b,c,d){var e,f,g;e=d;f=c;while(true){g=e.e;if(e.b!=f){g2d(e,f,new N2d((h7d(),i6d)));EDc(f,a.a.a);break}if(e.j==(h7d(),m5d)){$Dc(g,e);EDc(e,a.a.a);break}if(e.j==m4d){g2d(g,e,u1d(e.b?e.b.f:null));break}HAc();if(!(e.j==x5d||e.j==w5d)&&e.j!=I4d){g2d(e,f,new N2d(i6d));EDc(f,a.a.a);break}f=e;e=g}Yzc(b)} +function V_c(a,b,c){R_c();var d,e,f,g,h,i,j,k;if(pIb(a.T,(wEd(),oEd))){for(j=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();j.Pd();){i=rL(j.Qd(),5);g=rL(F1d(i,89),148);if(!!g&&!xEd(nEd,g)){for(e=0,f=c.length;e',vSe),fcd(c));!Jse(f.substr(0,1),'/')&&!(Jse(f.substr(0,2),WPe)||Jse(f.substr(0,3),bWe))&&(f='/'+f);Vcd(b.a,tf(f))}return ur(b.a)} +function mhd(a,b){var c,d,e,f,g;f=(HAc(),kf(b.j==(h7d(),r5d)),b.b.d);for(e=(!f.b?(jye(),jye(),iye):new F3d(f.b)).$d();e.Pd();){d=rL(e.Qd(),5);c=rL(F1d(d,29),11);if(!c){Xzc(a,d,ehd,GK(yK(fgb,1),pKe,2,6,[]));return}else{g=(hNe&c.a)==mNe?c.i:null;uf(g,'Inline JSDoc info should always have a type');ohd(a,d,null,g)}}} +function Y1b(a,b,c){var d;d=b.b.j==(h7d(),c5d);HAc();if(b.j==N4d&&qCc(b.e)&&b.j==N4d&&hDc(b.b)||d&&c.j==_5d||d&&c.j==m4d&&T1d(c.b)&&c.e.j==m5d){return false}if(OAc(b,false,null)||s7b(a.c,b)!=1){DGb(a.b,Rnc(b,(X5b(),V5b),GK(yK(fgb,1),pKe,2,6,['class expression that cannot be extracted'])));return false}return true} +function UIc(a,b){var c,d,e,f,g,h,i,j,k;Af(b.j==(h7d(),A5d),b);i=b.e;tf(i);e=b.b;k=e.d;h=k.d;g=tBc(e);if(g==(Vne(),Une)){tf(a.c);if(!rFb(a.c,k,h)){return b}}if(g.so(true)){c=k;d=h}else{c=h;d=k}f=(HAc(),OAc(e,false,a.c));v1d(b);if(f){j=H2d(mYd(Q4d,e,c),b)}else{j=c;EDc(e,a.c)}g2d(i,b,j);EDc(d,a.c);GGb(a.c);return j} +function sLc(a,b,c){var d,e,f,g,h;h='_set'+b.substr(0,1).toLocaleUpperCase()+b.substr(1);f=CYd((Ef(Ose('',hte(46))==-1,xMe,''),new T3d((h7d(),_5d),'')),XYd((Ef(Ose(b,hte(46))==-1,xMe,b),new T3d(_5d,b))),(d=new N2d(F4d),d));EGb(a.a,f);e=zYd(lYd(ODc(a.a,c+h),f));g=new a1d(true);E0d(g);n2d(e.b,F_d(g,false));return e} +function Pde(a,b,c){var d,e,f,g,h;f=a.d;if(f){for(e=f.$d();e.Pd();){d=rL(e.Qd(),24);h=d.Zn();if(!h){continue}if(b.a.containsKey(h)){c.add(h);while(HL(c.getAtIndex(0))!==HL(h)){c.removeAtIndex(0)}return c}b.a.put(h,b);c.add(h);g=Pde(h,b,c);if(g){return g}b.a.remove(h)!=null;c.removeAtIndex(c.size()-1)}}return null} +function sDe(){if(!Object.create||!Object.getOwnPropertyNames){return false}var a=RVe;var b=Object.create(null);if(b[a]!==undefined){return false}var c=Object.getOwnPropertyNames(b);if(c.length!=0){return false}b[a]=42;if(b[a]!==42){return false}if(Object.getOwnPropertyNames(b).length==0){return false}return true} +function Nrb(a,b,c){var d,e,f,g,h,i,j,k;f=(HAc(),g=CBc(c),!g?null:G1d(g));f!=null&&OCe(a.f,f);e=c.b.d;if(!T1d(e)){return}if(a.e==(fsb(),esb)&&e.j==(h7d(),_5d)){OCe(a.j,e.Lm());return}i=QBc(e);if(i.j==(h7d(),_5d)){j=i.Lm();k=Hzc(b)._j(j);if(!!k&&(k.hk()||k.Bk()));else{d=Vrb(G1d(e));h=wL(lw(d,G1d(e)));iue(a.i,h,e)}}} +function qLb(a,b){var c,d,e,f,g,h;if(b.j==(h7d(),p5d)||b.j==q5d){g=b.b;d=g.d;c=d.d;mLb(a,d,(IMb(),HMb),b);mLb(a,b,FMb,wLb(c));mLb(a,b,EMb,xLb(b,b,a));lLb(a,b,d)}else{f=b.b;e=f.d;h=e.d;c=h.d;mLb(a,f,(IMb(),HMb),b);mLb(a,b,FMb,wLb(c));e.j==c5d||mLb(a,b,EMb,xLb(b,b,a));mLb(a,h,HMb,b);lLb(a,f,f);lLb(a,b,e);lLb(a,h,h)}} +function Yzd(a,b){var c,d;if(!b){return $xd(a.a,(h7d(),_5d),pXe)}else if(b.c==(XMd(),FLd)){d=Tzd(a,rL(b,129),true)}else if(b.c==$Ld){d=oyd(a.a,rL(b,134));c=f2d(d,d.g,36);c!=d.g&&(d.g=c);d.g=new p3d(36,1,d.g)}else{d=kAd(a,rL(b,134));c=f2d(d,d.g,36);c!=d.g&&(d.g=c);d.g=new p3d(36,1,d.g)}zf(d.j==(h7d(),L6d));return d} +function Mgc(a,b,c,d){var e,f,g;if(!Jse(wL(mw(b.a)),KMe)){hzc(a.c.g,Rnc(d,(Yfc(),Mfc),GK(yK(fgb,1),pKe,2,6,[c])));return null}g=(kf(b.a.size()!=1),new jud(b.a.Bf(0,b.a.size()-1)));f=(e=Hsc(a.a,g,false),!e?null:zL(e.d,79)?rL(e.d,79):null);(!f||f.g!=0)&&hzc(a.c.g,Rnc(d,(Yfc(),Mfc),GK(yK(fgb,1),pKe,2,6,[c])));return f} +function b_d(a,b){var c,d,e;e=new g_d;e.a=$$d(a.a,b);e.e=c_d(a.e,b);e.f=c_d(a.f,b);e.n=d_d(a.n,b);e.r=c_d(a.r,b);e.q=!a.q?null:new kdd(a.q);e.d=!a.d?null:new TCe(a.d);e.s=!a.s?null:new TDe(a.s);e.c=a.c;e.j=a.j;e.b=a.b;e.i=a.i;e.p=!a.p?null:(Qq(),d=a.p,Xs(d));e.k=!a.k?null:(Qq(),c=a.k,Xs(c));e.g=a.g;e.o=a.o;return e} +function LKb(a,b){var c,d,e,f,g,h,i;j:for(i=b.b.$d();i.Pd();){h=rL(i.Qd(),7);g=(J$b(),bue(I$b,h)||hue(I$b,h,new M$b(h)),rL(eue(I$b,h),97));for(f=(d=(new ewe(a.c.a)).a.ke().b.Ho(),new kwe(d));f.a.Pd();){e=(c=rL(f.a.Qd(),12),rL(c.se(),169));if(e.Mg(g)){continue j}else if(e.Ng(g)){return false}}return false}return true} +function jd(){Zc.call(this,'CharMatcher.invisible()',cte('\x00\x7F\xAD\u0600\u061C\u06DD\u070F\u1680\u180E\u2000\u2028\u205F\u2066\u2067\u2068\u2069\u206A\u3000\uD800\uFEFF\uFFF9\uFFFA'),cte(' \xA0\xAD\u0604\u061C\u06DD\u070F\u1680\u180E\u200F\u202F\u2064\u2066\u2067\u2068\u2069\u206F\u3000\uF8FF\uFEFF\uFFF9\uFFFB'))} +function gyc(a,b){var c,d,e,f,g,h;h=b.Kk();if(h.a.length==0){kf(rL(b.te(),5).j==(h7d(),V6d));return a.P}if(h.a.length==1){return rL(NDe(a.F,(vJe(0,h.a.length),h.a[0])),160)}f=new tEe;for(d=new lxe(h);d.a=a.c.a.length){return null}zf(b>=0);zf(c>=0);if(Ycd(a.c,b)==null){return aI(a,b)}d=rL(Ycd(a.c,b),15);zf(d.a.length!=0);if((vJe(0,d.a.length),rL(d.a[0],392)).bg()>c){return aI(a,b)}e=gI(d,c,0,d.a.length-1);Bf(e>=0,'unexpected:%s',e);return _H(a,(vJe(e,d.a.length),rL(d.a[e],392)))} +function GRd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;f=new eSd(b);e=0;j=null;g=false;k=b.length;h=0;while(hh&&tte(a.c,b,h,m);h=m;if(m1||f.size()==1&&!f.contains(pNe)||(e=!c.d?null:c.d.k,!e?(jye(),jye(),iye):e).contains(pNe))&&arb(a,b,Tqb,GK(yK(fgb,1),pKe,2,6,[]));(c.a&nKe)!=0&&arb(a,b,Uqb,GK(yK(fgb,1),pKe,2,6,[]))} +function V3b(a){var b,c;if(a.f.b){c=P3b(a,d2d(a.f).Lm());if(!c){DGb(a.c,Rnc(a.f,(X5b(),W5b),GK(yK(fgb,1),pKe,2,6,['Breaking to a label that is not a loop'])));return}b=c.a}else{b=rL(Ycd(a.e,0),264).a}l1d(a.g,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d((h7d(),_5d),LSe))),g4b(a,new v3d(b))))));l1d(a.g,m4b())} +function goc(a,b,c){var d,e,f,g,h,i,j;zf(Jkb(c)!=0);i=a.a.length;g=new Qkb(a.a.length);Okb(g,a.a.length);for(h=Kkb(c,0);h>=0;h=Kkb(c,h+1)){i=i=0;e=Mkb(g,e-1)){f=a.c[e];if(Gkb(f,j)){Dkb(g,f);a.d[e]>19!=0){return '-'+gL(_K(a))}c=a;d='';while(!(c.l==0&&c.m==0&&c.h==0)){e=JK(1000000000);c=MK(c,e,true);b=''+fL(IK);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;f--){b='0'+b}}d=b+d}return d} +function Bkd(a,b){var c,d,e;if(!a||!b){return null}c=!a?null:a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25).d:null;d=!b?null:b.kl()==2&&b.nl().size()==1?rL(Uw(b.nl().$d()),25).d:null;if(!!c&&!!d){e=nsd(c,d);if(e){return !e.a.q.isEmpty()&&!e.b.d.d.isEmpty()?Bmd(Ftd(e.a.u,e,null,null,null,false,e.a.i)):e.a.r}}return Tnd(a,b)} +function ctd(a){var b,c,d,e,f,g;if(a==a.a.jb){return a.a._}if(a.c||!Sud(a.d.a)&&!Tud(a.d.a,gNe)||!!a.e){return a}b=!a.b?null:rkd(a.b);c=(rrd(),rrd(),qrd);for(g=new Gue((new yue(a.g.a)).a);g.b;){f=Fue(g);d=wL(f.se());e=rL(f.te(),52);c=trd(c,d,e.a==(fud(),eud)?e:new Wtd(e.c,e.d,e.b,eud))}return new etd(a.a,a.d,c,b,null,true,a.f)} +function fob(a,b){var c,d,e,f;switch(b.j.g){case 68:Pnb((h7d(),K4d),b);c=j7d(b.j);c!=-1&&(d=y1d(b),c!=d&&nob(PMe+c+QMe+d,b));rnb(a,b.b);anb(a,b.b?b.b.f:null);return;case 69:Pnb((h7d(),X4d),b);e=j7d(b.j);e!=-1&&(f=y1d(b),e!=f&&nob(PMe+e+QMe+f,b));anb(a,b.b?b.b.f:null);return;default:nob('Expected switch member but was '+b.j,b);}} +function pxb(a,b){var c,d,e,f;if(!a.c){e=(HAc(),zf(b.j==(h7d(),I4d)||b.j==f6d),FBc(b.b.d,0));if(e){h2d(b,u1d(e));FGb(a.b,e);return}}c=b.b;if(Z1d(c,cOe,cOe.length)){return}d=H2d((Ef(Ose(cOe,hte(46))==-1,xMe,cOe),new T3d((h7d(),_5d),cOe)),c);s2d(d,E1d(c));g2d(b,c,d);f=f2d(b,b.g,50);f!=b.g&&(b.g=f);b.g=new p3d(50,1,b.g);FGb(a.b,b)} +function G7b(a){var b,c,d,e;b=a;for(d=new k3d(new h3d(rL(tf(a.e),5)));d.a.a;){c=j3d(d);e=c.j;switch(e.g){case 84:case 66:case 67:case 0:case 39:case 76:case 88:case 100:zf(b==c.b);return c;case 72:if(b==c.b){return c}case 73:case 85:case 82:case 83:case 68:case 69:return null;}b=c}throw Aib(new Ire('Unexpected AST structure.'))} +function sgc(a,b,c){var d,e,f,g,h,i;kf(b.j==(h7d(),r5d));f=new idd;i=new idd;h=(HAc(),kf(b.j==r5d),b.b.d).b;while(h){Npd(c,h.Lm())&&!h.d?Vcd(i,h.Lm()):Vcd(f,h.Lm());h=h.d}if(c){for(e=VZd(c).$d();e.Pd();){d=wL(e.Qd());if(Zcd(f,d,0)==-1&&Zcd(i,d,0)==-1){g=DBc(b);hzc(a.b.g,Rnc(b,(Yfc(),Hfc),GK(yK(fgb,1),pKe,2,6,[d,g])))}}}return f} +function emd(a,b){var c,d,e,f;if(-1==a.kl()||eKe==a.kl()||a.nl().isEmpty()&&a.Dl()==null||b.isEmpty()){return a}c=(Qq(),new vv);for(f=a.nl().$d();f.Pd();){e=rL(f.Qd(),25);sv(c,Zsd(e,b))}d=Wnd(a.e,a.kl()&-2,Ys(new lxe(c.a)),null,a.gl());(a.kl()&1)!=0&&(d=Tnd(d,b.containsKey(a.Dl())?rL(b.get(a.Dl()),20):Dmd(a.e,a.Dl())));return d} +function hI(a){var b,c,d,e;e=CK(NL,ULe,17,5,15,1);b=new idd;while(AI(a.a)){if(lI(a,59)){iI(a,b);b.a.length==0||(b=new idd)}else{d=0;while(!kI(a)){e[d]=VH(a.a);++d}c=jI(a,e,d);Cf(a.i.b<0||a.b=0){++i;h=Pse(f,hte(46),h+1)}}if(!!e&&aDc(d)){return true}for(g=0;g=f.size()){l5c(a,b,u4c,GK(yK(fgb,1),pKe,2,6,[''+f.size(),''+d]));return a.b.uj((Lhe(),Hhe))}return rL(f.getAtIndex(d),60)} +function zld(a){var b,c;zf(a.kl()==2&&a.nl().size()==1);c=Xrd(a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25).d:null);if(kld(a,c)){Ef((b=a.kl()==2&&a.nl().size()==1?rL(Uw(a.nl().$d()),25):null,!!b&&Sud(b.d.a)&&!!Msd(b)),'Failed to reach Object.prototype in prototype chain, unexpected self-link found at %s',a);return null}return c} +function Lxd(a,b){var c,d,e,f,g,h,i,j;d=b.c;f=b.a.b.b+1;c=b.a.b.a;g=b.a.b.c;e=new SBd(new JCd(d.substr(3),f,c+3),d,g,a.t,a.a,a.d);NBd(e,a.f);OBd(e,a.g);b.b==(BNd(),xNd)&&b.c.length>0?(e.g=($Bd(),YBd),PBd(e),h=!e.n?DCd(e.i):_Ad(e),i=cBd(e,h,0,false,true),j=' '+i.a,e.c?D_d(e.c,j):e.e.d?Q_d(e.e,j):Q_d(e.e,''),undefined):mBd(e);return e} +function ywb(a){var b;this.c=a;this.b=ct('goog.isDef','goog.isNull','goog.isDefAndNotNull','goog.isString','goog.isNumber','goog.isBoolean',GK(yK(fgb,1),pKe,2,6,['goog.isFunction','goog.isArray','goog.isArrayLike','goog.isObject']));b=(Qq(),new vv);tv(b,GK(yK(fgb,1),pKe,2,6,[eOe,fOe,gOe]));uv(b,(lr(),lr(),kr));this.a=Ys(new lxe(b.a))} +function tJd(a){switch(eKd(a.g,0).c.g){case 76:case 29:case 9:case 99:case 14:case 2:case 108:case 109:case 110:case 111:case 64:case 69:case 18:case 97:case 100:case 45:case 47:case 49:case 63:case 68:case 94:case 95:case 101:case 107:case 104:case 35:case 21:case 77:case 98:case 24:case 26:case 44:return true;default:return false;}} +function hSd(a,b){var c;switch(b){case 43:c=a.d;a.d=true;break;case 44:c=a.e;a.e=true;break;case 45:c=a.f;a.f=true;break;case 40:c=a.g;a.g=true;break;case 35:c=a.i;a.i=true;break;case 32:c=a.j;a.j=true;break;case 48:c=a.k;a.k=true;break;default:return false;}if(c){throw Aib(new DJ(''+b))}!a.o&&(a.o=new Ate);ote(a.o,b&uKe);return true} +function zOb(a){var b,c,d,e,f,g,h,i;for(h=new fxe(a.a);h.a!=h.b;){f=rL(dxe(h),190);Ef(!f.d,'duplicate attempt to move %s',f)}e=new Qkb(a.b.b.a.length);b=xOb(a);for(d=new lxe(b);d.a',vSe),fcd(c));Bbd();if(Jse(b.substr(0,2),WPe)||Jse(b.substr(0,3),bWe)){e=a.a;d=e.lastIndexOf('/');f=fcd(e.substr(0,d+1)+(''+f))}return new Obd(a.b,Hbd(f,a.b.d))} +function asd(a,b){var c,d,e,f,g;if(b.isEmpty()){return a}if(a.a.q.isEmpty()){return a.a.s}Ef(a.b.d.d.isEmpty(),'Expected empty typemap, found: %s',a.b);c=new Nu;g=a.a.q;for(e=g.$d();e.Pd();){d=wL(e.Qd());b.containsKey(d)&&Ku(c,d,rL(b.get(d),20))}f=ps(c.b);if(f.d.d.isEmpty()){return a}if(f.d.d.size()0){Lse(b,i,c,f,g);g+=e}if(k>0){Gte(j,0,f,g,k);g+=k}i=c+1}d=m-i;if(d>0){l=g+d;h0){return null}d=WGb(a.b,b);c=sGb(a.b,'',d);if(a.b.q.a.e>0){DGb(a.b,new Mnc(null,null,-1,-1,cXc,null,GK(yK(fgb,1),pKe,2,6,[v$c(d)])));throw Aib(new Ire(EVe))}e=WGb(a.b,c);if(!Jse(d,e)){DGb(a.b,new Mnc(null,null,-1,-1,eXc,null,GK(yK(fgb,1),pKe,2,6,[d,e])));throw Aib(new Ire(EVe))}return c} +function d3c(a,b,c){var d,e,f,g,h,i,j,k,l;l=b.Lm();j=b.b;h=zL(b.k,9)?rL(b.k,9):null;if(j){c=W2c(a,j,c);k3c(a,c,b,zL(b.k,9)?rL(b.k,9):null,(e=zL(j.k,9)?rL(j.k,9):null,!e?a.i:e));return c}else{k=Zoc(c,l);if(k){d=k.nj();i=d&&N2c(a,t6c(a.g,l));g=false;if(d&&!!a.g.b){f=t6c(a.g.b,l);k==f&&!f.a&&(g=true)}if(!i&&!g){h=k.mj();!h&&(h=a.i)}}}b.k=h;return c} +function p4c(a,b,c,d,e){var f,g,h,i,j;c=q4c(c);d=q4c(d);if(c.hm(d)||d.hm(c)){j=!c.im(d)&&!d.im(c);j&&b.add(new j4c(c,d,new sh(e)));return}a.add(new j4c(c,d,new sh(e)));if(c.Sl()&&d.Sl()){f=c.sm();g=d.sm();h=new lxe(f.sl());i=new lxe(g.sl());while(h.a0){for(g=cec(b.p).$d();g.Pd();){f=rL(g.Qd(),124);if(f.g==(Pec(),Iec)){c=f.c.e;d=c.j==(h7d(),I4d)&&(!!a.b.dh(c)||a.b.mh(c)!=null);d||(e=true)}}}if(e){return false}if(PCe(a.f,b.b)){return false}if(b.p.t==(xec(),uec)||b.p.t==rec){return true}return b.p.t==sec&&b.p.e&&!PCe(a.c,b.b)} +function qJ(a){var b,c;c=a.offset.line;b=a.offset.column;if(a.map!=null&&a.url!=null){throw Aib(new tJ("Invalid map format: section may not have both 'map' and 'url'"))}else if(a.url!=null){return new uJ(0,a.url,c,b)}else if(a.map!=null){return new uJ(1,kte(a.map),c,b)}throw Aib(new tJ("Invalid map format: section must have either 'map' or 'url'"))} +function a0b(a){var b,c,d,e,f,g,h,i,j,k,l;d=(!a.f&&(a.f=new cfd),a.f);e=a.a;b=new JCe;for(h=Yed(d).$d();h.Pd();){g=rL(h.Qd(),44);zf(!g.isEmpty());f=rL($ed(d,rL(g.$d().Qd(),60)),60);k=null;for(j=g.$d();j.Pd();){i=rL(j.Qd(),60);l=gjb(i);(k==null||GJe((wJe(l),l),(wJe(k),k))<0)&&(k=l)}Jse('{...}',k)?(c=e):(c=QIe(TIe(Z_b,k))+'$'+e);iDe(b.d,f,c)}return b} +function OPc(a){var b,c,d,e;switch(a.j.g){case 26:d=(a.b?a.b.f:null).Lm();if(Jse(d,uRe)||Jse(d,vRe)){return OPc(a.b)}return lr(),new UD(a);case 65:case 29:return lr(),new UD(a);case 61:case 60:a.j==(h7d(),A5d)?(c=a.b.d):(c=a.b);b=OPc(c);e=OPc(c.d);if(!b||!e){return null}return Hq((lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[b,e])))));default:return null;}} +function P5c(a,b,c,d){var e,f,g;g=d.Zn();f=d.ao();e=!f?null:f.ao();!!e&&!!e.Sn()&&(e=e.Sn().i);if(!!e&&!zL(c,337)&&!D7d(e,c,0,new lge(true))){D7d(e,T5c(a,(Lhe(),nhe)),0,new lge(true))?p4c(a.d,a.c,c,e,W5c(a,Szc(b,w5c,GK(yK(fgb,1),pKe,2,6,[d.Um(new zte,false).a])))):V5c(a,b,'mismatch in declaration of superclass type',c,e);!!g.k||!g.B||nee(g,c,null)}} +function E4b(){E4b=cjb;C4b=new Q_b('JSC_LHS_OF_GOOG_REQUIRE_MUST_BE_CONST',(prb(),mrb),new _te("The left side of a goog.require() must use ''const'' (not ''let'' or ''var'')"));D4b=new Q_b('JSC_NAMESPACE_IMPORT_CANNOT_USE_STAR',mrb,new _te("Namespace imports ('goog:some.Namespace') cannot use import * as. Did you mean to import {0} from ''{1}'';?"))} +function _xc(a,b,c,d,e){var f,g,h,i;if(b==(h7d(),p6d)){g=c.kl();if(g!=0&&(g|522)==522){return d}h=c.kl();if(h!=0&&(h|1328)==1328){return e}d.b=cmd(d.b,a.p);return new ezc(uvd(d.a,e.a),Tnd(d.b,e.b))}zf(b==g4d);i=c.kl();if(i!=0&&(i|1328)==1328){return d}f=c.kl();if(f!=0&&(f|522)==522){return e}d.b=cmd(d.b,a.e);return new ezc(uvd(d.a,e.a),Tnd(d.b,e.b))} +function cad(a,b){Y9c();var c,d,e,f,g,h;Af(a.j==(h7d(),_5d)||a.j==A6d||a.j==M6d,a);f=a.e;e=b.uk();if(a.e.j==b7d&&(c=rL(F1d(a,51),28),!!c&&c.lk())&&XCc(a)){return true}d=rL(F1d(f,29),11);if(!!d&&(h=!d.d?null:d.d.p,!h?(jye(),jye(),iye):h).contains(DPe)){return true}d=rL(F1d(e,29),11);return !!d&&(g=!d.d?null:d.d.p,!g?(jye(),jye(),iye):g).contains(DPe)} +function fcd(a){ecd();var b,c,d,e,f,g,h,i;h=Zse(a,'/',0);d=CK(fgb,pKe,2,h.length,6,1);i=0;c=0;b=h.length>1&&h[0].length==0;b&&--c;for(f=0,g=h.length;f0){--i;--c;d[i]=null}else if(!b){d[i]=e;++i}continue}d[i]=e;++i;++c}if(b&&i==1){return '/'}return Wd(dcd,new Nue(new Zxe((qJe(i),txe(d,i)))))} +function JHc(a,b,c,d){var e,f,g,h,i,j;if(_Bc(b)){return b}if(d.j!=(h7d(),k6d)){return b}h=d.Km();i=IL(h);if(i!=h){Ijb(a,kHc,d);return b}if(i<0){Ijb(a,jHc,d);return b}zf(c.j==L6d);j=c.Lm();if(i>=j.length){Ijb(a,jHc,d);return b}e=0;for(g=0;g<=i;g++){e=j.charCodeAt(g);if(e<32||e>127){return b}}f=bZd(String.fromCharCode(e));g2d(b.e,b,f);GGb(a.c);return f} +function soc(a,b){var c,d,e,f,g;kf(!b.isEmpty());f=b.size();if(f==1){return rL(b.getAtIndex(0),204)}else if(f==2){return a.Dj(rL(b.getAtIndex(0),204),rL(b.getAtIndex(1),204))}else if(f<=16){d=(g=f>>>1,f>4&&(g&=-2),g);return a.Dj(soc(a,b.subList(0,d)),soc(a,b.subList(d,f)))}else{c=b.$d();e=rL(c.Qd(),204);while(c.Pd()){e=a.Dj(e,rL(c.Qd(),204))}return e}} +function V2c(a,b,c){var d,e,f,g,h,i,j,k;i=c.b;g=i.d;f=rL(fue(a.a,G1d(i)),186);if(!f||!g){return b}if(!g){return b}e=f.Fh(c,a.e);d=G1d(g);if(!e){b=a.f.Cm(g,b,true);j=(h=zL(g.k,9)?rL(g.k,9):null,!h?a.i:h).Jn()}else{k=(h=zL(g.k,9)?rL(g.k,9):null,!h?a.i:h);e.lm()||k.lm()?(j=e):(j=k.$m(e));d!=null&&!D7d(k,j,1,new lge(true))&&(b=S2c(a,b,g,j))}c.k=j;return b} +function rbd(a,b,c){var d,e,f,g,h,i,j,k,l;kf(le(a.f,b));f=new RCe;l=new Qwe(b);while(l.b!=l.c){g=rL(Jwe(l),212);i=f.a.put(g,f);if(i==null){for(k=g.li().$d();k.Pd();){j=wL(k.Qd());e=rL(fue(a.b,j),212);!!e&&(twe(l,e),true)}}}d=(lr(),new Fu);for(h=new lxe(c?a.c:a.f);h.a0){return}for(d=c.b;d;d=d.d){Oyb(a,(tJe(b.b!=0),rL(JEe(b,b.a.a),188)));lAc(a.a,d,new Pzb(a));IEe(a.g);a.b=rL(FEe(a.g),188)}} +function y9b(a,b,c,d,e){var f,g,h;if(b.j==(h7d(),_5d)){h=rL(d.get(b.Lm()),5);if(h){Af(!(c.j==r5d||c.j==b7d||c.j==M4d),c);g=s1d(h,false);g2d(c,b,g);return g}}else if(e&&b.j==U6d){h=rL(d.get(pNe),5);tf(h);if(h.j!=U6d){g=s1d(h,false);g2d(c,b,g);HAc();OAc(h,false,a)&&d.remove(pNe);return g}}else b.j==r5d&&(e=false);for(f=b.b;f;f=f.d){f=y9b(a,f,b,d,e)}return b} +function _Gc(a,b,c,d){var e,f,g;if(!fHc(b)){return false}f=b.b.b;if(!Jse(c,f.b.Lm())){return false}g=f.d;HAc();if(OAc(g,false,a.c)||(e=(jye(),jye(),iye),MAc(g,e,null))){return false}if(!RCc(g,true)&&gHc(g,c)){return false}switch(d.j.g){case 42:if(!bHc(d,b)){return false}break;case 43:if(!cHc(d,b)){return false}break;default:throw Aib(new Hre);}return true} +function Ckd(a,b){var c,d,e,f,g,h;kf(a.c||b.c);c=new cld(a.a);g=ose((zf(!(a==a.a.v||a==a.a.g)),a.i.size()),(zf(!(b==b.a.v||b==b.a.g)),b.i.size()));for(e=0;em.length||f<0||l<0){return b}j=m.substr(l,l+f-l);k=new T3d(L6d,j);i=b.e;g2d(i,b,k);GGb(a.c);return k} +function u7c(a,b,c,d){var e,f,g,h,i;tf(d);zf((d.a&hNe)==UQe);f=null;if(!!b&&T1d(b)){i=t6c(a.g,G1d(b));!!i&&zL(i.d,224)&&(f=rL(i.d,224))}if(!f){e=e1d((hNe&d.a)==UQe?d.i:null,a.g,a.k.i);f=new sde(a.k.i,c,e);if(!!b&&b.j==(h7d(),m6d)){g=b.b;while(g){h=g.Lm();vf(h,'Invalid enum key: %s',g);OCe(f.a,h);Yae(f,h,f.b,g);g=g.d}}}c!=null&&!a.g.b&&kie(a.k.i,c,f.b);return f} +function pjd(a,b){var c,d,e,f,g;f=b.a.size()==1?a:rjd(a,(kf(b.a.size()!=1),new jud(b.a.Bf(0,b.a.size()-1))));if(!f){return null}c=wL(mw(b.a));if(!(f.C.containsKey(c)||f.F.containsKey(c)||!!Nk(f.D,c,false))){return null}d=rL(f.C.get(c),159);g=zL(d,296)?rL(d,296).a:null;return new Vid((e=rL(Xk(Nk(f.D,c,false)),52),!e?null:e.b),rL(f.F.get(c),384),d,g,false,false)} +function ugc(a,b){var c,d,e,f,g;g=PBc(b);if(!g||!T1d(g)){return false}f=b.e;d=(HAc(),e=eBc(b),!e?null:rL(F1d(e,29),11));if(d){return (d.a&2)!=0||(d.a&512)!=0||(d.a&iNe)!=0||(d.a&1)!=0}if(b.j==(h7d(),_5d)&&f.j!=b7d){return false}if(!htc(a.a,g)){return false}return c=rL(F1d(b,51),28),!!c&&c.lk()||b.j==x5d&&Jse((b.b?b.b.f:null).Lm(),QOe)||b.j==M6d&&htc(a.a,fBc(f))} +function KHc(a,b){var c,d,e;kf(b.j==(h7d(),Y6d));c=b.b;if(!c||!RCc(c,true)){return b}e=null;switch(c.j.g){case 65:e=aKe;break;case 31:e=dKe;break;case 30:e=cKe;break;case 35:case 34:e=bKe;break;case 32:case 43:case 42:e=UJe;break;case 79:e=mMe;break;case 29:Jse(mMe,c.Lm())&&(e=mMe);}if(e!=null){d=new T3d(L6d,e);g2d(b.e,b,d);EDc(b,a.c);GGb(a.c);return d}return b} +function VId(a,b){var c,d,e,f,g,h;gHd(a,DSe);if(yJd(a,0)){f=dHd(a);aHd(a,(XMd(),bMd));d=bHd(a);h=jHd(a);aHd(a,gLd);g=jHd(a);!!g&&FJd(a,eKd(a.g,0),'setter should not have any returns',GK(yK(agb,1),ZJe,1,5,[]));c=gId(a);return new OQd(hHd(a,b.d),f,b.c,d,h,c)}else{e=SHd(a);aHd(a,(XMd(),bMd));d=bHd(a);jHd(a);aHd(a,gLd);c=gId(a);return new LNd(hHd(a,b.d),e,b.c,d,c)}} +function djc(a,b){var c,d,e,f,g,h,i,j;if(!(!!b.g&&mue(b.g.c)!=0)||!b.c){return}d=b.a.Cj();h=(j=new RCe,jjc((HAc(),lf(d.j==(h7d(),r5d),d),d.b?d.b.f:null),j),j);if(h.a.size()!=0){for(g=(i=(new dve(h.a)).a.ke().$d(),new jve(i));g.a.Pd();){f=(c=rL(g.a.Qd(),12),wL(c.se()));e=rL(NDe(a.f,f),219);if(!!e&&e.j){e.j=false;ajc(a,e)||Wjc(e,false)}}Xjc(b,s1d(b.a.Cj(),false))}} +function Ktd(a,b,c){var d,e,f,g,h,i,j;f=new Rtd;for(j=c.$d();j.Pd();){i=rL(j.Qd(),25);for(h=b.$d();h.Pd();){g=rL(h.Qd(),25);if(gtd(g.d,i.d)){if(a){e=Xsd(g,i);if(!e){continue}}else{e=Itd(g,i)}Qtd(f,e)}else g.d.a.g==2&&Vsd(i,true,g,new bvd((rrd(),rrd(),qrd)),null)?Qtd(f,i):i.d.a.g==2&&Vsd(g,true,i,new bvd((rrd(),rrd(),qrd)),null)&&Qtd(f,g)}}return Qq(),d=f.a,Xs(d)} +function KBd(a,b,c){var d,e,f;f=jBd(a,(h7d(),s6d));!!c&&l1d(f,c);d=null;do{if(d){PBd(a);b=!a.n?DCd(a.i):_Ad(a);zf(b==(wCd(),oCd));PBd(a);b=!a.n?DCd(a.i):_Ad(a)}d=FBd(a,b);if(!d){return null}l1d(f,d)}while(hBd(a,(wCd(),oCd)));if(!c){PBd(a);if(!hBd(a,sCd)){return XAd(a,BXe,a.i.g,CCd(a.i)),null}!a.n?DCd(a.i):_Ad(a)}if(!!f.b&&!f.b.d){e=f.b;a2d(f,e);return e}return f} +function Hy(a,b,c,d){var e,f,g;g=new vz(b,c);if(!a.a){a.a=a.e=g;hue(a.b,b,new uz(g));++a.c}else if(!d){a.e.b=g;g.d=a.e;a.e=g;e=rL(eue(a.b,b),200);if(!e){hue(a.b,b,new uz(g));++a.c}else{++e.a;f=e.c;f.c=g;g.e=f;e.c=g}}else{e=rL(eue(a.b,b),200);++e.a;g.d=d.d;g.e=d.e;g.b=d;g.c=d;!d.e?(rL(eue(a.b,b),200).b=g):(d.e.c=g);!d.d?(a.a=g):(d.d.b=g);d.d=g;d.e=g}++a.d;return g} +function mvb(a,b,c,d){var e,f,g;kf(c.j==(h7d(),m4d));f=c.b;zf(rvb(f));!a.b.a&&(!TCc(Jzc(b))||d.j!=m5d)&&Xzc(b,c,Tub,GK(yK(fgb,1),pKe,2,6,[]));if(f.j==_5d){if(a.b.a){g=W2d(a.b.a.i);Xzc(b,c,Uub,GK(yK(fgb,1),pKe,2,6,[''+g]))}a.b.a=f}if((f.j==_5d||!fDc(f))&&!PCc((HAc(),nBc(c,new vEc(F6d))))){e=rL(F1d(c,29),11);!!e&&(e.a&XLe)!=0&&Xzc(b,c,Rub,GK(yK(fgb,1),pKe,2,6,[]))}} +function EGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;j=new idd;h=true;g=b.a;n=(Af(c.j,tRe),rL(bk(c.a,g.d),44));for(m=n.$d();m.Pd();){k=rL(m.Qd(),168);zf(uZb(k));d=k.b.e;f=d.b;if(h){e=vGc(a,j,f,k.c);h=false}else{e=AGc(a,j,f)}if(!e){return}}e=HGc(j);if(!e){return}for(l=n.$d();l.Pd();){k=rL(l.Qd(),168);zf(uZb(k));d=k.b.e;BGc(a,c,j,d)}i=g.Bi();i.j==(h7d(),r5d)&&CGc(a,j,i,c)} +function zpd(a,b,c,d){var e,f,g,h,i,j,k;k=new RDe;for(i=b.b.b;i;i=i.d){e=i.j==(h7d(),P4d);h=e?i.b:i;g=h.Lm();(Jse(g.substr(0,1),"'")||Jse(g.substr(0,1),'"'))&&(g=bte(g,1,g.length-1));lfc(a.f,h);j=e?Bpd(a,i.b?i.b.f:null,c,d):a.a.G;kld(j,a.a.B)||Fpd(i.b?i.b.f:null)?(f=new Wtd(null,j,j,(fud(),dud))):(f=new Wtd(null,j,j,(fud(),eud)));ODe(k,g,f)}return Bmd(mtd(a.a,k))} +function DFb(a){var b,c,d,e,f,g,h,i,j;e=a.T.qb;if(e.a.a.isEmpty()){return FHb(new lHb(a))}else{b=new zte;tf(a.L);for(g=q1d(a.L).$d();g.Pd();){f=rL(g.Qd(),5);d=(c=rL(F1d(f,51),28),!c?null:c.ji());for(i=bx(new Gze(e.a.b.$d()));i.Pd();){h=wL(i.Qd());if((new RegExp('^('+h+')$')).test(d)){j='// '+d+_Je+(!a.T&&gGb(a,new UIb),XGb(a,f,null,true));b.a+=j;break}}}return b.a}} +function sLb(a,b){var c,d;d=b.e;if(b.j==(h7d(),F4d)&&d.j==X6d&&(HAc(),kf(d.j==X6d),d.b.d==b)&&(HAc(),kf(b.j==F4d),!(!!b.b&&b.b.j==M4d))){return}c=b.b;while(!!c&&c.j==r5d){c=c.d}c?mLb(a,b,(IMb(),HMb),wLb(c)):mLb(a,b,(IMb(),HMb),xLb(b,b,a));if(d){switch(d.j.g){case 69:case 68:case 44:break;default:(b.j==F4d&&B1d(b,38)!=0||b.j==D6d)&&mLb(a,b,(IMb(),GMb),xLb(b,b,a));}}} +function Cyc(a,b,c,d,e){var f,g,h;if(eKe!=c.kl()&&-1!=c.kl()&&(Rld(a.f,c,new bvd((rrd(),rrd(),qrd)))||Rld(a.q,c,new bvd((null,qrd))))){f=amd(c,a.g);if(0!=f.kl()){a.K&&hzc(a.Q,Rnc(b,ywc,GK(yK(fgb,1),pKe,2,6,[ild(c,new zte,(evd(),dvd)).a])));g=e;if(T1d(b)){h=lud(b);!!d&&Rld(d,f,new bvd((rrd(),rrd(),qrd)))&&(f=d);g=Pyc(e,b,h,f)}return new ezc(g,f)}}return new ezc(e,c)} +function vsc(a,b){var c,d,e,f,g,h,i,j,k;g=new qsc;h=g.a;for(k=new Gue((new yue(a.a)).a);k.b;){j=Fue(k);i=rL(j.se(),66);c=rL(j.te(),221);if(!c){iDe(h.d,i,null);continue}if(bue(b.a,i)){d=rL(eue(b.a,i),221);lsc(c,d)?iDe(h.d,i,c):iDe(h.d,i,null)}else{iDe(h.d,i,c)}}for(f=new Gue((new yue(b.a)).a);f.b;){e=Fue(f);i=rL(e.se(),66);bue(a.a,i)||hue(h,i,rL(e.te(),221))}return g} +function Ctd(a,b){var c,d,e,f,g,h;c=(rrd(),rrd(),qrd);for(h=new Gue((new yue(a.a)).a);h.b;){f=Fue(h);d=wL(f.se());!!Nk(b,d,false)||(c=trd(c,d,Vtd(rL(f.te(),52))))}for(g=new Gue((new yue(b.a)).a);g.b;){f=Fue(g);d=wL(f.se());e=rL(f.te(),52);Nk(a,d,false)?(c=trd(c,d,Vtd(Ztd(rL(Xk(Nk(a,d,false)),52),e)))):(c=trd(c,d,e.a==(fud(),eud)?e:new Wtd(e.c,e.d,e.b,eud)))}return c} +function uXd(a,b,c,d){var e,f,g,h,i,j,k;g=zL(b.k,9)?rL(b.k,9):null;g=!g?null:rL(g.Vn(a.f),9);g=!g?null:rL(g.Vn(a.j),9);e=false;h=(A7d(),!g?null:zL(g,24)?rL(g,24):null);!!h&&(e=h.sn()||h.qn()||h.rn()||qie(h.F,(Lhe(),Zge))==h||h.lm()||!!h.ho(c));if(!e){j=G1d(b);if(j!=null){i=j+'.'+c;if(!Zoc(d,i)){f=Xoc(d);k=sie(a.k,(Lhe(),Hhe));$oc(f,b,i,k,k,false);return f}}}return d} +function Ame(a,b,c){A7d();var d,e,f,g;Pce.call(this,a,null,null);this.b=false;this.v=true;this.a=c;for(g=bx(new Gze((d=b.b,!d?(b.b=_v(b.a,hAe(b.c))):d).b.b.$d()));g.Pd();){f=wL(g.Qd());e=rL(f==null?null:hB(b.d,f),467);if(!e){throw Aib(new Ire('RecordProperty associated with a property should not be null!'))}c?Yae(this,f,e.b,e.a):xme(this,f,e.b,false,e.a)}this.b=true} +function eI(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;j=false;k=null;n=null;l=null;m=null;i=a.c.a.length;for(f=0;f4&&(Ese(a.e.a,c+2)==42?(d=yNd):Ese(a.e.a,c+2)==33&&(d=xNd));b=SGd(a.e.b,c,a.d);e=bte(a.e.a,c,a.d);MJd(a.a,d,b,e)}else{gKd(a,'unterminated comment',GK(yK(agb,1),ZJe,1,5,[]))}} +function EF(a,b,c,d,e){var f,g,h,i,j;f=b.sf(c,a.b);if(f<0){h=a.e;if(!h){e[0]=0;return FF(a,c,d)}g=h.d;a.e=EF(h,b,c,d,e);e[0]==0&&++a.a;a.j=Bib(a.j,d);return a.e.d==g?a:LF(a)}else if(f>0){i=a.g;if(!i){e[0]=0;return GF(a,c,d)}g=i.d;a.g=EF(i,b,c,d,e);e[0]==0&&++a.a;a.j=Bib(a.j,d);return a.g.d==g?a:LF(a)}e[0]=a.c;j=Bib(a.c,d);kf(Dib(j,eKe)<=0);a.c+=d;a.j=Bib(a.j,d);return a} +function O1c(a,b,c,d,e){var f,g,h;h=(f=zL(e.k,9)?rL(e.k,9):null,!f?$1c(a,(Lhe(),Hhe)):f);if(D7d(h,sie(a.k,(Lhe(),Hhe)),0,new lge(true))){b=b.Vm();g=(A7d(),!b?null:zL(b,24)?rL(b,24):null);g?(!(g.sn()||g.qn()||g.rn()||qie(g.F,Zge)==g||g.lm()||!!g.ho(c))||D7d(g,sie(a.k,Hhe),0,new lge(true)))&&(zL(g,224)?c2c(d,e,l1c,GK(yK(fgb,1),pKe,2,6,[c])):P1c(a,g,c,d,e)):P1c(a,b,c,d,e)}} +function fec(a){var b,c;if(a.j||a.i!=1||a.n!=0||!(!a.j&&!(a.t==(xec(),tec)||a.t==wec)&&!dec(a)&&(a.e||(!a.p||_dc(a.p))&&(a.i>0||a.n>0)&&a.o==0&&a.f==0)&&!hec(a))){return false}for(c=(!a.r?(lr(),lr(),kr):a.r).$d();c.Pd();){b=rL(c.Qd(),124);switch(b.g.g){case 0:continue;default:case 1:throw Aib(new Hre);case 3:case 4:case 2:case 5:continue;case 6:return false;}}return true} +function yCc(a){HAc();var b,c;c=a.e;switch(c.j.g){case 82:case 84:return false;case 92:return yCc(c);case 60:case 62:case 61:return a==c.b||yCc(c);case 46:b=c.e;if(b.j==(h7d(),I4d)&&c==b.b){if(a==c.b&&!!c.b&&!!c.b.d&&c.b.d==(c.b?c.b.f:null)&&a.d.j==_5d&&Jse(XOe,a.d.Lm())){return true}}return a!=c.b&&yCc(c);case 72:case 73:if(c.j!=(h7d(),p5d)){return c.b.d==a}}return true} +function BJc(a,b,c,d){var e,f,g,h,i,j,k,l,m;kf(b.j==(h7d(),I4d));kf(c.j==L6d);kf(!!d);m=c.Lm();h=GBc(d,a.b);if(h!=null){l=IL((wJe(h),h))}else{return b}e=d.d;if(e){g=GBc(e,a.b);if(g!=null){f=IL((wJe(g),g))}else{return b}if(e.d){return b}}else{f=m.length}if(f>m.length||l>m.length||l<0||f<0||l>f){return b}j=m.substr(l,f-l);k=new T3d(L6d,j);i=b.e;g2d(i,b,k);GGb(a.c);return k} +function ACd(a){var b;if(a.r!=0){++a.b;--a.r;a.a==-1&&(a.a=a.i-a.f-a.r-1);return a.q[a.r]}for(;;){if(a.i==a.j){a.a==-1&&(a.a=a.i-a.f-a.r-1);return -1}++a.b;b=Ese(a.k,a.i++);if(a.e>=0){if(a.e==13&&b==10){a.e=10;continue}a.e=-1;a.f=a.i-1;++a.g}if(b<=127){if(b==10||b==13){a.e=b;b=10}}else{p7d();if(b>127){continue}if(LCd(b)){a.e=b;b=10}}a.a==-1&&(a.a=a.i-a.f-a.r-1);return b}} +function pLb(a,b){var c,d,e,f,g;e=null;!!b.b&&(e=b.b.Lm());g=null;for(c=b,f=b;!(SCc(c)&&CLb(c.e,e));c=c.e){if(c.j==(h7d(),X6d)&&(HAc(),kf(c.j==X6d),O1d(c,3))&&(c.b?c.b.f:null)!=g){f==b?mLb(a,f,(IMb(),HMb),c.b?c.b.f:null):dk(a.g,f,wLb(c.b?c.b.f:null));f=c}Af(!!c.e,'Cannot find continue target.');g=c}d=c;c.j==(h7d(),o5d)&&(d=x1d(c,2));f==b?mLb(a,b,(IMb(),HMb),d):dk(a.g,f,d)} +function Yed(a){var b,c,d,e,f,g,h,i,j,k,l;h=(aB(),new RDe);for(d=(j=(new nve(a.a)).a.ke().$d(),new sve(j));d.a.Pd();){c=(e=rL(d.a.Qd(),12),rL(e.te(),389));l=_ed(a,c);b=rL(NDe(h,l),89);if(!b){b=(Qq(),new vv);ODe(h,l,b)}sv(b,c.a)}k=(lr(),new Fu);for(g=(i=(new nve(h)).a.ke().$d(),new sve(i));g.a.Pd();){f=(e=rL(g.a.Qd(),12),rL(e.te(),89));Du(k,Ys(new lxe(f.a)))}return ur(k.a)} +function RH(a){OH();var b,c,d,e;if(wL(tf(a)).length==0){return null}e=a.charCodeAt(0)==45;d=e?1:0;if(d==a.length){return null}c=QH(Ese(a,d++));if(c<0||c>=10){return null}b=-c;while(d=10||Kib(b,{l:3355444,m:838860,h:996147})){return null}b=Mib(b,10);if(Kib(b,Bib(bMe,c))){return null}b=Qib(b,c)}return e?kse(b):Gib(b,bMe)?null:kse(Nib(b))} +function jI(a,b,c){var d;switch(c){case 1:d=new nI(b[0]+a.c);a.c=d.e;return d;case 4:d=new tI(b[0]+a.c,b[1]+a.f,b[2]+a.g,b[3]+a.e);a.c=d.e;a.f=d.eg();a.g=d.fg();a.e=d.dg();return d;case 5:d=new yI(b[0]+a.c,b[1]+a.f,b[2]+a.g,b[3]+a.e,b[4]+a.d);a.c=d.e;a.f=d.eg();a.g=d.fg();a.e=d.dg();a.d=d.cg();return d;default:throw Aib(new tJ('Unexpected number of values for entry:'+c));}} +function eGb(a){var b,c,d,e,f;(new yue(a.K.a)).a.clear();for(e=new lxe(a.u);e.a'}else if(!(c!=null&&Z1d(g,c,c.length))){Xzc(a,g,bhd,GK(yK(fgb,1),pKe,2,6,[]));return true}e=!!d&&d.a.j==h5d;if(f&&!e){Xzc(a,g,jhd,GK(yK(fgb,1),pKe,2,6,[c]));return true}return false} +function wpd(a,b,c,d,e,f){var g,h,i;if(!(!b.d?null:b.d.a)){return null}if((b.a&2)==0){OCe(a.i,Rnc(d,Yod,GK(yK(fgb,1),pKe,2,6,[c])));return null}g=(!b.d?null:b.d.a).a;h=Bpd(a,g,f,e);i=h.kl()==2&&h.nl().size()==1?rL(Uw(h.nl().$d()),25).d:null;if(!!i&&i.a.g==0){return i}if(!i){return vpd(a,g,c,d,h,f)}else{zf(i.a.g!=0);OCe(a.i,Rnc(d,Qod,GK(yK(fgb,1),pKe,2,6,[IMe,c])))}return null} +function IRd(a,b,c){var d,e,f,g,h,i,j,k;j=c;k=a.b.p;h=a.b.n;d=ite(b);if(h>=0){d=d0&&(k=nse(ite(b),k));if(d>=k){return b}e=32;a.b.k?a.b.b==100?(e=48):(e=48):(j=0);f=CK(LL,qKe,17,k-d,15,1);Dxe(f,f.length,e);g=a.b.f;i=zL(b,23)?rL(b,23):new Bte(b);g?(i.a+=mte(f,0,f.length),i):yte(i,j,mte(f,0,f.length));return i} +function Hrb(a,b,c){var d,e,f,g,h,i,j,k;h=rL(F1d(c,29),11);if(!h){return}if(Crb(c)){for(e=PZd(h).$d();e.Pd();){d=rL(e.Qd(),56);i=new $rb(d);Jrb(a,b,c,d.a,true,i)}!!(!h.d?null:h.d.a)&&Irb(a,b,c,!h.d?null:h.d.a);for(g=LZd(h).$d();g.Pd();){f=rL(g.Qd(),56);i=new $rb(f);Jrb(a,b,c,f.a,true,i)}}for(k=new lxe(b$d(h));k.a1&&e.length==c-f&&Use(e,false,0,b,f,c-f)&&Z1d(a.b,b,f-1);default:return false;}} +function xK(a,b){var c;switch(zK(a)){case 6:return EL(b);case 7:return BL(b);case 8:return AL(b);case 3:return Array.isArray(b)&&(c=zK(b),!(c>=14&&c<=16));case 11:return b!=null&&typeof b===aKe;case 12:return b!=null&&FL(b);case 0:return qL(b,a.__elementTypeId$);case 2:return GL(b)&&!(b.Po===hjb);case 1:return GL(b)&&!(b.Po===hjb)||qL(b,a.__elementTypeId$);default:return true;}} +function aJd(a,b){var c,d,e,f,g;e=!b?eKd(a.g,0).b.b:b.o.b;f=nHd(a);c=(lr(),new Fu);Du(c,new TQd(f.b,f));if(f.c==(XMd(),YLd)){return new SQd(new qRd(e,a.f),b,ur(c.a))}d=oHd(a,1);Du(c,new UQd(d.o,d));while(!a.c.d){f=(g=bKd(a.g),a.f=g.b.a,g);if(f.c==xLd||f.c==sLd){break}Du(c,new TQd(f.b,f));if(f.c==IMd){break}d=oHd(a,1);Du(c,new UQd(d.o,d))}return new SQd(new qRd(e,a.f),b,ur(c.a))} +function ZPb(a,b,c,d){var e,f,g,h,i;h=(jye(),new qze(new nve(c.d)));for(f=new Gze(h.b.$d());f.b.Pd();){e=rL(f.b.Qd(),87);i=rL(e.ug(),183);g=rL(e.te(),5);if(!g){continue}switch(g.j.g){case 66:case 70:case 71:XPb(a,b,jBc(g),i,d);continue;case 72:case 73:case 101:g.j==(h7d(),o5d)&&XPb(a,b,jBc(g),i,d);continue;case 67:case 68:case 0:!!g.b&&XPb(a,b,g.b,i,d);continue;}YPb(a,b,g,g,i,d)}} +function a3b(){a3b=cjb;_2b=new Q_b('JSC_DYNAMIC_EXTENDS_TYPE',(prb(),mrb),new _te('The class in an extends clause must be a qualified name.'));Z2b=new Q_b('CLASS_REASSIGNMENT',mrb,new _te('Class names defined inside a function cannot be reassigned.'));$2b=new Q_b('CONFLICTING_GETTER_SETTER_TYPE',mrb,new _te("The types of the getter and setter for property ''{0}'' do not match."))} +function E6b(a,b,c,d){var e,f,g,h,i,j,k,l;h=rL(F1d(c,51),28);!!h&&h.lk()||DGb(a.a,Rnc(c,g6b,GK(yK(fgb,1),pKe,2,6,[])));i=c;l=d;j=d.j==(h7d(),j5d);if(j){i=d;l=d.e}for(g=(!c.b?(jye(),jye(),iye):new F3d(c.b)).$d();g.Pd();){f=rL(g.Qd(),5);if(f.j==S4d){e=c1d(rL(F1d(f,29),11));S_d(e);A2d(f,b7d);n2d(f,F_d(e,false))}k=u1d(f);j&&k.j!=m5d&&(k=H2d(new P2d(j5d,k),d));k1d(l,k,i)}u1d(i);Yzc(b)} +function Oyc(a,b,c,d,e,f,g){var h,i,j;if(!!d&&(j=d.kl()==2&&d.nl().size()==1?rL(Uw(d.nl().$d()),25):null,!!j&&!!j.e||d.kl()==2&&d.nl().size()==1&&!!Msd(d.kl()==2&&d.nl().size()==1?rL(Uw(d.nl().$d()),25):null))){return false}i=!!e&&-1==e.kl()&&(-1!=f.kl()||cDc(a.A,c));h=!e||eKe==e.kl();return (h||i)&&(b==null||atc(a.C,b)||jtc(a.C,b))&&Sld(g,false,f,new bvd((rrd(),rrd(),qrd)),null)} +function KBc(a){HAc();switch(a.j.g){case 48:return h7d(),D4d;case 49:return h7d(),E4d;case 50:return h7d(),B4d;case 51:return h7d(),U5d;case 52:return h7d(),E6d;case 53:return h7d(),a7d;case 54:return h7d(),f4d;case 55:return h7d(),O6d;case 56:return h7d(),$5d;case 59:return h7d(),i5d;case 57:return h7d(),_4d;case 58:return h7d(),Y5d;}throw Aib(new ooc('Not an assignment op:'+a))} +function H5c(a,b,c,d,e,f){var g,h,i;if(!d.sn()&&!c.Bn(d)){i=(g=zL(e.k,9)?rL(e.k,9):null,!g?T5c(a,(Lhe(),Hhe)):g);if(i.pn()){h=(zL(i,24)?rL(i,24):null).co();if(h.i==(Bfe(),zfe)&&!!c.On()&&!!d.On()){return true}}V5c(a,b,'assignment to property '+f+' of '+uie(a.g,e,true),c,d);return false}else if(!d.sn()&&!c.Cn(d,new oge(false),(xge(),wge))){m4c(a.c,b,c,d);n4c(a.d,b,c,d)}return true} +function PK(a,b,c,d,e,f){var g,h,i,j,k,l,m;j=SK(b)-SK(a);g=aL(b,j);i=LK(0,0,0);while(j>=0){h=VK(a,g);if(h){j<22?(i.l|=1<>>1;g.m=k>>>1|(l&1)<<21;g.l=m>>>1|(k&1)<<21;--j}c&&RK(i);if(f){if(d){IK=_K(a);e&&(IK=dL(IK,(mL(),kL)))}else{IK=LK(a.l,a.m,a.h)}}return i} +function I0b(){I0b=cjb;F0b=new Q_b('JSC_INVALIDATION',(prb(),nrb),new _te('Property disambiguator skipping all instances of property {0} because of type {1} node {2}. {3}'));G0b=new Q_b('JSC_INVALIDATION_TYPE',nrb,new _te('Property disambiguator skipping instances of property {0} on type {1}. {2}'));H0b=new Q_b('JSC_INVALID_RENAME_FUNCTION',mrb,new _te('{0} call is invalid: {1}'))} +function xpd(a,b,c,d){var e,f,g;g=b.Lm();switch(g){case bKe:jpd(a,b);return a.a.a;case kKe:jpd(a,b);return a.a.j;case cKe:jpd(a,b);return a.a.q;case dKe:jpd(a,b);return a.a.t;case mMe:case dPe:jpd(a,b);return a.a.B;case gNe:jpd(a,b);return Hpd(a,yqd(a.a));case DKe:{if(b.b){e=a.a.V;if(!e){return a.a.G}f=ypd(a,e,b,c,d)}else{f=a.a.ib}return Tnd(a.a.j,f)}default:return Gpd(a,g,b,c,d);}} +function Tg(a){var b,c,d,e;c=a.c;while(a.c!=-1){e=c;d=a.fe(a.c);if(d==-1){b=a.e.length;a.c=-1}else{b=d;a.c=a.ee(d)}if(a.c==c){++a.c;a.c>=a.e.length&&(a.c=-1);continue}while(ee&&a.f.Vd(Ese(a.e,b-1))){--b}if(a.d&&e==b){c=a.c;continue}if(a.b==1){b=a.e.length;a.c=-1;while(b>e&&a.f.Vd(Ese(a.e,b-1))){--b}}else{--a.b}return _se(a.e,e,b)}return a.i=2,null} +function oH(a,b,c){var d,e,f,g,h,i;tf(c);if(b==0){throw Aib(new qqe('/ by zero'))}f=a/b|0;h=a-b*f;if(h==0){return f}i=1|(a^b)>>31;switch(c.g){case 7:sH(h==0);case 1:g=false;break;case 0:g=true;break;case 2:g=i>0;break;case 3:g=i<0;break;case 6:case 5:case 4:d=h<0?-h:h;e=d-((b<0?-b:b)-d);e==0?(g=c==(Rte(),Ote)||c==Nte&(f&1)!=0):(g=e>0);break;default:throw Aib(new zqe);}return g?f+i:f} +function ROb(a,b,c){var d,e,f,g,h;if(!c||RCc(c,true)||c.j==(h7d(),r5d)){return true}else if(c.j==(h7d(),I4d)){e=rL(tf(c.b),5);return e.j==_5d&&Jse(e.Lm(),$Qe)}else if(c.j==j4d||c.j==m6d){f=c.j==m6d;for(d=c.b;d;d=d.d){if(!ROb(a,b,f?d.b:d)){return false}}return true}else if(c.j==_5d){h=b._j(c.Lm());if(!!h&&h.gk()){g=rL(NDe(a.c,h),151);if(!!g&&_Qc(g)&&WQc(g)){return true}}}return false} +function izd(a,b){var c,d,e,f,g,h,i,j;Ryd(a,b,(BFd(),REd));h=MAd(a,b.d,b);Nyd(a,h,b.b);j=NAd(a,b.e,b);g=LAd(a,(h7d(),C5d),b.c);c=Vxd(a.a,O4d);W2d(c.i)==-1&&jyd(c,b.o.b,b.o.a);for(e=b.a.$d();e.Pd();){d=rL(e.Qd(),18);(d.p==(GQd(),TPd)||d.p==mPd)&&Uyd(a,d,jFd);l1d(c,lyd(a.a,d))}f=Yxd(a.a,N4d,h,j,c);if(g.j!=c5d){Uyd(a,b,dFd);i=f2d(f,f.g,82);i!=f.g&&(f.g=i);f.g=new A3d(82,g,f.g)}return f} +function RCc(a,b){HAc();var c,d,e;switch(a.j.g){case 92:return RCc(a.b,b);case 42:for(d=a.b;d;d=d.d){if(d.j!=(h7d(),c5d)&&!RCc(d,b)){return false}}return true;case 38:for(e=a.b;e;e=e.d){if(!RCc(e,b)){return false}}return true;case 43:for(c=a.b;c;c=c.d){if(!RCc(c.b,b)){return false}}return true;case 65:return b&&!(a.j==(h7d(),r5d)&&qCc(a.e)&&a.j==r5d&&hDc(a.b));default:return LCc(a);}} +function onc(a,b){var c,d,e,f;if(!b.b||b.b.j!=(h7d(),r5d)){return false}f=b.b;if(!f.b||(f.b?f.b.f:null).j!=(h7d(),F4d)||f.b.d.j!=(h7d(),r6d)){return false}if(!M1d(f.b.d)){return false}e=f.b?f.b.f:null;if(!e.b||e.b.j!=(h7d(),m5d)||e.b.b.j!=(h7d(),Q4d)){return false}d=e.b.b;if(y1d(d)!=2||d.b.d.j!=(h7d(),m4d)){return false}c=d.b.b;if(!Z1d(c,a+PTe,(a+PTe).length)){return false}return true} +function Jsc(a,b){var c,d,e;kf(b.indexOf('.')==-1);if(Jse(pNe,b)){d=a.c;if(!(!!d&&!!(d.c?d.c:d.e))){return null}return Xid(a.d)}c=Lsc(a,b,false);if(c){if(c.e){Ef(0!=c.e.kl(),'%s was bottom',b);return c.e}e=c.a;if(e){wf(e.c,'decl=%s, funScope=%s',c,e);return $pd(a.a,_id(e.c))}zf(!c.d);return null}if(Jse(b,a.q)&&!ctc(a.t,b)){return $pd(a.a,_id(a.c))}if(a.t){return Jsc(a.t,b)}return null} +function Bcc(a,b){var c,d,e,f,g,h,i,j;for(i=(g=b.c.a,g?!g.b?(jye(),jye(),iye):new F3d(g.b):(jye(),jye(),iye)).$d();i.Pd();){h=rL(i.Qd(),5);Fcc(a,zL(h.k,9)?rL(h.k,9):null)}Fcc(a,b.c.b);if(b.i==(Bfe(),zfe)){for(d=b.d.$d();d.Pd();){c=rL(d.Qd(),24);Yye(a.a,c)&&c.Vn(a)}}if(b.Nl()){for(f=b.e.$d();f.Pd();){e=rL(f.Qd(),24);Yye(a.a,e)&&e.Vn(a)}j=aee(b).ao();!!j&&Yye(a.a,j)&&j.Vn(a)}return a.b.b} +function dBc(a){HAc();switch(a.j.g){case 1:return h7d(),p4d;case 2:return h7d(),q4d;case 3:return h7d(),o4d;case 10:return h7d(),t4d;case 11:return h7d(),w4d;case 12:return h7d(),y4d;case 13:return h7d(),n4d;case 14:return h7d(),x4d;case 15:return h7d(),v4d;case 18:return h7d(),s4d;case 16:return h7d(),r4d;case 17:return h7d(),u4d;default:throw Aib(new Ire('Unexpected operator: '+a));}} +function FPc(a){var b,c,d,e,f,g,h,i;i=new hQc;i.a|=4;i.a|=2;i.a|=32;i.b=ZLb(a.i,i);for(h=(f=jZb(a.c).a.ke().$d(),new sve(f));h.a.Pd();){g=(c=rL(h.a.Qd(),12),rL(c.te(),268));b=g.a;if(b.Ai()){d=b.Ai();lf(d.j==(h7d(),x5d)||d.j==_5d,d);e=nZb(d);tf(e);if(MPc(b.Bi())){EPc(a,g,e)}else{if(gue(a.e,e)){rL(fue(a.e,e),181).a|=4;rL(fue(a.e,e),181).a|=2;rL(fue(a.e,e),181).a|=32}else{iue(a.e,e,i)}}}}} +function ekd(a,b){var c,d,e,f,g,h,i;zf(!a.n.a.isEmpty());if(b.isEmpty()){return a}c=new cld(a.a);for(g=a.i.$d();g.Pd();){f=rL(g.Qd(),20);Wkd(c,emd(f,b))}for(e=a.e.$d();e.Pd();){d=rL(e.Qd(),20);Skd(c,emd(d,b))}!!a.j&&Ykd(c,emd(a.j,b));Zkd(c,emd(a.k,b));a.c&&(c.c=true,c);Rkd(c,Hkd(a.d,b));Vkd(c,Hkd(a.g,b));for(i=a.f.Gf().$d();i.Pd();){h=wL(i.Qd());Tkd(c,h,rL(a.f.get(h),20))}return bld(c)} +function NRd(a){var b,c;if(a.a==null){return IRd(a,kKe,0)}if(zL(a.a,119)){return IRd(a,kte(a.a),0)}else if(zL(a.a,95)){b=Dre(rL(a.a,271));if(!(b>=0&&b<=dMe)){throw Aib(new yRd(b))}c=b=0&&b<=dMe),b>=rKe?GK(yK(LL,1),qKe,17,15,[sKe+(b-rKe>>10&tKe)&uKe,vKe+(b-rKe&tKe)&uKe]):GK(yK(LL,1),qKe,17,15,[b&uKe])));return IRd(a,c,0)}else{throw Aib(FRd(a))}} +function Tdc(a,b,c,d,e,f,g,h){var i,j,k,l,m,n;if(Wdc(a,b,c,d,e,f)){return}j=Pdc(a,f,h);j.t=g;k=new Fec(b,c,d,j,(Pec(),Nec),a.a.b++);$dc(j,k);if(e.j==(h7d(),m4d)&&e.e.j!=m5d){i=new Fec(b,c,d,j,Iec,a.a.b++);$dc(j,i);Gec(k,i)}else (l=PBc(d),m=(HAc(),n=eBc(d),!n?null:rL(F1d(n,29),11)),!!m&&!!l&&((m.a&2)!=0&&l.j==r5d||((m.a&512)!=0||(m.a&iNe)!=0)&&l.j==r5d||(m.a&hNe)==UQe&&l.j==m6d))&&jec(j)} +function Ysd(a,b){var c,d,e,f,g;tf(a.e);if(a==b||!!b.e||!Krd(b.d,qqd(a.a))){return a}f=rtd(b);if(!f){return a}d=Nsd(b,f);g=(e=Ksd(a,f),!!e&&(f.a.size()==1||$ld(e.d,(kf(f.a.size()!=1),new jud(f.a.Bf(1,f.a.size())))))?Nsd(a,f):null);c=!g?null:cmd(g,d);if(!!g&&Tld(g)&&0!=c.kl()&&Rld(c,g,new bvd((rrd(),rrd(),qrd)))&&!Rld(g,c,new bvd((rrd(),rrd(),qrd)))){return dtd(a,f,c,false,false)}return a} +function X7b(a,b,c,d){var e,f,g;if(b.indexOf('.')!=-1){f=ODc(a.d.b,b);c.j==(h7d(),c5d)?(e=(HAc(),H2d((Af(NYd(f),f),new P2d(m5d,f)),f))):(e=KDc(lYd(f,c)))}else{c.j==(h7d(),c5d)?(e=xYd((Ef(Ose(b,hte(46))==-1,xMe,b),new T3d(_5d,b)),b7d)):(e=SDc(b,c))}if(d){if(e.j==(h7d(),m5d)){n2d(e.b,d)}else{zf(e.j==b7d);g=f2d(e,e.g,29);g!=e.g&&(e.g=g);!!d&&(e.g=new A3d(29,d,e.g))}}l1d(a.d.g,e);OCe(a.d.a,b)} +function mcc(a,b){var c;c=(A7d(),!b?null:zL(b,24)?rL(b,24):null);if(!c){Xbc(a.a,(E1c(),W0c),GK(yK(fgb,1),pKe,2,6,[a.a.i]));return false}else if(c.sn()||c.qn()||c.rn()||qie(c.F,(Lhe(),Zge))==c){Ybc(a.a,(Gbc(),zbc),GK(yK(fgb,1),pKe,2,6,[pTe,a.a.i]));return false}else if(c.lm()){if(_bc(c)){return true}else{Ybc(a.a,(Gbc(),zbc),GK(yK(fgb,1),pKe,2,6,[pTe,a.a.i]));return false}}else{return true}} +function pTc(a,b,c){var d,e,f,g;a.e=PAc(a.d,b);lue(a.o);a.b=new zte;lAc(a.d,c,new ITc(a));ie(a.v,a.e);g=new IHe(gTc);ie(g,new nve(a.c));a.w&&vYc(new wYc(a.d,a.c,g,a.s),c);jTc(a,g);for(f=new lxe(a.f);f.a=b.a.length){g=new OGc(c,false);b.a[b.a.length]=g}else{g=(vJe(f,b.a.length),rL(b.a[f],260));if(g.d){h=g.a;c.Mm(h,false,true,false,false)?(d=true):(g.d=false)}}g.c||NGc(g,(HAc(),OAc(c,false,a.a)));g.b||MGc(g,(HAc(),e=(jye(),jye(),iye),MAc(c,e,null)));++f}for(;f>>16<<24>>24;if(f>>8&255)<<24>>24;if(f>24}}}return d} +function upd(a,b,c,d,e){var f,g,h,i,j,k;f=(Qq(),new vv);for(k=(e?PZd(b):LZd(b)).$d();k.Pd();){j=rL(k.Qd(),56);g=j.a;h=Bpd(a,g,c,d);i=h.kl()==2&&h.nl().size()==1?rL(Uw(h.nl().$d()),25).d:null;!!i&&i.a.g!=0?(Vcd(f.a,tf(i)),f):e?OCe(a.i,Rnc(g,$od,GK(yK(fgb,1),pKe,2,6,[ild(h,new zte,(evd(),dvd)).a]))):OCe(a.i,Rnc(g,Wod,GK(yK(fgb,1),pKe,2,6,[ild(h,new zte,(evd(),dvd)).a])))}return Ys(new lxe(f.a))} +function _Rd(a,b){var c,d,e;e=a.b;c=a.b=48&&c<=57){d=$Rd(a);if((a.bd-1?0:d-1}else{if(c==48){a.b=e}else{return cSd(a,b,d)}}}else if(c==60){b.a=-2;YRd(a)}while(hSd(b,a.b=48&&c<=57?cSd(a,b,$Rd(a)):c==46?bSd(a,b):aSd(a,b)} +function Are(a,b){var c,d,e,f,g;if(a==null){throw Aib(new zse(kKe))}if(b<2||b>36){throw Aib(new zse('radix '+b+' out of range'))}e=a.length;f=e>0&&(a.charCodeAt(0)==45||a.charCodeAt(0)==43)?1:0;for(c=f;ceKe){throw Aib(new zse(jKe+a+'"'))}return g} +function Zse(a,b,c){var d,e,f,g,h,i,j;d=new RegExp(b,'g');i=CK(fgb,pKe,2,0,6,1);e=0;j=a;g=null;while(true){h=d.exec(j);if(h==null||j==''||e==c-1&&c>0){i[e]=j;break}else{i[e]=bte(j,0,h.index);j=bte(j,h.index+h[0].length,j.length);d.lastIndex=0;if(g==j){i[e]=j.substr(0,1);j=j.substr(1)}g=j;++e}}if(c==0&&a.length>0){f=i.length;while(f>0&&i[f-1]==''){--f}f0){f=(a.b?a.b.f:null).j==C6d;if(f){jbc(a,b);--j}if(j>0){nbc(a,null,b,c);h=H2d((zf(c.length!=0),new T3d(P5d,c)),a);g=H2d((zf(h.j==P5d),zf(OYd(a)),new R2d(O5d,h,a)),a);i=H2d((e=new N2d(F4d),e),a);l1d(i,g);k=i}}d&&!f&&b!=null&&(kf(a.j==F4d),l=RDc(a),m=kbc(b,l),K2d(m,a),l1d(a,m),undefined);return k} +function kmd(a,b,c,d,e){var f,g,h,i,j;pf(!Tld(b),'Expected non-union type but found: %s',b);if(b.kl()==4&&b.gl().size()==1){f=b.kl()==4&&b.gl().size()==1?yjd(rL(Uw(b.gl().$d()),100)):null;return kmd(a,f,c,d,e)}if(b.kl()==2&&b.nl().size()==1){g=b.kl()==2&&b.nl().size()==1?rL(Uw(b.nl().$d()),25):null;h=false;for(j=a.nl().$d();j.Pd();){i=rL(j.Qd(),25);atd(i,g,c,d,e)&&(h=true)}return h}return false} +function lmd(a,b,c,d,e){var f,g,h,i,j,k;if(eKe==b.kl()){k=a.Dl();k!=null&&c.contains(k)&&jod(d,k,b);return true}f=new RCe;for(i=Eld(b).$d();i.Pd();){h=rL(i.Qd(),20);if(Rld(h,a,new bvd((rrd(),rrd(),qrd)))){continue}h=8==h.kl()||16==h.kl()?h.e.a:h;kmd(a,h,c,d,e)||(g=f.a.put(h,f),g==null)}if(f.a.size()==0){return true}j=a.Dl();if(j!=null&&c.contains(j)){jod(d,j,Und(a.e,f));return true}return false} +function Uyb(a,b,c){var d,e,f;e=c.b?c.b.f:null;if(e.j!=(h7d(),L6d)){Xzc(b,e,uyb,GK(yK(fgb,1),pKe,2,6,[]));return}d=e.Lm();a.b.i&&Xzc(b,e,tyb,GK(yK(fgb,1),pKe,2,6,[]));Bzb(a.f,d)&&Xzc(b,c,cyb,GK(yK(fgb,1),pKe,2,6,[d]));OCe(a.f.b,d);dk(a.f.a,(HAc(),nBc(c,new vEc(F6d))),d);f=Qz(Ig(Pg((Ac(),new ld(46))),d));while(f.b!=0){OCe(a.c,Wd(new _d(String.fromCharCode(46)),DEe(f,0)));tJe(f.b!=0);JEe(f,f.c.b)}} +function NCc(a){HAc();var b;switch(a.j.g){case 29:case 26:case 27:case 91:break;default:return false;}b=a.e;if(!b){return false}switch(b.j.g){case 106:return (b.b?b.b.f:null)==a;case 76:case 100:case 88:case 112:case 45:case 104:case 63:case 64:case 78:return true;case 96:case 65:case 118:case 72:case 73:case 101:return b.b==a;case 94:case 93:case 91:return QCc(a);default:return $Bc(b)&&b.b==a;}} +function SF(a,b,c,d,e){var f,g,h;f=b.sf(c,a.b);if(f<0){g=a.e;if(!g){e[0]=0;return d>0?FF(a,c,d):a}a.e=SF(g,b,c,d,e);d==0&&e[0]!=0?--a.a:d>0&&e[0]==0&&++a.a;a.j=Bib(a.j,d-e[0]);return LF(a)}else if(f>0){h=a.g;if(!h){e[0]=0;return d>0?GF(a,c,d):a}a.g=SF(h,b,c,d,e);d==0&&e[0]!=0?--a.a:d>0&&e[0]==0&&++a.a;a.j=Bib(a.j,d-e[0]);return LF(a)}e[0]=a.c;if(d==0){return KF(a)}a.j=Bib(a.j,d-a.c);a.c=d;return a} +function B6b(a,b,c,d){var e,f,g,h,i,j;i=rL(F1d(c,78),75);g=!!i;c.j==(h7d(),A6d)&&g?(i=new P2d(b5d,q6b(a,d2d(i)))):c.j==X5d?!!i&&(i=A6b(a,c,i)):(i=z6b(a,c,i));if(!i){return}e=c1d(rL(F1d(d,29),11));j=new f1d(i,(f=rL(F1d(c,51),28),!f?null:f.ji()));switch(c.j.g){case 65:K0d(e,j);break;case 156:S0d(e,j);break;default:S0d(e,j);e.a.e=true;}n2d(d,F_d(e,false));if(g){h=f2d(c,c.g,78);h!=c.g&&(c.g=h);Yzc(b)}} +function Ugc(a,b){var c,d,e,f;c=rL(F1d(b,51),28);if(!!c&&c.lk()){hzc(a.c.g,Rnc(b,(Yfc(),zfc),GK(yK(fgb,1),pKe,2,6,[(lf(T1d(b)||b.j==(h7d(),M6d),b),T1d(b)?G1d(b):b.Lm())])));return null}e=PBc(b);f=jhc(a,e);d=b.j==(h7d(),_5d)&&b.e.j==b7d&&!_sc(a.a,b.Lm());if((!f||eKe==f.kl())&&!d){hzc(a.c.g,Rnc(b,(Yfc(),zfc),GK(yK(fgb,1),pKe,2,6,[(lf(T1d(b)||b.j==M6d,b),T1d(b)?G1d(b):b.Lm())])));return null}return f} +function wQc(a){qQc();var b;b=a.e;if(b.j==(h7d(),N4d)&&a!=b.b){return false}if(!b.e){return false}if(VCc(b.e)&&a==b.b.d){return false}if(b.j==$4d||b.j==n6d||b.j==k4d||b.j==M6d&&b.e.j==n6d||b.j==R4d&&b.e.j==n6d&&a==(b.b?b.b.f:null)||b.j==Y4d&&a==b.b){return wQc(b)}if(b.j==D5d){return true}if(b.j==E5d&&a==(b.b?b.b.f:null)){return true}if(b.j==r5d&&B1d(b,60)!=0){return a==b.b}return pQc.contains(b.j)} +function Ugd(){Ugd=cjb;Tgd=new Q_b('JSC_NON_DECLARATION_STATEMENT_IN_RECORD',(prb(),nrb),new _te('@record functions should not contain statements other than field declarations'));Rgd=new Q_b('JSC_INTERFACE_FUNCTION_NOT_EMPTY',nrb,new _te('interface functions must have an empty body'));Sgd=new Q_b('JSC_INTERFACE_SHOULD_NOT_TAKE_ARGS',nrb,new _te('Interface functions should not take any arguments'))} +function Tjb(a,b){var c,d,e,f,g;g=new Qwe((b.e||Cdc(b),b.f));while(g.b!=g.c){c=rL(Jwe(g),139);if(c.t==(xec(),tec)||c.t==wec){continue}if(!c.j&&c.i==1&&c.n==0&&c.a>0){f=new kdd(!c.r?(lr(),lr(),kr):c.r);for(e=new lxe(f);e.a0||(c.a&hNe)==mKe||!!c.g||(c.a&2)!=0||(c.a&512)!=0||(c.a&iNe)!=0||(c.a&jNe)!=0){d=G1d(b);e=v7c(a,null,d,c,b)}}}return e} +function Atd(a,b){var c,d,e,f,g,h,i,j;if(a==a.a.jb||b==b.a.jb){return a.a.jb}if(Fsd(a,b)){return a}if(!!Msd(a)&&!!Msd(b)){return Atd(Qrd(a.d),Qrd(b.d))}h=a.d;i=b.d;zf(Uud(h.a,i.a)||Uud(i.a,h.a));c=a.a;e=a.c||b.c;d=Akd(a.b,b.b);if(e){d=!d?null:rkd(d);j=Ctd(a.g,b.g)}else{j=Btd(a.g,b.g,h,i)}f=nsd(h,i);Sud(f.a)&&!!d&&(e?(f=fqd(a.a)):(d=null));g=nFe(a.e,b.e)?a.e:null;return Ftd(c,f,j,d,g,e,zsd(a.f,b.f))} +function qee(a,b,c){var d,e,f,g,h,i;tf(b);if(D7d(a,b,0,new lge(true))){return a}if(a.i==(Bfe(),Afe)&&b.i==Afe&&!hae(a.c)&&!hae(b.c)){f=a.Bn(b);g=b.Bn(a);if(f&&!g){return c?b:a}else if(g&&!f){return c?a:b}i=ree(a,b,c);if(i){return i}}d=sie(a.F,(Lhe(),Rge));if(D7d(d,b,0,new lge(true))){return c?b:a}else if(D7d(d,a,0,new lge(true))){return c?a:b}e=rL(sie(a.F,Fhe),68);h=rL(sie(a.F,Zge),68);return c?e:h} +function Xae(a,b,c,d){var e,f,g,h,i,j,k;if(!!a.Sn()&&Cne(a.Sn(),b)){return fne(a.cn(),b.cn(),c,d,(xge(),wge))}k=jge(d,a,b);if(k){return k.a}i=abe(a);j=abe(b);if(!Bl(j,i)){kge(d,a,b,(sge(),qge));return false}for(h=(f=(new ewe(i.a)).a.ke().b.Ho(),new kwe(f));h.a.Pd();){g=(e=rL(h.a.Qd(),12),wL(e.se()));if(!D7d(b.fo(g),a.fo(g),c,d)){kge(d,a,b,(sge(),qge));return false}}kge(d,a,b,(sge(),pge));return true} +function MF(a,b,c,d,e){var f,g,h;f=b.sf(c,a.b);if(f<0){g=a.e;if(!g){e[0]=0;return a}a.e=MF(g,b,c,d,e);if(e[0]>0){if(d>=e[0]){--a.a;a.j=Qib(a.j,e[0])}else{a.j=Qib(a.j,d)}}return e[0]==0?a:LF(a)}else if(f>0){h=a.g;if(!h){e[0]=0;return a}a.g=MF(h,b,c,d,e);if(e[0]>0){if(d>=e[0]){--a.a;a.j=Qib(a.j,e[0])}else{a.j=Qib(a.j,d)}}return LF(a)}e[0]=a.c;if(d>=a.c){return KF(a)}else{a.c-=d;a.j=Qib(a.j,d);return a}} +function mRb(a){var b,c;b=new idd;a.Fc.Eb&&Vcd(b,a.Bb);Xcd(b,lRb(a));(a.Fc.Db||a.Fc.Fb)&&Vcd(b,a.zb);a.Fc.Hb&&Vcd(b,a.Ab);c=a.Fc.hc||a.Fc.ic||a.Fc.jc;if(a.Fc.Rc||a.Fc.Oc){if(a.Fc.X){Vcd(b,a.ab);!a.Fc.qc&&Vcd(b,a.bb)}c||Vcd(b,new NTb(a,CQe,false,false))}if(c){Vcd(b,a._b);a.Fc.hc&&Vcd(b,new NTb(a,'removeUnusedVars_afterOptimizeCalls',false,true))}if(OJb(a.Fc.Tb)){Vcd(b,a.Jb);Vcd(b,a.Ib)}tRb(b);return b} +function zJc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;if(a.a){return b}kf(b.j==(h7d(),I4d));kf(c.j==L6d);l=null;n=c.Lm();j=n.length+1;if(d){if(d.j==L6d){l=d.Lm()}else if(d.j!=i6d){return b}e=d.d;if(e){if(e.j==k6d){j=ose(IL(e.Km()),j);if(j<0){return b}}else{return b}}}m=pJc(n,l,j);f=jYd(GK(yK(veb,1),MMe,5,0,[]));for(h=0,i=m.length;h0&&(u+=t*2+(t-1)),g&&(u+=10),u);m=h*p;k=$9b(c,e,0);j=$9b(c,e,1);return Z9b(c,m,r,k,q,j,f)} +function Zid(a,b){var c,d,e,f,g,h,i;zf(!b.isEmpty());if(!Sqd(a.a.i,b)){for(i=Rq(a.j.a.Gf()).$d();i.Pd();){h=wL(i.Qd());zf(!b.containsKey(h))}}c=new cld(a.a);for(g=a.f.$d();g.Pd();){f=rL(g.Qd(),20);Wkd(c,!f?null:emd(f,b))}for(e=a.d.$d();e.Pd();){d=rL(e.Qd(),20);Skd(c,!d?null:emd(d,b))}!!a.g&&Ykd(c,emd(a.g,b));!!a.i&&Zkd(c,emd(a.i,b));!!a.e&&Vkd(c,emd(a.e,b));!!a.c&&Rkd(c,emd(a.c,b));$kd(c,a.j);return c} +function QHc(a,b,c,d){nHc();HAc();if(OAc(b,false,null)||OAc(c,false,null)){return Vne(),Une}switch(a.g){case 4:return THc(b,c,d);case 5:return THc(b,c,d).qo();case 36:return VHc(b,c,d);case 37:return VHc(b,c,d).qo();case 6:return UHc(b,c,d,false);case 8:return UHc(c,b,d,false);case 7:return UHc(c,b,d,true).qo();case 9:return UHc(b,c,d,true).qo();}throw Aib(new Ire('Unexpected operator for comparison'))} +function gNc(a,b,c,d){var e,f,g,h,i,j;zf(c.j==(h7d(),I4d));h=c.b;e=h.d;if(qNc(a,h,e)){i=e.Lm();if(MDe(a.i,i)){j=rL(NDe(a.i,i),174);j.c?DGb(a.a,Szc(c,BMc,GK(yK(fgb,1),pKe,2,6,[i]))):ANc(j,d,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g),true)}else{kNc(a,i,d,(g=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!g?null:g.g));ODe(a.i,i,new DNc(a,i,d,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g),true))}}} +function OAd(a,b,c){var d,e,f;for(f=mr(new yA(wL(tf(c))),0);f.b0){if(!VQb(a.a,b.charCodeAt(0))){c=CK(LL,qKe,17,a.a.length,15,1);for(d=0;d=b){g2d(f,k,RYd(c[n-b]));FGb(a.b,f)}else{i=d.b;for(g=0;g=0);kf(a!=null);if(c==0){return CK(fgb,pKe,2,0,6,1)}if(b==null){return GK(yK(fgb,1),pKe,2,6,[a])}f=new idd;if(b.length==0){for(d=0;d=0&&f.a.length=0)||!isNaN(e)&&!isFinite(e)||e>eKe){return false}g=IL(e);if(e!=g){return false}if(i+4i){while(i0&&(p=0);f.b>0&&(i=0);h=new YH(e.b+o,e.a+p);g=new YH(f.b+o,f.a+i)}l=new YI;l.d=b;l.c=d;l.b=c;l.e=h;l.a=g;if(a.b){k=a.b.e.b;j=a.b.e.a;n=l.e.b;m=l.e.a;If(n>k||n==k&&m>=j,'Incorrect source mappings order, previous : (%s,%s)\nnew : (%s,%s)',Zre(k),Zre(j),Zre(n),Zre(m))}a.b=l;Vcd(a.e,l)} +function Rbc(a,b,c){var d,e,f,g,h,i,j,k,l;if(b){d=(lr(),new Fu);g=YZd(b);h=c$d(b);if(!g.isEmpty()){for(j=g.$d();j.Pd();){i=wL(j.Qd());Du(d,new Yme(a.A,i))}}if(!h.isEmpty()){for(f=cs(h).$d();f.Pd();){e=rL(f.Qd(),12);Du(d,new Zme(a.A,wL(e.se()),rL(e.te(),5)))}}(!g.isEmpty()||!h.isEmpty())&&(a.v=ur(d.a))}k=a.v;if(c){l=c.I.d;if(!l.isEmpty()){d=(lr(),new Fu);Eu(d,a.v);su(d,l);k=ur(d.a)}}k.isEmpty()||Nie(a.A,k);return a} +function sic(a,b,c){var d,e,f,g,h,i,j;e=b.sk();d=b.rk();!!d&&(d.a&37)!=0?(g=f2d(e,e.g,65),g!=e.g&&(e.g=g),e.g=new p3d(65,1,e.g)):!!e&&e.e.j==(h7d(),S4d)?(h=f2d(e,e.g,65),h!=e.g&&(e.g=h),e.g=new p3d(65,1,e.g)):!!e&&CFb(a.a).rh(e.Lm())?(i=f2d(e,e.g,65),i!=e.g&&(e.g=i),e.g=new p3d(65,1,e.g)):!!e&&!!c&&_Qc(c)&&WQc(c)&&(j=c.a.a.length,j>0&&sQc(rL(Ycd(c.a,0),86)))&&(f=f2d(e,e.g,65),f!=e.g&&(e.g=f),e.g=new p3d(65,1,e.g))} +function L1c(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p;k=g.ao();!k?(h=(Qq(),kD(),jD)):(h=k.bo());for(m=h.$d();m.Pd();){l=wL(m.Qd());o=rL(e.get(l),24);f.put(l,g);if(o){p=g.fo(l);n=o.fo(l);if(N7d(p,n,a.i)||N7d(n,p,a.i)||!!p.On()&&!!n.On()&&fee(p.On(),n.On())){continue}DGb(a.a,Szc(c,k1c,GK(yK(fgb,1),pKe,2,6,[d,l,o.Um(new zte,false).a,g.Um(new zte,false).a])))}}for(j=g.$n().$d();j.Pd();){i=rL(j.Qd(),24);L1c(a,b,c,d,e,f,i)}} +function Phd(){Phd=cjb;Mhd=new Q_b('JSC_NULLABLE_RETURN',(prb(),nrb),new _te("This function''s return type is nullable, but it always returns a non-null value. Consider making the return type non-nullable."));Ohd=new Q_b('JSC_NULLABLE_RETURN_WITH_NAME',nrb,new _te('The return type of the function "{0}" is nullable, but it always returns a non-null value. Consider making the return type non-nullable.'));Nhd=new Yhd} +function Q7d(a,b,c){var d,e,f,g;if(c.hn()||c.lm()||c.rn()||b.hn()||b.lm()||b.rn()){return Vne(),Une}d=b.sn()||b.qn()||b.rn()||rL(sie(b.F,(Lhe(),Zge)),68)==b;e=c.sn()||c.qn()||c.rn()||rL(sie(c.F,(Lhe(),Zge)),68)==c;if(d||e){return d&&e?(Vne(),Tne):(Vne(),Une)}if(!!b.On()||!!c.On()){g=b.On()?c:b;f=g.$m(H7d(a,(Lhe(),nhe)));return f.sn()||f.qn()?(Vne(),Sne):(Vne(),Une)}if(!!c.Mn()||!!c.Tn()){return c.Ln(b)}return null} +function Tae(a,b,c){if(c.lm()||c.hn()||c.qn()||c.sn()){return Dqe(),Dqe(),true}else if(!!b.Qn()||!!c.Qn()){return Dqe(),Dqe(),true}else if(Uae(b)||Uae(c)){return Dqe(),Dqe(),true}else if(c.Mn()){return tL(b.Un(a,c.Mn().d))}else if(c.Tn()){return Dqe(),Rae(a,b,c.Tn())?true:false}else if(c.On()){return Dqe(),Qae(b,c.On())?true:false}else if(c.Sn()){return tL(b.Un(a,c.Sn().j))}return Dqe(),b.Bn(c)||c.Bn(b)?true:false} +function hkb(a,b){var c,d,e,f,g,h,i,j;g=b.length;h=g<20?g:20;j=new zte;j.a+='$$S_';i=false;for(f=0;f=48&&c<=57||c>=97&&c<=102)&&(j.a+='_',j);i=false}if(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){j.a+=String.fromCharCode(c)}else{j.a+='$';vte(j,(c>>>0).toString(16));i=true}}if(g==h){return j.a}e=RJe(b)&-1;j.a+='_';vte(j,(e>>>0).toString(16));d=j.a;OCe(a.j.i,d)||(d+='_'+a.b);return d} +function Vnb(a,b,c){var d,e,f;snb(a,(BFd(),WEd),c);Pnb((h7d(),n6d),c);for(d=c.b;d;d=d.d){switch(d.j.g){case 91:Wnb(a,b,d);break;case 94:Vnb(a,b,d);break;case 118:knb(a,b,d);break;case 114:Pnb(R4d,d);e=j7d(d.j);e!=-1&&(f=y1d(d),e!=f&&nob(PMe+e+QMe+f,d));rnb(a,d.b);(d.b?d.b.f:null).j==Y4d?knb(a,b,d.b?d.b.f:null):Dnb(a,(d.b?d.b.f:null).j,d.b?d.b.f:null);break;default:nob('Invalid object pattern child for '+b+UMe,c);}}} +function ODc(a,b){HAc();var c,d,e,f,g,h,i,j;c=Ose(b,hte(46));if(c==-1){return LDc(a,b)}f=b.substr(0,c);Jse(pNe,f)?(e=new N2d((h7d(),U6d))):Jse(YOe,f)?(e=new N2d((h7d(),P6d))):(e=LDc(a,f));do{j=c+1;c=Pse(b,hte(46),j);g=c==-1?b.substr(j):b.substr(j,c-j);h=new T3d((h7d(),L6d),g);p2d(h,g.length);CFb(a).sh(g)&&(i=f2d(h,h.g,43),i!=h.g&&(h.g=i),h.g=new p3d(43,1,h.g));d=e.c+1+g.length;e=EYd(e,h);e.c=d}while(c!=-1);return e} +function sZb(a,b){var c,d,e,f,g,h,i,j,k,l;if(AZb(b)){g=rL(NDe(a.f,b),268);if(g){e=g.a;h=e.d;if(h!=null){f=e.Ai();QCe(a.e,f);Rj(a.i,h,e);QDe(a.f,b);j=mBc(b);Rj(a.g,j,g)}}}else{l=b;if(b.j==(h7d(),x5d)){i=(b.b?b.b.f:null).Lm();(Jse(i,uRe)||Jse(i,vRe))&&(l=b.b)}h=nZb(l);if(h!=null){k=new F9c(l,null,null);Rj(a.a,h,k);Rj(a.b,mBc(l),new wZb)}}for(d=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();d.Pd();){c=rL(d.Qd(),5);sZb(a,c)}} +function r0b(a,b){var c,d,e,f,g,h;d=(b.b?b.b.f:null).Lm();h=e0b(a.a,b.b);e=d0b(a.a,d);if(!D0b(e,b.b?b.b.f:null,w0b(a,e,h,null))&&gue(a.a.i,d)){g='';if(h.jm()||h.lm()){if(b.b.j==(h7d(),U6d)){g=PRe}else{f=G1d(b.b);g=QRe+f+RRe}}else{c=new idd;v0b(a,c,h);if(c.a.length!=0){g=SRe;g+=Wd(new _d(_Je),new lxe(c))}}DGb(a.a.c,Qnc(b,rL(fue(a.a.i,d),250),(I0b(),F0b),GK(yK(fgb,1),pKe,2,6,[d,!h?kKe:gjb(h),F2d(b,true,true,true),g])))}} +function Dtd(a,b){var c,d,e,f,g,h,i,j;if(a.isEmpty()){return b}else if(b.isEmpty()){return a}j=new kdd(a);Xcd(j,b);for(d=0;d';case 5:return '[';case 7:return '{';case 9:return '(';case 2:return '<';case 17:return '?';case 14:return '|';case 6:return ']';case 8:return '}';case 10:return ')';case 15:return '*';case 18:return OOe;case 20:return '=';case 4:return a.i.n;default:throw Aib(new Ire(b.f!=null?b.f:''+b.g));}} +function vCc(a){HAc();var b;c:do{b=a.e;switch(b.j.g){case 66:case 60:case 62:case 61:if(b.b!=a){return false}continue c;case 72:case 73:if(b.j==(h7d(),p5d)){if(b.b.d!=a){return false}}else{if(b.b!=a){return false}}continue c;case 70:case 71:return false;case 44:{kf(b.j==(h7d(),X6d));if(!O1d(b,3)||(b.b?b.b.f:null)!=a){return false}}continue c;case 68:case 69:return false;case 85:case 65:break c;}}while(a=a.e);return true} +function zHc(a,b,c,d){var e,f,g,h,i,j,k;if(RCc(d,false)&&c.j==(h7d(),f4d)){f=c.b;g=f.d;if(g.j==(h7d(),L6d)){e=UBc(g);i=UBc(d);if(e!=null&&i!=null){a2d(c,f);h=e+(''+i);g2d(b,c,f);g2d(b,d,new T3d(L6d,h));GGb(a.c);return b}}}if(RCc(c,false)&&d.j==(h7d(),f4d)){j=d.b;k=d.b?d.b.f:null;if(j.j==(h7d(),L6d)){e=UBc(c);i=UBc(j);if(e!=null&&i!=null){a2d(d,k);h=e+(''+i);g2d(b,d,k);g2d(b,c,new T3d(L6d,h));GGb(a.c);return b}}}return b} +function _Mc(a,b,c){var d,e,f,g,h,i,j,k;if(!Nzc(b)){return}f=rL(F1d(c.b,29),11);e=!!f&&(d=rL(F1d(c,51),28),!!d&&d.lk()||(f.a&hNe)==lKe);if(e){if(T1d(c.b)){h=G1d(c.b);i=rL(NDe(a.i,h),174);if(i){k=f2d(c,c.g,91);k!=c.g&&(c.g=k);c.g=new p3d(91,1,c.g);zNc(i,c,(g=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!g?null:g.g))}else if(B1d(c,91)!=0){j=new DNc(a,h,c,(g=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!g?null:g.g),true);ODe(a.i,h,j)}}}} +function bTd(a){var b,c,d,e,f;zf(Ese(a.e,a.c)==92);++a.c;b=Ese(a.e,a.c);if(b==98||b==66){++a.c;return new oUd(b)}else if(49<=b&&b<=57){++a.c;e=b-48;if(a.b>=e){if(a.c=f){++a.c;e=f}}}return new sTd(e)}else{return new jUd(String.fromCharCode(e<=7?e&uKe:b))}}else{c=rL(Fs((XSd(),TSd),Xqe(b)),33);if(c){++a.c;return new DTd(c,(uSd(),tSd))}return new jUd(''+xL(cTd(a)))}} +function dI(b,c){var d,e,f,g,h,i;try{if(c.c>=0||c.d!=null||c.g!=null||c.e!=null){throw Aib(new tJ('Invalid map format'))}e=new NI;for(i=c.f.$d();i.Pd();){h=rL(i.Qd(),476);f=h.d;h.c==0&&(f=null);if(f==null){throw Aib(new tJ('Unable to retrieve: '+h.d))}JI(e,h.b,h.a,f)}g=new zte;try{GI(e,g,c.b)}catch(a){a=zib(a);if(zL(a,147)){d=a;throw Aib(new FJ(d))}else throw Aib(a)}cI(b,g.a)}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}} +function Nfd(a,b,c){var d,e,f,g,h,i,j,k,l;h=new Yfd(c);f=new _Gb;cGb(f,(lr(),lr(),kr),(null,kr),new UIb);g=SCd((Axd(),yxd),(rxd(),oxd),1,(kD(),jD),1);k=(ZYc(),new kZc((new jZc,b),a));i=new agd;j=WCd(k,a,g,h);m2d(j.a,new lZd(b));l=AEd(j.c);Jse(l,TPe)||EHe(i.i,$wnd.Array.prototype.slice.call(GK(yK(fgb,1),pKe,2,6,['lang',l])));for(e=j.b.$d();e.Pd();){d=rL(e.Qd(),398);d.b==(BNd(),yNd)&&Ofd(d,i)}lAc(f,j.a,new egd(i));return i} +function phd(a,b,c){var d,e,f,g,h,i;if(!!c&&(c.a&64)!=0){return}if(!!c&&!!((hNe&c.a)==mNe?c.i:null)){return}i=!c?(lr(),lr(),kr):ur(VZd(c));if(i.isEmpty()){mhd(a,b)}else{g=(HAc(),kf(b.j==(h7d(),r5d)),b.b.d);if(i.size()!=y1d(g)){Xzc(a,g,khd,GK(yK(fgb,1),pKe,2,6,[]));return}f=g.b;for(d=0;dh.f){e=Fwe(a.b);tJe(e!=null)}}}}if(wb(rL(Awe(a.b),190),b)){e=Fwe(a.b);tJe(e!=null);d=new AOb(a.f);do{c=rL(Jwe(a.a),190);twe(d.a,c);c.b=true}while(!wb(c,b));twe(a.e,d)}} +function VPb(a,b,c){var d,e,f,g,h,i;if(oMb(b)){return 0}if(b.j==(h7d(),_5d)&&Jse(c,b.Lm())){if(UCc(b,b.e)){Af(b.e.j==m4d,b.e);f=b.d;g=VPb(a,f,c);if(g==1){return 1}return 2}else{return 1}}switch(b.j.g){case 61:case 62:h=VPb(a,b.b,c);i=VPb(a,b.b?b.b.f:null,c);return h!=0?h:i==1?1:0;case 60:e=VPb(a,b.b,c);if(e!=0){return e}return TPb(a,b.b.d,b.b?b.b.f:null,c);default:for(d=b.b;d;d=d.d){g=VPb(a,d,c);if(g!=0){return g}}}return 0} +function Ejc(a,b,c,d){var e,f,g,h;HAc();if(!(c.j!=(h7d(),Z5d)&&nDc(c.e))){return}switch(c.j.g){case 76:Af(!!c.b&&!c.b.d,c);h=c.b;h.j==_5d&&!!h.b&&h.b.j==r5d&&_ic(a.b,new Zjc(a.b,c),(g=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!g?null:g.g));break;case 65:zf(d.j==D6d||d.j==F6d||d.j==F4d||d.j==Z5d||d.j==O5d);{if(!(c.j==r5d&&!(c.j!=Z5d&&nDc(c.e)))){e=new dkc(a.b,c);_ic(a.b,e,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g))}}}} +function dxc(a,b,c){var d,e,f,g,h,i;f=b.b.d;i=bxc(a,f,c,Iyc(a,b));i=Cyc(a,b,i.b,null,c);g=i.b;Rld(g,a.n,new bvd((rrd(),rrd(),qrd)))?Pld(g)&&hzc(a.Q,Rnc(f,qwc,GK(yK(fgb,1),pKe,2,6,[]))):hzc(a.Q,Rnc(f,$vc,GK(yK(fgb,1),pKe,2,6,[ild(g,new zte,(evd(),dvd)).a])));d=b.b;e=vxc(a,d,c,a.k,false);if(!!e.a&&!xqd(a.w,e.a)){hzc(a.Q,Rnc(d,_vc,GK(yK(fgb,1),pKe,2,6,[ild(e.a,new zte,(evd(),dvd)).a])));h=e.b}else{h=Pyc(e.b,d,e.c,a.k)}return h} +function iec(a,b){var c,d,e,f;if(!!a.r&&cdd(a.r,b)){if(b==a.d){a.d=null;if(a.r){for(f=new lxe(a.r);f.a',vSe),fcd(d));if(!OCe(e,Hbd(c,b))){throw Aib(new ooc('Duplicate module path after resolving: '+f))}!Jse(c.substr(0,1),'/')&&!(Jse(c.substr(0,2),WPe)||Jse(c.substr(0,3),bWe))&&(c='/'+c);Vcd(h.a,tf(c))}return Ys(new lxe(h.a))} +function IQd(){GQd();return GK(yK(kcb,1),PKe,49,0,[eQd,FPd,_Od,CQd,AQd,vPd,zPd,KPd,uPd,DQd,CPd,EPd,BQd,qPd,aPd,iQd,EQd,dPd,sPd,mQd,PPd,rQd,ePd,sQd,rPd,qQd,JPd,QPd,VOd,_Pd,hPd,jPd,iPd,IPd,jQd,fQd,kPd,lPd,nPd,oPd,UPd,gPd,$Od,pPd,xQd,zQd,RPd,YPd,UOd,bPd,fPd,OPd,WPd,XPd,wPd,SPd,dQd,APd,lQd,WOd,YOd,aQd,BPd,kQd,$Pd,hQd,VPd,xPd,yPd,LPd,MPd,DPd,FQd,tPd,nQd,oQd,pQd,vQd,wQd,tQd,bQd,cQd,XOd,gQd,yQd,GPd,HPd,TPd,mPd,uQd,TOd,NPd,cPd,ZPd,ZOd])} +function icc(a,b){var c;c=(A7d(),!b?null:zL(b,24)?rL(b,24):null);if(!c){Ybc(a.a,(Gbc(),ubc),GK(yK(fgb,1),pKe,2,6,[Jbc(a.a),b.Um(new zte,false).a]));return false}else if(c.sn()||c.qn()||c.rn()||qie(c.F,(Lhe(),Zge))==c){Ybc(a.a,(Gbc(),zbc),GK(yK(fgb,1),pKe,2,6,['@extends',Jbc(a.a)]));return false}else if(c.lm()){if(_bc(c)){return true}else{Ybc(a.a,(Gbc(),zbc),GK(yK(fgb,1),pKe,2,6,['@extends',a.a.i]));return false}}else{return true}} +function vGb(a){var b;a.T.Gc&&(DIe(kFb,'Recording function information'),zf(!a.i),a.g=MPe,a.i=(a.T.wd!=(vKb(),sKb)&&!!a.eb&&qKc(a.eb,MPe,true),new z_c),undefined,b=new mQc(a,a.C),lQc(b,a.L),null.Qo(),Af(!!a.i,'Tracer should not be null at the end of a pass.'),TGb(a,a.i,a.g),qFb(a),a.g=null,a.i=null,a.T.ab==(iJb(),eJb)&&gXc(new kXc(a),a.w,a.L),undefined,undefined);a.T.ab==(iJb(),hJb)&&gXc(new kXc(a),a.w,a.L);a.Y=1;!!a.eb&&lKc(a.eb)} +function _fd(a){a.n?(TE(a.o,ANe,1),true):a.b&&(TE(a.p,ANe,1),true);return bgd(cgd(bgd(bgd(bgd(cgd(bgd(bgd(bgd(cgd(cgd(bgd(bgd(bgd(cgd(bgd(new dgd,'custom_annotations',a.a),ANe,a.b),'has_soy_delcalls',a.c),'has_soy_deltemplates',a.d),'imported_modules',a.e),'is_config',a.f),'is_externs',a.g),'load_flags',a.i),'modName',a.j),'mods',a.k),'provide_goog',a.n),'provides',a.o),'requires',a.p),'requiresCss',a.q),'testonly',a.r),dNe,a.s).a} +function iOb(a){var b,c,d,e,f,g,h;d=new Owe;for(c=new fxe(a.b);c.a!=c.b;){b=rL(dxe(c),182);g=new Qwe(b.d);h=d;d=new Pwe((g.c-g.b&g.a.length-1)+(d.c-d.b&d.a.length-1));while(true){if(g.b==g.c){ie(d,h);break}else if(h.b==h.c){ie(d,g);break}else{e=rL(g.a[g.b],220);f=rL(h.a[h.b],220);if(e.e>f.e){twe(d,rL(Jwe(g),220));Af(g.b==g.c||rL(g.a[g.b],220).e0||FHb(new wHb(a));if(a.q.a.e<=0){Af(!!a.J&&!a.J.isEmpty(),zPe);zf(a.q.a.e<=0);zf(true);FHb(new qHb(a));a.q.a.e>0||(Af(!!a.J&&!a.J.isEmpty(),zPe),zf(a.q.a.e<=0),zf(true),FHb(new sHb(a)),undefined);FHb(new uHb(a))}}finally{e=(a.T.wd!=(vKb(),sKb)&&!!a.eb&&qKc(a.eb,APe,true),new z_c);wob(a.q.a);f=(Fte(),Qib(Hib(fJe()),e.a));a.T.wd!=sKb&&!!a.eb&&rKc(a.eb,APe,f)}return OFb(a)} +function Zyc(a){var b,c,d,e,f,g,h,i,j,k;d=a.v;c=rL(F1d(d,51),28);if(!!c&&c.lk()){return true}b=a.c;if(!!b&&b.b&&!!b.e){return true}if(!eDc(d)){return false}i=MBc(d.e.b);if(i.j==(h7d(),_5d)){f=Jsc(a,i.Lm())}else{h=lud(i);k=Jsc(a,wL(h.a.getAtIndex(0)));f=!k?null:yld(k,(kf(h.a.size()!=1),new jud(h.a.Bf(1,h.a.size()))))}return !!f&&(e=(j=f.kl()==2&&f.nl().size()==1?rL(Uw(f.nl().$d()),25):null,!j?null:j.b),!!e&&(g=xkd(e.d),!!g&&g.a.g!=0))} +function p$c(a,b){var c,d,e,f,g,h,i,j;c=new RCe;h=new RCe;i=new RCe;j=new RCe;for(d=b.b;d;d=d.d){if(d.j==(h7d(),c5d)||d.j==R4d){continue}e=d.Lm();if(d.j!=G6d){g=B1d(d,58)!=0?i:c;f=g.a.put(e,g);f==null||(b.j==O4d?Xzc(a,d,f$c,GK(yK(fgb,1),pKe,2,6,[e])):Xzc(a,d,g$c,GK(yK(fgb,1),pKe,2,6,[e])))}if(d.j!=y5d){g=B1d(d,58)!=0?j:h;f=g.a.put(e,g);f==null||(b.j==O4d?Xzc(a,d,f$c,GK(yK(fgb,1),pKe,2,6,[e])):Xzc(a,d,g$c,GK(yK(fgb,1),pKe,2,6,[e])))}}} +function yse(){yse=cjb;var a;use=GK(yK(NL,1),ULe,17,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);vse=CK(NL,ULe,17,37,15,1);wse=GK(yK(NL,1),ULe,17,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);xse=CK(OL,{3:1,579:1},17,37,14,1);for(a=2;a<=36;a++){vse[a]=IL($wnd.Math.pow(a,use[a]));xse[a]=Fib({l:fMe,m:fMe,h:524287},vse[a])}} +function hoc(a){var b,c,d,e,f,g,h;h=new idd;for(g=0;gd+1?e:d+1}nf(e>=0,'invalid depth: %s',e);f.b=e;e==h.a.length&&Vcd(h,new idd);(vJe(e,h.a.length),rL(h.a[e],50)).add(f)}return h} +function mpc(a,b){var c,d,e,f,g,h,i,j,k;jpc(this);this.c=null;this.b=a.a.b.a?b.a.b:a.a.b;j=Woc(a);k=Woc(b);this.d=j;for(g=Nq(hw(this.d.keySet(),new dve(k)));Ax(g);){f=wL(Bx(g));h=rL(NDe(j,f),226);i=rL(NDe(k,f),226);e=null;if(!i||!i.mj()){c=t6c(b.a.b,f);d=!c?null:c.d;if(!d);else{e=h.mj()._m(d)}}else if(!h||!h.mj()){c=t6c(a.a.b,f);d=!c?null:c.d;!d?this.d.put(f,i):(e=i.mj()._m(d))}else{e=h.mj()._m(i.mj())}!!e&&this.d.put(f,new rpc(f,e))}} +function Hgc(a,b){var c,d,e,f;b.j==(h7d(),x5d)&&vgc(b.e);if(Zsc(a.a,b)){b.j==x5d&&PBc(b).j!=p6d&&hzc(a.b.g,Rnc(b,(Yfc(),Rfc),GK(yK(fgb,1),pKe,2,6,[(b.b?b.b.f:null).Lm(),G1d(b.b)])));return}Csc(a.a,b);d=PBc(b);d.j==p6d&&(d=d.b?d.b.f:null);Ef(d.j==m6d,'Expected object literal, found %s',d);for(f=(!d.b?(jye(),jye(),iye):new F3d(d.b)).$d();f.Pd();){e=rL(f.Qd(),5);if(ugc(a,e)){c=EYd(s1d(b,false),bZd(e.Lm()));lYd(c,s1d(e.b,false));Bgc(a,c)}}} +function exc(a,b,c){var d,e,f,g,h,i,j,k,l;j=b.b.d;l=bxc(a,j,c,Iyc(a,b));l=Cyc(a,b,l.b,null,c);k=l.b;d=jld(k);e=kqd(a.w,a.r);if(Rld(d,e,new bvd((rrd(),rrd(),qrd)))){f=vld(d,e)}else{hzc(a.Q,Rnc(j,awc,GK(yK(fgb,1),pKe,2,6,[ild(k,new zte,(evd(),dvd)).a])));f=a.r}h=b.b;g=vxc(a,h,c,f,false);if(!g.a||Rld(f,g.a,new bvd((null,qrd)))){i=Pyc(g.b,h,g.c,f)}else{Lyc(a,Rnc(b,twc,GK(yK(fgb,1),pKe,2,6,[Vyc(g.a,f)])),f,g.a);i=Pyc(g.b,h,g.c,g.a)}return i} +function _Pc(a,b,c,d,e){var f,g,h,i,j;f=d.b;Ef(f.j==(h7d(),_5d)||(HAc(),f.j==x5d||f.j==w5d),'Unexpected LHS expression:',f);if(f.j==_5d){j=c._j(f.Lm());if(ZPc(j,c)){zf($Bc(d)||(i=d.j,i==I5d||i==V4d)||d.j==Z4d);h=d.b?d.b.f:null;!!h&&d.j==m4d&&(HAc(),!$Ac(h,(Lf(),fg(),bg)))&&dk(a.a,e,j)}else{b.a|=4}}else{HAc();if(f.j==x5d||f.j==w5d){if(f.b.j==U6d){b.a|=8}else{g=f.b;if(g.j==_5d){j=c._j(g.Lm());ZPc(j,c)?dk(a.c,e,j):(b.a|=4)}else{b.a|=4}}}}} +function jDd(a,b){if(!bDd(a,b,(fEd(),KDd))){return false}if(!hDd(a,(pf(b.j==(h7d(),I4d),UVe,b),x1d(b,1)))){a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[OXe])),a.b.ji(),a.d,a.c);return false}if(!ADd(a,(pf(b.j==I4d,UVe,b),x1d(b,2)))){a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[OXe])),a.b.ji(),a.d,a.c);return false}if(!ADd(a,(pf(b.j==I4d,UVe,b),x1d(b,3)))){a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[OXe])),a.b.ji(),a.d,a.c);return false}return true} +function htb(a){var b,c,d,e,f,g,h;for(c=new Gue((new yue(a.c)).a);c.b;){b=Fue(c);d=wL(b.se());f=-1;e=false;if(Jse(d.substr(0,8),'$jscomp.')||(Ayb(),Jse(d.substr(0,16),KNe))||(Ayb(),Jse(d.substr(0,15),LNe))){continue}do{f=Pse(d,hte(46),f+1);h=f==-1?d:d.substr(0,f);if(gue(a.d,h)){e=true;break}}while(f!=-1);if(!e&&(a.a||mue(a.d)!=0)){g=rL(b.te(),5);DGb(a.e.b,Rnc(g,(btb(),atb),GK(yK(fgb,1),pKe,2,6,[wL(b.se())])))}}lue(a.d);lue(a.c);a.a=false} +function vUd(a){var b,c,d,e,f,g,h,i;h=Zse(a,'\r?\n',0);b=new Nu;for(e=0;e0||d.n>0)&&d.o==0&&d.f==0)&&!hec(d)?$Db(a,d,f):gec(d)&&!dec(d)&&(g=rL(Uw((!d.r?(lr(),lr(),kr):d.r).$d()),124),h=MDc(a.a,f,g.c,bec(d)),i=J2d(xYd(h,(h7d(),b7d)),h),zf(g.c.e.j==m5d),j=g.c.e,k=j.e,g2d(k,j,i),FGb(a.a,i),undefined);_Db(a,d,f)}} +function nGb(b){var c,d,e,f,g,h;_Fb(b);h=false;if(n$b(b.T._)){for(e=b.J.$d();e.Pd();){d=rL(e.Qd(),82);for(g=KHb(d).c.$d();g.Pd();){f=wL(g.Qd());OCe(b.B,f)}}try{b.J=koc(b.O,b.T._,b.J);h=true}catch(a){a=zib(a);if(zL(a,442)){c=a;DGb(b,new Mnc(null,null,-1,-1,hFb,null,GK(yK(fgb,1),pKe,2,6,[c.e])))}else if(zL(a,598)){c=a;DGb(b,new Mnc(null,null,-1,-1,iFb,null,GK(yK(fgb,1),pKe,2,6,[c.e])))}else throw Aib(a)}}bGb(b);h&&(bHb(b.Q),b.J=cHb(b.Q),eGb(b))} +function zBc(a,b){var c;switch(a.j.g){case 104:zBc(a.b,b);zBc(a.b.d,b);return;case 76:case 88:case 100:case 94:case 93:case 45:case 105:for(c=a.b;c;c=c.d){zBc(c,b)}return;case 95:case 118:case 78:case 112:zBc(a.b,b);return;case 106:case 114:zBc(a.b?a.b.f:null,b);return;case 91:if(a.b){zBc(a.b?a.b.f:null,b)}else{zf(NCc(a));b.add(a)}return;case 29:case 107:b.add(a);return;default:Ef(a.j==(h7d(),c5d),'Invalid node in lhs of declaration: %s',a);}} +function f3c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;l=zL(b.k,9)?rL(b.k,9):null;tf(l);for(f=b.b;f;f=f.d){c=W2c(a,f.b,c)}g=(A7d(),!l?null:zL(l,24)?rL(l,24):null);if(!g||B1d(b,57)!=0||!!g.Nn()){return c}j=gBc(fBc(b));for(e=b.b;e;e=e.d){d=IBc(e);if(d!=null){k=C1d(e.b);m=q2c(e,k);!m&&(m=a.i);Zae(g,d,m,e);if(j!=null&&e.j==(h7d(),M6d)){i=j+'.'+d;n=t6c(a.g,i);h=!n?null:n.d;!!n&&n.e&&U8c(n,!h?m:h._m(h));$oc(c,e,i,!h?a.i:h,m,false)}}else{o2d(b,a.i)}}return c} +function r7c(a,b){var c;switch(b.j.g){case 32:o2d(b,k7c(a.k,(Lhe(),bhe)));break;case 79:o2d(b,k7c(a.k,(Lhe(),Khe)));break;case 31:o2d(b,k7c(a.k,(Lhe(),whe)));break;case 30:o2d(b,k7c(a.k,(Lhe(),hhe)));break;case 35:case 34:o2d(b,k7c(a.k,(Lhe(),Gge)));break;case 38:o2d(b,k7c(a.k,(Lhe(),the)));break;case 43:c=rL(F1d(b,29),11);if(!!c&&(!c.d?null:c.d.g)!=null){!a.e&&(a.e=new idd);Vcd(a.e,b)}else{y7c(a,b)}break;case 42:o2d(b,k7c(a.k,(Lhe(),Dge)));}} +function jld(a){var b,c,d,e,f;if(-1==a.kl()||eKe==a.kl()){return a}e=a.kl();if((e&220)==0){return a}switch(e){case 64:return oqd(a.e);case 24:case 8:case 16:return cqd(a.e);case 128:return sqd(a.e);}b=(Qq(),new vv);uv(b,a.nl());(e&64)!=0&&sv(b,pqd(a.e));(e&128)!=0&&sv(b,tqd(a.e));(e&24)!=0&&sv(b,dqd(a.e));f=Wnd(a.e,e&-217,Ys(new lxe(b.a)),a.Dl(),eld);for(d=a.gl().$d();d.Pd();){c=rL(d.Qd(),100);f=Tnd(f,jld((zf(c.d==(Rjd(),Qjd)),c.a)))}return f} +function Vnd(a,b){switch(b){case 0:return a.b;case 8:return a.w;case 16:return a.e;case 32:return a.j;case 64:return a.q;case 128:return a.t;case 256:return a.B;case 512:return a.A;case XLe:return a.f;case eKe:return a.G;case -1:return a.u;case 24:return a.a;case 192:return a.r;case 280:return a.C;case 320:return a.D;case 384:return a.F;case 288:return a.p;case 56:return a.k;case 96:return a.n;case 160:return a.o;default:return new qod(a,b);}} +function ypd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;n=b.s;if(b.q.isEmpty()&&!c.b){return b.t}k=(lr(),new Fu);if(c.b){Af(c.b.j==(h7d(),F4d),c);for(g=q1d(c.b).$d();g.Pd();){f=rL(g.Qd(),5);Du(k,Bpd(a,f,d,e))}}j=ur(k.a);l=b.q;i=j.size();m=l.size();if(i!=m){i>m&&OCe(a.i,Rnc(c,bpd,GK(yK(fgb,1),pKe,2,6,[' for type '+n.a.A,''+m,''+i])));j=opd(a,l.size(),j);h=_rd(n,j);return Hpd(a,Bmd(Ftd(h.a.u,h,null,null,null,false,h.a.i)))}return Hpd(a,Bmd(ltd(_rd(n,j))))} +function C7b(a,b,c){var d,e,f,g,h,i,j,k;j=false;k=(HAc(),OAc(c,false,a.a));d=c;for(i=new k3d(new h3d(rL(tf(c.e),5)));i.a.a;){h=j3d(i);if(h==b){return j?2:1}if(J7b(h)){d!=h.b&&(j=true)}else{if(B7b(a,h,k));else{for(g=(!h.b?(jye(),jye(),iye):new F3d(h.b)).$d();g.Pd();){f=rL(g.Qd(),5);if(f==d){break}if(k?MAc(f,a.b,a.e):OAc(f,false,a.a)){k=true;j=true}}e=h.b;if(j&&h.j==(h7d(),I4d)&&(e.j==(h7d(),x5d)||e.j==w5d)){return 0}}}d=h}throw Aib(new Ire(eTe))} +function Gpd(a,b,c,d,e){var f,g;g=Xvd(b,e);if(g!=null){jpd(a,c);return Dmd(a.a,g)}f=Hsc(d,b.indexOf('.')!=-1?new jud(tr(Ig(Pg((Ac(),new ld(46))),b))):new kud(b),true);if(!f){ODe(a.g,c,b);return a.a.G}if(f.f){jpd(a,c);return Dpd(a,f.f,d)}if(zL(f.d,100)?rL(f.d,100):null){jpd(a,c);return rpd(a,zL(f.d,100)?rL(f.d,100):null,d)}if(f.c){jpd(a,c);++a.c;return f.e}if(zL(f.d,79)?rL(f.d,79):null){return ypd(a,zL(f.d,79)?rL(f.d,79):null,c,d,e)}return a.a.G} +function Itd(a,b){var c,d,e,f,g,h,i,j,k;f=a.d;g=b.d;Gf(dsd(f,g)||dsd(g,f),'Unrelated nominal types %s and %s',f,g);if(a==a.a.jb||b==b.a.O){return b}else if(b==b.a.jb||a==a.a.O){return a}c=a.a;j=psd(f,g);d=Dkd(a.b,b.b);if(!(!d||d!=d.a.c)){return c.O}e=a.c&&b.c||!!d&&d.c;if(Tud(j.a,gNe)&&!d){d=!a.b?b.b:a.b;e=d.c}e?(i=Ctd(a.g,b.g)):(i=Jtd(c,false,j,a.g,b.g));if(i==c.d){return c.O}h=Asd(a.f,b.f);k=nFe(a.e,b.e)?a.e:null;return new etd(c,j,i,d,k,e,h)} +function ADd(a,b){var c,d;if(!(b.j==(h7d(),_5d)||b.j==L6d||b.j==I4d)){a.a.Fj(tXe+e4d(LXe,GK(yK(agb,1),ZJe,1,5,[MXe])),a.b.ji(),a.d,a.c);return false}if(b.j==_5d||b.j==L6d){return true}d=(pf(b.j==I4d,UVe,b),b.b.Lm());if(!dDd(d)){a.a.Fj(tXe+e4d(LXe,GK(yK(agb,1),ZJe,1,5,[MXe])),a.b.ji(),a.d,a.c);return false}c=hEd(Xb(d));switch(c.a){case 0:return xDd(a,b);case 1:return oDd(a,b);default:throw Aib(new Ire('Invalid type transformation expression'));}} +function yOb(a){var b,c,d,e,f,g,h;d=new Owe;for(h=new fxe(a.a);h.a!=h.b;){g=rL(dxe(h),190);e=d;f=new Qwe(g.a);d=new Pwe((d.c-d.b&d.a.length-1)+(f.c-f.b&f.a.length-1));while(true){if(e.b==e.c){ie(d,f);break}else if(f.b==f.c){ie(d,e);break}else{b=rL(e.a[e.b],182);c=rL(f.a[f.b],182);if(b.a.c>c.a.c){twe(d,rL(Jwe(e),182));Af(e.b==e.c||rL(e.a[e.b],182).a.c<=b.a.c,ZQe)}else{twe(d,rL(Jwe(f),182));Af(f.b==f.c||rL(f.a[f.b],182).a.c<=c.a.c,ZQe)}}}}return d} +function uyc(a,b,c,d,e){var f,g,h,i,j,k,l,m;m=b.e;h=null;if(m.j==(h7d(),m4d)&&dDc(m.b)){h=lud(m.b.b)}else if(!!c&&(!c.d?null:c.d.g)!=null){k=mud(!c.d?null:c.d.g);Jse(wL(mw(k.a)),KMe)&&(h=(kf(k.a.size()!=1),new jud(k.a.Bf(0,k.a.size()-1))))}else if(m.j==I4d&&!!a.B.kh(m)){f=a.B.kh(m);f.c!=null&&(h=mud(f.c))}if(h){g=Tyc(d,h);if(g){i=(l=g.kl()==2&&g.nl().size()==1?rL(Uw(g.nl().$d()),25):null,!l?null:l.b);j=!i?null:_jd(i);if(j){return zld(j)}}}return e} +function IHc(a,b,c,d){var e,f,g,h,i,j;if(c.j==(h7d(),k6d)&&d.j==k6d){f=c.Km();i=d.Km();if(!(i>=0&&i<32)){return b}j=IL(i);if(j!=i){Ijb(a,iHc,d);return b}if($wnd.Math.floor(f)!=f){Ijb(a,iHc,c);return b}e=Tib(Cib(Hib($wnd.Math.floor(f)),-1));switch(b.j.g){case 10:h=e<>j;break;case 12:h=Sib(Cib(4294967295,e>>>j));break;default:throw Aib(new Aqe('Unknown shift operator: '+b.j));}g=new v3d(h);g2d(b.e,b,g);GGb(a.c);return g}return b} +function _4c(a,b,c){var d,e,f;f=(pf(b.j==(h7d(),I4d),UVe,b),b.b.Lm());e=hEd(f.toLocaleUpperCase());switch(e.g){case 19:return $4c(a,b,c);case 22:return g5c(a,b,c);case 11:return a.b.uj((Lhe(),ahe));case 0:return a.b.vj((Lhe(),Bge));case 23:return a.b.uj((Lhe(),Hhe));case 14:return S4c(a,b,c);case 18:return Z4c(a,b,c);case 17:return V4c(a,b,c);case 20:return d=new f1d((pf(b.j==I4d,UVe,b),x1d(b,1)),''),a.b.sj(d,a.c);default:throw Aib(new Ire($Ve));}} +function FBd(a,b){var c;if(b==(wCd(),pCd)){b=!a.n?DCd(a.i):_Ad(a);if(b==eCd||b==jCd||b==tCd||b==rCd||b==sCd||b==oCd||b==qCd||b==gCd||b==iCd||b==hCd){a.n=b;return jBd(a,(h7d(),x6d))}return RBd(a,(h7d(),x6d),pBd(a,b))}else if(b==cCd){return RBd(a,(h7d(),A4d),pBd(a,!a.n?DCd(a.i):_Ad(a)))}else{c=pBd(a,b);if(c){if(hBd(a,pCd)){!a.n?DCd(a.i):_Ad(a);return RBd(a,(h7d(),x6d),c)}else if(hBd(a,cCd)){!a.n?DCd(a.i):_Ad(a);return RBd(a,(h7d(),A4d),c)}}return c}} +function k8c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;g=b.b.d;i=null;HAc();n=b.e;!!n&&(n.j==(h7d(),I4d)||n.j==f6d||n.j==R6d)&&n.b==b&&(i=b.d);h=J9d(zL(b.k,9)?rL(b.k,9):null);if(h){l=h.c.a;if(l){k=l.b;for(f=(!g.b?(jye(),jye(),iye):new F3d(g.b)).$d();f.Pd();){e=rL(f.Qd(),5);m=!k?a.a.j:zL(k.k,9)?rL(k.k,9):null;j=!m||E7d(m,a.a.j);if(!!i&&j){c=G1d(i);d=c==null||!a.g.b?null:t6c(a.g.b,c);!!d&&!d.e&&(m=d.d)}!m&&(m=a.a.j);A7c(a,e,b,m,j);!!k&&(k=k.d);!!i&&(i=i.d)}}}} +function ntb(){ntb=cjb;mtb=new Q_b('JSC_REGEXP_REFERENCE',(prb(),orb),new _te('References to the global RegExp object prevents optimization of regular expressions.'));ktb=new Q_b('JSC_MALFORMED_REGEXP',orb,new _te('Malformed Regular Expression: {0}'));ltb=ct('$1','$2','$3','$4','$5','$6',GK(yK(fgb,1),pKe,2,6,['$7','$8','$9','$_','$input','input','lastMatch','lastParen','leftContext','rightContext',MNe,'ignoreCase','lastIndex','multiline','source']))} +function Mmc(a,b,c){var d,e,f;if(b.size()!=2){return}d=(tf(b),rL(zL(b,50)?rL(b,50).getAtIndex(0):Rw(b.$d(),0),5));f=(tf(b),rL(zL(b,50)?rL(b,50).getAtIndex(1):Rw(b.$d(),1),5));if(!(f.e.j==(h7d(),F6d)&&f.j==b7d&&!!f.b.b&&RCc(f.b.b,false))){return}if(!(d.e.j==m5d&&(!d.e?null:d.e.e).j==F4d&&Omc((!d.e?null:d.e.e).e))){return}e=d.b.d;if(!RCc(e,true)||e.j==r5d&&!c.a.containsKey(e)){return}HAc();if(nBc(d,new vEc(F6d))!=nBc(f,new vEc(F6d))){return}Lmc(a,d,f)} +function cAc(a,b,c){var d,e,f,g,h;d=b.j;if(d==(h7d(),F6d)){Mzc(a,b,c);return}else if(d==r5d){Lzc(a,b,c);return}a.e=b;if(!a.a.og(a,b,c)){return}d==r5d?eAc(a,b,c):d==N4d?(e=b.b,f=(HAc(),b.j==N4d&&!(b.j!=Z5d&&nDc(b.e))),f||cAc(a,e,b),a.e=b,Vzc(a,b),f&&cAc(a,e,b),g=b.b.d,h=g.d,cAc(a,g,b),cAc(a,h,b),Tzc(a,false),undefined):d==Z5d?(Vzc(a,b),dAc(a,b),Tzc(a,false),undefined):a.p&&WAc(b)?(Vzc(a,b),dAc(a,b),Tzc(a,false),undefined):dAc(a,b);a.e=b;a.a.pg(a,b,c)} +function Fob(a,b){var c,d,e,f,g,h,i;if(!b){return !a?0:1}if(a.b!=b.b){return Yb(b.b,a.b)}g=a.a.f;h=b.a.f;if(g!=null&&h!=null){i=GJe((wJe(g),g),(wJe(h),h));if(i!=0){return i}}else if(g==null&&h!=null){return -1}else if(g!=null&&h==null){return 1}e=a.a.d;f=b.a.d;if(e!=f){return e-f}else if(e<0&&0<=f){return -1}else if(0<=e&&f<0){return 1}c=a.a.a;d=b.a.a;if(c!=d){return c-d}else if(c<0&&0<=d){return -1}else if(0<=c&&d<0){return 1}return Fse(a.a.c,b.a.c)} +function hbc(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r;q=s1d(c,false);if(h){r=new yHb(a.a);lAc(a.a,q,new Zpc(new wqc(CFb(a.a),r,'inline_',g,true,null),false));xSc(new zSc(a.a,new qbc(r),false,false),q);pbc(q.b?q.b.f:null)}o=t9b(q);i=w9b(q,d,a.b);j=mue(i.c)!=0;j&&A9b(q,i,o,CFb(a.a));p=(HAc(),lf(q.j==(h7d(),r5d),q),q.b?q.b.f:null);u1d(p);if(j){l=gbc(a,p,i,o);zf(p==l)}g&&lbc(p,p);m=(n=!b?'anon':b,lTe+n+'_'+(''+a.b.a.hb++));k=obc(p,e,m,f);zf(!!k);return k} +function udc(a,b){var c,d,e,f,g,h,i,j,k,l,m;i=new z8b(a.b,a.a);lAc(a.b,b,i);h=i.c;j=i.d;for(e=new pEe(new gEe(h));e.b!=e.c.a.b;){d=nEe(e);f=wL(d.d);c=rL(d.e,5);sdc(a,h,f,c)}for(g=(k=(new dve(j.a)).a.ke().$d(),new jve(k));g.a.Pd();){f=(d=rL(g.a.Qd(),12),wL(d.se()));l=zYd(EYd(ODc(a.b,'Object.prototype'),new T3d((h7d(),L6d),f)));I2d(l,JHb(UFb(a.b),a.b));m=f2d(l,l.g,40);m!=l.g&&(l.g=m);f!=null&&(l.g=new A3d(40,f,l.g));l1d(JHb(UFb(a.b),a.b),l);FGb(a.b,l)}} +function Xnd(a,b){hld();var c,d,e,f,g;g=Znd(a,b);if(0==g.kl()&&(d=a.nl(),d.size()==1&&rL(Uw(d.$d()),25).c||(e=b.nl(),e.size()==1&&rL(Uw(e.$d()),25).c))){g=Znd(jld(a),jld(b));if(0!=g.kl()){f=a.nl();if(f.size()==1&&rL(Uw(f.$d()),25).c){Gf((c=b.nl(),!(c.size()==1&&rL(Uw(c.$d()),25).c)),'Two loose types %s and %s that meet to bottom, meet to non-bottom after autoboxing.',ild(a,new zte,(evd(),dvd)).a,ild(b,new zte,dvd).a);return b}else{return a}}}return g} +function ABd(a,b){var c,d,e;e=jBd(a,(h7d(),r6d));c=false;d=null;if(b!=(wCd(),sCd)){do{if(d){!a.n?DCd(a.i):_Ad(a);PBd(a);b=!a.n?DCd(a.i):_Ad(a)}if(b==fCd){PBd(a);if(hBd(a,sCd)){d=jBd(a,b5d)}else{PBd(a);d=RBd(a,b5d,FBd(a,!a.n?DCd(a.i):_Ad(a)));PBd(a)}c=true}else{d=FBd(a,b);if(hBd(a,jCd)){PBd(a);!a.n?DCd(a.i):_Ad(a);d=RBd(a,h5d,d)}}if(!d){return null}l1d(e,d);if(c){break}}while(hBd(a,eCd))}if(c&&hBd(a,eCd)){return XAd(a,FXe,a.i.g,CCd(a.i)),null}return e} +function VDb(a,b,c){var d,e,f;d=_dc(b);!b.j&&!(b.t==(xec(),tec)||b.t==wec)&&!dec(b)&&(b.e||(!b.p||_dc(b.p))&&(b.i>0||b.n>0)&&b.o==0&&b.f==0)&&!hec(b)&&cEb(a,b,c,d);if(!b.q){return}for(f=new lxe(b.q);f.a0||e.n>0)&&e.o==0&&e.f==0)&&!hec(e)&&!!e.d.c&&!!e.d.c.e&&e.d.c.e.j==(h7d(),m4d)&&fEb(a,SDb(a,c,e.b),e,e.d)}} +function A5b(a){var b,c,d,e,f;e=new zte;for(d=0;d=127){if(a>=256){b.a+='\\u';ote(b,fWe.charCodeAt(a>>12&15));ote(b,fWe.charCodeAt(a>>8&15));ote(b,fWe.charCodeAt(a>>4&15));ote(b,fWe.charCodeAt(a&15))}else{b.a+='\\x';ote(b,fWe.charCodeAt(a>>4&15));ote(b,fWe.charCodeAt(a&15))}}else{b.a+=String.fromCharCode(a)}}} +function GI(a,b,c){var d,e,f,g,h,i,j;g=KI(a)+1;b.a+='{\n';RI(b,'version',true);b.a+='3';QI(b,(wJ(),zJ(c)));RI(b,'lineCount',false);b.a+=''+g;RI(b,'mappings',false);UI(new WI(a,b,g));RI(b,'sources',false);b.a+='[';OI(b,a.k);b.a+=']';FI(a,b);RI(b,'names',false);b.a+='[';OI(b,a.g);b.a+=']';for(f=(i=(new dve(a.a)).a.ke().$d(),new jve(i));f.a.Pd();){e=(d=rL(f.a.Qd(),12),wL(d.se()));h=NDe(a.a,e);EL(h)?(j=SI(wL(h))):(j=gjb(h));RI(b,e,false);b.a+=''+j}b.a+='\n}\n'} +function GQb(a,b){FQb();var c,d,e,f;f=new idd;for(e=bx(new Gze(EQb.a.b.$d()));e.Pd();){c=wL(e.Qd());Ef(c==null?!!hDe(b.d,null):wDe(b.e,c),'Externs must contain builtin: %s',c);Vcd(f,rL(c==null?jDe(b.d,null):zDe(b.e,c),178))}if(a==(nJb(),lJb)){for(d=bx(new Gze(DQb.a.b.$d()));d.Pd();){c=wL(d.Qd());Gf(c==null?!!hDe(b.d,null):wDe(b.e,c),'Externs must contain builtin for env %s: %s',a,c);Vcd(f,rL(c==null?jDe(b.d,null):zDe(b.e,c),178))}Xcd(f,new nve(b))}return f} +function rxc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;zf((HAc(),b.j==(h7d(),I4d)||b.j==f6d||b.j==S6d));j=f;n=b.j==S6d?1:0;for(h=c.$d();h.Pd();){g=rL(h.Qd(),5);m=$jd(d,n);zf(0!=m.kl());o=cxc(a,g,j,m,m);i=o.b;if(n>=d.i.size()&&n=100){while(Gib(Mib(Fib(d,10),Hib($wnd.Math.pow(10,c+1))),g)){d=Fib(d,10);++c}}if(c>2){a.Hh(Uib(d)+'E'+c)}else{h=Dib(g,0)<0?Nib(g):g;Dib(h,1000000000000)>0&&ise(h,4).length+2<(''+Uib(h)).length?a.Hh((Dib(g,0)<0?'-':'')+'0x'+ise(h,4)):a.Hh(''+Uib(g))}}else{a.Hh(Yse(Wse(''+b,'.0E','E'),'^(-?)0\\.','$1.'))}} +function Oxb(a,b,c){var d,e;if(!b||b.j!=(h7d(),m6d)){Mxb(a,c);return false}for(e=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();e.Pd();){d=rL(e.Qd(),5);if(d.j==(h7d(),W5d)){continue}if(d.j==R4d){DGb(a.a,Rnc(b,zxb,GK(yK(fgb,1),pKe,2,6,[])));return false}if(d.j==M6d&&!d.b){DGb(a.a,Rnc(b,Axb,GK(yK(fgb,1),pKe,2,6,[])));return false}if(d.j==M6d&&!!d.b&&P1d(d.b)){DGb(a.a,Rnc(b,yxb,GK(yK(fgb,1),pKe,2,6,[])));return false}if(d.j!=M6d||d.Nm()){Mxb(a,c);return false}}return true} +function yDc(a,b){HAc();switch(a.j.g){case 31:case 30:case 35:case 34:return true;case 62:case 61:case 13:case 3:case 20:case 1:case 2:case 16:case 4:case 18:case 9:case 8:case 7:case 10:case 6:case 17:case 15:case 5:case 11:case 36:case 37:case 14:case 12:return yDc(a.b,b)&&yDc(a.b?a.b.f:null,b);case 60:return yDc(a.b,b)&&yDc(a.b.d,b)&&yDc(a.b?a.b.f:null,b);case 19:case 22:case 21:return yDc(a.b,b);case 29:case 26:if(T1d(a)){return b.contains(G1d(a))}}return false} +function iRc(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=G1d(c.b);if(d==null){return false}j=Zse(b,jVe,0);if(j.length!=2){return false}i=j[0];k=(wJe(j[1]),j[1]+(wJe(FNe),FNe));f=Zse(d,'\\.superClass_\\.',0);if(f.length==2&&Jse(f[0],i)&&Jse(f[1],k)){return true}e=Zse(d,jVe,0);if(e.length!=2||!Jse(e[1],k)){return false}g=e[0];l=WFb(a.a.a).xj(i);h=WFb(a.a.a).xj(g);if(!l||!h){return false}if(!l.tm()||!l.tm().bl()){return false}m=l.tm().zl();if(!m){return false}return wb(m.il(),h)} +function Myb(a,b){var c,d,e,f,g,h,i,j,k;if(!Jse(b.Lm(),qNe)||(j=b.e,!(j.j==(h7d(),m4d)&&j.b==b))||(!b.e?null:b.e.e).j!=(h7d(),m5d)){return}zf(!a.b.e);d=b.d;if(pzb(d)){e=!b.e?null:b.e.e;for(g=d.b;g;g=g.d){c=g.Lm();f=rL(F1d(g,29),11);k=g.b?d2d(g):H2d((Ef(Ose(c,hte(46))==-1,xMe,c),new T3d((h7d(),_5d),c)),g);h=I2d(EYd((Ef(Ose(qNe,hte(46))==-1,xMe,qNe),new T3d((h7d(),_5d),qNe)),new T3d(L6d,c)),g);i=H2d(zYd(n2d(H2d(lYd(h,k),g),f)),g);j1d(e.e,i,e);e=i}u1d(!b.e?null:b.e.e)}} +function _Lc(a,b){var c,d,e;if(!!a.a&&(a.a.a&hNe)==mNe){return _Zd(a.a)}if(a.c.j==(h7d(),m6d)){e=qBc(a.c,rNe);if(!e||e.j!=_5d){DGb(b,Rnc(a.b,(XLc(),QLc),GK(yK(fgb,1),pKe,2,6,[])));return null}d=e.Lm()}else a.c.j==_5d?(d=a.c.Lm()):(d='');switch(d){case GKe:case IKe:case HKe:c=bZd(d.toLowerCase());break;case lOe:case gNe:case DKe:case nSe:c=new P2d(A4d,new T3d(L6d,d));break;default:DGb(b,Rnc(a.b,(XLc(),QLc),GK(yK(fgb,1),pKe,2,6,[])));return null;}return new f1d(c,QUe)} +function xSd(a,b){var c,d,e,f,g,h,i,j,k,l,m;g=a.a;m=b.a;h=g.length;l=m.length;if(h==0||l==0){return a}d=CK(NL,ULe,17,g.length,15,1);f=0;k=0;c=0;j=g[0];while(f=g[f+1]){f+=2}else if(j=m[k]){j=m[k+1];k+=2}else{e=k0&&h.o==0&&!dec(h)){j=SDb(a,c,h.b);f=(Ef(Ose(j,hte(46))==-1,xMe,j),new T3d(_5d,j));g=K2d(xYd(f,b7d),e);j1d(d,g,e);e=g;FGb(a.a,g);if(B1d(D1d(rL((!h.r?(lr(),lr(),kr):h.r).getAtIndex(0),124).c),43)!=0){k=f2d(f,f.g,43);k!=f.g&&(f.g=k);f.g=new p3d(43,1,f.g);FGb(a.a,f)}}}} +function h$b(a,b,c){var d,e,f,g,h;if(!c||(HAc(),!(c.j==(h7d(),D6d)||c.j==F6d||c.j==F4d||c.j==Z5d))){return}if(b.j!=(h7d(),m5d)&&b.j!=b7d){return}g=b.d;if(!g){return}else if(g.j==p5d||g.j==q5d){d=g.b;if(d.j==_5d&&b.j==b7d&&!!b.b&&!b.b.d){e=b.b;if(!e.b&&Jse(d.Lm(),e.Lm())){a2d(c,b);g2d(g,d,b);FGb(a.a,c)}}}else if(g.j==o5d&&g.b.j==c5d){HAc();if(RAc(b,H5d,(Lf(),fg(),cg))){return}h=g.b;a2d(c,b);if(b.j==b7d){f=b}else{Af(!!b.b&&!b.b.d,b);f=b.b;a2d(b,f)}g2d(g,h,f);FGb(a.a,g)}} +function n7b(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;g=c.b?c.b.f:null;for(m=(!g.b?(jye(),jye(),iye):new F3d(g.b)).$d();m.Pd();){l=rL(m.Qd(),5);if(l.j==(h7d(),W5d)){n=l.Lm();i7b();if(n!=null&&PIe(TIe(h7b,n))){k=d+LMe+n;h=d+HMe;i=PDc(a.a.a,a.a.b,l,n);f=qYd(i,GK(yK(veb,1),MMe,5,0,[]));i.j==_5d&&(o=f2d(f,f.g,50),o!=f.g&&(f.g=o),f.g=new p3d(50,1,f.g));l1d(f,PDc(a.a.a,h,l,h));l1d(f,new T3d(L6d,n));l1d(f,PDc(a.a.a,k,l,k));j=(Af(NYd(f),f),new P2d(m5d,f));j1d(b,j,e);FGb(a.a.a,j)}}}} +function kpd(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;l=c.e;p=(lr(),new Fu);if(b){g=new idd;if(d){Eu(p,d.q);g=d.q}else{for(o=YZd(b).$d();o.Pd();){n=wL(o.Qd());j=Vvd(a.d,n);Vcd(p.a,tf(j));g.add(j)}}q=new RDe;for(i=cs(c$d(b)).$d();i.Pd();){h=rL(i.Qd(),12);k=wL(h.se());m=rL(h.te(),5);j=Vvd(a.d,k);ODe(q,j,m);Vcd(p.a,tf(j))}(!YZd(b).isEmpty()||mue(q.c)!=0)&&(l.j==(h7d(),G6d)||l.j==y5d?OCe(a.i,Rnc(c,epd,GK(yK(fgb,1),pKe,2,6,[]))):$kd(f,Evd(g,q)))}!!e&&Eu(p,e.q);return ur(p.a)} +function q2b(a,b){var c,d,e,f,g;f=b.e;if(b.c){e=(Ef(Ose(ySe,hte(46))==-1,xMe,ySe),new T3d((h7d(),_5d),ySe));c=wYd(e,(Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe)),S4d);d=new a1d(false);S0d(d,new f1d(new P2d(A4d,new T3d(L6d,'Arguments')),''));n2d(c,F_d(d,false));K2d(c,f);m1d(f,c);FGb(a.a,c)}if(b.d){e=(Ef(Ose(zSe,hte(46))==-1,xMe,zSe),new T3d((h7d(),_5d),zSe));g=wYd(e,new N2d(U6d),S4d);K2d(g,f);s2b(a,g);!b.b?m1d(f,g):j1d(f,g,b.b);FGb(a.a,g)}} +function s7d(a,b,c,d,e){var f,g,h,i,j,k,l;g=new a4d((h7d(),s5d),a);tf(b);tf(c);for(j=new pEe(new gEe(b));j.b!=j.c.a.b;){h=nEe(j);f=RYd(wL(h.d));l1d(g,t7d(f,rL(h.e,75)))}for(i=new pEe(new gEe(c));i.b!=i.c.a.b;){h=nEe(i);f=RYd(wL(h.d));l=f2d(f,f.g,80);l!=f.g&&(f.g=l);f.g=new p3d(80,1,f.g);l1d(g,t7d(f,rL(h.e,75)))}if(d!=null){k=new P2d(A6d,(Ef(Ose(d,hte(46))==-1,xMe,d),new T3d(_5d,d)));l1d(g,(!!e&&(l=f2d(k,k.g,78),l!=k.g&&(k.g=l),!!e&&(k.g=new A3d(78,e,k.g))),k))}return g} +function Dnc(a,b,c){var d,e,f,g,h,i,j;f=false;b.a+=TTe;d=c.b;if(d.j==(h7d(),f6d)){b.a+='new:';Enc(a,b,d.b);f=true}else if(d.j==U6d){b.a+='this:';Enc(a,b,d.b);f=true}else if(d.j==c5d){b.a+=')';return}else if(d.j!=r6d){b.a+='):';Enc(a,b,d);return}i=null;d.j==r6d?(i=d):d.d.j==r6d&&(i=d.d);if(i){e=true;for(h=(!i.b?(jye(),jye(),iye):new F3d(i.b)).$d();h.Pd();){g=rL(h.Qd(),5);(!e||f)&&(b.a+=',',b);Enc(a,b,g);e=false}}b.a+=')';j=c.b?c.b.f:null;if(j.j!=c5d){b.a+=':';Enc(a,b,j)}} +function RF(a,b,c,d,e,f){var g,h,i;g=b.sf(c,a.b);if(g<0){h=a.e;if(!h){f[0]=0;if(d==0&&e>0){return FF(a,c,e)}return a}a.e=RF(h,b,c,d,e,f);if(f[0]==d){e==0&&f[0]!=0?--a.a:e>0&&f[0]==0&&++a.a;a.j=Bib(a.j,e-f[0])}return LF(a)}else if(g>0){i=a.g;if(!i){f[0]=0;if(d==0&&e>0){return GF(a,c,e)}return a}a.g=RF(i,b,c,d,e,f);if(f[0]==d){e==0&&f[0]!=0?--a.a:e>0&&f[0]==0&&++a.a;a.j=Bib(a.j,e-f[0])}return LF(a)}f[0]=a.c;if(d==a.c){if(e==0){return KF(a)}a.j=Bib(a.j,e-a.c);a.c=e}return a} +function ovb(a,b,c,d){var e,f,g,h;d.j==(h7d(),T5d)&&!Y1d(c.b,DNe)&&Xzc(b,d,cvb,GK(yK(fgb,1),pKe,2,6,[]));if(!(!!d.b&&!d.b.d)){Xzc(b,d,fvb,GK(yK(fgb,1),pKe,2,6,[]));return}e=d.b;if(e.j==$4d){uvb(e)||Xzc(b,d,_ub,GK(yK(fgb,1),pKe,2,6,[]));Y1d(c.b,DNe)&&Xzc(b,e,$ub,GK(yK(fgb,1),pKe,2,6,[]))}else{zf(e.j==_5d);tvb(b,e,(c.b?c.b.f:null).Lm())}iue(a.b.b,qvb(c),e);for(h=new lxe(ABc(d));h.a',b):vte(b,a.b.Lm())}else if(a.j==k6d){b.a+=' ';pte(b,a.Km())}if(c){h=W2d(a.i);if(h!=-1){b.a+=' ';b.a+=h}if(a.c!=0){b.a+=' [length: ';qte(b,a.c);b.a+=']'}}if(d){g=I1d(a);for(f=0;fe){OCe(a.i,Rnc(f.a,Vod,GK(yK(fgb,1),pKe,2,6,[])));d=a.a.G;a.c=e}else if(-1==d.kl()){OCe(a.i,Rnc(f.a,Tod,GK(yK(fgb,1),pKe,2,6,[])));d=a.a.G}else if(Tld(d)){OCe(a.i,Rnc(f.a,Uod,GK(yK(fgb,1),pKe,2,6,[])));d=a.a.G}}Ajd(b,d)} +function lpd(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p;h=c.j!=(h7d(),r5d);n=h?null:c.b.d;j=new Spd(n,b);while(Qpd(j)){o=Rpd(j);m=Ppd(j);l=(Wpd(),Upd);!!m&&a.b.xh(m)?(l=Tpd):!!m&&a.b.Dh(m)&&(l=Vpd);i=h||!rL(F1d(m,29),11)?null:Ipd(a,_Zd(rL(F1d(m,29),11)),l,e,d);g=i;k=!b?null:WZd(b,o);!!k&&(!i?(g=Ipd(a,k,l,e,d)):OCe(a.i,Rnc(m,fpd,GK(yK(fgb,1),pKe,2,6,['formal parameter '+o]))));p=null;if(g){l=g.a;p=g.b}switch(l.g){case 0:Wkd(f,p);break;case 1:Skd(f,p);break;case 2:Ykd(f,p?p:a.a.G);}}} +function tnb(a,b,c){var d,e,f,g,h,i,j,k;Pnb((h7d(),r5d),b);f=j7d(b.j);f!=-1&&(e=y1d(b),f!=e&&nob(PMe+f+QMe+e,b));Ynb(a,b.b.d);g=b.b;d=b.b?b.b.f:null;if(b.j==r5d&&B1d(b,60)!=0){snb(a,(BFd(),MEd),b);Pnb(_5d,g);g.Lm()==null&&nob(WMe,g);g.Lm().length==0||nob('Expected empty string.',g);h=j7d(g.j);h!=-1&&(i=y1d(g),h!=i&&nob(PMe+h+QMe+i,g));d.j==F4d?anb(a,d):rnb(a,d)}else{Pnb(_5d,g);g.Lm()==null&&nob(WMe,g);j=j7d(g.j);j!=-1&&(k=y1d(g),j!=k&&nob(PMe+j+QMe+k,g));c?Pnb(c5d,d):anb(a,d)}} +function Eqb(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=b.d;i=b.p;g=KFb(a.a);for(k=(!b.r?(lr(),lr(),kr):b.r).$d();k.Pd();){j=rL(k.Qd(),124);e=j.c.e.j==(h7d(),m5d);if(!c&&!Gqb(j)){e||Dqb(a,b,j)}else if(!!d&&j.a!=d.a&&!coc(g,j.a,d.a)){DGb(a.a,Rnc(j.c,vqb,GK(yK(fgb,1),pKe,2,6,[j.a.e,b.d.a.e,bec(b)])))}else{if(j.e.gk()){f=j.g==(Pec(),Mec);h=f?b:i;m=!!h&&!!h.d&&h.n==0;if(m&&h.d.d>j.d){l=f?bec(b)+HMe:bec(b);DGb(a.a,Rnc(j.c,uqb,GK(yK(fgb,1),pKe,2,6,[l,bec(h),Cec(h.d).ji(),''+W2d(h.d.c.i)])))}}}}} +function zrb(){zrb=cjb;urb=Pg((Ac(),new ld(46)));trb=new _d(String.fromCharCode(46));yrb=new Q_b('JSC_MISSING_REQUIRE_WARNING',(prb(),nrb),new _te(vNe));wrb=new Q_b('JSC_MISSING_REQUIRE_FOR_GOOG_SCOPE',nrb,new _te(vNe));xrb=new Q_b('JSC_MISSING_REQUIRE_STRICT_WARNING',nrb,new _te(vNe));vrb=new Q_b('JSC_EXTRA_REQUIRE_WARNING',nrb,new _te("extra require: ''{0}''"));srb=(Qq(),$s(GK(yK(agb,1),ZJe,1,5,['goog.testing.asserts','goog.testing.jsunit','goog.testing.JsTdTestCaseAdapter'])))} +function JNc(a,b){var c,d,e,f,g;zf(b.j==(h7d(),F6d));g=new WNc(a);lAc(a.a,b,g);f=(lr(),new Fu);if((g.b.a.length>0||g.e.a.length>0)&&!g.c){TNc(g);if(g.i.a.length!=0){SNc(g);if(KNc(a,b)){g=new WNc(a);lAc(a.a,b,g)}}for(e=ur(g.e).$d();e.Pd();){c=rL(e.Qd(),277);HAc();!!nBc(c.a,new vEc(F6d))&&(Vcd(f.a,tf(c)),f)}for(d=ur(g.b).$d();d.Pd();){c=rL(d.Qd(),277);HAc();!!nBc(c.a,new vEc(F6d))&&(Vcd(f.a,tf(c)),f)}RNc(g)}lAc(a.a,b,new iOc(a,(g.b.a.length>0||g.e.a.length>0)&&!g.c,ur(f.a)));PNc(g)} +function vDd(a,b){var c,d,e;if(!bDd(a,b,(fEd(),aEd))){return false}e=(pf(b.j==(h7d(),I4d),UVe,b),y1d(b)-1);c=(pf(b.j==I4d,UVe,b),x1d(b,1));if(c.j!=_5d&&c.j!=L6d){a.a.Fj(tXe+e4d(KXe,GK(yK(agb,1),ZJe,1,5,['type name or type variable'])),a.b.ji(),a.d,a.c);a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[TXe])),a.b.ji(),a.d,a.c);return false}for(d=1;d2;g=0;for(i=(f=(new ewe(j.a)).a.ke().b.Ho(),new kwe(f));i.a.Pd();){h=(e=rL(i.a.Qd(),12),wL(e.se()));g>0&&(b.a+=',',b);k?(b.a+='\n ',b):g>0&&(b.a+=' ',b);vte((b.a+=''+h,b),hKe);B7d(a.fo(h),b,c);++g;if(!c&&g==10){b.a+=', ...';break}}k&&(b.a+=_Je,b);b.a+='}';a.v=true;return b} +function hZb(a){var b,c,d,e,f,g,h,i,j,k;for(h=Yx(a.i).$d();h.Pd();){g=wL(h.Qd());for(c=new lxe(Oz(rL(bk(a.i,g),44)));c.a0||f.j!=(z_d(),u_d)||(f.a&135292871)!=0)){continue}for(j=rL(bk(a.i,g),44).$d();j.Pd();){i=rL(j.Qd(),117);if(i!=b&&X1d(d,i.Ai())){Rj(a.i,g,b);e=rL(QDe(a.f,d),268);k=mBc(d);Rj(a.g,k,e);tf(e);break}}}}} +function $Pc(a,b,c,d,e){var f,g,h;if($Bc(d)||d.j==(h7d(),I5d)||d.j==(h7d(),Z4d)||d.j==(h7d(),V4d)){_Pc(a,b,Hzc(c),d,e)}else{HAc();if(d.j==(h7d(),I4d)||d.j==f6d){aQc(a,b,d)}else if(d.j==_5d){kf(VCc(d.e));g=d.b;if(!!g&&!$Ac(g,(Lf(),fg(),bg))){f=Hzc(c);h=f._j(d.Lm());dk(a.a,e,h)}}else if(d.j==V6d){b.a|=2}else if(d.j==C6d){!!d.b&&!$Ac(d.b,(Lf(),fg(),bg))&&(b.a|=32)}else if(d.j==g7d){!!d.b&&!$Ac(d.b,(Lf(),fg(),bg))&&(b.a|=32)}else{throw Aib(new ooc('Unhandled side effect node type '+d.j))}}} +function aFb(a){a.A=true;a.B=true;p$b(a._,true);a.F=true;a.sb=true;a.G=true;a.X=true;a.pb=(wJb(),uJb);a.L=true;a.P=true;a.Ub=true;a.Jc=true;a.gc=true;a.J=true;a.Ec=true;a.Ic=true;a.Hc=true;a.Lc=true;a._c=true;OIb(a,(Nad(),Kad),(BPc(),zPc));a.gd=true;a.Pc=true;a.Eb=true;a.Qc=false;a.Mc=true;a.I=true;a.K=true;uIb(a,(prb(),orb));a.bd=false;a.jd=true;a.ob=true;a.Cb=true;DIb(a,0);a.n=false;EIb(a,0);a.rb=true;a.N=true;a.o=true;MIb(a,0);a.Q=true;a.S=true;a.bb=true;a.ic=true;a.jc=true;a.hc=true} +function Bgc(a,b){var c,d,e,f,g,h;if(Zsc(a.a,b)){return}g=PBc(b);h=lud(g);c=(HAc(),d=eBc(b),!d?null:rL(F1d(d,29),11));e=Osc(a.a,h);if(!!c&&((c.a&2)!=0||(c.a&512)!=0||(c.a&iNe)!=0)){f=zL(e,79)?rL(e,79):null;if((c.a&2)!=0&&(!f||f.g!=0)){hzc(a.b.g,Rnc(g,(Yfc(),Efc),GK(yK(fgb,1),pKe,2,6,[Wd(new _d('.'),h.a.$d())])));return}if(((c.a&512)!=0||(c.a&iNe)!=0)&&(!f||f.g==0)){hzc(a.b.g,Rnc(g,(Yfc(),Ffc),GK(yK(fgb,1),pKe,2,6,[Wd(new _d('.'),h.a.$d())])));return}}if(e){$1d(b.e,76,true);Bsc(a.a,b,e)}} +function k2c(a,b,c){var d,e,f,g,h;d=c.b;h=(g=zL(d.k,9)?rL(d.k,9):null,!g?$1c(a,(Lhe(),Hhe)):g).Jn();if(!(h.Nl()||h.sn()||h.qn()||h.rn()||qie(h.F,(Lhe(),Zge))==h||h.lm())){c2c(b,c,w1c,GK(yK(fgb,1),pKe,2,6,[]));W1c(a,c,$1c(a,(Lhe(),Hhe)));return}f=h.On();if(!!f&&(f.Nl()||f.i==(Bfe(),zfe))){e=(Ef(f.Nl()||f.i==(Bfe(),zfe),hOe,f),S7d(f.p)).Zn();!!e&&e.f&&c2c(b,c,o1c,GK(yK(fgb,1),pKe,2,6,[]));m2c(a,b,c,f);W1c(a,c,(Ef(f.Nl()||f.i==(Bfe(),zfe),hOe,f),S7d(f.p)))}else{W1c(a,c,$1c(a,(Lhe(),Hhe)))}} +function lkd(a,b){var c,d,e,f,g,h,i,j,k;if(b.isEmpty()||a==a.a.v||a==a.a.g){return a}if(!Sqd(a.a.i,b)){for(i=Rq(a.n.a.Gf()).$d();i.Pd();){h=wL(i.Qd());zf(!b.containsKey(h))}}c=new cld(a.a);for(g=a.i.$d();g.Pd();){f=rL(g.Qd(),20);Wkd(c,emd(f,b))}for(e=a.e.$d();e.Pd();){d=rL(e.Qd(),20);Skd(c,emd(d,b))}!!a.j&&Ykd(c,emd(a.j,b));Zkd(c,emd(a.k,b));a.c&&(c.c=true,c);Rkd(c,Hkd(a.d,b));Vkd(c,Hkd(a.g,b));for(k=a.f.Gf().$d();k.Pd();){j=wL(k.Qd());Tkd(c,j,rL(a.f.get(j),20))}$kd(c,a.n);return bld(c)} +function Gte(a,b,c,d,e){Fte();var f,g,h,i,j,k,l,m,n;xJe(a,'src');xJe(c,'dest');m=yb(a);i=yb(c);sJe((m.i&4)!=0,'srcType is not an array');sJe((i.i&4)!=0,'destType is not an array');l=m.c;g=i.c;sJe((l.i&1)!=0?l==g:(g.i&1)==0,"Array types don't match");n=a.length;j=c.length;if(b<0||d<0||e<0||b+e>n||d+e>j){throw Aib(new rqe)}if((l.i&1)==0&&m!=i){k=sL(a);f=sL(c);if(HL(a)===HL(c)&&bd;){FK(f,h,k[--b])}}else{for(h=d+e;d0&&ZIe(a,b,c,d,e,true)} +function r1b(a,b,c,d){var e,f,g,h,i,j,k;Af(c.j==(h7d(),x5d)||c.j==w5d,c);Af(b.j==P6d,b);g=c.e;zf(g.j==I4d);f=(HAc(),nBc(b,new vEc(N4d)));k=f.b.d;if(!T1d(k)){return}if(B1d(d,58)!=0){g2d(c,b,s1d(k,false));e=EYd(u1d(c),new T3d(L6d,vRe));m1d(g,e);j1d(g,new N2d(U6d),e);K2d(g,c)}else{i=Vd(new _d(String.fromCharCode(46)),G1d(k),KMe,GK(yK(agb,1),ZJe,1,5,[]));h=ODc(a.a,i);g2d(b.e,b,h);e=EYd(u1d(c),new T3d(L6d,vRe));m1d(g,e);j1d(g,new N2d(U6d),e);j=f2d(g,g.g,50);j!=g.g&&(g.g=j);K2d(g,c)}FGb(a.a,g)} +function H5b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;for(m=(j=(new dve(b.b.a)).a.ke().$d(),new jve(j));m.a.Pd();){l=(f=rL(m.a.Qd(),12),rL(f.se(),5));zf(l.j==(h7d(),x5d));i=(l.b?l.b.f:null).Lm();if(!PCe(b.a,i)){continue}if(J5b(c,i)){continue}n=d.b.d;g=EYd(s1d(n,false),new T3d(L6d,i));h=c1d(rL(F1d(l,29),11));o=new f1d(new N2d(x6d),TQe);S0d(h,o);sZd(h.a,dNe);h.e=true;n2d(g,F_d(h,false));e=(Af(NYd(g),g),new P2d(m5d,g));K2d(e,d);k=d.e;k1d(k.e,e,k);FGb(a.b,k);if(!PCe(c.a,i)){OCe(c.b,g);OCe(c.a,i)}}} +function lhc(a,b){var c,d,e,f,g,h,i;if(T1d(b)){c=Hsc(a.a,lud(b),false);if(!c){i=khc(a,b);if(i){return g=i.kl()==2&&i.nl().size()==1?rL(Uw(i.nl().$d()),25):null,!g?null:g.b}}else if(zL(c.d,79)?rL(c.d,79):null){return (zL(c.d,79)?rL(c.d,79):null).b}else if(c.a){d=c.a.c;if(d){return _id(d)}}else if(c.d){e=c.d;if(zL(e,296)){d=rL(e,296).a.c;return _id(rL(tf(d),291))}}else if(c.e){return rld(c.e)}}h=khc(a,b);return !h?null:(f=h.kl()==2&&h.nl().size()==1?rL(Uw(h.nl().$d()),25):null,!f?null:f.b)} +function $kc(a,b,c,d,e){var f,g,h,i,j;if(PCe(a.a.b,e)||PCe(a.a.e,e)){return}f=rL(bk(a.a.d,e),44);if(f.isEmpty()){return}h=rL(f.$d().Qd(),5);if(f.size()==1||Pkc(a.a,f)){if(!Qkc(a.a,c)){j=Ykc(h);if(j){if(Wkc(j)){EIe((i=(Okc(),Nkc),fIe(),i));Tkc(a.a,d,c,j)}else if(RCc(j,false)&&(HAc(),!OAc(c.b,false,a.a.a))){EIe((i=(Okc(),Nkc),fIe(),i));Rkc(a.a,d,c,j)}}else{Okc();g=Vkc(h);if(!!g&&sCc(g)&&(HAc(),!OAc(c.b,false,a.a.a))){EIe((i=Nkc,fIe(),i));Skc(a.a,b,d,c)}}}}else{EIe((i=(Okc(),Nkc),fIe(),i))}} +function fXc(){fXc=cjb;cXc=new Q_b('JSC_CANNOT_PARSE_GENERATED_CODE',(prb(),mrb),new _te('Internal compiler error. Cannot parse generated code: {0}'));eXc=new Q_b('JSC_GENERATED_BAD_CODE',mrb,new _te('Internal compiler error. Generated bad code.----------------------------------------\nExpected:\n{0}\n----------------------------------------\nActual:\n{1}'));dXc=new Q_b('JSC_EXTERN_PROPERTIES_CHANGED',mrb,new _te('Internal compiler error. Extern properties modified from:\n{0}\nto:\n{1}'))} +function Q4c(a,b,c){var d,e,f,g;e=(pf(b.j==(h7d(),I4d),UVe,b),b.b.Lm());d=hEd(e.toLocaleUpperCase());switch(d.g){case 1:return f=h5c(b),K4c(a,rL(f.getAtIndex(0),5),c)?N4c(a,rL(f.getAtIndex(1),5),c):N4c(a,rL(f.getAtIndex(2),5),c);case 9:return P4c(a,b,c);case 10:return O4c(a,b,c);case 21:return b5c(a,b);case 8:return M4c(a,b,c);case 12:return g=N4c(a,(pf(b.j==I4d,UVe,b),x1d(b,2)),c),(pf(b.j==I4d,UVe,b),x1d(b,1)).Lm()+(''+g),Fte(),g;case 13:return R4c(a,b,c);default:throw Aib(new Ire(XVe));}} +function vId(a){var b,c,d,e,f;f=eKd(a.g,0).b.b;e=EId(a);if(!zL(e,425)||!!rL(e,425).a){while(nJd(a,0,(XMd(),bMd))||nJd(a,0,cMd)||nJd(a,0,hMd)||nJd(a,0,YLd)||nJd(a,0,GMd)){switch(eKd(a.g,0).c.g){case 47:b=wHd(a);e=new pNd(new qRd(f,a.f),e,b);break;case 49:aHd(a,cMd);d=oHd(a,1);aHd(a,hLd);e=new GOd(new qRd(f,a.f),e,d);break;case 51:aHd(a,hMd);c=cHd(a);e=new FOd(new qRd(f,a.f),e,c);break;case 107:case 104:e=aJd(a,e);break;default:throw Aib(new Aqe('unexpected case: '+eKd(a.g,0).c));}}}return e} +function Qhe(a,b,c){var d,e,f,g,h,i,j,k;if(b.zn()){return b.Hl(c)}else{if(!(b.sn()||b.qn()||b.rn()||rL(sie(b.F,(Lhe(),Zge)),68)==b)&&!b.lm()&&b.Hl(c)){return true}if(gue(a.t,c)){for(e=ppe(rL(fue(a.t,c),126)).$d();e.Pd();){d=rL(e.Qd(),9);f=d.$m(b);if(!(f.sn()||f.qn()||f.rn()||rL(sie(f.F,(Lhe(),Zge)),68)==f)){h=f.Qn();if(!!h&&!h.a){continue}return true}}}if(b.Qn()){k=b.Qn();g=false;for(j=k.w.b.keySet().$d();j.Pd();){i=wL(j.Qd());if(PCe(a.p,i)){g=true;break}}return g&&PCe(a.b,c)}}return false} +function etd(a,b,c,d,e,f,g){var h;tf(a);tf(b);qf(!d||d==d.a.s||d.c==f,'isLoose: %s, fn: %s',(Dqe(),f?true:false),d);kf(!d||d!=d.a.c);if(e){h=b.a.A;pf(Jse(h,ATe)||Jse(h,gNe)||Jse(h,yTe),"Can't create namespace with nominal type %s",h)}f&&pf(Sud(b.a)||Tud(b.a,gNe),'Cannot create loose objectType with nominal type %s',b);qf(!d||Tud(b.a,gNe),'Cannot create objectType of nominal type %s with function (%s)',b,d);this.a=a;this.d=b;this.g=f?Etd(c):c;this.b=d;this.e=e;this.c=f;this.f=f?(xsd(),vsd):g} +function DBd(a,b){var c,d;if(b!=(wCd(),lCd)){UAd(a,GXe,a.i.g,CCd(a.i));return b}else{d=new RCe;while(true){if(hBd(a,vCd)){c=a.i.n;a.j.contains(c)||WAd(a,'msg.jsdoc.suppress.unknown',c,a.i.g,CCd(a.i));OCe(d,a.i.n);!a.n?DCd(a.i):_Ad(a)}else{UAd(a,GXe,a.i.g,CCd(a.i));return b}if(iBd(a,oCd,eCd)){b=!a.n?DCd(a.i):_Ad(a)}else{break}}if(hBd(a,rCd)){!a.n?DCd(a.i):_Ad(a);N0d(a.e,d)||UAd(a,'msg.jsdoc.suppress.duplicate',a.i.g,CCd(a.i))}else{UAd(a,GXe,a.i.g,CCd(a.i))}return bBd(a,!a.n?DCd(a.i):_Ad(a))}} +function PKd(b){var c,d,e,f;while(b.indexOf(wKe)!=-1){e=Ose(b,hte(92));try{if(b.charCodeAt(e+1)!=117){return null}if(b.charCodeAt(e+2)!=123){d=e+6;f=b.substr(e+2,d-(e+2))}else{d=e+3;while(Nqe(b.charCodeAt(d),16)>=0){++d}if(b.charCodeAt(d)!=125){return null}f=b.substr(e+3,d-(e+3));++d}c=Are(f,16)&uKe;if(!(KKd(c)||/\d/.test(String.fromCharCode(c)))){return null}b=b.substr(0,e)+String.fromCharCode(c)+b.substr(d)}catch(a){a=zib(a);if(zL(a,140)||zL(a,588)){return null}else throw Aib(a)}}return b} +function Kie(a){lue(a.t);LDe(a.c);zie(a);lue(a.k);Eie(a,sie(a,(Lhe(),Dge)));Eie(a,sie(a,Fge));Eie(a,sie(a,Gge));Eie(a,sie(a,Jge));Eie(a,sie(a,bhe));Fie(a,sie(a,bhe),'Null');Eie(a,sie(a,ehe));Eie(a,sie(a,hhe));Eie(a,sie(a,nhe));Eie(a,sie(a,Mge));Eie(a,sie(a,Jhe));Eie(a,sie(a,Oge));Eie(a,sie(a,Ehe));Eie(a,sie(a,phe));Eie(a,sie(a,rhe));Eie(a,sie(a,zhe));Eie(a,sie(a,the));Eie(a,sie(a,vhe));Eie(a,sie(a,whe));Eie(a,sie(a,Khe));Fie(a,sie(a,Khe),'Undefined');Fie(a,sie(a,Khe),dPe);Fie(a,sie(a,Rge),gNe)} +function X2c(a,b,c){var d,e,f,g,h,i,j;d=b.b;g=d.d;c=_2c(a,b,c);f=zL(d.k,9)?rL(d.k,9):null;i=zL(g.k,9)?rL(g.k,9):null;j=a.i;if(!!f&&!!i){e=f.lm();h=i.lm();e&&h?(j=a.i):!e&&f.Bn(H7d(f,(Lhe(),xhe)))||!h&&i.Bn(H7d(i,(Lhe(),xhe)))?(j=I2c(a,(Lhe(),whe))):e||h?(j=a.i):f.Bn(jie(a.e,GK(yK(Teb,1),PKe,57,0,[(Lhe(),Khe),bhe,ihe,Gge,Fge])))&&i.Bn(jie(a.e,GK(yK(Teb,1),PKe,57,0,[Khe,bhe,ihe,Gge,Fge])))?(j=I2c(a,hhe)):(j=jie(a.e,GK(yK(Teb,1),PKe,57,0,[whe,hhe])))}b.k=j;b.j==(h7d(),n4d)&&k3c(a,c,d,f,j);return c} +function aNd(){XMd();return GK(yK(Uab,1),PKe,37,0,[sLd,xLd,FLd,$Kd,bLd,cLd,lLd,mLd,oLd,pLd,qLd,rLd,BLd,CLd,DLd,GLd,JLd,KLd,VLd,rMd,FMd,JMd,KMd,NMd,PMd,SMd,TMd,UMd,VMd,dLd,kLd,tLd,yLd,zLd,ILd,EMd,HLd,LLd,PLd,eMd,mMd,nMd,oMd,CMd,WMd,aMd,fLd,bMd,gLd,cMd,hLd,hMd,uMd,jLd,_Ld,eLd,OLd,ELd,WKd,vLd,WLd,wLd,XLd,iMd,QLd,yMd,AMd,fMd,kMd,SLd,MLd,sMd,QMd,TKd,YKd,_Kd,XKd,LMd,VKd,dMd,pMd,iLd,uLd,jMd,RLd,zMd,BMd,gMd,NLd,tMd,RMd,UKd,ZKd,aLd,vMd,wMd,lMd,ZLd,MMd,ALd,$Ld,DMd,qMd,xMd,GMd,HMd,IMd,YLd,OMd,nLd,TLd,ULd])} +function RRd(a){var b,c,d,e;d=0;c=new zte;b=a.b.b;if(zL(a.a,205)){e=rL(a.a,205).a}else if(zL(a.a,95)){e=rL(a.a,95).a}else{throw Aib(FRd(a))}if(a.b.i){if(b==111){c.a+='0';d+=1}else{c.a+='0x';d+=2}}if(100==b){a.b.e?ute(c,a.a):(c.a+=Uib(e),c);if(Dib(e,0)<0){if(a.b.g){return URd(a,c)}else a.b.k&&++d}else{if(a.b.d){yte(c,0,String.fromCharCode(43));d+=1}else if(a.b.j){yte(c,0,String.fromCharCode(32));d+=1}}}else{zL(a.a,95)&&(e=Cib(e,4294967295));111==b?vte(c,ise(e,3)):vte(c,ise(e,4))}return IRd(a,c,d)} +function Csd(a,b,c){if(Msd(a)){return vte(ute(b,dkd(Msd(a))),HMe)}if(c.wm()){a.b?Wjd(a.b,b,c):(new yue(a.g.a)).a.size()==0?Tud(a.d.a,ATe)?(b.a+='!Object',b):Ird(a.d,b,c):Bsd(a,b,c);return b}if(!Rsd(a)){if(a.b){return Wjd(a.b,b,c)}return Ird(a.d,b,c)}!Tud(a.d.a,gNe)&&!Sud(a.d.a)&&!Tud(a.d.a,ATe)?Ird(a.d,b,c):(a.f.a&1)!=0?(b.a+=rUe,b):(a.f.a&2)!=0?(b.a+=sUe,b):!!a.e&&ute(b,a.e);if(a.b){b.a+='<|';Wjd(a.b,b,c);b.a+='|>'}(!a.e||(new yue(a.g.a)).a.size()!=0)&&Bsd(a,b,c);a.c&&(b.a+=' (loose)',b);return b} +function b$d(a){var b,c,d,e,f,g,h,i,j;e=new idd;!!a.i&&Vcd(e,a.i.a);!!a.g&&Vcd(e,a.g.a);if(a.d){!!a.d.a&&Vcd(e,a.d.a.a);if(a.d.e){for(d=new lxe(a.d.e);d.a0&&ote(m,a.a);vte(m,yzc(a,c))}return m.a;}} +function XCc(a){HAc();var b,c,d,e,f,g,h;e=(f=eBc(a),!f?null:rL(F1d(f,29),11));if(!!e&&b$d(e).a.length!=0){return false}c=rL(F1d(a,51),28);if(!(!!c&&c.lk())&&(!e||(e.a&37)==0)){return false}if(VCc(a.e)){h=a;d=a.b}else if(a.j==(h7d(),m5d)){b=a.b;if(b.j!=m4d||b.b.j!=x5d){return false}h=b.b;d=b.b?b.b.f:null}else if(a.j==x5d){g=a.e;if(g.j!=m4d||g.e.j!=m5d){return false}h=a;d=g.b?g.b.f:null}else{return false}if(!d||!h){return false}if(d.j==(h7d(),m6d)){return true}return d.j==p6d&&X1d(h,d.b)&&(d.b?d.b.f:null).j==m6d} +function gQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;kf(b.j==(h7d(),r5d));kf((d=rL(F1d(b,51),28),!!d&&d.lk()));f=(HAc(),g=eBc(b),!g?null:rL(F1d(g,29),11));l=b.k;e=!l?null:l.sm();if(e){k=e.xl();(tf(k),m=WFb(c).vj((Lhe(),nhe)),n=k.om(m),n.Ll())||(a.a|=32)}if(!f){a.a|=4;a.a|=2}else{if((i=!f.d?null:f.d.k,!i?(jye(),jye(),iye):i).contains(pNe)){a.a|=8}else{j=(h=!f.d?null:f.d.k,!h?(jye(),jye(),iye):h);if(j.size()>1||j.size()==1&&!j.contains(pNe)){a.a|=16}else if(ZZd(f).isEmpty()){if((f.a&nKe)!=0);else{a.a|=4}}else{a.a|=2}}}} +function l3c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;Af(b.j==(h7d(),I4d)||b.j==f6d,b);i=0;g=y1d(b);j=b.b;for(m=(q=c.c.a,q?!q.b?(jye(),jye(),iye):new F3d(q.b):(jye(),jye(),iye)).$d();m.Pd();){l=rL(m.Qd(),5);if(i+1>=g){return}j=j.d;k=(p=zL(j.k,9)?rL(j.k,9):null,!p?a.i:p);n=(o=zL(l.k,9)?rL(l.k,9):null,!o?a.i:o);q3c(k,n);r=null;if(n.Tn()){s=n.Tn();for(e=qoe(s).$d();e.Pd();){d=rL(e.Qd(),9);if(d.On()){r=d.On();break}}}else{r=n.On()}if(!!r&&j.j==r5d&&!!k.On()){f=k.On();h=!!rL(F1d(j,29),11);o2d(j,O2c(a,r,f,h))}++i}} +function Qcd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;d=0;l=(jye(),new qze(new nve(b.d))).b.size();i=Iib(Mib(Mib(l,l),l),100)?Mib(Mib(l,l),l):100;q=new tEe;for(k=c.$d();k.Pd();){j=k.Qd();OCe(q,rL(NDe(b.d,j),87))}for(;q.a.size()!=0&&Dib(d,i)<0;d++){o=(h=rL((n=(new dve(q.a)).a.ke().$d(),new jve(n)).a.Qd(),12),rL(h.se(),87));p=o.te();q.a.remove(o)!=null;m=o.Kk();for(g=new lxe(m);g.a0||d.n+d.i>1||d.f>0)){c=!!d.d;for(h=(!d.r?(lr(),lr(),kr):d.r).$d();h.Pd();){g=rL(h.Qd(),124);if(g==d.d){continue}if(g.g==(Pec(),Kec)){c&&DGb(a.a,Rnc(g.c,NDb,GK(yK(fgb,1),pKe,2,6,[bec(d)])))}else if(g.g==Nec||g.g==Oec){c&&!aEb(g)&&DGb(a.a,Rnc(g.c,NDb,GK(yK(fgb,1),pKe,2,6,[bec(d)])));c=true}else g.g==Iec&&DGb(a.a,Rnc(g.c,ODb,GK(yK(fgb,1),pKe,2,6,[bec(d)])))}}}} +function MTd(a,b){var c,d,e,f,g,h;if(a.c.a.length==0){if(!a.a&&a.b.length==2){vte(b,a.b);return}else if(a.c.a.length==0&&a.b.length==0){vte(b,a.a?'[\\S\\s]':'(?!)');return}}b.a+='[';a.a&&(b.a+='^',b);vte(b,a.b);g=!a.a&&a.b.length==0;c=false;for(e=0,f=a.c.a.length>>1;e0&&(j=i.substr(0,m));if(Jse(ANe,j)&&!Wrb(i.substr(m+1))){return false}k=PCe(a.f,b)||PCe(a.f,j);l=gue(a.g,b)||gue(a.g,j);for(e=f.$d();e.Pd();){d=wL(e.Qd());if(PCe(a.f,d)){k=true;break}if(gue(a.g,d)){l=true;break}}return !l&&!k} +function yxc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;kf(b.j==(h7d(),I4d)||b.j==f6d);g=b.b;f=new cld(a.w);p=c;for(e=g.d;e;e=e.d){n=cxc(a,e,p,a.r,a.r);p=n.a;Wkd(f,n.b)}k=eKe==d.kl()?a.c:d;j=$pd(a.w,bld(Qkd(Zkd(f,k))));h=cxc(a,g,p,Qqd(a.w),j);i=qld(h.b);o=i.k;return new ezc(h.a,0==o.kl()||-1==o.kl()||eKe==o.kl()||Tld(o)||512==o.kl()||8==o.kl()||XLe==o.kl()||16==o.kl()||(m=o.nl(),m.size()==1&&rL(Uw(m.$d()),25).c)||(l=o.kl()==2&&o.nl().size()==1?rL(Uw(o.nl().$d()),25).d:null,!!l&&!(!Tud(l.a,gNe)&&!Sud(l.a)&&!Tud(l.a,ATe)))?d:o)} +function UBc(a){HAc();var b,c,d,e;switch(a.j.g){case 31:case 91:return a.Lm();case 116:e='';for(c=a.b;c;c=c.d){if(c.j==(h7d(),L6d)){e=e+c.Lm()}else if(c.j==T6d){if(c.b.j==L6d){e=e+c.b.Lm()}else{return null}}}return e;case 29:d=a.Lm();if(Jse(mMe,d)||Jse(AUe,d)||Jse(PNe,d)){return d}break;case 30:return ''+a.Km();case 34:return $Oe;case 35:return _Oe;case 32:return kKe;case 79:return mMe;case 19:b=OBc(a.b);if(b!=(Vne(),Une)){return b.so(true)?$Oe:_Oe}break;case 42:return LAc(a);case 43:return '[object Object]';}return null} +function Eub(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;d=b.b;n=G1d(b.b.d);Z1d(d,WNe,WNe.length)&&(m=HMe.length,!Jse(n.substr(n.length-m,m),HMe))&&(n+=HMe);h=x1d(b,2);f=I2d(ODc(a.a,n+'.'+h.Lm()),b);g=Z1d(d,WNe,WNe.length);if(g){i=zub(a,x1d(b,3));if(i){Iub(f,i)}else{l=rL(F1d(b,29),11);!!l&&(l.a&hNe)==mNe?(k=f2d(f,f.g,29),k!=f.g&&(f.g=k),!!l&&(f.g=new A3d(29,l,f.g)),f):Iub(f,new N2d((h7d(),x6d)))}j=f2d(b,b.g,29);j!=b.g&&(b.g=j)}else{Iub(f,new N2d((h7d(),x6d)))}e=H2d((Af(NYd(f),f),new P2d((h7d(),m5d),f)),c);j1d(c.e,e,c);FGb(a.a,g?b:f)} +function wxc(a,b,c,d,e){var f,g,h,i,j,k,l,m;f=b.j;g=b.b;j=b.b?b.b.f:null;if((512==e.kl()||8==e.kl())&&f==(h7d(),g4d)||(XLe==e.kl()||16==e.kl())&&f==(h7d(),p6d)){h=cxc(a,g,c,a.r,e);k=cxc(a,j,h.a,a.r,e);return k}else if((XLe==e.kl()||16==e.kl())&&f==(h7d(),g4d)||(512==e.kl()||8==e.kl())&&f==(h7d(),p6d)){l=cxc(a,g,c,a.r,e);h=cxc(a,g,c,a.r,_ld(e));k=cxc(a,j,h.a,a.r,e);i=Tnd(l.b,h.b);return _xc(a,f,i,l,k)}else{m=f==(h7d(),g4d)?a.e:a.p;l=cxc(a,g,c,a.r,m);h=cxc(a,g,c,a.r,_ld(m));k=cxc(a,j,h.a,d,e);i=Tnd(l.b,h.b);return _xc(a,f,i,l,k)}} +function J5c(a,b,c,d){var e,f;Af(b.j==(h7d(),w5d),b);f=b.b?b.b.f:null;c.zn()&&!(f.j==x5d&&f.b.j==_5d&&Jse(f.b.Lm(),VRe))&&W5c(a,Rnc(f,t5c,GK(yK(fgb,1),pKe,2,6,["'[]'",rUe])));if(c.lm()){!d.Fn()&&!d.Hn()&&U5c(a,f,_Ve,d,(Lhe(),fhe))}else{e=S7d(c.Vm());!!e&&pne(e.cn(),tie(a.g))?G5c(a,f,d,jne(e.cn(),tie(a.g)),'restricted index type'):!!e&&e.jn()?d.Fn()||U5c(a,f,'array access',d,(Lhe(),hhe)):c.Gn()?d.Hn()||U5c(a,f,_Ve,d,(Lhe(),whe)):V5c(a,b,'only arrays or objects can be accessed',c,jie(a.g,GK(yK(Teb,1),PKe,57,0,[(Lhe(),Dge),nhe])))}} +function V5c(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p;if(!N7d(d,e,a.f)){l=null;k=null;if(e.An()){l=new GHe;k=new GHe;p=zL(e,24)?rL(e,24):null;i=zL(d,24)?rL(d,24):null;if(!!p&&!!i){for(o=(g=(new ewe(abe(p).a)).a.ke().b.Ho(),new kwe(g));o.a.Pd();){n=(f=rL(o.a.Qd(),12),wL(f.se()));m=p.fo(n);j=i.sn()||i.qn()||i.rn()||qie(i.F,(Lhe(),Zge))==i||i.lm()||!!i.ho(n);(!m.on()||j)&&(j?N7d(i.fo(n),m,a.f)||k.a.put(n,(Dqe(),Bqe))==null:l.a.put(n,(Dqe(),Bqe))==null)}}}h=Rnc(b,x5c,GK(yK(fgb,1),pKe,2,6,[$5c(c,d,e,l,k)]));p4c(a.d,a.c,d,e,h);DGb(a.b,h)}} +function $5c(a,b,c,d,e){var f,g,h,i,j,k;h=b.Um(new zte,false).a;k=c.Um(new zte,false).a;if(Jse(h,k)){h=b.Um(new zte,true).a;k=c.Um(new zte,true).a}j='';i='';!!d&&d.a.size()!=0&&(j=Wd(new _d(','),(g=(new ewe(d.a)).a.ke().b.Ho(),new kwe(g))));!!e&&e.a.size()!=0&&(i=Wd(new _d(','),(f=(new ewe(e.a)).a.ke().b.Ho(),new kwe(f))));return j.length>0||i.length>0?aue('{0}\nfound : {1}\nrequired: {2}\nmissing : [{3}]\nmismatch: [{4}]',GK(yK(agb,1),ZJe,1,5,[a,h,k,j,i])):aue('{0}\nfound : {1}\nrequired: {2}',GK(yK(agb,1),ZJe,1,5,[a,h,k]))} +function Xsd(a,b){var c,d,e,f,g,h;zf(gtd(a.d,b.d));if(a==a.a.jb&&b.f.a==0){return b}if(a.e){return Ysd(a,b)}Sud(a.d.a)&&b.d.a.g==2?(g=a.d):(g=psd(a.d,b.d));if(!Tud(g.a,gNe)&&!Sud(g.a)&&!Tud(g.a,ATe)){zf(!a.b&&!b.b);f=Jtd(a.a,true,g,a.g,b.g);if(uqd(a.a,f)){return a.a.O}return new etd(a.a,g,f,null,a.e,false,a.f)}h=a.b;c=a.c;if(Tud(g.a,gNe)&&!a.b){h=b.b;c=b.b.c}c&&Tud(g.a,ATe)&&(g=qqd(a.a));e=Jtd(a.a,true,g,a.g,b.g);if(uqd(a.a,e)){return a.a.O}d=!h?null:jkd(h,b.b);if(!(!d||d!=d.a.c)){return a.a.O}return new etd(a.a,g,e,d,a.e,c,a.f)} +function jQb(a,b,c){var d,e;switch(b.j.g){case 26:if(b.j==(h7d(),x5d)&&wD(a.a,(b.b?b.b.f:null).Lm())){hQb(a);return true}if($Bc(c)&&c.b==b){return false}e=gQb(a,b);if(e){e.b.b==0||(rL(CEe(e.b),218).b=true);c.j==x5d||uQb(e)}return true;case 28:{hQb(a)}return false;case 33:case 29:d=rL(tf(gQb(a,b)),289);d.b.b==0||(rL(CEe(d.b),218).b=true);c.j==(h7d(),x5d)||uQb(d);return true;case 39:case 72:case 73:case 67:hQb(a);return false;case 82:kf(b.j==(h7d(),F4d));!!b.b&&hQb(a);return true;default:if(lQb(b)){hQb(a);return false}return true;}} +function Bhc(a,b,c){var d,e,f,g,h,i,j;j=b.Lm();h=$sc(a.a,j,false);if(kgc(b)){Ngc(a,(HAc(),i=eBc(b),!i?null:rL(F1d(i,29),11)),j,b.b,null,a.a);return}if(lgc(b)){Ngc(a,(HAc(),i=eBc(b),!i?null:rL(F1d(i,29),11)),j,b,null,a.a);return}if(h&&itc(a.a,j)){return}if(tDc(b)||uCc(b)){h||zsc(a.a,j,a.c.d.d.G,false,(e=rL(F1d(b,51),28),!!e&&e.lk()));return}f=b.b;if(!!f&&f.j==(h7d(),r5d)){return}if(c.j==(h7d(),M4d)){zsc(a.a,j,a.c.d.d.G,false,false)}else{g=egc(a.c,b);d=dgc(a.c,b,a.a);!d&&(d=$gc(a,b));zsc(a.a,j,d,g,(e=rL(F1d(b,51),28),!!e&&e.lk()))}} +function gic(a){eic();var b,c,d,e,f,g,h,i,j;if(!a){return jye(),jye(),hye}i=new JCe;c=null;f=0;for(e=dh(Ig(dic,a));Mb(e);){d=Nb(e);++f;if(d.length==0){continue}if(d.charCodeAt(0)==91){b=bte(d,1,d.length-1);c=rL(b==null?Xk(hDe(i.d,null)):xDe(i.e,b),245);if(!c){c=new Nt;b==null?iDe(i.d,null,c):yDe(i.e,b,c)}else{throw Aib(new ooc(WRd(FTe,GK(yK(agb,1),ZJe,1,5,[a,d,Zre(f)]))))}}else{j=Ose(d,hte(58));if(j!=-1){h=d.substr(0,j);g=bte(d,j+1,d.length);c.put(h,g)}else{throw Aib(new ooc(WRd(FTe,GK(yK(agb,1),ZJe,1,5,[a,d,Zre(f)]))))}}}return i} +function Soc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;m=a.e;o=b.f;k=b.d;g=b.a;d=new zte;e=new zte;l=Voc(o,k);if(a.c){!m?null:TFb(m,b.f,b.d,b.a);e.a+=''+l}n=!m?null:SFb(m,o,k);if(a.b){vte(e,vjb(a,c?(prb(),orb):(prb(),mrb)));e.a+=' - '}vte(e,b.c);vte(d,xjb(a,e.a));d.a+=_Je;if(n!=null){d.a+=''+n;d.a+=_Je;if(a.a==(TYc(),RYc)&&0<=g&&g<=n.length){for(i=0;i1){return false}zf(!g.isEmpty());zf(g.contains(c))}return true} +function fTd(b,c){var d,e,f,g,h,i,j;if(b.c==b.a){return c}switch(Ese(b.e,b.c)){case 43:++b.c;i=1;h=eKe;break;case 42:++b.c;i=0;h=eKe;break;case 63:++b.c;i=0;h=1;break;case 123:++b.c;j=b.c;f=Nse(b.e,125,j);if(f<0){b.c=j-1;return c}e=bte(b.e,j,f);b.c=f+1;d=Ose(e,hte(44));try{i=Are(d>=0?e.substr(0,d):e,10);h=d>=0?d+1!=e.length?Are(e.substr(d+1),10):eKe:i}catch(a){a=zib(a);if(zL(a,140)){i=h=-1}else throw Aib(a)}if(i<0||i>h){b.c=j-1;return c}break;default:return c;}g=true;if(b.c%s) from this (%s)",b,f,Fs(a.b,f),a);e=rL(Fs(a.b,f),20);d=rL(Fs(b.b,f),20);c=a.a.u;if(c.L&&Tud(a.a,lOe)){e=amd(e,c.p);d=amd(d,c.p);if(!Rld(e,d,new bvd((rrd(),rrd(),qrd)))&&!Rld(d,e,new bvd((null,qrd)))){return false}}else if(!Rld(e,d,new bvd((rrd(),rrd(),qrd)))){return false}}return true} +function m2c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;f=(!c.b?(jye(),jye(),iye):new F3d(c.b)).$d();f.Qd();o=(k=d.c.a,k?!k.b?(jye(),jye(),iye):new F3d(k.b):(jye(),jye(),iye)).$d();m=0;n=null;while(f.Pd()&&(o.Pd()||!!n&&B1d(n,30)!=0)){o.Pd()&&(n=rL(o.Qd(),5));e=rL(f.Qd(),5);++m;E5c(a.p,e,(h=zL(e.k,9)?rL(e.k,9):null,!h?$1c(a,(Lhe(),Hhe)):h),(g=zL(n.k,9)?rL(n.k,9):null,!g?$1c(a,(Lhe(),Hhe)):g),c,m)}l=y1d(c)-1;j=Zde(d);i=Yde(d);(j>l||i3?wL(h.a.getAtIndex(3)):'');g.indexOf(LMe)!=-1?ov(d,Xse(g,'.*\\.prototype\\.',''),e):(Vcd(f.b,(Ep(g,e),aB(),new tu(g,e))),f)}return new _Vc(tq(d.a),ps(f.b))} +function vBd(a,b,c){var d,e;while(true){switch(b.g){case 13:if(a.g==($Bd(),YBd)){a.g=ZBd;b=oBd(a,b,c)}else{b=!a.n?DCd(a.i):_Ad(a)}break;case 16:d=true;ZAd(a,c);if(I_d(a.e)){a.d=F_d(a.e,false);e=a.d.j;switch(e.g){case 0:case 2:VAd(a,Vb(e.f!=null?e.f:''+e.g));d=false;}}return d;case 0:F_d(a.e,false);UAd(a,'msg.unexpected.eof',a.i.g,CCd(a.i));ZAd(a,c);return false;case 1:a.g==($Bd(),ZBd)&&(a.g=YBd);b=!a.n?DCd(a.i):_Ad(a);break;default:if(b==(wCd(),uCd)&&a.g==($Bd(),YBd)){b=!a.n?DCd(a.i):_Ad(a)}else{a.g=($Bd(),ZBd);b=aBd(a,!a.n?DCd(a.i):_Ad(a))}}}} +function wCd(){wCd=cjb;hCd=new xCd('EOF',0);iCd=new xCd('EOL',1);kCd=new xCd('LEFT_ANGLE',2);qCd=new xCd('RIGHT_ANGLE',3);vCd=new xCd(DWe,4);nCd=new xCd('LEFT_SQUARE',5);tCd=new xCd('RIGHT_SQUARE',6);lCd=new xCd('LEFT_CURLY',7);rCd=new xCd('RIGHT_CURLY',8);mCd=new xCd('LEFT_PAREN',9);sCd=new xCd('RIGHT_PAREN',10);eCd=new xCd('COMMA',11);dCd=new xCd('COLON',12);bCd=new xCd(HXe,13);oCd=new xCd('PIPE',14);uCd=new xCd('STAR',15);gCd=new xCd('EOC',16);pCd=new xCd('QMARK',17);fCd=new xCd('ELLIPSIS',18);cCd=new xCd('BANG',19);jCd=new xCd('EQUALS',20)} +function _hc(a,b,c,d){var e;e=d==c.b;switch(c.j.g){case 92:return a;case 46:return d==(c.b?c.b.f:null)?a:a.c?a:new bic(a.a,true,a.b);case 60:case 62:return e?new bic(c,true,a.a?a:null):a;case 61:return e?new bic(c,false,a.a?a:null):a;case 66:return e?new bic(c,true,a.a?a:null):Zhc;case 41:case 47:return e==a.c?a:new bic(a.a,e,a.b);case 25:case 19:case 4:case 5:case 36:case 37:return a.c?a:new bic(a.a,true,a.b);case 28:return aic(a,!e&&Whc(b,c));case 81:return Zhc;default:return HAc(),c.j!=(h7d(),Z5d)&&nDc(c.e)?Zhc:a.c?new bic(a.a,false,a.b):a;}} +function VKc(b,c,d){var e;if(!xEd(b.a.fi(),b.c.b.A)){JIe((GKc(),FKc),'Skipping pass '+b.b+'\nfactory features: '+b.a.fi()+'\ncompiler features: '+b.c.b.A);return}DIe((GKc(),FKc),'Running pass '+b.b);!!b.c.q&&(b.c.a=cpb(new jpb(b.c.b),b.c.e));!!b.c.r&&qKc(b.c.r,b.b,b.a.c);b.d=new y_c;b.a.ei(b.c.b).ng(c,d);qFb(b.c.b);try{if(!b.c.o){SGb(b.c.b,-1)}else{b.c.n+=b.c.p;SGb(b.c.b,b.c.n)}e=x_c(b.d);!!b.c.r&&rKc(b.c.r,b.b,e);JKc(b.c,b.b,d);KKc(b.c,b.b,c,d)}catch(a){a=zib(a);if(zL(a,31)){throw Aib(new EJ('Sanity check failed for '+b.b))}else throw Aib(a)}} +function Hpb(a,b){var c,d,e,f,g,h,i,j,k,l;i=b.e;f=i.j==(h7d(),Z4d);if(!($Bc(i)&&i.b==b)&&i.j!=I5d&&i.j!=V4d&&!f){return}h=_pb(aqb(b.b.k));j=(b.b?b.b.f:null).Lm();e=Ypb(a,h,j);if(e){d=rL(F1d(i,29),11);if(!!d&&(l=!d.d?null:d.d.p,!l?(jye(),jye(),iye):l).contains(cNe)){return}if(f){DGb(a.a,Szc(b,upb,GK(yK(fgb,1),pKe,2,6,[j])));return}if(!h||h.Sl()&&!h.sm().Nl()){return}g=h;while(g){if(Nj(a.f,g,j)||Nj(a.f,(c=g.bl(),!c?g:c.il()),j)){DGb(a.a,Szc(b,vpb,GK(yK(fgb,1),pKe,2,6,[j])));break}g=g.vl()}dk(a.f,h,j);if(h.Ul()){k=h.vl();!!k&&k.Hl(j)&&dk(a.f,k,j)}}} +function AGb(a){var b;kIb(a.T,(K_b(),b_b))?(a.T.B=true):jIb(a.T,b_b)?(a.T.B=false):a.T.B||iIb(a.T,new S$b(Q$b((zWc(),wWc)),(prb(),nrb)));b=NKb(a.T.Fd,t_b);b==0?(a.T.Bd=true,undefined):b==1&&(a.T.Bd=false,undefined);if(a.T.Bd&&a.T.dd){a.T.B=true;iIb(a.T,new S$b(Z$b,(prb(),nrb)));iIb(a.T,new S$b(y_b,nrb));iIb(a.T,new S$b(z_b,nrb));iIb(a.T,new S$b((Gbc(),sbc),nrb));iIb(a.T,new S$b(Q$b((zWc(),wWc)),orb))}a.T.t!=(prb(),nrb)&&!jIb(a.T,n_b)&&iIb(a.T,new S$b(n_b,a.T.t));lIb(a.T)&&iIb(a.T,new S$b(j_b,mrb));!a.T.A&&!kIb(a.T,d_b)&&iIb(a.T,new S$b(d_b,nrb))} +function bGc(){bGc=cjb;$Fc=new Q_b('JSC_OBJECT_PROPERTY_STRING_NUM_ARGS',(prb(),mrb),new _te('goog.testing.ObjectPropertyString instantiated with "{0}" arguments, expected 2.'));_Fc=new Q_b('JSC_OBJECT_PROPERTY_STRING_QUALIFIED_NAME_EXPECTED',mrb,new _te('goog.testing.ObjectPropertyString instantiated with invalid argument, qualified name expected. Was "{0}".'));aGc=new Q_b('JSC_OBJECT_PROPERTY_STRING_STRING_LITERAL_EXPECTED',mrb,new _te('goog.testing.ObjectPropertyString instantiated with invalid argument, string literal expected. Was "{0}".'))} +function a2c(a,b){var c,d,e,f,g;if(b.lm()||b.Bn(H7d(b,(Lhe(),ihe)))||b.Bn(H7d(b,(Lhe(),xhe)))||b.kn()||b.Kl()||b.mn()||b.xn()||b.Wl()||!!b.Qn()||b.Zl()||b.mm()){return true}if(b.Mn()){return a2c(a,b.Mn().d)}if(b.jn()){return true}if(b.Sn()){g=b.Sn();if(g.i.jn()){return a2c(a,rL(g.b.getAtIndex(0),9))}}if(zL(b,222)){return a2c(a,rL(b,222).j)}if(b.Tn()){for(d=qoe(b.Tn()).$d();d.Pd();){c=rL(d.Qd(),9);if(!a2c(a,c)){return false}}return true}if(b.vn()){f=zL(b,24)?rL(b,24):null;e=f.Zn();if(!!e&&e.i==(Bfe(),zfe)){return true}return U1c(a,f)}return false} +function Wud(a,b,c,d,e,f,g){var h,i,j,k;wjd.call(this,a,c,b);this.c=(rrd(),rrd(),qrd);this.k=(null,qrd);this.n=(null,qrd);this.o=new tEe;tf(f);Ef(Zud(b),'Invalid defsite %s',b);!d&&(d=(lr(),lr(),kr));this.q=d;this.g=!!b&&(i=rL(F1d(b,51),28),!!i&&i.lk())&&Jse(c,aTe)?2:e;this.i=!!b&&(j=rL(F1d(b,51),28),!!j&&j.lk())&&Jse(c,aTe)?(xsd(),vsd):f;this.e=g;this.s=new jsd((_C(),$C),this);!!b&&(h=rL(F1d(b,51),28),!!h&&h.lk())&&Jse(c,gNe)?(k=ktd(this.u.v,this.s)):(k=ltd(this.s));this.r=(hld(),Wnd(k.a,2,(Qq(),new XD(k)),null,eld));this.t=Tnd(this.u.j,this.r)} +function wHc(a,b,c,d){var e,f,g;kf(b.j==(h7d(),m4d));if(!a.a){return b}if(!d.b||d.b.d!=(d.b?d.b.f:null)){return b}HAc();if(OAc(c,false,a.c)){return b}if(Gjb(a,c,d.b)){f=d.b?d.b.f:null}else if(iCc(d.j)&&Gjb(a,c,d.b?d.b.f:null)){f=d.b}else{return b}switch(d.j.g){case 13:g=n4d;break;case 3:g=o4d;break;case 1:g=p4d;break;case 2:g=q4d;break;case 16:g=r4d;break;case 10:g=t4d;break;case 17:g=u4d;break;case 15:g=v4d;break;case 11:g=w4d;break;case 14:g=x4d;break;case 12:g=y4d;break;default:return b;}e=new R2d(g,u1d(c),u1d(f));g2d(b.e,b,e);GGb(a.c);return e} +function yYc(a,b,c,d){var e,f,g,h,i,j,k;j=d.vk();i=rL(bk(a.a.f,d),44);FHe(a.a.g,b);FHe(a.a.g,c);b.a-=i.size();c.a+=i.size();EHe(a.a.g,b);EHe(a.a.g,c);k=j._j(c.d);if(k){if(j.$j().j==(h7d(),r5d)&&D1d(j.$j()).j==F4d){dk(a.a.e,D1d(j.$j()),c.d);Rj(a.a.e,D1d(j.$j()),b.d)}for(e=j;e!=k.k;e=e.Zj()){dk(a.a.e,e.$j(),c.d);Rj(a.a.e,e.$j(),b.d)}}for(h=i.$d();h.Pd();){g=rL(h.Qd(),567);f=g.a;f.Qm(c.d);if(g.b.$j()==j.$j()){if(d.sk()!=g.a){dk(a.a.e,j.$j(),c.d);Rj(a.a.e,j.$j(),b.d)}}else{for(e=g.b;e.$j()!=j.$j();e=e.Zj()){dk(a.a.e,e.$j(),c.d);Rj(a.a.e,e.$j(),b.d)}}}} +function mxc(a,b,c,d){var e,f,g,h,i,j;e=b.b;j=b.b?b.b.f:null;h=Iyc(a,b);f=bxc(a,e,c,a.j);Rld(f.b,a.j,new bvd((rrd(),rrd(),qrd)))||Qyc(a,e,(h7d(),H5d),a.j,f.b);f=bxc(a,j,f.a,h);if(!Rld(f.b,a.n,new bvd((null,qrd)))){Qyc(a,j,(h7d(),H5d),DKe,f.b);f.b=a.b;return f}if(Pld(f.b)){hzc(a.Q,Rnc(j,qwc,GK(yK(fgb,1),pKe,2,6,[])));f.b=a.b;return f}i=a.b;if(e.j==(h7d(),L6d)){g=new kud(e.Lm());if(512==d.kl()||8==d.kl()){f=cxc(a,j,c,h,qmd(h,wL(g.a.getAtIndex(0))));i=a.o}else if(XLe==d.kl()||16==d.kl()){f=cxc(a,j,c,h,h);f=cxc(a,j,c,h,rmd(f.b,g));i=a.d}}f.b=i;return f} +function K5c(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;k=c.ho(e);if(!k){h=rL(F1d(b,51),28);!h?null:h.ji();p4c(a.d,a.c,c,d,W5c(a,Rnc(b,u5c,GK(yK(fgb,1),pKe,2,6,[e,d.Um(new zte,false).a,c.Um(new zte,false).a]))))}else{j=!(!k.d?null:k)?null:(!k.d?null:k).d;j=!j?b:j;i=k.e;i=i.Jn();m=d.ao().fo(e);n=d.cn();if(!n.d.isEmpty()){l=new yne(a.g,n);m=rL(m.Vn(l),9)}m=m.Jn();if(!N7d(i,m,a.f)){f=(d?d:null).Zn();g=Szc(j,s5c,GK(yK(fgb,1),pKe,2,6,[e,c.Um(new zte,false).a,dee(f,e).Um(new zte,false).a,m.Um(new zte,false).a,i.Um(new zte,false).a]));p4c(a.d,a.c,i,m,g);DGb(a.b,g)}}} +function DHd(a,b){var c,d,e,f,g,h,i;i=eKd(a.g,0).b.b;gHd(a,NOe);g=eKd(a.g,0).b.b.b>a.f.b;(g||nJd(a,0,(XMd(),uMd))||nJd(a,0,(XMd(),fLd))||nJd(a,0,(XMd(),sLd)))&&HJd(a,'No newline allowed between `async` and arrow function parameter list',GK(yK(agb,1),ZJe,1,5,[]));if(oJd(a,(XMd(),bMd))){d=fId(a,0)}else{h=mId(a);d=new _Nd(h.o,(lr(),new UD(h)))}f=eKd(a.g,0).b.b.b>a.f.b;(f||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd))&&HJd(a,pYe,GK(yK(agb,1),ZJe,1,5,[]));aHd(a,WKd);c=AHd(a,b,(SJd(),PJd));e=fOd(eOd(dOd(new mOd((rOd(),nOd))),d),c);return bOd(e,new qRd(i,a.f))} +function K3b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;i=N3b(a,(Lhe(),Tge),c);j=N3b(a,Xge,c);k=b.b.d;zf(k.j==(h7d(),r5d));l=k.k.sm();l=l.um(j);k.k=l;B2d(k.b,l);p=x1d(x1d(k,2).b.b.d.b,2).b.b.b;zf(p.j==m6d);p.k=j;B2d(p.b,j);m=k.d;zf(m.j==b7d);B2d(m.b,i);B2d(m.b.b,i);B2d(m.b.b.b,i);n=m.b.b.b.b;zf(n.j==M6d);o=n.k.sm();o=o.um(j);n.k=o;B2d(n.b,o);d=x1d(n.b,2).b.b;zf(d.j==I4d);d.k=j;g=d.b;zf(g.j==_5d);h=g.k.sm();h=h.um(j);g.k=h;e=m.d.d;zf(e.j==m5d);f=e.b.k.sm();f=f.um(j);B2d(e.b,f);B2d(e.b.b,f);B2d(e.b.b.b,i);B2d(e.b.b.d,f);B2d(x1d(e.b.b.d,2).b.b,i);B2d(e.d.b,i)} +function OHd(a,b){var c,d;if(oJd(a,(XMd(),uMd))){return VHd(a)}else{d=new VJd(eKd(a.g,0).b.b);d.b=b;d.a=a.b.d&&tCe(pCe(oMd,GK(yK(Uab,1),PKe,37,0,[nMd,mMd])),eKd(a.g,0).c)?nHd(a).c:null;d.c=!!eHd(a,CMd);return nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,GOe)&&(yJd(a,1)||eKd(a.g,1).c==cMd)?kId(a,d):nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,DSe)&&(yJd(a,1)||eKd(a.g,1).c==cMd)?VId(a,d):nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,NOe)&&(c=eKd(a.g,1).b.b.b>eKd(a.g,0).b.a.b,!(c||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&(yJd(a,1)||eKd(a.g,1).c==cMd)?GHd(a,d):QHd(a,d)}} +function dmd(a,b){var c,d,e,f;if(-1==b.kl()||eKe==b.kl()||a==b){return a}if(512==b.kl()){return Wld(a)}if(512==a.kl()){f=Wld(b);return !f.nl().isEmpty()||Ijd(f.gl())?omd(f):f}if(XLe==b.kl()){return Vld(a)}if(XLe==a.kl()){return Vld(b)}if(-1==a.kl()){return b}if(eKe==a.kl()){e=b.kl()==2&&b.nl().size()==1?rL(Uw(b.nl().$d()),25).d:null;return !!e&&Sud(e.a)?omd(b):b}c=a.kl()&b.kl();if(a.Dl()==b.Dl()){d=a.Dl()}else if(a.Dl()!=null&&b.Dl()==null){return b}else{d=null;c&=-2}return Ynd(a.e,c,a.kl()|b.kl(),Ktd(true,a.nl(),b.nl()),d,a.nl(),b.nl(),a.gl(),b.gl())} +function Jtd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;tf(c);g=d;for(n=new Gue((new yue(d.a)).a);n.b;){l=Fue(n);i=wL(l.se());h=Vrd(c,i,0);if(h){g=ftd(b,g,i,h,rL(l.te(),52));if(g==a.d){return a.d}}}for(m=new Gue((new yue(e.a)).a);m.b;){l=Fue(m);i=wL(l.se());k=rL(l.te(),52);if(Nk(d,i,false)){j=rL(Xk(Nk(d,i,false)),52);if(Ttd(j,k)){continue}f=b?new Wtd(j.c,cmd(j.d,k.d),j.b,_td(j.a,k.a)):new Wtd(j.c==k.c?j.c:null,Xnd(j.d,k.d),null,_td(j.a,k.a))}else{f=k}h=Vrd(c,i,0);if(h){g=ftd(b,g,i,h,f);if(g==a.d){return a.d}}else{if(0==f.d.kl()){return a.d}g=trd(g,i,f)}}return g} +function tId(a){var b,c,d,e,f,g,h,i;h=eKd(a.g,0).b.b;e=!!eHd(a,(XMd(),yMd));g=null;i=eKd(a.g,0).c;if(i==VLd){return LHd(a,true)}else if(i==FLd||(HGd(),HGd(),!!rL(Fs(iGd,i),63))){g=cHd(a)}else if(i==cMd){return rId(a)}else if(i==_Ld||i==bMd){return LHd(a,false)}f=false;if(oJd(a,pMd)){aHd(a,pMd);f=true}if(oJd(a,bMd)||oJd(a,_Ld)){d=(b=fOd(kOd(eOd(hOd(cOd(jOd(gOd(lOd(iOd(new mOd((rOd(),qOd)),g),false),e),f),null),kHd(a)),fId(a,1)),jHd(a)),new SNd(new qRd(h,a.f))),bOd(b,new qRd(h,a.f)));return d}else{c=jHd(a);return new HOd(new qRd(h,a.f),g,false,f,null,c)}} +function Nde(a,b,c){var d,e,f;if(!a.v||a==sie(a.F,(Lhe(),Rge))){return b.a+=gNe,b}a.v=false;b.a+=TTe;f=y1d(a.c.a);d=!zL(a.p,337);if(d){a.Nl()?(b.a+='new:',b):(b.a+='this:',b);a.p.Um(b,c)}if(f>0){d&&(b.a+=BKe,b);e=a.c.a.b;B1d(e,30)!=0?Ode(a,b,zL(e.k,9)?rL(e.k,9):null,c):B1d(e,37)!=0?Mde(a,b,zL(e.k,9)?rL(e.k,9):null,c):B7d(zL(e.k,9)?rL(e.k,9):null,b,c);e=e.d;while(e){b.a+=BKe;B1d(e,30)!=0?Ode(a,b,zL(e.k,9)?rL(e.k,9):null,c):B1d(e,37)!=0?Mde(a,b,zL(e.k,9)?rL(e.k,9):null,c):B7d(zL(e.k,9)?rL(e.k,9):null,b,c);e=e.d}}b.a+='): ';B7d(a.c.b,b,c);a.v=true;return b} +function oId(a){var b,c,d,e,f,g,h,i,j,k;j=eKd(a.g,0).b.b;aHd(a,(XMd(),ILd));if(oJd(a,DMd)){f=rL(aHd(a,DMd),134);fHd(a);return new zOd(new qRd(j,a.f),null,null,null,f)}b=null;h=null;c=null;i=true;k=eKd(a.g,0).c;if(tCe(pCe(FLd,GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),k)||!a.b.c&&MGd(k)){b=bHd(a);oJd(a,jLd)?aHd(a,jLd):(i=false)}else if(KGd(eKd(a.g,0).c)){d=nHd(a);FJd(a,d,tYe,GK(yK(agb,1),ZJe,1,5,[d]))}if(i){if(oJd(a,yMd)){aHd(a,yMd);gHd(a,'as');h=bHd(a)}else{c=qId(a)}}gHd(a,ROe);g=aHd(a,DMd);e=!g?null:rL(g,134);fHd(a);return new zOd(new qRd(j,a.f),b,c,h,e)} +function $K(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;c=a.l&8191;d=a.l>>13|(a.m&15)<<9;e=a.m>>4&8191;f=a.m>>17|(a.h&255)<<5;g=(a.h&1048320)>>8;h=b.l&8191;i=b.l>>13|(b.m&15)<<9;j=b.m>>4&8191;k=b.m>>17|(b.h&255)<<5;l=(b.h&1048320)>>8;B=c*h;C=d*h;D=e*h;F=f*h;G=g*h;if(i!=0){C+=c*i;D+=d*i;F+=e*i;G+=f*i}if(j!=0){D+=c*j;F+=d*j;G+=e*j}if(k!=0){F+=c*k;G+=d*k}l!=0&&(G+=c*l);n=B&fMe;o=(C&511)<<13;m=n+o;q=B>>22;r=C>>9;s=(D&262143)<<4;t=(F&31)<<17;p=q+r+s+t;v=D>>18;w=F>>5;A=(G&kMe)<<8;u=v+w+A;p+=m>>22;m&=fMe;u+=p>>22;p&=fMe;u&=gMe;return LK(m,p,u)} +function huc(a){var b,c,d,e,f;switch(a.j.g){case 84:return huc(a.b);case 96:case 65:return lr(),lr(),kr;case 28:{zf(_Cc(a)&&a.e.j==(h7d(),m5d)&&T1d(a.b.d)&&(a.b?a.b.f:null).j==(h7d(),m6d));return lr(),new UD(a.b?a.b.f:null)}case 29:{f=a.b;return f?(lr(),new UD(f)):(lr(),lr(),kr)}case 95:case 47:{d=a.b;f=d.d;return lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[d,f])))}case 76:case 100:case 88:{e=(lr(),new Fu);for(c=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();c.Pd();){b=rL(c.Qd(),5);Eu(e,huc(b))}return ur(e.a)}default:throw Aib(new ooc('AstChangeProxy::getRhs '+a));}} +function OBc(a){HAc();var b;switch(a.j.g){case 116:if(!!a.b&&!a.b.d){return Vne(),a.b.Lm().length!=0?Tne:Sne}break;case 31:return Vne(),a.Lm().length>0?Tne:Sne;case 30:return Vne(),a.Km()!=0?Tne:Sne;case 19:return OBc(a.b?a.b.f:null).qo();case 32:case 34:return Vne(),Sne;case 79:if(!OAc(a.b,false,null)){return Vne(),Sne}break;case 29:b=a.Lm();if(Jse(mMe,b)||Jse(PNe,b)){return Vne(),Sne}else if(Jse(AUe,b)){return Vne(),Tne}break;case 35:case 38:return Vne(),Tne;case 65:case 96:case 23:case 42:case 43:if(!OAc(a,false,null)){return Vne(),Tne}}return Vne(),Une} +function WCd(b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;p=b.ji();try{k=new SKd(p,c);l=d.b==1;g=new ZCd(e,l);h=VCd(d);m=new KJd(h,g,k);q=(r=new uRd,s=eKd(m.g,0).b.b,t=lId(m),aHd(m,(XMd(),sLd)),wRd(r.a,(Fte(),Qib(Hib(fJe()),r.b))),new JQd(new qRd(s,m.f),t,ur(m.a.a.a)));o=null;f=(lr(),lr(),kr);j=m.d;if(!g.d||l){i=Eyd(q,b,c,d,e);o=i.p;j=zEd(j,i.e);n=f2d(o,o.g,89);n!=o.g&&(o.g=n);!!j&&(o.g=new A3d(89,j,o.g));d.d!=(rxd(),qxd)&&(f=ur(m.a.a.a))}return new aDd(o,f,j,m.i)}catch(a){a=zib(a);if(zL(a,70)){throw Aib(new EJ('Exception parsing "'+p+'"'))}else throw Aib(a)}} +function TBc(b){HAc();var c;if(b.indexOf('\x0B')!=-1){return null}c=cEc(b);if(c.length==0){return 0}if(c.length>2&&c.charCodeAt(0)==48&&(c.charCodeAt(1)==120||c.charCodeAt(1)==88)){try{return Are(c.substr(2),16)}catch(a){a=zib(a);if(zL(a,140)){return NaN}else throw Aib(a)}}if(c.length>3&&(c.charCodeAt(0)==45||c.charCodeAt(0)==43)&&c.charCodeAt(1)==48&&(c.charCodeAt(2)==120||c.charCodeAt(2)==88)){return null}if(Jse(c,'infinity')||Jse(c,'-infinity')||Jse(c,'+infinity')){return null}try{return zre(c)}catch(a){a=zib(a);if(zL(a,140)){return NaN}else throw Aib(a)}} +function wBd(a,b){var c,d;c=rXe;if(b==(wCd(),lCd)){if(hBd(a,vCd)){d=a.i.n;!QAd.contains(d)&&!H_d(a.e,d)&&WAd(a,'msg.jsdoc.idgen.unknown',d,a.i.g,CCd(a.i));c=d;b=!a.n?DCd(a.i):_Ad(a)}else{UAd(a,CXe,a.i.g,CCd(a.i));return b}hBd(a,rCd)?(b=!a.n?DCd(a.i):_Ad(a)):UAd(a,CXe,a.i.g,CCd(a.i))}switch(c){case rXe:h0d(a.e)||UAd(a,DXe,a.i.g,CCd(a.i));break;case sXe:R_d(a.e)||UAd(a,DXe,a.i.g,CCd(a.i));break;case 'stable':L0d(a.e)||UAd(a,DXe,a.i.g,CCd(a.i));break;case 'xid':$0d(a.e)||UAd(a,DXe,a.i.g,CCd(a.i));break;case 'mapped':s0d(a.e)||UAd(a,DXe,a.i.g,CCd(a.i));}return b} +function tpd(b,c,d,e,f,g,h){var i,j,k,l,m,n,o;i=new cld(b.a);!!g&&Vkd(i,g.r);try{if(!!c&&!!((hNe&c.a)==mNe?c.i:null)){n=ppd(b,c,h,!g?(lr(),lr(),kr):g.q);if(eKe==n.kl()||-1==n.kl()){return b.e}l=qld(n);if(l){o=(m=n.kl()==2&&n.nl().size()==1?rL(Uw(n.nl().$d()),25):null,(!m?null:m.b)?null:n);k=mkd(l);!!g&&!(l.g?l.g:l.d)&&(k=ajd(k,g.r));return new Opd(o,k)}else{OCe(b.i,Rnc(e,Zod,GK(yK(fgb,1),pKe,2,6,[])));c=null}}j=spd(b,c,d,e,f,g,h,i);return new Opd(null,j)}catch(a){a=zib(a);if(zL(a,382)){OCe(b.i,Rnc(e,hpd,GK(yK(fgb,1),pKe,2,6,[])));return b.e}else throw Aib(a)}} +function aTd(a){var b,c,d,e,f,g,h,i,j,k;zf(Ese(a.e,a.c)==91);++a.c;g=Ose(a.d,hte(105))>=0;f=a.c1){c=0;while(true){Af(++c<10,'Stuck in loop expanding types to skip.');l=new RCe;for(o=(k=(new dve(a.g.a)).a.ke().$d(),new jve(k));o.a.Pd();){m=(d=rL(o.a.Qd(),12),rL(d.se(),60));OCe(l,rL($ed(a.f,m),60))}ie(a.g,l);g=new RCe;b=Zed(a.f);i=b.b.size();for(n=new Gze(b.b.$d());n.b.Pd();){m=rL(n.b.Qd(),60);!PCe(a.g,m)&&PCe(a.g,$ed(a.f,m))&&(h=g.a.put(m,g),h==null)}for(f=(j=(new dve(g.a)).a.ke().$d(),new jve(j));f.a.Pd();){e=(d=rL(f.a.Qd(),12),rL(d.se(),60));A0b(a,e)}if(Zed(a.f).b.size()==i){break}}}} +function HHc(a,b,c,d){var e,f,g,h,i,j;kf((HAc(),b.j==(h7d(),x5d)||b.j==w5d));if(c.j!=m6d||d.j!=L6d){return b}if(_Bc(b)){return b}f=null;j=null;for(e=c.b;e;e=e.d){if(Jse(e.Lm(),d.Lm())){switch(e.j.g){case 87:continue;case 86:case 91:if(!!j&&OAc(j,false,a.c)){return b}f=e;j=e.b;break;default:throw Aib(new Hre);}}else if(Hjb(a,e.b)){return b}}if(!j){return b}if(j.j==r5d&&(i=j.j==r5d?j.b?j.b.f:null:j,RAc(i,U6d,BAc))){return b}g=u1d(j);if(f.j==y5d){g=qYd(g,GK(yK(veb,1),MMe,5,0,[]));h=f2d(g,g.g,50);h!=g.g&&(g.g=h);g.g=new p3d(50,1,g.g)}g2d(b.e,b,g);EDc(b,a.c);GGb(a.c);return b} +function erb(a,b,c){var d,e,f;if(!c){return}d=(c.a&hNe)==mNe&&((hNe&c.a)==mNe?c.i:null).a.j==(h7d(),r5d);if((d||(c.a&hNe)==mKe||!!c.g||TZd(c)>0||(c.a&2)!=0||(c.a&nKe)!=0&&(c.a&hNe)!=mNe)&&(c.a&hNe)!=mNe){switch(b.j.g){case 65:case 86:case 87:case 98:case 91:case 114:case 108:return;case 27:case 26:if(T1d(b.b)){return}break;case 76:case 100:case 88:case 47:{e=b.b;f=PBc(e);if(!!f&&(f.j==(h7d(),N4d)||f.j==I4d&&CFb(a.a).qh(f))&&(c.a&2)==0){break}return}}DGb(a.a,Rnc(b,Vqb,GK(yK(fgb,1),pKe,2,6,[aKe,'This JSDoc is not attached to a function node. Are you missing parentheses?'])))}} +function vhc(a,b,c){var d,e,f,g,h,i,j,k;e=rL(F1d(b,29),11);!!e&&(!e.d?null:e.d.g)!=null&&OCe(a.b,b);h=c.j==(h7d(),m4d)?c.b:c;if(XCc(h)&&htc(a.a,h)){for(j=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();j.Pd();){i=rL(j.Qd(),5);g=JBc(i);!!g&&fgc(a.c,g);i.j==R4d||uhc(a,i,h,i.Lm())}}else if(!uCc(h)&&!dDc(h)){for(j=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();j.Pd();){i=rL(j.Qd(),5);g=JBc(i);!!g&&fgc(a.c,g);k=rL(F1d(i,29),11);!!k&&ODe(a.c.d.e,i,_fc(a.c,k,a.a));Yfc();d=(HAc(),f=eBc(i),!f?null:rL(F1d(f,29),11));!!d&&(d.a&1)!=0&&(d.a&2)==0&&hzc(a.c.g,Rnc(i,Ofc,GK(yK(fgb,1),pKe,2,6,[])))}}} +function bAc(a,b){var c,d,e,f,g,h,i,j;h=b.$j();Qzc(a,h);a.e=h;i=new Owe;j=b.Zj();while(j){swe(i,j);j=j.Zj()}while(i.b!=i.c){Uzc(a,rL(Jwe(i),171),true)}if(h.j==(h7d(),r5d)){Uzc(a,b,false);c=h.b.d;d=c.d;cAc(a,c,h);cAc(a,d,h);Tzc(a,false)}else if(h.j==F4d){Uzc(a,b,false);dAc(a,h);Tzc(a,false)}else{HAc();if(h.j==o5d||h.j==p5d||h.j==q5d){zf(a.j.Fi());Uzc(a,b,false);e=h.b;g=e.d;f=g.d;cAc(a,e,h);cAc(a,g,h);cAc(a,f,h);Tzc(a,false)}else if(h.j==Q6d){zf(a.j.Fi());Uzc(a,b,false);dAc(a,h);Tzc(a,false)}else{Ef(b.gk()||b.$j().j==Z5d,'Expected global or module scope. Got:',b);iAc(a,h,b)}}} +function jfd(b){var c,d,e,f,g,h,i,j,k;k=rfd(b,ffd);if(k.length>0){throw Aib(new DJ('Unhandled flag: '+k[0]))}g=ofd(b.jsCode,'Input_');j=ifd(b.jsCode);h=new UIb;YEb((XEb(),VEb),h);Uad((Tad(),Qad),h);FIb(h,($Jb(),XJb));GIb(h,SJb);hfd(h,b);h.Mb=j;p$b(h._,false);f=ofd(b.externs,'Extern_');Xcd(f,nfd(h.gb));e=new vfd;d=new aHb(new Gfd);uf(e,JPe);d.q=new k_c(e);uFb(d,f,g,h);i=new $wnd.Object;i.compiledCode=sfd(d,b.outputWrapper);i.errors=qfd(e.a);i.warnings=qfd(e.b);if(b.createSourceMap){c=new zte;try{qZc(d._,c)}catch(a){a=zib(a);if(!zL(a,147))throw Aib(a)}i.sourceMap=c.a}return i} +function tOc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;!a.d&&(a.d=new Gdc(a.a,b,c));d=new idd;for(k=(l=(new nve(ydc(a.d))).a.ke().$d(),new sve(l));k.a.Pd();){j=(f=rL(k.a.Qd(),12),rL(f.te(),139));e=j.d;if(!!j.g&&(j.g.a&4)!=0){if(vOc(a,_Zd(j.g))){d.a[d.a.length]=j}else{g=Rnc(e.c,nOc,GK(yK(fgb,1),pKe,2,6,[]));DGb(a.a,g)}}else{for(p=(!j.r?(lr(),lr(),kr):j.r).$d();p.Pd();){o=rL(p.Qd(),124);if(o==e){continue}i=o.c;m=o.c.e;h=rL(F1d(i,29),11);!h&&m.j==(h7d(),b7d)&&!!m.b&&!m.b.d&&(h=rL(F1d(m,29),11));if(!!h&&(h.a&4)!=0){d.a[d.a.length]=j;break}}}}n=new COc(a.a,d);nAc(a.a,n,b,c);return n.a} +function Owc(a,b,c,d,e){var f,g,h,i,j;h=b.v;g=d.i;f=rL(tf((lf(true,nUe),kf(true),rL(Xk(Nk(c.b,nUe,false)),20))),20);if(g){if(B1d(h,59)!=0){i=gqd(a.w,a.r);if(Rld(i,g,new bvd((rrd(),rrd(),qrd)))){zf(!e.k);e.k=g}else{Lyc(a,Rnc(h,kwc,GK(yK(fgb,1),pKe,2,6,[Vyc(i,g)])),g,i);Zkd(e,a.r)}}else{zf(!e.k);e.k=g;!Zyc(b)&&!Rld(a.q,g,new bvd((rrd(),rrd(),qrd)))&&Yyc(a.v)&&hzc(a.Q,Rnc(h,rwc,GK(yK(fgb,1),pKe,2,6,[ild(g,new zte,(evd(),dvd)).a])))}}else if(B1d(h,59)!=0){j=(lf(true,oUe),kf(true),rL(Xk(Nk(c.b,oUe,false)),20));Zkd(e,gqd(a.w,rL(Ze(j,a.r),20)))}else !d.c?Zkd(e,Wyc(f,a.r)):Zkd(e,a.q)} +function c3b(a,b,c){var d,e,f,g,h,i;for(h=new pEe(new gEe(b.j));h.b!=h.c.a.b;){f=nEe(h);e=wL(f.d);d=EYd(ODc(a.a,b.f+HMe),new T3d((h7d(),L6d),e));n2d(d,rL(f.e,11));d=K2d((Af(NYd(d),d),new P2d(m5d,d)),b.c);j1d(c.e,d,c);c=d}for(i=new pEe(new gEe(b.b));i.b!=i.c.a.b;){f=nEe(i);e=wL(f.d);d=EYd(ODc(a.a,b.f),new T3d((h7d(),L6d),e));n2d(d,rL(f.e,11));d=K2d((Af(NYd(d),d),new P2d(m5d,d)),b.c);j1d(c.e,d,c);c=d}for(g=new pEe(new gEe(b.i));g.b!=g.c.a.b;){f=nEe(g);e=wL(f.d);d=DYd(ODc(a.a,b.f+HMe),ODc(a.a,e));n2d(d,rL(f.e,11));d=K2d((Af(NYd(d),d),new P2d((h7d(),m5d),d)),b.c);j1d(c.e,d,c);c=d}} +function Hyd(a,b){var c,d,e,f,g,h;f=false;c=true;for(d=0;df?d:f;i+=2;j+=2;while(i1||f==0&&e>0||e==0){m=a.e.a.length+a.b.a.length;i=xYd((Ef(Ose(j,hte(46))==-1,xMe,j),new T3d((h7d(),_5d),j)),b7d);if(e',vSe),fcd(b)))),j);for(f=j.ki().$d();f.Pd();){e=wL(f.Qd());iue(a.b,e,j)}}for(m=new lxe(a.f);m.aa.f.b,(h||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd))&&HJd(a,pYe,GK(yK(agb,1),ZJe,1,5,[])),aHd(a,WKd),i=AHd(a,b,(SJd(),RJd)),j=fOd(eOd(new mOd((rOd(),nOd)),g),i),bOd(j,hHd(a,g.o.b)))}if(qJd(a)){c=IJd(a,c);cNd(c)||HJd(a,qYe,GK(yK(agb,1),ZJe,1,5,[]));d=nHd(a);e=BHd(a,b);return new mNd(new qRd(f,a.f),c,d,e)}return c} +function Dyb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;if(!a.b.i||!Jse(c.Lm(),qNe)||(n=c.e,!(n.j==(h7d(),m4d)&&n.b==c))){return}Af(!a.b.e,a.b.e);i=c.d;if(pzb(i)){d=true;j=new idd;for(k=i.b;k;k=k.d){h=k.Lm();o=k.b?k.b:k;m=zzb(b,h,o);OCe(a.b.k,h);a.b.c||!xzb(m,new dve(a.b.f))?(d=false):(j.a[j.a.length]=m,true)}if(d){for(g=new lxe(j);g.a=2&&(a.charCodeAt(c-1)==45&&a.charCodeAt(c-2)==45||a.charCodeAt(c-1)==93&&a.charCodeAt(c-2)==93)?(d.a+='\\u003e',d):(d.a+='>',d);break;case 60:Use(a,true,c+1,'/script',0,7)?(d.a+='\\u003c',d):Use(a,false,c+1,'!--',0,3)?(d.a+='\\u003c',d):(d.a+='<',d);break;default:b>31&&b<=127?(d.a+=String.fromCharCode(b),d):yJ(d,b);}}d.a+='"';return d.a} +function MK(a,b,c){var d,e,f,g,h,i;if(b.l==0&&b.m==0&&b.h==0){throw Aib(new qqe('divide by zero'))}if(a.l==0&&a.m==0&&a.h==0){c&&(IK=LK(0,0,0));return LK(0,0,0)}if(b.h==hMe&&b.m==0&&b.l==0){return NK(a,c)}i=false;if(b.h>>19!=0){b=_K(b);i=true}g=TK(b);f=false;e=false;d=false;if(a.h==hMe&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=KK((mL(),iL));d=true;i=!i}else{h=bL(a,g);i&&RK(h);c&&(IK=LK(0,0,0));return h}}else if(a.h>>19!=0){f=true;a=_K(a);d=true;i=!i}if(g!=-1){return OK(a,g,i,f,c)}if(YK(a,b)<0){c&&(f?(IK=_K(a)):(IK=LK(a.l,a.m,a.h)));return LK(0,0,0)}return PK(d?a:LK(a.l,a.m,a.h),b,i,f,e,c)} +function utb(a){var b,c,d,e,f,g,h,i,j,k,l,m;if(a.c.a.length!=0){h=(Ef(Ose(ONe,hte(46))==-1,xMe,ONe),new T3d((h7d(),_5d),ONe));i=f2d(h,h.g,43);i!=h.g&&(h.g=i);h.g=new p3d(43,1,h.g);j=xYd(h,b7d);k=new a1d(false);y0d(k);n2d(j,F_d(k,false));l=UFb(a.a);m=JHb(l,a.a);z2d(h,m);z2d(j,m);l1d(m,j);FGb(a.a,j);for(c=new lxe(a.c);c.a0&&!CHb(a.b)&&BHb(a.b,_Je);zf(a.d.j==(h7d(),F6d));c=a.a.T.Kb;f=rL(F1d(a.d,53),127).a;k=(d=rL(F1d(a.d,51),28),!d?null:d.ji());zf(k!=null);zf(k.length!=0);c=Wse(Wse(Wse(c,'%name%',WIe(f)),'%num%',''+a.c),'%n%',_Je);BHb(BHb(a.b,c),_Je)}if(rL(F1d(a.d,29),11)){i=RZd(rL(F1d(a.d,29),11));i!=null&&AHb(a.b,i)&&BHb(BHb(BHb(a.b,'/*\n'),i),'*/\n')}a.a.T.nd!=null&&sZc(a.a._,a.b.b,a.b.a);b=XGb(a.a,a.d,a.a._,a.c==0);if(b.length!=0){BHb(a.b,b);h=b.length;g=b.charCodeAt(h-1);j=h>=2?b.charCodeAt(h-2):0;e=g==59||g==10&&j==59;e||BHb(a.b,';')}return null} +function hDd(a,b){var c;if(b.j==(h7d(),g4d)||b.j==p6d||b.j==h6d){return iDd(a,b)}if(b.j!=I4d){a.a.Fj(tXe+e4d(LXe,GK(yK(agb,1),ZJe,1,5,[bKe])),a.b.ji(),a.d,a.c);return false}if(!eDd((pf(b.j==I4d,UVe,b),b.b.Lm()))){a.a.Fj(tXe+e4d(KXe,GK(yK(agb,1),ZJe,1,5,['boolean predicate'])),a.b.ji(),a.d,a.c);return false}c=hEd(Xb((pf(b.j==I4d,UVe,b),b.b.Lm())));if(!bDd(a,b,c)){return false}switch(c.a){case 3:return zDd(a,b,(pf(b.j==I4d,UVe,b),y1d(b)-1));case 2:return uDd(a,b,(pf(b.j==I4d,UVe,b),y1d(b)-1));case 4:return CDd(a,b,(pf(b.j==I4d,UVe,b),y1d(b)-1));default:throw Aib(new Ire('Invalid boolean expression'));}} +function rgd(){rgd=cjb;qgd=ct('goog.object.forEach','goog.object.filter','goog.object.map','goog.object.some','goog.object.every','goog.object.getCount',GK(yK(fgb,1),pKe,2,6,['goog.object.getAnyKey','goog.object.getAnyValue','goog.object.contains','goog.object.getValues','goog.object.getKeys','goog.object.findKey','goog.object.findValue','goog.object.isEmpty','goog.object.clear','goog.object.remove','goog.object.equals','goog.object.clone','goog.object.transpose']));pgd=new Q_b('JSC_ARRAY_PASSED_TO_GOOG_OBJECT',(prb(),orb),new _te('{0} expects an object, not an array. Did you mean to use goog.array?'))} +function Wwc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;l=b.e;h=a.w.G;(l.j==(h7d(),p6d)||l.j==g4d)&&b==l.b&&(h=d);g=b.b;k=cxc(a,g,c,a.w.G,h);f=k.b;n=Tec(a.N,b);j=f.kl()==2&&f.nl().size()==1?rL(Uw(f.nl().$d()),25).d:null;if(!(!!j&&j.a.g!=0)&&(i=n.kl()==2&&n.nl().size()==1?rL(Uw(n.nl().$d()),25).d:null,!(!!i&&i.a.g!=0))&&(hld(),!(0==f.kl()||0==n.kl()||0!=Xnd(f,n).kl()))&&(f.kl()&1)==0){e=Rnc(b,jwc,GK(yK(fgb,1),pKe,2,6,[ild(f,new zte,(evd(),dvd)).a,ild(n,new zte,dvd).a]));p4c(a.J,a.H,f,n,e);hzc(a.Q,e)}else{m4c(a.H,b,f,n);n4c(a.J,b,f,n)}m=f2d(g,g.g,79);m!=g.g&&(g.g=m);!!f&&(g.g=new A3d(79,f,g.g));g.k=n;k.b=n;return k} +function Uxc(a,b,c){var d,e,f,g,h,i,j,k,l;k=b.Lm();d=Jsc(a.C,k);if(ftc(a.C,k)){return c}i=b.b;if(XCc(b)||kgc(b)&&!pyc(a,i.b,c)||B1d(b.e,76)!=0){vf(d,"Can't skip var declaration with undeclared type at: %s",b);Gyc(b,d);return kf(k.indexOf('.')==-1),qvd(c,k,d)}g=c;j=null;if(i){h=bxc(a,i,c,rL(Ze(d,a.r),20));g=h.a;j=h.b;!!d&&(Rld(j,d,new bvd((rrd(),rrd(),qrd)))?(m4c(a.H,i,j,d),n4c(a.J,i,j,d)):Lyc(a,Rnc(i,swc,GK(yK(fgb,1),pKe,2,6,[Vyc(d,j)])),j,d))}l=j;if(!i){l=a.q}else if(d){e=(HAc(),f=eBc(b),!f?null:rL(F1d(f,29),11));!!e&&((e.a&1)==0||(e.a&hNe)==mNe)&&(l=d)}Gyc(b,l);return kf(k.indexOf('.')==-1),qvd(g,k,l)} +function aJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;Af(b.j==(h7d(),Q6d),b);h=_Ic(a,b);if(!h||(b.b?b.b.f:null).j==X4d){f=b.b;n=null;for(g=f.d;g;g=m){m=g.d;!Hjb(a,g.b)&&KIc(g,n,h)?LIc(a,b,g):(n=g)}if(RCc(f,false)){e=(Vne(),Tne);for(g=f.d;g;g=m){m=g.d;d=g.b;e=QHc(H6d,f,d,false);if(e==Tne){break}else if(e==Une){break}else{LIc(a,b,g)}}if(!!g&&e==Tne){k=g;l=g.b?g.b.f:null;while(g){c=g.b?g.b.f:null;j=c.b?c.b.f:null;i=false;if(!!j&&fJc(j)){MIc(a,j);i=true}m=g.d;if(g!=k){while(c.b){l1d(l,u1d(c.b))}u1d(g);GGb(a.c)}g=m;if(i){break}}for(;g;g=m){m=g.d;LIc(a,b,g)}g=f.d;if(!!g&&!g.d){return cJc(a,b,false)}}}}return bJc(a,b)} +function imb(a,b,c){var d,e,f,g,h,i,j,k,l,m;m=QBc(c);i=c.e;switch(i.j.g){case 26:d=i.b.d;k=i.e;e=k.e;if(d.j==(h7d(),L6d)&&(HAc(),e.j==m5d&&e.b.j==m4d)&&(HAc(),k.j==m4d&&k.b==i||!!k&&(k.j==b7d||k.j==T5d||k.j==S4d))){j=d.Lm();l=new Dlb(e,m.j==_5d?Hzc(b)._j(m.Lm()):null,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g));twe(zlb(a.b,j,(xlb(),0)).a,l);return true}break;case 47:h=i.b.d;if(h.j==(h7d(),m6d)){for(g=h.b;g;g=g.d){if(!g.Nm()){j=g.Lm();l=new Nlb(g,g.b,h,i,m.j==_5d?Hzc(b)._j(m.Lm()):null,(f=(!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d),!f?null:f.g));twe(zlb(a.b,j,(xlb(),0)).a,l)}}return true}}return false} +function j3b(a,b,c){var d,e,f,g,h,i;if(b.j==(h7d(),R4d)&&B1d(b,58)!=0){DGb(a.a,Rnc(b,(X5b(),W5b),GK(yK(fgb,1),pKe,2,6,['Static computed property'])));return}if(b.j==R4d&&!T1d(b.b)){d3b(a,b.b);return}i=d1d(f3b(b));b3b(c,b);if(b.j==R4d){zf(B1d(b,58)==0);h=c.i;g=G1d(b.b)}else{h=B1d(b,58)!=0?c.b:c.j;g=b.Lm()}d=rL(NDe(h,g),11);e=!d?null:(hNe&d.a)==mNe?d.i:null;if(!!e&&!i.a.Mm(e.a,false,true,false,false)){DGb(a.a,Rnc(b,$2b,GK(yK(fgb,1),pKe,2,6,[g])))}else{f=new a1d(false);S0d(f,i);if(!!rL(F1d(b,29),11)&&(rL(F1d(b,29),11).a&XLe)!=0){a0d(f);Y0d(f,(z_d(),y_d))}B1d(b,58)!=0&&b.j!=R4d&&z0d(f);ODe(h,g,F_d(f,false))}} +function PRd(a){var b,c,d,e,f;if(a.a==null){return a.b.k=false,IRd(a,kKe,0)}if(!BL(a.a)){throw Aib(FRd(a))}e=SRd(a);if(e!=null){return e}b=a.b.b;b!=97&&b!=65&&a.b.n==-1&&(a.b.n=6,undefined);d=new zte;switch(b){case 97:case 65:KRd(a);break;case 101:case 69:LRd(a,d);break;case 102:MRd(a,d);break;case 103:case 71:TRd(a,d);break;default:throw Aib(kSd(a.b));}a.b.n=-1;f=0;if(45==d.a.charCodeAt(0)){if(a.b.g){return URd(a,d)}}else{if(a.b.j){yte(d,0,String.fromCharCode(32));++f}if(a.b.d){yte(d,0,String.fromCharCode(43));++f}}c=d.a.charCodeAt(0);a.b.k&&(c==43||c==45)&&(f=1);(b==97||b==65)&&(f+=2);return IRd(a,d,f)} +function g0b(a,b,c){var d,e,f,g,h,i;if(!c){return null}d=(e=rL(fue(a.d,b),157),!e?null:rL(Xk(hDe(e.d,c)),106));if(d){return wb(d,a.a)?null:d}if(c.Ol()){d=g0b(a,b,c.el());j0b(a,b,c,!d?a.a:d);return d}if(!c.am()){if(c.Ml()){d=g0b(a,b,c.Yk());j0b(a,b,c,!d?a.a:d);return d}else{j0b(a,b,c,a.a);return null}}if(Jse(KMe,b)){j0b(a,b,c,a.a);return null}g=c.tm();if(!!g&&!!g.bl()&&g.bl().Wl()){i=g.Bl(b);!!i&&!!i.bl()&&(d=i.vl())}else{while(!!g&&!nFe(g.vl(),g)){g.Gl(b)&&(d=g);g=g.vl()}}if(!d){h=c.hl(b);f=!h?null:h.tm();!!f&&f.Gl(b)&&(d=f)}!!d&&d.Tl()&&(d=d.wl());!!d&&d.Xl()&&(d=R7d(d.jl()));j0b(a,b,c,!d?a.a:d);return d} +function yFc(a,b){var c,d,e,f,g,h,i,j,k;if(B1d(b,63)!=0){return}c=b.b;HAc();if(!!c&&(c.j==(h7d(),b7d)||c.j==T5d||c.j==S4d)||c.j==(h7d(),r5d)&&qCc(c.e)&&(c.j==r5d&&hDc(c.b))||c.j==(h7d(),N4d)&&qCc(c.e)&&(c.j==N4d&&hDc(c.b))){a2d(b,c);g=H2d(new N2d((h7d(),l5d)),b);m1d(b,g);if(c.j==N4d||c.j==r5d){j=sye(c.b);k1d(b.e,c,b);c.j==N4d&&k1d(b.e,H2d(new N2d(c5d),b),b)}else{j=ABc(c);for(e=(!c.b?(jye(),jye(),iye):new F3d(c.b)).$d();e.Pd();){d=rL(e.Qd(),5);a2d(c,d);k=H2d(new P2d(c.j,d),b);k1d(b.e,k,b)}}for(i=j.$d();i.Pd();){h=rL(i.Qd(),5);f=H2d(new N2d(k5d),h);m1d(f,h.Jm(false));m1d(f,h.Jm(false));l1d(g,f)}FGb(a.b,b.e)}} +function KNc(a,b){var c,d,e,f,g,h,i,j;zf(b.j==(h7d(),F6d));j=b.b;while(!!j&&j.j==c5d){j=j.d}if(!j||j.j!=m5d||!!j.d){return false}d=j.b;if(!d||d.j!=I4d){return false}if(d.b.j==r5d){f=j.b.b}else if(d.b.j==x5d&&d.b.b.j==r5d&&d.b.b.d.j==L6d&&Jse(d.b.b.d.Lm(),vRe)){f=d.b.b;if(!(!!d.b.d&&d.b.d.j==U6d)){return false}}else{return false}HAc();kf(f.j==r5d);if(!(f.j==r5d&&B1d(f,60)!=0)&&WCc(f.b?f.b.f:null,xRe,BAc)){return false}e=JFb(a.a,rL(F1d(b,53),127));h=LHb(e);if(!h){return false}g=hcd(h.a)+'_iifeWrapper';i=new ibc(a.a,new yHb(a.a));c=hbc(i,g,f,d,null,false,false,false);c2d(b);p1d(b,c2d(c));FGb(a.a,b);return true} +function Wjd(a,b,c){var d,e;if(a==a.a.g){return b.a+=wWe,b}else if(a==a.a.v){return b.a+=xWe,b}else if(a==a.a.s){return vte(vte(b,c.wm()?'!':''),gNe)}if(!a.n.a.isEmpty()){b.a+='<';Ud(new _d(','),b,Np(ykd(Rq(a.n.a.Gf()),c)));b.a+='>'}b.a+=TTe;if(a.d){b.a+='new:';ute(b,a.d);b.a+=','}else if(a.g){b.a+='this:';ute(b,a.g);b.a+=','}for(e=0;e1&&DGb(b,new Mnc(null,null,-1,-1,gFb,null,GK(yK(fgb,1),pKe,2,6,[(vJe(0,d.a.length),rL(d.a[0],149)).e])));bHb(d);b.u=iGb(c);b.Q=d;try{b.O=new loc(d)}catch(a){a=zib(a);if(zL(a,597)){f=a;DGb(b,new Mnc(null,null,-1,-1,jFb,null,GK(yK(fgb,1),pKe,2,6,[f.b.e,f.a.e])));return}else throw Aib(a)}b.J=cHb(d);new UHe(b.J.size());dGb(b);eGb(b);b.L=_Yd(GK(yK(veb,1),MMe,5,0,[]));b.w=_Yd(GK(yK(veb,1),MMe,5,0,[]));b.s=_Yd(GK(yK(veb,1),MMe,5,0,[b.w,b.L]))} +function sOc(){sOc=cjb;oOc=(Qq(),new XD('COMPILED'));rOc=new Q_b('JSC_UNKNOWN_DEFINE_WARNING',(prb(),orb),new _te('unknown @define variable {0}'));nOc=new Q_b('JSC_INVALID_DEFINE_TYPE_ERROR',mrb,new _te('@define tag only permits literal types'));mOc=new Q_b('JSC_INVALID_DEFINE_INIT_ERROR',mrb,new _te('illegal initialization of @define variable {0}'));pOc=new Q_b('JSC_NON_GLOBAL_DEFINE_INIT_ERROR',mrb,new _te('@define variable {0} assignment must be global'));lOc=new Q_b('JSC_DEFINE_NOT_ASSIGNABLE_ERROR',mrb,new _te('@define variable {0} cannot be reassigned due to code at {1}.'));qOc=new _te('line {0} of {1}')} +function Itb(){Itb=cjb;Htb=new Q_b('JSC_SUSPICIOUS_SEMICOLON',(prb(),orb),new _te("If this if/for/while really shouldn''t have a body, use '{}'"));Dtb=new Q_b('JSC_SUSPICIOUS_NAN',orb,new _te('Comparison against NaN is always false. Did you mean isNaN()?'));Ftb=new Q_b('JSC_SUSPICIOUS_IN',orb,new _te('Use of the "in" keyword on non-object types throws an exception.'));Etb=new Q_b('JSC_SUSPICIOUS_INSTANCEOF_LEFT',orb,new _te('"instanceof" with left non-object operand is always false.'));Gtb=new Q_b('JSC_SUSPICIOUS_NEGATED_LEFT_OPERAND_OF_IN_OPERATOR',orb,new _te("Suspicious negated left operand of 'in' operator."))} +function PNc(a){var b,c,d,e,f,g,h;b=JFb(a.g.a,rL(F1d(a.f,53),127));g=LHb(b);if(!g){return}f=hcd(g.a);for(e=(h=(new dve(a.d.a)).a.ke().$d(),new jve(h));e.a.Pd();){d=(c=rL(e.a.Qd(),12),wL(c.se()));a.g.b&&Vcd(b.e,d);m1d(a.f,K2d(zYd(qYd(EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d((h7d(),_5d),ANe)),new T3d(L6d,IOe)),GK(yK(veb,1),MMe,5,0,[new T3d(L6d,d)]))),a.f))}if((a.b.a.length>0||a.e.a.length>0)&&!a.c){a.g.b&&Vcd(b.d,f);m1d(a.f,K2d(zYd(qYd(EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d((h7d(),_5d),ANe)),new T3d(L6d,HOe)),GK(yK(veb,1),MMe,5,0,[new T3d(L6d,f)]))),a.f));FGb(a.g.a,a.f)}else a.d.a.size()>0&&FGb(a.g.a,a.f)} +function dEb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;k=b.d;n=k.c.d;o=new N2d((h7d(),b7d));p=w1d(k.c,3);e=w1d(k.c,2);h=n.j==m6d;g=false;if(h&&aec(b)){g2d(p,e,o);k.c=null;g=true;FGb(a.a,o)}else if(b.p){n.j==r5d&&TDb(a,n,b.g,b);FGb(a.a,n);a2d(k.c.e,n);j=MDc(a.a,c,w1d(k.c,2),bec(b));f=(HAc(),i=eBc(k.c.e),!i?null:rL(F1d(i,29),11));(B1d(D1d(k.c),43)!=0||!!f&&(f.a&37)!=0)&&(m=f2d(j,j.g,43),m!=j.g&&(j.g=m),j.g=new p3d(43,1,j.g));!!f&&(l=f2d(o,o.g,29),l!=o.g&&(o.g=l),!!f&&(o.g=new A3d(29,f,o.g)),o);l1d(o,j);m1d(j,n);g2d(p,e,o);k.c=j;g=true;FGb(a.a,o)}if(d){h&&WDb(a,b,c,n,o,o==o.e.b?null:o.f,p);RDb(a,b,c,p,o)}g&&(!!o.b||a2d(p,o))} +function Juc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n;n='';!!f&&(n=f.b?f.e:f.c);m=e.c;Huc(c)&&Xtc(a.b,m,bOe);if(e.a){Ztc(a.b,bOe,m,(kvc(),jvc));Iuc(a,m,c,f,n);return}HAc();if(d.j==(h7d(),m4d)&&d.b==c||!!d&&(d.j==b7d||d.j==T5d||d.j==S4d)){!!f&&Ztc(a.b,n,m,(kvc(),jvc));return}if(PCe(a.a,c)){l=Rtc(a.b,b);if(l.isEmpty()){Ztc(a.b,bOe,m,(kvc(),jvc));!!f&&Iuc(a,m,c,f,n)}else{for(k=l.$d();k.Pd();){j=rL(k.Qd(),202);Ztc(a.b,j.c,m,(kvc(),jvc))}}}else if(f){if(!Iuc(a,m,c,f,n)){i=f.d?(kvc(),ivc):(kvc(),jvc);Ztc(a.b,n,m,i)}}else{for(h=new k3d(new h3d(rL(tf(c.e),5)));h.a.a;){g=j3d(h);if($Bc(g)||g.j==r5d){Ztc(a.b,bOe,m,(kvc(),jvc));break}}}} +function oHc(a,b,c,d){var e,f,g,h,i;if(b==(h7d(),f4d)&&(IDc(c,a.b)||IDc(d,a.b))){return null}e=GBc(c,a.b);if(e==null){return null}g=GBc(d,a.b);if(g==null){return null}f=(wJe(e),e);i=(wJe(g),g);switch(b.g){case 3:h=bEc(f)&bEc(i);break;case 1:h=bEc(f)|bEc(i);break;case 2:h=bEc(f)^bEc(i);break;case 13:h=f+i;break;case 14:h=f-i;break;case 15:h=f*i;break;case 17:if(i==0){return null}h=f%i;break;case 16:if(i==0){return null}h=f/i;break;default:throw Aib(new xqe('Unexpected arithmetic operator'));}if((''+h).length<=(''+f).length+(''+i).length+1&&$wnd.Math.abs(h)<=lHc||isNaN(h)||h==BUe||h==CUe){return UDc(h,null)}return null} +function S7c(a,b,c,d){var e,f,g,h;a.d=b.g;r7c(a,c);switch(c.j.g){case 28:t7c(a,c);s7c(a,c,a.k.c);break;case 65:!b.d&&!!b.g&&(b.d=JFb(b.c,b.g));(!b.d||!MHb((!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d)))&&Vcd(a.f,c);KCc(c)||w7c(a,c);break;case 47:e=c.b;e.j==(h7d(),x5d)&&T1d(e)&&a.nk(b,rL(F1d(c,29),11),e,c,e.d);break;case 78:q7c(a,c,(h7d(),M4d));h=c.b;z7c(a,h,c,F7c(a,rL(F1d(h,29),11),h,null));break;case 76:C7c(a,c);break;case 26:d.j==(h7d(),m5d)&&T1d(c)&&a.nk(b,rL(F1d(c,29),11),c,d,null);}if(!!c.e&&(HAc(),c.j!=(h7d(),Z5d)&&nDc(c.e))&&!!a.e){for(g=new lxe(a.e);g.a0||(e.a&2)!=0||(e.a&nKe)!=0&&(e.a&hNe)!=mNe)))&&(h=Osc(a.a,lud(b.b)),i=agc(a.b,D1d(b.e)),j=Tsc(a.a,i),k=new kud((b.b?b.b.f:null).Lm()),tjd(h,k)||jjd(h,k,new Ujd(a.b.d.d,G1d(b),j,b)),undefined)} +function fkd(a,b,c){var d,e,f,g,h,i,j,k;zf(!a.n.a.isEmpty());if(c.size()<(zf(!(a==a.a.v||a==a.a.g)),a.i.size())||c.size()>(kf(!(a==a.a.v||a==a.a.g)),a.j?eKe:a.i.size()+a.e.size())){return null}h=new Zx(16,2);if(!!b&&!lmd(a.g?a.g:a.d,b,Rq(a.n.a.Gf()),h,new bvd((rrd(),rrd(),qrd)))){return null}for(f=0,g=c.size();f1){return null}else k.isEmpty()?Ku(e,i,a.a.G):Ku(e,i,rL(Uw(k.$d()),20))}return ekd(a,ps(e.b))} +function sJ(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=new pJ;try{f=$wnd.JSON.parse(b)}catch(a){a=zib(a);if(zL(a,72)){d=a;throw Aib(new tJ('JSON parse exception: '+d))}else throw Aib(a)}p=(DJe(f==null||FL(f)),f);oJ(c,p.version);iJ(c,p.file);jJ(c,p.getLineCount()!=null?p.lineCount:-1);kJ(c,p.mappings);if(p.sections!=null){k=(lr(),new Fu);for(m=p.sections,n=0,o=m.length;n1&&ulc(a,b,c)){if(j){p=PBc(j.c)}else{o=g.c;p=RDc(o)}tf(p);tlc(a,b,p,c.a);OCe(a.b,b)}else if(l==h){m=rL(Ycd(c.a,h-1),86);if(llc(a,g,j,m)){plc(a,b,g,j,m);OCe(a.b,b)}}else if(g!=j&&l==2){if((VCc(g.c.e)&&!SCc(z1d(g.c))||BCc(g.c.e))&&xlc(a,j)){p=PBc(j.c);tf(p);tlc(a,b,p,c.a);OCe(a.b,b)}}if(!d&&!PCe(a.b,b)&&_Qc(c)&&WQc(c)){n=c.a;for(i=1;ib){throw Aib(new sqe(lZe))}}f=CK(LL,qKe,17,e,15,1);j=0;g=0;for(h=0;h0){c=a[h++];if((c&192)!=128){throw Aib(new ooc('Invalid UTF8 sequence at '+(h-1)+', byte='+(c>>>0).toString(16)))}d=d<<6|c&63}j+=Vqe(d,f,j)}return f} +function qVc(a,b,c,d,e){var f,g,h,i,j,k,l,m;k=c.e;j=cVc(a.b,d);if(!j){if(k.j!=(h7d(),b7d)){return}i=false;for(h=(!k.b?(jye(),jye(),iye):new F3d(k.b)).$d();h.Pd();){g=rL(h.Qd(),5);if(g.j!=_5d||cVc(a.b,g.Lm())||dVc(a.b,g.Lm(),b)){i=true;break}}if(!i){return}}l=j?EYd(H2d(RYd(a.b.f),c),H2d(new T3d((h7d(),L6d),d),c)):H2d((Ef(Ose(d,hte(46))==-1,xMe,d),new T3d((h7d(),_5d),d)),c);H2d(l,c);if(c.b){f=lYd(l,d2d(c));g2d(k,c,f)}else if(j){g2d(k,c,l);k.j==(h7d(),I4d)&&!PCe(a.b.g,d)&&(m=f2d(k,k.g,50),m!=k.g&&(k.g=m),false)}!j&&k.j==(h7d(),b7d)&&Vcd(a.a,new uVc(JHb(e,a.b.c),H2d((Ef(Ose(d,hte(46))==-1,xMe,d),new T3d((h7d(),_5d),d)),c)));FGb(a.b.c,k)} +function E7c(a,b,c){var d,e,f,g,h,i,j;g=rL(F1d(c,29),11);if(c.j==(h7d(),L4d)&&!!g&&(g.a&hNe)==mNe){return e1d((hNe&g.a)==mNe?g.i:null,a.g,a.k.i)}j=zL(c.k,9)?rL(c.k,9):null;if(!!j&&!j.lm()){return j}if(T1d(c)){return L7c(a,c)}HAc();if(yBc(c)==5){return k7c(a.k,(Lhe(),Gge))}if(yBc(c)==3){return k7c(a.k,(Lhe(),hhe))}if(yBc(c)==4){return k7c(a.k,(Lhe(),whe))}if(c.j==f6d&&T1d(c.b)){i=L7c(a,c.b);if(i){e=i.Jn().On();if(!!e&&(e.Nl()||e.i==(Bfe(),zfe))){return Ef(e.Nl()||e.i==(Bfe(),zfe),hOe,e),S7d(e.p)}}}if(c.j==p6d){d=c.b;h=d.d;f=d.j==_5d&&b.j==_5d&&Jse(d.Lm(),b.Lm());if(f){j=zL(h.k,9)?rL(h.k,9):null;if(!!j&&!j.lm()){return j}}}return null} +function NYd(a){switch(a.j.g){case 65:case 96:return true;case 13:case 62:case 42:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 59:case 57:case 58:case 103:case 3:case 1:case 20:case 2:case 28:case 92:case 46:case 64:case 24:case 16:case 4:case 18:case 34:case 9:case 26:case 27:case 8:case 60:case 40:case 63:case 41:case 7:case 10:case 6:case 17:case 15:case 29:case 5:case 22:case 23:case 19:case 30:case 32:case 43:case 61:case 21:case 38:case 11:case 36:case 37:case 113:case 31:case 14:case 99:case 116:case 115:case 33:case 25:case 35:case 12:case 79:case 102:return true;default:return false;}} +function K7c(a,b,c,d,e,f){var g,h,i,j,k,l,m;if(!f){return true}if(b!=null&&(m=HMe.length,Jse(b.substr(b.length-m,m),HMe))){g=bte(b,0,b.lastIndexOf(HMe));l=t6c(a.g,g);h=!l?null:l.d;if(!!h&&(h.Nl()||h.Wl())){return false}}k=true;!!d&&(k=!((d.a&hNe)==mNe||(d.a&hNe)==UQe||lCc(CFb(a.k.b),d,c)&&!!f&&!f.lm()||(Gbc(),TZd(d)>0||(d.a&hNe)==mKe||!!d.g||(d.a&2)!=0||(d.a&512)!=0||(d.a&iNe)!=0||(d.a&jNe)!=0)));if(k&&!!e&&e.j==(h7d(),r5d)){if(d){return false}else if(!u6c(a.g,b,false)&&U1d(c)){for(j=c.e;!(j.j==(h7d(),F6d)||j.j==r5d);j=j.e){if(oCc(j)){return true}}i=j7c(a.k,a.g.i);if(!i||!(!i.b?(Qq(),kD(),jD):i.b).contains(b)){return false}}}return k} +function l0b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;p=0;q=0;f=0;g=0;t=0;r=new RCe;for(n=(k=(new nve(a.g)).a.ke().$d(),new sve(k));n.a.Pd();){m=(e=rL(n.a.Qd(),12),rL(e.te(),516));if(!m.d&&!!m.f&&Yed(m.f).size()>1){l=(!m.f&&(m.f=new cfd),m.f);o=a0b(m);++p;B0b(m);for(d=new Gue((new yue(m.c)).a);d.b;){c=Fue(d);j=rL(c.se(),5);s=rL(c.te(),60);if(!m.d&&!PCe(m.g,s)){i=wL(eue(o,(pf(MDe(l.a,s),ORe,s),_ed(l,rL(NDe(l.a,s),389)).a)));j.Qm(i);FGb(a.c,j);++f}else{++g;b=rL(fue(a.i,m.a),250);if(!!b&&b!=(prb(),nrb)&&!PCe(r,m.a)){OCe(r,m.a);DGb(a.c,Qnc(j,b,(I0b(),G0b),GK(yK(fgb,1),pKe,2,6,[m.a,gjb(s),''])))}}}}else{m.d?++q:++t}}EIe((h=$_b,fIe(),h))} +function WXc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;n=new nYc(a);lAc(a.a,b,n);if(!n.e){g=new kdd(n.b);while(g.a.length!=0){j=new idd;for(f=new lxe(g);f.a0||(b.a&2)!=0||(b.a&nKe)!=0&&(b.a&hNe)!=mNe)&&(!i||i.j!=(h7d(),r5d))){zf(c.j==(h7d(),x5d));e=Ngc(a,b,(c.b?c.b.f:null).Lm(),c,null,a.a);j.a=$pd(a.c.d.d,_id(e))}else if(!!i&&i.j==(h7d(),r5d)){f=$pd(a.c.d.d,_id(e));!!b&&(g=(b.a&hNe)==mNe&&((hNe&b.a)==mNe?b.i:null).a.j==(h7d(),r5d),g||(b.a&hNe)==mKe||!!b.g||TZd(b)>0||(b.a&2)!=0||(b.a&nKe)!=0&&(b.a&hNe)!=mNe)||aBc(i)?(j.a=f):(j.b=f)}return j} +function g8d(a,b){var c;if(!!a.On()&&!!b.On()){return qee(a.On(),b.On(),false)}else if(D7d(a,b,0,new lge(true))){return a}else if(a.lm()||b.lm()){return D7d(a,b,0,new lge(true))?a:H7d(a,(Lhe(),Hhe))}else if(a.Tn()){return Boe(a.Tn(),b)}else if(b.Tn()){return Boe(b.Tn(),a)}else if(a.Sn()){return Bne(a.Sn(),b)}else if(b.Sn()){return Bne(b.Sn(),a)}else if(a.Bn(b)){return b8d(a)}else if(b.Bn(a)){return b8d(b)}else if(a.Qn()){return yme(a.Qn(),b)}else if(b.Qn()){return yme(b.Qn(),a)}if(a.Mn()){c=hce(a.Mn(),b);if(c){return c}}else if(b.Mn()){c=hce(b.Mn(),a);if(c){return c}}if(a.vn()&&b.vn()){return H7d(a,(Lhe(),$ge))}return H7d(a,(Lhe(),ahe))} +function Mbc(a,b,c){var d,e,f,g,h,i,j,k,l,m;if(!b){return a}a.v=b.I.d;a.s=b.c.b;a.t=b.c.c;if(!c){a.r=b.c.a;!a.r&&(a.r=(new xfe(a.A)).b)}else{j=new xfe(a.A);h=(e=b.c.a,e?!e.b?(jye(),jye(),iye):new F3d(e.b):(jye(),jye(),iye)).$d();m=false;i=false;for(d=c.b;d;d=d.d){if(h.Pd()){g=rL(h.Qd(),5);f=wfe(j,g);i=i||B1d(g,30)!=0||B1d(g,37)!=0;if(!!d.d&&B1d(f,30)!=0){l=f2d(f,f.g,30);l!=f.g&&(f.g=l);k=f2d(f,f.g,37);k!=f.g&&(f.g=k);f.g=new p3d(37,1,f.g)}}else{m=m|Hbc(a,j,sie(a.A,(Lhe(),Hhe)),m,a.c.xh(d)||i,a.c.Dh(d))}}while(h.Pd()){f=wfe(j,rL(h.Qd(),5));B1d(f,30)==0&&B1d(f,37)==0&&(k=f2d(f,f.g,37),k!=f.g&&(f.g=k),f.g=new p3d(37,1,f.g))}a.r=j.b}return a} +function W7b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;k=Y7b(b);for(e=0;e>24}this.e=e;i=CK(xib,_Le,17,this.d,16,1);for(g=0;ga.f.b,!(h||nJd(a,0,(XMd(),uMd))||nJd(a,0,(XMd(),fLd))||nJd(a,0,(XMd(),sLd))))&&(i=eKd(a.g,0).c,tCe(pCe((XMd(),FLd),GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),i)||!a.b.c&&MGd(i))&&(g=eKd(a.g,1).b.b.b>eKd(a.g,0).b.a.b,!(g||nJd(a,1,(XMd(),uMd))||nJd(a,1,(XMd(),fLd))||nJd(a,1,(XMd(),sLd))))&&nJd(a,1,(XMd(),WKd))}else if(b.p==bPd){d=rL(b,359);e=d.b;c=d.a;return e.p==JPd&&Jse(rL(e,232).a.a,NOe)&&e.o.a.b==c.o.b.b&&(g=eKd(a.g,0).b.b.b>a.f.b,!(g||nJd(a,0,(XMd(),uMd))||nJd(a,0,(XMd(),fLd))||nJd(a,0,(XMd(),sLd))))&&oJd(a,(XMd(),WKd))}else{return false}} +function azc(a,b,c){var d,e,f,g,h,i,j,k,l;i=qld(rL(NDe(b,a.c),20));Nwc();GK(yK(agb,1),ZJe,1,5,['Running deferred check of function: ',Ssc(a.c),' with FunctionSummary of: ',i,' and callsite ret: ',a.e,' args: ',a.a]);!!a.e&&!Rld(i.k,a.e,new bvd((rrd(),rrd(),qrd)))&&hzc(c,Rnc(a.b,mwc,GK(yK(fgb,1),pKe,2,6,[Vyc(a.e,i.k)])));k=0;g=wBc(a.b);if(!a.a){return}l=a.b.j==(h7d(),R6d)?1:0;for(e=g.$d();e.Pd();){d=rL(e.Qd(),5);f=rL(Ycd(a.a,k),20);j=$jd(i,k+l);d.j==_5d&&etc(a.d,d.Lm())&&(f=rL(NDe(b,Tsc(a.d,d.Lm())),20));if(f){if(Rld(f,j,new bvd((rrd(),rrd(),qrd)))){Kyc(a.f,d,f,j)}else{h=Rnc(d,iwc,GK(yK(fgb,1),pKe,2,6,[''+(k+l+1),Ssc(a.c),Vyc(j,f)]));Lyc(a.f,h,f,j)}}++k}} +function mpd(b,c,d,e,f){var g,h,i,j,k,l;h=c.b;if(h.j==(h7d(),U6d)){Vkd(f,Apd(b,h.b,d,e));h=h.d}else if(h.j==f6d){i=h.b;l=(k=Bpd(b,i,d,e),k.kl()==34&&k.nl().size()==1?amd(k,b.a.j):k);!Rld(l,b.a.ib,new bvd((rrd(),rrd(),qrd)))&&((l.kl()&1)==0||(l.kl()&504)!=0||Kjd(l.gl()))&&OCe(b.i,Rnc(i,dpd,GK(yK(fgb,1),pKe,2,6,[ild(l,new zte,(evd(),dvd)).a])));zf(!f.d);f.d=l;h=h.d}if(h.j==r6d){for(g=h.b;g;g=g.d){try{switch(g.j.g){case 144:Skd(f,Bpd(b,g.b,d,e));break;case 142:j=g.b;Ykd(f,!j?b.a.G:Bpd(b,j,d,e));break;default:Wkd(f,Bpd(b,g,d,e));}}catch(a){a=zib(a);if(zL(a,382)){OCe(b.i,Rnc(c,hpd,GK(yK(fgb,1),pKe,2,6,[])));Ukd(f)}else throw Aib(a)}}h=h.d}Zkd(f,Bpd(b,h,d,e))} +function J6b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;t6b(a,c,c);o=c.b;q=o.d;g=c1d(rL(F1d(c,29),11));l0d(g);if(q.j!=(h7d(),c5d)){for(f=(!q.b?(jye(),jye(),iye):new F3d(q.b)).$d();f.Pd();){e=rL(f.Qd(),5);r=J2d(o6b(a,e),e);c0d(g,new f1d(r,(i=rL(F1d(c,51),28),!i?null:i.ji())))}}k=c;n=c.b?c.b.f:null;for(m=(!n.b?(jye(),jye(),iye):new F3d(n.b)).$d();m.Pd();){l=rL(m.Qd(),5);l.j==J4d&&DGb(a.a,Rnc(c,c6b,GK(yK(fgb,1),pKe,2,6,[])));l.j==J5d&&c0d(g,r6b(a,b,l));if(l.j==W5d){j=l.b;B1d(j,80)!=0?(l=p6b(a,l)):A2d(j.b?j.b.f:null,F4d)}if(l.j==X5d){p=s6b(a,b,l,o.Lm());j1d(k.e,p,k);k=p}}n2d(c,F_d(g,false));A2d(c,N4d);h=J2d(new N2d(c5d),c);g2d(c,q,h);A2d(n,O4d);w6b(a,b,c,d);Yzc(b)} +function g2c(a,b,c){var d,e,f,g;I1c(a,b,c);d=c.b;e=(g=zL(d.k,9)?rL(d.k,9):null,!g?$1c(a,(Lhe(),Hhe)):g).Jn();if(!e.Xm()){c2c(b,c,x1c,GK(yK(fgb,1),pKe,2,6,[e.Um(new zte,false).a]));W1c(a,c,$1c(a,(Lhe(),Hhe)));return}if(e.On()){f=e.On();f.Nl()&&!f.t&&(f.c.b.lm()||f.c.b.mm())&&c2c(b,c,$0c,GK(yK(fgb,1),pKe,2,6,[e.Um(new zte,false).a]));f.i==(Bfe(),Afe)&&!(K7d(f.p)?rL(sie(f.F,(Lhe(),Hhe)),24):f.p).lm()&&!(!!S7d(K7d(f.p)?rL(sie(f.F,(Lhe(),Hhe)),24):f.p)&&S7d(K7d(f.p)?rL(sie(f.F,(Lhe(),Hhe)),24):f.p).jo())&&!(d.j==(h7d(),w5d)||d.j==x5d)&&c2c(b,c,c1c,GK(yK(fgb,1),pKe,2,6,[f.Um(new zte,false).a]));G1c(b,c);m2c(a,b,c,f);W1c(a,c,f.c.b)}else{W1c(a,c,$1c(a,(Lhe(),Hhe)))}} +function qyd(a,b){var c,d;if(b.j==(h7d(),H4d)||b.j==T4d){c=b.b;if(c){d=b.e;while(d.j!=O5d||!Jse(d.b.Lm(),c.Lm())){if(d.j==r5d||d.j==F6d){a.d.Ej(WRd('undefined label "%s"',GK(yK(agb,1),ZJe,1,5,[c.Lm()])),a.r,W2d(b.i),V2d(b.i));break}d=d.e}d.j==O5d&&Jse(d.b.Lm(),c.Lm())&&b.j==T4d&&!zyd(d.b?d.b.f:null)&&a.d.Ej('continue can only use labeles of iteration statements',a.r,W2d(b.i),V2d(b.i))}else{if(b.j==T4d){d=b.e;while(!zyd(d)){if(d.j==r5d||d.j==F6d){a.d.Ej('continue must be inside loop',a.r,W2d(b.i),V2d(b.i));break}d=d.e}}else{d=b.e;while(!yyd(d)){if(d.j==r5d||d.j==F6d){a.d.Ej('unlabelled break must be inside loop or switch',a.r,W2d(b.i),V2d(b.i));break}d=d.e}}}}} +function oxc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;m=b.b;e=b.b?b.b.f:null;n=cxc(a,m,c,a.r,a.r);o=n.b;-1!=o.kl()&&eKe!=o.kl()&&!(512==o.kl()||8==o.kl())&&!(!o.nl().isEmpty()||Ijd(o.gl()))&&(o.kl()&1)==0&&Qyc(a,m,(h7d(),K5d),'an object or a union type that includes an object',n.b);g=bxc(a,e,n.a,Qqd(a.w));h=g.b;f=qld(h);k=!!f&&(f.c||f==f.a.s||!!f.d);eKe==h.kl()||k||Qyc(a,e,(h7d(),K5d),'a constructor function',h);if(!f||(l=xkd(f.d),!(!!l&&l.a.g==0))||!(512==d.kl()||8==d.kl())&&!(XLe==d.kl()||16==d.kl())){g.b=a.b;return g}j=_jd(f);512==d.kl()||8==d.kl()?(i=cmd(o,j)):-1==o.kl()?(i=o):(i=amd(o,j));if(0!=i.kl()){n=cxc(a,m,c,a.r,i);g=bxc(a,e,n.a,Qqd(a.w))}g.b=a.b;return g} +function E2c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;n=(b.b?b.b.f:null).Lm();j=b.b;i=(g=zL(j.k,9)?rL(j.k,9):null,!g?a.i:g);k=nbe(i.Jn());m=j.j==(h7d(),U6d)&&H2c(a,a.g.i).Nl();if(!k){Iie(a.e,n,i)}else{if(i.zn()&&!(k.sn()||k.qn()||k.rn()||qie(k.F,(Lhe(),Zge))==k||k.lm()||!!k.ho(n))){p=false;h=!b.e?null:b.e.e;if(!a.g.b&&(HAc(),h.j==m5d&&h.b.j==m4d&&fDc(h.b.b))){l=(f=rL(F1d(h,51),28),!f?null:f.ji());d=k.co().n;!!d&&Jse((e=rL(F1d(d,51),28),!e?null:e.ji()),l)&&(p=true)}if(!m&&!p){return}}if(D2c(a,b,k)){return}o=k.ho(n);!!o&&!o.b||(k.sn()||k.qn()||k.rn()||qie(k.F,(Lhe(),Zge))==k||k.lm()||!!k.ho(n)||!k.Ul()?Jse(KMe,n)?Yae(k,n,c,b):Zae(k,n,c,b):m?Zae(k,n,c,b):Iie(a.e,n,k))}} +function C1b(a,b){var c,d,e,f,g,h,i,j,k;if(!a.c){return false}i=Adc(a.c,b);if(!i){return false}d=i.d;if(!d){for(k=(!i.r?(lr(),lr(),kr):i.r).$d();k.Pd();){j=rL(k.Qd(),124);(j.g==(Pec(),Nec)||j.g==Oec)&&(d=j)}}if(!d){return false}f=d.c;g=rL(F1d(f,51),28);if(!!g&&g.lk()){return false}c=f.e;if(c.j==(h7d(),r5d)){e=c}else{HAc();if(!!c&&(c.j==b7d||c.j==T5d||c.j==S4d)&&f.j==_5d){if(f.b){e=rL(tf(f.b),5)}else{return false}}else if(c.j==m4d&&c.b==f){e=rL(tf(c.b.d),5)}else if(c.j==m6d&&!!f.b&&!f.b.d){e=rL(tf(f.b),5)}else{throw Aib(new Ire('Unexpected declaration format:\n'+G2d(c)))}}if(e.j==r5d){h=rL(tf(x1d(e,2)),5);return !O1b(new P1b(a),h)}else return T1d(e)&&C1b(a,G1d(e))} +function spd(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o;j=d.e;m=kpd(a,b,d,e,f,h);lpd(a,b,d,m,g,h);npd(a,b,d,j,m,g,h);if(!b){return ald(h)}k=wpd(a,b,c,d,m,g);i=upd(a,b,g,m,true);if(!e&&((b.a&2)!=0||(b.a&512)!=0||(b.a&iNe)!=0)){return ald(h)}else (b.a&2)!=0?Epd(a,c,d,e,k,i,h):(b.a&512)!=0||(b.a&iNe)!=0?(i.isEmpty()||OCe(a.i,Rnc(d,Rod,GK(yK(fgb,1),pKe,2,6,[c]))),n=upd(a,b,g,m,false),o=rud(e,n.isEmpty()?(Qq(),new XD(qqd(a.a))):n),o||OCe(a.i,Rnc(d,apd,GK(yK(fgb,1),pKe,2,6,[zud(e,new zte).a]))),Rkd(h,e.r),undefined):i.isEmpty()||OCe(a.i,Rnc(d,_od,GK(yK(fgb,1),pKe,2,6,[c])));if(b.g){l=b.g.a;zf(l.j==(h7d(),A4d));Vkd(h,Apd(a,l.b,g,m))}(b.a&2)!=0||Pkd(h,(b.a&jNe)!=0);return ald(h)} +function D7d(a,b,c,d){var e,f;if(a==b){return true}if(a.rn()&&b.rn()){return true}f=a.lm();e=b.lm();if(f||e){if(c==2){return true}else if(c==1){return f&&e}else if(f&&e&&a.tn()^b.tn()){return false}}if(!!a.Tn()&&!!b.Tn()){return poe(a.Tn(),b.Tn(),c,d)}if(!!a.On()&&!!b.On()){return Qde(a.On(),b.On(),c,d)}if(!fne(a.cn(),b.cn(),c,d,(xge(),wge))){return false}if(d.b&&a.An()&&b.An()){return Xae(zL(a,24)?rL(a,24):null,zL(b,24)?rL(b,24):null,c,d)}if(a.tn()&&b.tn()){return Jse(G7d(a,zL(a,24)?rL(a,24):null),G7d(a,zL(b,24)?rL(b,24):null))}if(!!a.Rn()&&!!b.Rn()){return false}if(zL(a,158)){return D7d(rL(a,158).j,b,c,d)}if(zL(b,158)){return D7d(a,rL(b,158).j,c,d)}return false} +function qKd(a){var b;b=GKd(a);if($Jd(a,a.d)){switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 47:switch($Jd(a,a.d+1)?Ese(a.e.a,a.d+1):0){case 47:CKd(a,(BNd(),zNd));return true;case 42:vKd(a);return true;}break;case 60:if(($Jd(a,a.d+1)?Ese(a.e.a,a.d+1):0)==33&&($Jd(a,a.d+2)?Ese(a.e.a,a.d+2):0)==45&&($Jd(a,a.d+3)?Ese(a.e.a,a.d+3):0)==45){hKd(a,yYe,GK(yK(agb,1),ZJe,1,5,[]));CKd(a,(BNd(),zNd));return true}break;case 45:if(b&&($Jd(a,a.d+1)?Ese(a.e.a,a.d+1):0)==45&&($Jd(a,a.d+2)?Ese(a.e.a,a.d+2):0)==62){hKd(a,yYe,GK(yK(agb,1),ZJe,1,5,[]));CKd(a,(BNd(),zNd));return true}break;case 35:if(a.d==0&&($Jd(a,a.d+1)?Ese(a.e.a,a.d+1):0)==33){CKd(a,(BNd(),ANd));return true}}}return false} +function _ic(a,b,c){var d,e,f,g,h,i,j;h=b.ji();g=Zic(a,h);if(g.a){Wjc(g,false);return}f=b.Cj();if(a.e&&!mjc(f)&&a.k<=UAc(f,a.k)){Wjc(g,false);return}if(g.c){zf(!g.a);g.a=b;_9b(b.Cj())&&(g.d=true);$ic(a,b)||Wjc(g,false);if(g.c){g.e=c;i=t9b(f);if(!i.isEmpty()){g.d=false;g.f=i}e=(HAc(),lf(f.j==(h7d(),r5d),f),f.b?f.b.f:null);j=e.j==r5d?e.b?e.b.f:null:e;RAc(j,U6d,BAc)&&(g.i=true);if(RAc(e,r5d,(Lf(),fg(),cg))){g.b=true;!a.b&&(d=(lf(f.j==r5d,f),f.b?f.b.f:null),!!(kf(f.j==r5d),f.b.d).b||VBc(d,new KEc,new YEc))&&Wjc(g,false)}}g.c&&!g.d&&!a.c&&Wjc(g,false);kjc((HAc(),kf(f.j==(h7d(),r5d)),f.b.d))&&Wjc(g,false);ljc((kf(f.j==r5d),f.b.d))&&Wjc(g,false);B1d(f,59)!=0&&Wjc(g,false)}} +function nhc(a,b,c){var d,e,f,g,h,i,j,k;if(b.j==(h7d(),x5d)&&Jse((b.b?b.b.f:null).Lm(),KMe)){return ohc(a,b.b,c)}i=new kud(c);k=null;if(T1d(b)){j=lud(b);d=Hsc(a.a,j,false);if(d){e=zL(d.d,100)?rL(d.d,100):null;if(!!e&&e.c.contains(c)){return zf(e.d==(Rjd(),Qjd)),e.a}g=d.d;if(g){return ggc(a.c,pjd(g,i))}k=d.e}}!k&&(k=khc(a,b));if(!k){return null}(k.kl()==64||k.kl()==128||k.kl()==32||k.kl()==256||(k.kl()&-25)==0&&(k.kl()&24)!=0)&&(k=jld(k));f=(h=k.kl()==2&&k.nl().size()==1?rL(Uw(k.nl().$d()),25):null,!h?null:h.b);if(!!f&&Jse(c,vRe)){return $pd(a.c.d.d,okd(f))}else if(!!f&&Jse(c,uRe)){return $pd(a.c.d.d,nkd(f))}if(Kvd(k.nl(),i)||Kvd(k.gl(),i)){return yld(k,i)}return null} +function rhc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;kf(b.j==(h7d(),x5d));_gc(a,b);if(Vgc(a,b)){return}d=G1d(b.b);e=lud(b.b);zf(ftc(a.a,d));c=(f=Hsc(a.a,e,false),!f?null:zL(f.d,79)?rL(f.d,79):null);m=(b.b?b.b.f:null).Lm();j=(HAc(),k=eBc(b),!k?null:rL(F1d(k,29),11));o=_fc(a.c,j,a.a);i=egc(a.c,b);if(!!o||i){n=(l=rL(Xk(Nk(c.D,m,false)),52),!l?null:l.b);if(sjd(c,m)&&!!n&&!phc(j,o,n)){hzc(a.c.g,Rnc(b,(Yfc(),Rfc),GK(yK(fgb,1),pKe,2,6,[m,'type '+c])));return}!o&&(o=$gc(a,b));zf(!c.f);kjd(c,m,b,o,i);q=f2d(b,b.g,76);q!=b.g&&(b.g=q);b.g=new p3d(76,1,b.g);i&&(p=f2d(b,b.g,77),p!=b.g&&(b.g=p),b.g=new p3d(77,1,b.g))}else{g=null;h=PBc(b);!!h&&(g=jhc(a,h));!g&&(g=a.c.d.d.G);wud(c,m,b,g)}} +function yhc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;kf(b.j==(h7d(),x5d));o=Xid(a.a.c);p=!o?null:o.kl()==2&&o.nl().size()==1?rL(Uw(o.nl().$d()),25).d:null;g=b.e;c=g.j==m4d?g.b?g.b.f:null:null;if(!p){!!c&&c.j==r5d&&shc(a,c,null);return}l=p.a;if(l.g!=0){Ahc(a,b,l);return}h=(b.b?b.b.f:null).Lm();e=(HAc(),f=eBc(b),!f?null:rL(F1d(f,29),11));k=Sgc(a,e,b,l);i=k.a;j=k.b;d=egc(a.c,b);!!c&&c.j==r5d&&(n=f2d(g,g.g,76),n!=g.g&&(g.g=n),g.g=new p3d(76,1,g.g));if(!!i||d){ahc(a,l,h,b,i);!i&&(i=$gc(a,b));Zgc(a,b,l)&&qud(l,h,b,i,d);d&&(m=f2d(b,b.g,77),m!=b.g&&(b.g=m),b.g=new p3d(77,1,b.g))}else Zgc(a,b,l)&&(j?xud(l,h,j,b):xud(l,h,a.c.d.d.G,b));Ft(a.c.f,l,h)||yt(a.c.f,l,h,new Fhc(b,null,null))} +function djd(a,b){var c,d,e,f,g,h,i,j,k;if(a==b){return a}d=a.a;c=new cld(a.a);h=ose(a.f.size(),b.f.size());for(f=0;f=14&&j<=16))){if(b.a.containsKey(d)){!c.a?(c.a=new Cte(c.d)):vte(c.a,c.b);ste(c.a,'[...]')}else{g=sL(d);i=new TCe(b);mGe(c,wxe(g,i))}}else zL(d,890)?mGe(c,Wxe(rL(d,890))):zL(d,469)?mGe(c,Pxe(rL(d,469))):zL(d,90)?mGe(c,Qxe(rL(d,90))):zL(d,1947)?mGe(c,Vxe(rL(d,1947))):zL(d,19)?mGe(c,Txe(rL(d,19))):zL(d,579)?mGe(c,Uxe(rL(d,579))):zL(d,1948)?mGe(c,Sxe(rL(d,1948))):zL(d,1949)&&mGe(c,Rxe(rL(d,1949)))}else{mGe(c,d==null?kKe:gjb(d))}}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)} +function _3b(a){var b,c,d,e,f,g,h,i,j,k;f=e4b(a,RYd('$jscomp$generator$switch$entered'+(''+a.j.a.hb++)));g=wYd(s1d(f,false),f4b(a,new N2d((h7d(),n5d))),b7d);j=b6b(RYd('$jscomp$generator$switch$val'+(''+a.j.a.hb++)),a.f.b.k);k=wYd(s1d(j,false),d2d(a.f),b7d);m1d(a.p,g);j1d(a.p,k,g);i=k;while(a.f.b){e=d2d(a.f);m1d(e.b?e.b.f:null,zYd(e4b(a,lYd(s1d(f,false),i4b(a,new N2d(W6d))))));if(e.j==X4d){!!a.f.b&&DGb(a.c,Rnc(a.f,(X5b(),W5b),GK(yK(fgb,1),pKe,2,6,['Default case as intermediate case'])));h=nYd(d2d(e))}else{h=IYd(e4b(a,WYd(s1d(f,false),e4b(a,aZd(s1d(j,false),d2d(e))))),d2d(e))}j1d(a.p,h,i);i=h}c=J3b++;d=a.e.a.length==0?-1:rL(Ycd(a.e,0),264).b;Ucd(a.e,0,new B4b(c,d,null));b=S3b(a,c);j1d(a.p,b,i)} +function S9b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;e=b.c;n=e.e;h=n.e;f=O9b(a,b);kf(f!=(rac(),pac));l=true;switch(f.g){case 2:o=n.b.Lm();aac(b.f,o);break;case 3:o=n.Lm();aac(b.f,o);break;case 1:o=null;l=false;break;case 4:throw Aib(new Ire('Movable expressions must be moved before inlining.'));case 5:throw Aib(new Ire('Decomposable expressions must be decomposed before inlining.'));default:throw Aib(new Ire(gTe));}k=new ibc(a.d,a.f);j=DDc(e);m=hbc(k,d,c,e,o,l,j,true);FDc(m,a.d);i=h.e;switch(f.g){case 3:g=d2d(n);EDc(g,a.d);zf(!n.b);j1d(i,m,h);break;case 2:zf(h.j==(h7d(),m5d));g2d(i,h,m);EDc(h,a.d);break;case 1:zf(n.j==(h7d(),m5d));g2d(h,n,m);EDc(n,a.d);break;default:throw Aib(new Ire(gTe));}return m} +function jTc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=a.n;PQb(a.n,a.v,a.q,a.u);n=a.q.length==0?j:MQb(a.n,a.v,a.u);q=new idd;i=new idd;for(e=(h=(new ewe(b.a)).a.ke().b.Ho(),new kwe(h));e.a.Pd();){c=(f=rL(e.a.Qd(),12),rL(f.se(),191));if(c.c!=null){continue}if(a.e.contains(c.d)){continue}if(c.b){o=NQb(n);kTc(a,c,o)}else{o=NQb(j);q.a[q.a.length]=c;i.a[i.a.length]=o}OCe(a.v,o)}p=i.a.length;for(k=0;keKd(a.g,0).b.a.b,!(c||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&nJd(a,1,FLd)&&nJd(a,2,uLd)){return cJd(a)}if(nJd(a,0,nLd)&&(d=eKd(a.g,1).b.b.b>eKd(a.g,0).b.a.b,!(d||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&(nJd(a,1,SMd)||nJd(a,1,PLd)||nJd(a,1,kLd)||nJd(a,1,DLd)||nJd(a,1,dLd)||nJd(a,1,tLd)||nJd(a,1,TLd)||nJd(a,1,ULd))){return qHd(a)}if((nJd(a,0,TLd)||nJd(a,0,ULd))&&(b=eKd(a.g,1).b.b.b>eKd(a.g,0).b.a.b,!(b||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&nJd(a,1,FLd)){return CId(a,false)}return XId(a)} +function JRd(a,b,c){var d,e,f;a.b=b;a.a=c;if(!b.d&&!b.e&&!b.f&&!b.g&&!b.i&&!b.j&&!b.k&&b.p==-1&&b.n==-1){switch(b.b){case 115:if(a.a==null){return kKe}case 100:if(zL(a.a,95)||zL(a.a,205)){e=gjb(a.a);return e}}}gSd(a.b,a.a);switch(b.b){case 66:case 98:f=(AL(a.a)?(e=gjb(a.a)):a.a==null?(e=$Oe):(e=_Oe),IRd(a,e,0));break;case 72:case 104:f=QRd(a);break;case 83:case 115:f=(d=kte(a.a),IRd(a,d,0));break;case 67:case 99:f=NRd(a);break;case 100:case 111:case 120:case 88:f=RRd(a);break;case 65:case 97:case 69:case 101:case 102:case 71:case 103:f=PRd(a);break;case 37:f=IRd(a,'%',0);break;case 110:f=_Je;break;case 116:case 84:f=ORd(a);break;default:throw Aib(kSd(b));}Tqe(b.b)&&f!=null&&(f=Xb(gjb(f)));return f} +function D5b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;n=WFb(a.c);q=_5b(c,n,(Lhe(),whe));d=$5b(c,n,Dge,q);r=_5b(c,n,Yge);s=b.b?b.b.f:null;m=C5b(s,d,q);h=B5b(s,r,q);k=new f1d((SAd(),l=TBd('!ITemplateArray'),EBd(l,!l.n?DCd(l.i):_Ad(l))),'');j=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4d,X5d,J5d,J4d,b6d,c6d,t6d,u6d,v6d])} +function czb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;if(c.indexOf('.')==-1){dzb(a,b,c);return}f=b.e;d=rL(F1d(f,29),11);switch(f.j.g){case 65:case 96:{HAc();if(f.j!=(h7d(),Z5d)&&nDc(f.e)&&f.b==b){l=f.e;i=new N2d(c5d);g2d(l,f,i);h=QDc(a.a,c,f,d);j=f2d(f,f.g,29);j!=f.g&&(f.g=j);K2d(h,f);$yb(h,b.i,b.c);g2d(l,i,h);zf(f.j==r5d||f.j==N4d);m=f.b;n=f.j==r5d?(Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')):new N2d(c5d);g2d(f,m,H2d(n,m));return}}break;case 76:case 100:case 88:{k=b.b?u1d(b.b?b.b.f:null):null;h=QDc(a.a,c,k,d);K2d(h,f);e=wL(F1d(b,40))!=null?wL(F1d(b,40)).length:b.Lm().length;$yb(h,b.i,e);aEc(b,h);return}case 94:case 93:case 45:throw Aib(new DJ('Not supported'));}g=ODc(a.a,c);I2d(g,b);g2d(f,b,g);FGb(a.a,g)} +function Lsc(a,b,c){var d,e,f,g,h,i,j;kf(b.indexOf('.')==-1);if(!$sc(a,b,c)){return null}d=a.d;j=null;g=false;if(Jse(pNe,b)){j=Jsc(a,pNe)}else if(MDe(a.p,b)){j=rL(NDe(a.p,b),20)}else if(a.g.contains(b)){e=a.g.indexOf(b);if(!!d&&e!=-1){f=(i=d.f.size(),e100?(e=G1d(j)):(e=G1d(j)+' of type '+k):(e=k);l=Kvd(c.nl(),d)||Kvd(c.gl(),d)?zwc:hwc;hzc(a.Q,Rnc(b,l,GK(yK(fgb,1),pKe,2,6,[i,e])));return true} +function uBd(a,b){var c,d,e,f,g,h,i,j;if(b!=(wCd(),mCd)){a.n=b;return XAd(a,'msg.jsdoc.missing.lp',a.i.g,CCd(a.i)),null}d=jBd(a,(h7d(),r5d));h=null;PBd(a);if(!hBd(a,sCd)){b=!a.n?DCd(a.i):_Ad(a);e=true;if(b==vCd){j=a.i.n;g=Jse(pNe,j);f=Jse('new',j);if(g||f){if(hBd(a,dCd)){!a.n?DCd(a.i):_Ad(a);PBd(a);c=RBd(a,g?U6d:f6d,qBd(a,!a.n?DCd(a.i):_Ad(a)));if(!c){return null}m1d(d,c)}else{return XAd(a,'msg.jsdoc.missing.colon',a.i.g,CCd(a.i)),null}if(hBd(a,eCd)){!a.n?DCd(a.i):_Ad(a);PBd(a);b=!a.n?DCd(a.i):_Ad(a)}else{e=false}}}if(e){h=ABd(a,b);if(!h){return null}}}!!h&&l1d(d,h);PBd(a);if(!hBd(a,sCd)){return XAd(a,BXe,a.i.g,CCd(a.i)),null}PBd(a);!a.n?DCd(a.i):_Ad(a);i=CBd(a);if(!i){return null}else{l1d(d,i)}return d} +function wmb(){wmb=cjb;umb=new Q_b('JSC_INJECT_IN_NON_GLOBAL_OR_BLOCK_ERROR',(prb(),mrb),new _te('@ngInject only applies to functions defined in blocks or global scope.'));vmb=new Q_b('JSC_INJECT_NON_FUNCTION_ERROR',mrb,new _te('@ngInject can only be used when defining a function or assigning a function expression.'));smb=new Q_b('JSC_INJECTED_FUNCTION_HAS_DESTRUCTURED_PARAM',mrb,new _te('@ngInject cannot be used on functions containing destructured parameter.'));rmb=new Q_b('JSC_INJECTED_FUNCTION_HAS_DEFAULT_VALUE',mrb,new _te('@ngInject cannot be used on functions containing default value.'));tmb=new Q_b('JSC_INJECTED_FUNCTION_ON_NON_QNAME',mrb,new _te('@ngInject can only be used on qualified names.'))} +function w4b(a,b,c){var d,e,f,g,h,i,j;f=(HAc(),nBc(c,new vEc((h7d(),r5d))));if(!f||B1d(f,59)==0||c.j==p5d){return}e=nBc(c,new vEc(F4d));h=null;j=null;switch(c.j.g){case 72:h=c.b.d;j=h.d;break;case 70:h=c.b;j=new N2d(c5d);break;case 71:h=c.b?c.b.f:null;if(h.j!=c5d){g=(Ef(Ose(SSe,hte(46))==-1,xMe,SSe),new T3d(_5d,SSe));m1d(e,wYd(s1d(g,false),i4b(a.c,new N2d(W6d)),b7d));h=e4b(a.c,WYd(g,u1d(c.b?c.b.f:null)));l1d(c,h)}j=new N2d(c5d);}if(!L3b(a.c,h)&&!L3b(a.c,j)){return}i=RYd('$jscomp$generator$loop$guard'+(''+a.c.j.a.hb++));if(h.j!=c5d){d=new N2d(F4d);g2d(c,h,d);m1d(d,nYd(zYd(b6b(lYd(s1d(i,false),s1d(h,false)),h.k))));l1d(d,s1d(i,false))}j.j==c5d||k1d(c,nYd(zYd(u1d(j))),c.b?c.b.f:null);m1d(e,xYd(i,b7d));Yzc(b)} +function NId(a){var b,c,d,e,f,g;switch(eKd(a.g,0).c.g){case 29:return NHd(a,true,false);case 35:return b=eKd(a.g,0).b.b,aHd(a,(XMd(),EMd)),new QQd(new qRd(b,a.f));case 21:return c=eKd(a.g,0).b.b,aHd(a,(XMd(),JMd)),new VQd(new qRd(c,a.f));case 2:case 108:case 109:case 110:case 111:return mId(a);case 100:case 101:case 98:case 99:case 97:return wId(a);case 107:case 104:return aJd(a,null);case 49:return eKd(a.g,1).c==(XMd(),CLd)?RHd(a,cMd,hLd):xHd(a);case 45:return FId(a);case 47:return UHd(a);case 94:case 95:return d=eKd(a.g,0).b.b,e=(g=aKd(a.g),a.f=g.b.a,g),new EOd(new qRd(d,a.f),e);default:return f=eKd(a.g,0).b.b,nHd(a),HJd(a,'primary expression expected',GK(yK(agb,1),ZJe,1,5,[])),new IOd(new qRd(f,a.f));}} +function Sjb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;f=c.c.e;if(f.j==(h7d(),_5d)){r=c.e;j=f.Lm();i=r._j(j);k=new GQc(a.b,(AQc(),zQc),new o5b(a.b),(Lf(),!i?(fg(),dg):new Tf(i)));k.e=r;bAc(new jAc(k.c,k,k.g),r);k.e=null;h=rL(NDe(k.f,i),151);o=new tEe;if(_Qc(h)&&(t=h.a.a.length,t>0&&sQc(rL(Ycd(h.a,0),86)))){if(!WQc(h)){if(eec(b)){e=false;for(q=new lxe(h.a);q.a0)&&++h;c==123&&(d=true);if(c==125||h>=6&&!d){d=false;h=0}ote(j,_Jd(a));c=$Jd(a,a.d)?Ese(a.e.a,a.d):0}i=j.a;if(e){i=PKd(i);if(i==null){fKd(a,ZJd(a,a.d),xYe,GK(yK(agb,1),ZJe,1,5,[]));return WJd(a,(XMd(),xLd),b)}}g=i.charCodeAt(0);if(!KKd(g)){fKd(a,RGd(a.e.b,b),"Character '%c' (U+%04X) is not a valid identifier start char",GK(yK(agb,1),ZJe,1,5,[Xqe(g),Zre(g)]));return WJd(a,(XMd(),xLd),b)}f=(HGd(),rL(Fs(hGd,i),63));if(f){return new GFd(f.a,SGd(a.e.b,b,a.d))}return new IFd(SGd(a.e.b,b,a.d),(wJe(i),i))} +function AZb(a){var b,c,d,e,f;f=a.e;if(!f){return false}HAc();if(!!f&&(f.j==(h7d(),b7d)||f.j==T5d||f.j==S4d)&&a.j==(h7d(),_5d)&&(c=rL(F1d(a,51),28),!!c&&c.lk()||!!a.b)){return true}else if(f.j==(h7d(),r5d)&&f.b==a){if(f.j==r5d&&!(f.j!=Z5d&&nDc(f.e))){if(a.Lm().length!=0){return true}}else{return true}}else if(f.j==N4d&&f.b==a){if(f.j==N4d&&!(f.j!=Z5d&&nDc(f.e))){if(a.j!=c5d){return true}}else{return true}}else if(a.j==W5d&&f.j==O4d){return true}else if(f.j==m4d&&f.b==a){return true}else if(aDc(a)){return true}else if(f.j==r6d){return true}else if(f.j==P4d&&f.b==a&&(d=rL(F1d(a,51),28),!!d&&d.lk())){e=f.e;zf(e.j==Q5d);zf(e.e.j==R5d);return true}else{b=rL(F1d(a,51),28);if(!!b&&b.lk()&&f.j==m5d&&a.j==x5d&&T1d(a)){return true}}return false} +function Kxc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;kf(c.a.size()==1);i=d.b;n=d.d;!Tld(n)&&!(n.kl()==2&&n.nl().size()==1)&&(n=omd(a.n));l=b.e;if(l.j==(h7d(),x5d)&&l.e.j==m4d&&Dyc(a,c,l,n)){return new gzc(i,e,null,null)}if(!f&&xyc(a,l,n,c)){return new gzc(i,e,null,null)}if(!Hld(n,c)){if(f||l.e.j!=m4d){Ayc(a,l,n,c);k=n.nl();if(!(k.size()==1&&rL(Uw(k.$d()),25).c)){return new gzc(i,e,null,null)}}j=n.nl();if(j.size()==1&&rL(Uw(j.$d()),25).c){n=pmd(n,c,a.r);i=Pyc(i,b,d.c,n)}}l.j==w5d?Eyc(a,b,n):l.j==x5d&&yyc(a,b,n);o=new kud(DTe+wL(c.a.getAtIndex(0)));if(Hld(n,o)){h=qld(yld(n,o));tf(h);g=$jd(h,0);zf(0!=g.kl());return new gzc(i,g,g,null)}m=!d.c?null:nud(d.c,c);return Kvd(n.nl(),c)||Kvd(n.gl(),c)?new gzc(i,yld(n,c),nld(n,c),m):new gzc(i,a.r,null,m)} +function Wxc(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u;zf(!c||g);t=Rq(e.n.a.Gf());q=new Zx(16,2);j=e.g?e.g:e.d;if(!!c&&!!j){n=rL(c.k,20);if(!n){m=cxc(a,c,f,a.r,a.r);n=m.b;f=m.a}lmd(j,n,t,q,new bvd((rrd(),rrd(),qrd)))}h=d;k=0;while(h){m=g?cxc(a,h,f,a.r,a.r):_wc(a,h,f,a.r);lmd($jd(e,k),m.b,t,q,new bvd((rrd(),rrd(),qrd)));h=h.d;f=m.a;++k}i=new Nu;for(s=t.$d();s.Pd();){r=wL(s.Qd());u=rL(bk(q,r),44);if(u.size()>1){g&&hzc(a.Q,Rnc(b,xwc,GK(yK(fgb,1),pKe,2,6,[''+u.size(),bte(r,0,Ose(r,hte(35))),gjb(u),Wjd(e,new zte,(evd(),dvd)).a])));if(a.I){l=a.c;for(p=u.$d();p.Pd();){o=rL(p.Qd(),20);l=Tnd(l,o)}Vcd(i.b,(Ep(r,l),aB(),new tu(r,l)))}else{Ku(i,r,a.r)}}else if(u.size()==1){o=rL(Uw(u.$d()),20);Ku(i,r,Wyc(o,a.r))}else{Ku(i,r,a.r)}}return ps(i.b)} +function xLc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;!!c.e&&pLc(a,c.e,G1d(c.j),c.c);bMc((HAc(),kf(b.j==(h7d(),N4d)),b.b?b.b.f:null),a.a);for(m=c.i.$d();m.Pd();){l=rL(m.Qd(),150);l.c.j==m6d&&bMc(l.c,a.a)}h=(g=new N2d(F4d),g);rLc(a,c,h,G1d(c.j)+LMe);n=uLc(a,c,h);f=tLc(c);mLc(a,c,n,f);if(!n.isEmpty()||!f.isEmpty()){i=c1d(rL(F1d(b,29),11));j=OUe+Xse(G1d(c.j),SNe,'_')+PUe;k=new f1d(new P2d(A4d,new T3d(L6d,j)),QUe);i0d(i,k);n2d(b,F_d(i,false))}if(h.b){vLc(a,c.e,c.c);o=nBc(b,GAc);n1d(o.e,c2d(h),o);FGb(a.a,o)}oLc(c,'is',new f1d(new T3d(L6d,dKe),''));p=new N2d(A4d);d=new T3d(L6d,lOe);l1d(p,d);e=new P2d(F4d,new T3d(L6d,dKe));l1d(d,e);oLc(c,'observers',new f1d(p,''));oLc(c,MUe,new f1d(new T3d(L6d,'Polymer.ElementProperties'),''));a.d&&!!c.e&&nLc(a,c,c.e)} +function cBd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;f=new zte;o=-1;n=-1;if(d){HCd(a.i);o=a.i.g;n=CCd(a.i)+1;k=fBd(a);c!=0&&(k=fte(k));f.a+=''+k;a.g=($Bd(),YBd);b=!a.n?DCd(a.i):_Ad(a)}i=false;l=-1;do{switch(b.g){case 15:if(i){l=CCd(a.i)+1;i=false}else{lBd(a,f,l,c);l=-1;f.a+='*'}b=!a.n?DCd(a.i):_Ad(a);while(b==(wCd(),uCd)){if(l!=-1){lBd(a,f,l,c);l=-1}f.a+='*';b=!a.n?DCd(a.i):_Ad(a)}continue;case 1:c!=2&&(f.a+=_Je,f);i=true;l=0;b=!a.n?DCd(a.i):_Ad(a);continue;default:i=false;a.g=($Bd(),YBd);j=b==(wCd(),gCd);if(!j){lBd(a,f,l,c);l=-1}if(b==gCd||b==hCd||b==bCd&&!e){m=f.a;c!=0&&(m=fte(m));if(d&&m.length!=0){h=a.i.g;g=CCd(a.i);L_d(a.e,m,o,n,h,g)}return new WBd(m,b)}vte(f,QBd(a,b));k=fBd(a);c!=0&&(k=UBd(k));f.a+=''+k;b=!a.n?DCd(a.i):_Ad(a);}}while(true)} +function iod(a,b){hld();var c,d,e,f,g,h,i,j,k,l,m,n,o,p;tf(a);tf(b);if(eKe==a.kl()||(j=a.nl(),j.size()==1&&rL(Uw(j.$d()),25).c)){return b}else if(eKe==b.kl()||(i=b.nl(),i.size()==1&&rL(Uw(i.$d()),25).c)){return a}else if(-1==a.kl()&&-1==b.kl()){return a.e.u}else if(-1==a.kl()||-1==b.kl()){return null}if(!pD(a.gl(),b.gl())){return null}d=a.gl();k=cod(a.kl());l=cod(b.kl());if(k!=l||a.Dl()!=b.Dl()){return null}if((k&2)==0){return a}if(a.nl().size()!=b.nl().size()){return null}p=new vEe(b.nl());o=new tEe;for(f=a.nl().$d();f.Pd();){e=rL(f.Qd(),25);n=e;c=false;for(h=b.nl().$d();h.Pd();){g=rL(h.Qd(),25);m=Mtd(n,g);if(m){c=true;p.a.remove(g)!=null;n=m}}if(!c){return null}o.a.put(n,o)}if(p.a.size()!=0){return null}return Wnd(a.e,k,(Qq(),Xs(o)),a.Dl(),d)} +function vvd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;kf(!a.isEmpty());i=a.$d();j=rL(i.Qd(),160);if(!i.Pd()){return j}m=j.b;if(!j.a){while(i.Pd()){g=rL(i.Qd(),160);for(f=new Gue((new yue(g.b.a)).a);f.b;){e=Fue(f);k=wL(e.se());d=rL(Xk(Nk(m,k,false)),20);n=rL(e.te(),20);vf(d,'%s is missing from an env',k);kld(d,n)||(m=trd(m,k,Tnd(d,n)))}}return new svd(m)}l=(yrd(),yrd(),xrd);for(h=a.$d();h.Pd();){g=rL(h.Qd(),160);for(q=(o=(new dve(g.a.a.a)).a.ke().$d(),new jve(o));q.a.Pd();){p=(e=rL(q.a.Qd(),12),wL(e.se()));l=zrd(l,p)}}while(i.Pd()){g=rL(i.Qd(),160);for(c=(o=(new dve(l.a.a)).a.ke().$d(),new jve(o));c.a.Pd();){b=(e=rL(c.a.Qd(),12),wL(e.se()));d=rL(Xk(Nk(m,b,false)),20);n=rL(Xk(Nk(g.b,b,false)),20);kld(d,n)||(m=trd(m,b,Tnd(d,n)))}}return new tvd(m,l)} +function VNc(a,b,c){var d,e,f,g,h;if(y1d(c)!=3){DGb(a.g.a,Szc(c,(HNc(),GNc),GK(yK(fgb,1),pKe,2,6,['Expected the function to have 2 arguments but instead found {0}',''+y1d(c)])));return}g=c.b.d;if(g.j!=(h7d(),j4d)){DGb(a.g.a,Szc(g,(HNc(),GNc),GK(yK(fgb,1),pKe,2,6,[eVe])));return}for(f=(!g.b?(jye(),jye(),iye):new F3d(g.b)).$d();f.Pd();){e=rL(f.Qd(),5);if(e.j!=L6d){DGb(a.g.a,Szc(e,(HNc(),GNc),GK(yK(fgb,1),pKe,2,6,[eVe])));return}}d=g.d;if(!(d.j==r5d&&y1d(d.b.d)==1&&d.b.d.b.j==_5d&&Jse(IOe,d.b.d.b.Lm()))){DGb(a.g.a,Szc(d,(HNc(),GNc),GK(yK(fgb,1),pKe,2,6,['The second argument must be a function whose first argument is named "require".'])));return}tf(d.e);a2d(d.e,d);c2d(d.b.d);c2d(c);h=f2d(c,c.g,50);h!=c.g&&(c.g=h);c.g=new p3d(50,1,c.g);m1d(c,d);Yzc(b)} +function d6c(a,b){var c,d,e,f,g,h,i,j,k,l,m;l=b.k;zf(b.j==(h7d(),r5d)||l.Sl());if(!l||l.lm()){return ''}d=l.sm();if(wb(l,a.b.vj((Lhe(),Rge)))){return '/** @type {!Function} */\n'}j=new Cte('/**\n');h=null;!!b&&b.j==r5d&&(h=(HAc(),kf(b.j==r5d),b.b.d).b);g=d.ml();f=d.ll();c=tr(d.sl());for(e=0;e=a.a||!$Sd(Ese(a.e,e+1))){++e}else{break i}}}c=new jUd(bte(a.e,g,e));a.c=e;}a.c0){b=a.charCodeAt(0);if(b==45||b==43){a=a.substr(1);--f;i=b==45}}if(f==0){throw Aib(new zse(jKe+j+'"'))}while(a.length>0&&a.charCodeAt(0)==48){a=a.substr(1);--f}if(f>(yse(),wse)[10]){throw Aib(new zse(jKe+j+'"'))}for(e=0;e0){l=-IJe(a.substr(0,d),10);a=a.substr(d);f-=d;c=false}while(f>=g){d=IJe(a.substr(0,g),10);a=a.substr(g);f-=g;if(c){c=false}else{if(Dib(l,h)<0){throw Aib(new zse(jKe+j+'"'))}l=Mib(l,k)}l=Qib(l,d)}if(Dib(l,0)>0){throw Aib(new zse(jKe+j+'"'))}if(!i){l=Nib(l);if(Dib(l,0)<0){throw Aib(new zse(jKe+j+'"'))}}return l} +function nqd(a,b){switch(b.g){case 49:return a.u;case 50:return a.b;case 42:return a.G;case 45:return a.B;case 21:return a.j;case 13:return a.e;case 39:return a.w;case 2:return a.a;case 36:return a.t;case 22:return a.q;case 61:return Tnd(a.r,a.a);case 32:return a.db?a.db:a.G;case 0:return bqd(a,a.G);case 25:return a.ib;case 8:return !a.Z?null:a.Z.r;case 26:return $pd(a,Mrd(!a.Q?null:a.Q.s));case 63:return a.A;case 51:return Bmd(a.O);case 16:return Mud(fqd(a).a);case 15:return $pd(a,a.s);case 14:return ujd(a.P);case 27:case 46:return Xrd(wld(a.ib));case 53:return a.S?a.S:a.G;case 18:return iqd(a,a.G);case 20:return a.W?a.W.r:a.G;case 19:return lqd(a,a.G);case 17:return gqd(a,a.G);default:throw Aib(new DJ('Native type '+(b.f!=null?b.f:''+b.g)+' not found'));}} +function nkc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;l=false;p=new RCe;for(j=new lxe(a);j.aa.i.size()){return false}g=a.i.size()+a.e.size();for(f=0;f'}else{vte(b,c.Lm())}}} +function Dkd(a,b){var c,d,e,f,g,h,i,j,k;if(!a||!b){return null}else if(b==b.a.v||b==b.a.g||Zjd(a,b)){return a}else if(a==a.a.v||a==a.a.g){return b}if(a.c||b.c){return Ckd(a,b)}if(!a.n.a.isEmpty()&&ikd(a,b,true,new bvd((rrd(),rrd(),qrd)),null)){return a}else if(!b.n.a.isEmpty()&&ikd(b,a,true,new bvd((rrd(),rrd(),qrd)),null)){return b}!a.n.a.isEmpty()&&(a=gkd(a));!b.n.a.isEmpty()&&(b=gkd(b));d=a.a;c=new cld(d);h=ose(a.i.size(),b.i.size());for(f=0;feKd(a.g,0).b.a.b,!(c||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&nJd(a,1,DLd)?(e=FHd(a)):nJd(a,0,DLd)?(e=(g=eKd(a.g,0).b.b,aHd(a,(HGd(),aGd).a),h=!!eHd(a,yMd),i=iOd(new mOd((rOd(),pOd)),(j=eKd(a.g,0).c,tCe(pCe(FLd,GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),j)||!a.b.c&&MGd(j)?cHd(a):null)),iId(a,i,h?(SJd(),QJd):(SJd(),RJd)),bOd(i,new qRd(g,a.f)))):(e=NId(a));while(nJd(a,0,cMd)||nJd(a,0,hMd)||nJd(a,0,YLd)||nJd(a,0,GMd)){switch(eKd(a.g,0).c.g){case 49:aHd(a,cMd);d=oHd(a,1);aHd(a,hLd);e=new GOd(new qRd(f,a.f),e,d);break;case 51:aHd(a,hMd);b=cHd(a);e=new FOd(new qRd(f,a.f),e,b);break;case 107:case 104:e=aJd(a,e);break;default:throw Aib(new DJ(uYe));}}return e} +function lDd(a,b){var c,d,e,f;if(!bDd(a,b,(fEd(),SDd))){return false}if(!ADd(a,(pf(b.j==(h7d(),I4d),UVe,b),x1d(b,1)))){GDd(a,(c=SDd.d,pf(b.j==I4d,UVe,b),x1d(b,1),c));return false}if((pf(b.j==I4d,UVe,b),x1d(b,2)).j!=r5d){FDd(a,(pf(b.j==I4d,UVe,b),x1d(b,2),PXe));GDd(a,(c=SDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}d=(pf(b.j==I4d,UVe,b),x1d(b,2));f=(pf(d.j==r5d,WVe,d),y1d(d.b.d));if(f<2){a.a.Fj(tXe+e4d(QXe,GK(yK(agb,1),ZJe,1,5,[PXe])),a.b.ji(),a.d,a.c);GDd(a,(c=SDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}if(f>2){a.a.Fj(tXe+e4d(RXe,GK(yK(agb,1),ZJe,1,5,[PXe])),a.b.ji(),a.d,a.c);GDd(a,(c=SDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}e=(pf(d.j==r5d,WVe,d),x1d(d,2));if(!ADd(a,e)){a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[SXe])),a.b.ji(),a.d,a.c);return false}return true} +function mDd(a,b){var c,d,e,f;if(!bDd(a,b,(fEd(),TDd))){return false}if(!ADd(a,(pf(b.j==(h7d(),I4d),UVe,b),x1d(b,1)))){GDd(a,(c=TDd.d,pf(b.j==I4d,UVe,b),x1d(b,1),c));return false}if((pf(b.j==I4d,UVe,b),x1d(b,2)).j!=r5d){FDd(a,(pf(b.j==I4d,UVe,b),x1d(b,2),PXe));GDd(a,(c=TDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}d=(pf(b.j==I4d,UVe,b),x1d(b,2));f=(pf(d.j==r5d,WVe,d),y1d(d.b.d));if(f<1){a.a.Fj(tXe+e4d(QXe,GK(yK(agb,1),ZJe,1,5,[PXe])),a.b.ji(),a.d,a.c);GDd(a,(c=TDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}if(f>1){a.a.Fj(tXe+e4d(RXe,GK(yK(agb,1),ZJe,1,5,[PXe])),a.b.ji(),a.d,a.c);GDd(a,(c=TDd.d,pf(b.j==I4d,UVe,b),x1d(b,2),c));return false}e=(pf(d.j==r5d,WVe,d),x1d(d,2));if(!ADd(a,e)){a.a.Fj(tXe+e4d(NXe,GK(yK(agb,1),ZJe,1,5,[SXe])),a.b.ji(),a.d,a.c);return false}return true} +function zZb(a,b){var c,d,e,f;f=a.e;if(!f){return null}HAc();if(!!f&&(f.j==(h7d(),b7d)||f.j==T5d||f.j==S4d)&&a.j==(h7d(),_5d)&&(b||!!a.b)){return new d$b(a,b)}else if(f.j==(h7d(),r5d)&&f.b==a){if(f.j==r5d&&!(f.j!=Z5d&&nDc(f.e))){if(a.Lm().length!=0){return new UZb(f,b)}}else{return new YZb(f,b)}}else if(f.j==N4d&&f.b==a){if(f.j==N4d&&!(f.j!=Z5d&&nDc(f.e))){if(a.j!=c5d){return new JZb(f,b)}}else{return new XZb(f,b)}}else if(a.j==W5d&&f.j==O4d){return new VZb(a,b)}else if(f.j==m4d&&f.b==a){return new DZb(f,b)}else if(aDc(a)){return new ZZb(a,a.b,b)}else{if(!!nBc(a,new vEc(r6d))&&a.j==_5d){e=nBc(a,new vEc(r6d));c=e.e;return new QZb(c,a,b)}else if(f.j==P4d&&f.b==a&&b){d=f.e;zf(d.j==Q5d);zf(d.e.j==R5d);return new b$b(a)}else if(b&&a.j==x5d&&f.j==m5d&&T1d(a)){return new PZb(a)}}return null} +function n1b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;n=b.b.d;f=b.b?b.b.f:null;if(n.j==(h7d(),c5d)){j=(HAc(),new S2d(r5d,(Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),new N2d(r6d),(c=new N2d(F4d),c)));EGb(a.a,j);m=QYd(j)}else{if(!T1d(n)){return}d=(c=new N2d(F4d),c);i=rL(F1d(b,51),28);if(!(!!i&&i.lk())&&(e=(HAc(),l=eBc(b),!l?null:rL(F1d(l,29),11)),!(!!e&&((e.a&512)!=0||(e.a&iNe)!=0)))){h=zYd(qYd(EYd(new N2d(P6d),new T3d(L6d,uRe)),GK(yK(veb,1),MMe,5,0,[new N2d(U6d),(Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe))])));m1d(d,h)}g=CYd((Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),XYd((Ef(Ose(eSe,hte(46))==-1,xMe,eSe),new T3d(_5d,eSe))),d);EGb(a.a,g);m=QYd(g);k=new a1d(false);F0d(k,eSe,new f1d(new P2d(b5d,new N2d(x6d)),''));n2d(m,F_d(k,false))}K2d(m,b);m1d(f,m);FGb(a.a,m)} +function dtd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p;k=a.g;if(b.a.size()==1){p=wL(b.a.getAtIndex(0));f=Gsd(a,b);i=Ssd(a,b)?Nsd(a,b):null;!c&&(c=f);if(f){d=true;Psd(a,b)&&(e=true);!!c&&!Rld(c,f,new bvd((rrd(),rrd(),qrd)))&&(c=f)}if(!c){k=urd(k,p)}else if(!kld(c,f)&&!kld(c,i)){d&&!f&&(f=c);h=null;Ssd(a,b)&&(h=Ksd(a,b).c);k=trd(k,p,e?new Wtd(h,c,f,(fud(),cud)):new Wtd(h,c,d?f:null,(fud(),eud)))}}else{l=wL(b.a.getAtIndex(0));n=new kud(l);o=Ksd(a,n);if(!(!!o&&(n.a.size()==1||$ld(o.d,(kf(n.a.size()!=1),new jud(n.a.Bf(1,n.a.size()))))))){Hf(!c,b,a,l);return a}j=(kf(b.a.size()!=1),new jud(b.a.Bf(1,b.a.size())));m=Ksd(a,n);i=!c?rmd(m.d,j):pmd(m.d,j,c);g=m.b;kld(i,g)||(k=trd(k,l,m.a==(fud(),dud)?new Wtd(null,i,g,dud):new Wtd(null,i,g,eud)))}if(k==a.g){return a}return Ftd(a.a,a.d,k,a.b,a.e,a.c,a.f)} +function yme(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(b.Qn()){q=b.Qn();f=new Jme(a.F);f.a=false;h=rie(a.F,(Lhe(),ahe));for(o=a.w.b.keySet().$d();o.Pd();){m=wL(o.Qd());s=bbe(a,m);if(qie(q.F,Zge)==q||hbe(q)||!!rme(q.w,m)){p=bbe(q,m);l=s.$m(p);if(D7d(l,h,0,new lge(true))){return h}}else{l=s}Hme(f,m,l,(i=rme(a.w,m),!i?null:i.d))}for(n=q.w.b.keySet().$d();n.Pd();){m=wL(n.Qd());qie(a.F,Zge)==a||hbe(a)||!!rme(a.w,m)||Hme(f,m,bbe(q,m),(i=rme(q.w,m),!i?null:i.d))}return Ime(f)}g=sie(a.F,(Lhe(),$ge));r=sie(a.F,nhe).$m(b);if(!(r.sn()||r.qn()||r.rn()||rL(sie(r.F,Zge),68)==r)){for(k=a.w.b.keySet().$d();k.Pd();){j=wL(k.Qd());l=bbe(a,j);f=new tpe(a.F);for(d=nie(a.F,j).$d();d.Pd();){c=rL(d.Qd(),24);e=c.fo(j);!!e&&!D7d(c,a,0,new lge(true))&&c.Bn(b)&&e.Bn(l)&&npe(f,c,false)}g=g._m(ope(f))}}return g} +function brb(a,b,c){var d;if(!c||(c.a&jNe)==0){return}if(b.j==(h7d(),N4d)||b.j==I4d&&CFb(a.a).qh(b)||b.j==m4d&&Zqb(a,b.b?b.b.f:null)||(HAc(),!!b&&(b.j==b7d||b.j==T5d||b.j==S4d)&&$qb(a,b.b))||!!b&&b.j==_5d&&!!b.b&&Zqb(a,b.b)){return}d=Yqb(b);if(!d){arb(a,b,Vqb,GK(yK(fgb,1),pKe,2,6,[kNe,lNe]));return}if((c.a&2)==0&&!!(HAc(),lf(d.j==r5d,d),d.b?d.b.f:null).b){arb(a,b,Vqb,GK(yK(fgb,1),pKe,2,6,[kNe,'function with a non-empty body cannot be abstract']));return}if((b.j==W5d||b.j==M6d)&&Jse(IMe,b.Lm())){arb(a,b,Vqb,GK(yK(fgb,1),pKe,2,6,[kNe,'constructors cannot be abstract']));return}if((c.a&2)==0&&b.j!=W5d&&b.j!=M6d&&b.j!=y5d&&b.j!=G6d&&!eDc(d)){arb(a,b,Vqb,GK(yK(fgb,1),pKe,2,6,[kNe,lNe]));return}if(B1d(b,58)!=0){arb(a,b,Vqb,GK(yK(fgb,1),pKe,2,6,[kNe,'static methods cannot be abstract']));return}} +function Pbc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(!b){return !c?a:Obc(a,c)}n=null;!!a.r&&(n=a.r.b);h=new xfe(a.A);q=false;d=!c?new RCe:new TCe(VZd(c));m=false;for(f=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();f.Pd();){e=rL(f.Qd(),5);g=e.Lm();d.a.remove(g)!=null;l=Ubc(a,e,c);m=Vbc(a,e,c);if(!!c&&!!WZd(c,g)){p=e1d(WZd(c,g),a.u,a.A)}else if(!!rL(F1d(e,29),11)&&(rL(F1d(e,29),11).a&hNe)==mNe){p=e1d(_Zd(rL(F1d(e,29),11)),a.u,a.A)}else if(!!n&&!!(zL(n.k,9)?rL(n.k,9):null)){p=zL(n.k,9)?rL(n.k,9):null;l=B1d(n,37)!=0;m=B1d(n,30)!=0}else{p=sie(a.A,(Lhe(),Hhe))}q=q|Hbc(a,h,p,q,l,m);!!n&&(n=n.d)}if(!m){while(!!n&&!m){wfe(h,n);n=n.d}}for(k=(o=(new dve(d.a)).a.ke().$d(),new jve(o));k.a.Pd();){j=(i=rL(k.a.Qd(),12),wL(i.se()));Ybc(a,xbc,GK(yK(fgb,1),pKe,2,6,[j,a.i.length==0?sPe:a.i]))}a.r=h.b;return a} +function tad(){tad=cjb;nad=new Q_b('JSC_REFERENCE_BEFORE_DECLARE',(prb(),orb),new _te('Variable referenced before declaration: {0}'));qad=new Q_b('JSC_REDECLARED_VARIABLE',orb,new _te('Redeclared variable: {0}'));oad=new Q_b('JSC_REFERENCE_BEFORE_DECLARE_ERROR',mrb,new _te('Illegal variable reference before declaration: {0}'));pad=new Q_b('JSC_REASSIGNED_CONSTANT',mrb,new _te('Constant reassigned: {0}'));rad=new Q_b('JSC_REDECLARED_VARIABLE_ERROR',mrb,new _te('Illegal redeclared variable: {0}'));mad=new Q_b('JSC_DECLARATION_NOT_DIRECTLY_IN_BLOCK',mrb,new _te('Block-scoped declaration not directly within block: {0}'));sad=new Q_b('JSC_UNUSED_LOCAL_ASSIGNMENT',nrb,new _te('Value assigned to local variable {0} is never read'));lad=Au(pCe((h7d(),B5d),GK(yK(xeb,1),PKe,29,0,[o5d,p5d,q5d,e7d])))} +function xmb(a,b){var c,d,e,f,g,h,i,j,k;k=null;d=null;f=null;switch(b.j.g){case 47:if(!T1d(b.b)){DGb(a.a,Szc(b,tmb,GK(yK(fgb,1),pKe,2,6,[])));return}f=G1d(b.b);d=b;while(d.j==(h7d(),m4d)){d=d.b?d.b.f:null}k=b.e;break;case 65:f=(HAc(),h=CBc(b),!h?null:G1d(h));d=b;k=b;if(b.e.j==(h7d(),m4d)&&p$d(rL(F1d(b.e,29),11))){return}break;case 76:case 100:case 88:f=b.b.Lm();d=Cmb(b);k=b;break;case 98:j=b.e;if(j.j==(h7d(),O4d)){c=j.e;e=B1d(b,58)!=0?'.':LMe;f=(HAc(),i=CBc(c),(!i?null:G1d(i))+e+b.Lm());Jse(b.Lm(),IMe)&&(f=(g=CBc(c),!g?null:G1d(g)));d=b.b;c.e.j==m4d||c.e.j==_5d?(k=!c.e?null:c.e.e):(k=c)}}if(!d||d.j!=(h7d(),r5d)){DGb(a.a,Szc(b,vmb,GK(yK(fgb,1),pKe,2,6,[])));return}if(k.e.j!=(h7d(),F6d)&&k.e.j!=F4d&&k.e.j!=Z5d){DGb(a.a,Szc(b,umb,GK(yK(fgb,1),pKe,2,6,[])));return}tf(f);Vcd(a.b,new Fmb(f,b,d,k))} +function Akd(a,b){var c,d,e,f,g,h,i,j,k;if(!a){return b}else if(!b||Zjd(a,b)){return a}else if(a==a.a.s||b==b.a.s){return a.a.s}else if(a==a.a.v||a==a.a.g||b==b.a.v||b==b.a.g){return a.a.v}if(a.c||b.c){return Ckd(a,b)}if(!a.n.a.isEmpty()&&ikd(b,a,true,new bvd((rrd(),rrd(),qrd)),null)){return a}else if(!b.n.a.isEmpty()&&ikd(a,b,true,new bvd((rrd(),rrd(),qrd)),null)){return b}!a.n.a.isEmpty()&&(a=gkd(a));!b.n.a.isEmpty()&&(b=gkd(b));d=a.a;c=new cld(d);g=nse(a.i.size(),b.i.size());for(f=0;f0&&(p.a+='.',p);p.a+=''+n}g2d(l,rL(g.d,5),bZd(p.a));FGb(a.b,l)}for(e=new lxe(a.n);e.a0||f.j!=(z_d(),u_d)||(f.a&135292871)!=0))){c=G1d(h);if(_Mb(a.b,c)){return 2}if(XMb(h)||aNb(a.b,c)){n2d(g,jNb(null,new f1d(new N2d(K6d),TQe)));return 1}return 2}QMb();d=e||h.e.j==S4d||!!f&&(f.a&1)!=0;if(d&&!mNb(f)&&!XCc(h)){if(T1d(j)&&bNb(a.b,G1d(j))){return 0}i=TMb(b.c,j);if(i){if(i.ok()==N4d||mNb(i.rk())){return 0}}n2d(g,nNb(a.a,f,h))}return 1} +function A9b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;if(mue(b.c)==0){return}kf(a.j==(h7d(),r5d));h=a.b?a.b.f:null;e=mue(b.c);o=!h.b||!!h.b&&!h.b.d&&!s9b(h.b?h.b.f:null);n=vDc(rL(NDe(b,pNe),5))&&e<=2;r=new dve(b);q=(u=new TCe(r),v9b(h,u),v=new E9b(r,u),eEc(h,v,v),v.d);for(m=new pEe(new gEe(b));m.b!=m.c.a.b;){l=nEe(m);f=wL(l.d);if(c.contains(f)){continue}i=rL(l.e,5);t=true;s=(HAc(),kBc(h,new OEc(f),(Lf(),fg(),cg)));g=OAc(i,false,null);if(!g&&s==0){t=true}else if(o&&n&&s==1&&(k=(jye(),jye(),iye),!(MAc(i,k,null)&&q.a.containsKey(f)))){t=true}else{if(OAc(i,true,null)&&s>0){t=false}else if(g){t=false}else{j=(jye(),jye(),iye);if(MAc(i,j,null)&&q.a.containsKey(f)){t=false}else if(s>1){switch(i.j.g){case 29:p=i.Lm();t=!d.th(p);break;case 33:t=true;break;case 31:t=i.Lm().length<2;break;default:t=LCc(i);}}}}t||c.add(f)}} +function LHc(b,c){var d,e,f,g,h,i,j,k,l,m;Af(!!c.b&&!c.b.d,c);e=c.b;k=c.e;if(!e){return c}f=OBc(e);if(f==(Vne(),Une)){return c}switch(c.j.g){case 19:if(b.a&&e.j==(h7d(),k6d)){j=e.Km();if(j==0||j==1){return c}}l=(HAc(),f.so(true)?new N2d((h7d(),n5d)):new N2d((h7d(),W6d)));g2d(k,c,l);GGb(b.c);return l;case 21:{HAc();if(yBc(e)==3){g2d(k,c,u1d(e));GGb(b.c);return e}}return c;case 22:if(e.j==(h7d(),_5d)){if(Jse(e.Lm(),AUe)){return c}else if(Jse(e.Lm(),PNe)){a2d(c,e);g2d(k,c,e);GGb(b.c);return e}}if(e.j==k6d){g=-e.Km();h=new v3d(g);g2d(k,c,h);GGb(b.c);return h}else{Ijb(b,mHc,e);return c}case 20:try{m=e.Km();if($wnd.Math.floor(m)==m){d=Tib(Cib(Hib($wnd.Math.floor(m)),-1));i=new v3d(~d);g2d(k,c,i);GGb(b.c);return i}else{Ijb(b,iHc,e);return c}}catch(a){a=zib(a);if(zL(a,47)){Ijb(b,mHc,e);return c}else throw Aib(a)}default:return c;}} +function f7c(){f7c=cjb;_6c=(A7d(),'(Proxy)');d7c=new Q_b('JSC_MALFORMED_TYPEDEF',(prb(),orb),new _te('Typedef for {0} does not have any type information'));a7c=new Q_b('JSC_ENUM_INITIALIZER_NOT_ENUM',orb,new _te('enum initializer must be an object literal or an enum'));$6c=new Q_b('JSC_CTOR_INITIALIZER_NOT_CTOR',orb,new _te('Constructor {0} must be initialized at declaration'));b7c=new Q_b('JSC_IFACE_INITIALIZER_NOT_IFACE',orb,new _te('Interface {0} must be initialized at declaration'));Z6c=new Q_b('JSC_REFLECT_CONSTRUCTOR_EXPECTED',orb,new _te(mUe));e7c=new Q_b('JSC_UNKNOWN_LENDS',orb,new _te('Variable {0} not declared before @lends annotation.'));c7c=new Q_b('JSC_LENDS_ON_NON_OBJECT',orb,new _te('May only lend properties to object types. {0} has type {1}.'));new O$b(_6c,GK(yK(oZ,1),ZJe,7,0,[d7c,a7c,$6c,b7c,Z6c,e7c,c7c]))} +function whc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;kf(b.j==(h7d(),x5d));kf(T1d(b));if(lgc(b)){Ngc(a,(HAc(),g=eBc(b),!g?null:rL(F1d(g,29),11)),G1d(b),b,null,a.a);return}Yfc();e=(HAc(),h=eBc(b),!h?null:rL(F1d(h,29),11));!!e&&(e.a&1)!=0&&(e.a&2)==0&&(n=b.b,!(n.j==_5d&&$se(n.Lm(),CSe)))&&hzc(a.c.g,Rnc(b,Ofc,GK(yK(fgb,1),pKe,2,6,[])));m=b.b;o=lud(m);c=Hsc(a.a,o,false);if(!!c&&!!c.f){hzc(a.c.g,Rnc(b,tfc,GK(yK(fgb,1),pKe,2,6,[])));$1d(b.e,76,true);return}p=jhc(a,m);if(!p){return}p=amd(p,a.c.d.d.p);i=p.kl()==2&&p.nl().size()==1?rL(Uw(p.nl().$d()),25).d:null;if(!i||Krd(i,qqd(a.c.d.d))){return}l=i.a;j=(b.b?b.b.f:null).Lm();d=_fc(a.c,(f=eBc(b),!f?null:rL(F1d(f,29),11)),a.a);if(d){d=emd(d,d.e.i);k=Eud(l,j);if(Tud(i.a,gNe)&&!!k){d=Tnd(d,k);0==d.kl()&&(d=a.c.d.d.G)}else if(ahc(a,l,j,b,d)){return}sud(l,j,d)}else !!Hud(l,j,0)||sud(l,j,null)} +function S1d(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p;if(a.j!=b.j||y1d(a)!=y1d(b)||a.No!=b.No){return false}if(c&&!F8d(zL(a.k,9)?rL(a.k,9):null,zL(b.k,9)?rL(b.k,9):null)){return false}if(e&&!Z$d(rL(F1d(a,29),11),rL(F1d(b,29),11))){return false}p=rL(F1d(a,78),75);o=rL(F1d(b,78),75);if((!!p||!!o)&&(!p||!o||!S1d(p,o,c,d,e,false))){return false}if(a.j==(h7d(),I5d)||a.j==V4d){i=B1d(a,32);j=B1d(b,32);if(i!=j){return false}}else if(a.j==L6d||a.j==M6d){if(a.j==M6d){k=B1d(a,36);l=B1d(b,36);if(k!=l){return false}}m=B1d(a,54);n=B1d(b,54);if(m!=n){return false}}else if(a.j==I4d){if(B1d(a,50)!=0!=(B1d(b,50)!=0)){return false}}else if(a.j==r5d){if((a.j==r5d&&B1d(a,60)!=0)!=(b.j==r5d&&B1d(b,60)!=0)){return false}}if(f){if(B1d(a,42)!=B1d(b,42)){return false}}if(d){for(g=a.b,h=b.b;g;g=g.d,h=h.d){if(!g.Mm(h,c,true,e,f)){return false}}}return true} +function wVc(a,b){var c,d,e,f,g,h,i,j,k,l;i=rL(b.a.Ld(),5);zf(i.j==(h7d(),r5d));l=f2d(i,i.g,61);l!=i.g&&(i.g=l);h=i.b?i.b.f:null;f=J2d((c=new N2d(F4d),c),h);g2d(i,h,f);b.c&&l1d(f,wYd((Ef(Ose(rVe,hte(46))==-1,xMe,rVe),new T3d(_5d,rVe)),new N2d(U6d),S4d));b.b&&l1d(f,wYd((Ef(Ose(sVe,hte(46))==-1,xMe,sVe),new T3d(_5d,sVe)),(Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe)),S4d));h.j==F4d||(h=I2d(nYd((zf(NYd(h)),new P2d(C6d,h))),h));g=(Ef(Ose(tVe,hte(46))==-1,xMe,tVe),new T3d(_5d,tVe));j=i.b;K2d(g,j);e=CYd(g,new N2d(r6d),h);EGb(a.a,e);k=f2d(e,e.g,59);k!=e.g&&(e.g=k);e.g=new p3d(59,1,e.g);l1d(f,e);d=EYd((Ef(Ose(VQe,hte(46))==-1,xMe,VQe),new T3d(_5d,VQe)),new T3d(L6d,'executeAsyncGenerator'));l1d(f,$Yd(qYd(d,GK(yK(veb,1),MMe,5,0,[JDc((Ef(Ose(tVe,hte(46))==-1,xMe,tVe),new T3d(_5d,tVe)),GK(yK(veb,1),MMe,5,0,[]))]))));K2d(f,h);FGb(a.a,f)} +function FWc(a){zWc();this.a=a;this.b=Ku(new Nu,VIe(AVe),vWc).Qf(CWc('Duplicate parameter name "{0}"'),iWc).Qf(VIe('Unnecessary escape:.*'),xWc).Qf(VIe('^invalid param name.*'),nWc).Qf(CWc(e4d(BVe,GK(yK(agb,1),ZJe,1,5,[]))),hWc).Qf(VIe('^'+WIe(CVe)),oWc).Qf(VIe('^Keywords and reserved words are not allowed as unquoted property.*'),lWc).Qf(VIe('^Too many template parameters'),uWc).Qf(VIe('.*Type annotations should have curly braces.*'),pWc).Qf(VIe('Missing type declaration\\.'),qWc).Qf(VIe('.*Unknown type.*'),yWc).Qf(VIe('^Bad type annotation.*'),wWc).Qf(VIe('Too deep recursion while parsing'),tWc).Qf(VIe('^Octal .*literal.*'),mWc).Qf(VIe('^this language feature is only supported for ECMASCRIPT6 mode.*'),jWc).Qf(VIe('^type syntax is only supported in ES6 typed mode.*'),kWc).Qf(VIe('^Can only have JSDoc or inline type.*'),rWc).Pf()} +function sxc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;kf(b.j==(h7d(),f6d)||b.j==I4d||b.j==R6d);f=b.b;l=_wc(a,f,c,Qqd(a.w));g=l.a;i=qld(l.b);if(!i){return qxc(a,b,b.b,g)}else if(i.c){return xxc(a,b,g,d)}else if(b.j==I4d&&!!i.d||b.j==f6d&&!i.d){return qxc(a,b,b.b,g)}else if(i==i.a.v||i==i.a.g){return qxc(a,b,b.b,g)}f.j==_5d&&i.n.a.isEmpty()&&(b.j==I4d||b.j==R6d)&&ayc(a,b,d);k=xBc(b);if(k<(zf(!(i==i.a.v||i==i.a.g)),i.i.size())||k>(kf(!(i==i.a.v||i==i.a.g)),i.j?eKe:i.i.size()+i.e.size())){return b.j==R6d?qxc(a,b.b?b.b.f:null,null,g):qxc(a,b,b.b,g)}if(!i.n.a.isEmpty()){q=Wxc(a,b,null,b.b.d,i,g,false);i=ekd(i,q)}p=g;o=b.j==R6d?null:b.b;n=b.j==R6d?D1d(b.b?b.b.f:null):b.b?b.b.f:null;j=k;for(e=n;e!=o;e=e==e.e.b?null:e.f){if(b.j==R6d&&e.j!=T6d){continue}--j;h=$jd(i,j);h=Wyc(h,a.r);p=_wc(a,e,p,h).a}m=b.j==f6d?i.g?i.g:i.d:i.k;return new ezc(p,m)} +function w7b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;k=I7b(c,b);h=(HAc(),OAc(k,false,a.a));e=H7b(k);p=new K7b;p.b=h;p.a=e;for(g=null,d=k,m=k.e;m!=b;g=d,d=m,m=m.e){n=m.j;zf(!J7b(m)||d==m.b);if(n==(h7d(),m4d)){if(B7b(a,m,p.b));else{i=m.b;q=i.j;if(i!=d){zf(i.j==x5d||i.j==w5d);q==w5d&&u7b(a,i.b?i.b.f:null,null,p);u7b(a,i.b,null,p)}}}else if(n==I4d&&DCc(m.b)){f=m.b;u7b(a,f.d,d,p);if(A7b(a,f,p.b)&&f.b!=g){Af(false,'Object method calls can not be decomposed.');p.b=true;o=(kf(m.j==I4d),r=m.b,kf(r.j==x5d||r.j==w5d),s=y7b(a,r,p.a),p.a=s,t=s.b.b,kf(t.j==x5d||t.j==w5d),u=y7b(a,t.b,p.a),p.a=u,v=u.b,w=s.b,A=H2d(qYd(EYd(w.Jm(false),new T3d(L6d,vRe)),GK(yK(veb,1),MMe,5,0,[v.Jm(false)])),m),d2d(m),!!m.b&&o1d(A,c2d(m)),B=m.e,g2d(B,m,A),A);m=o}}else n==m6d?t7b(a,m.b,d,p):u7b(a,m.b,d,p)}if(k==c);else{l=k.e;j=l.j!=(h7d(),m5d);x7b(a,k,e,j)}} +function _Nc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;if(!d||rL(F1d(d.tk(),53),127)!=rL(F1d(c,53),127)){return G1d(c)}n=hcd(LHb((!b.d&&!!b.g&&(b.d=JFb(b.c,b.g)),b.d)).a);for(f=a.b.$d();f.Pd();){e=rL(f.Qd(),277);g=INc(e.a);j=PBc(g);if(!j){continue}k=aOc(e);if(j==c||(HAc(),(j.j==(h7d(),N4d)&&!(j.j!=Z5d&&nDc(j.e))||j.j==r5d&&!(j.j!=Z5d&&nDc(j.e)))&&k==c)){return null}h=G1d(g);if(j.j==(h7d(),m6d)){if(!Jse(fVe,h)){return G1d(c)}l=j.b;m=false;while(l){if(l.j==M6d&&!l.Nm()&&zDc(aKb(a.f.a.T.Vb),l.Lm())){if(l.b){if(T1d(l.b)){if(l.b==c){return null}o=Hzc(b)._j(G1d(l.b));if(!!o&&o.sk()==d.sk()){m=true;break}}}else{if(l==c){return null}o=Hzc(b)._j(l.Lm());if(!!o&&o.sk()==d.sk()){m=true;break}}}l=l.d}if(!!l&&m){return n+'.'+l.Lm()}}else{if(d.sk()==k){i=Jse(h.substr(0,6),FOe)?fVe:qNe;if(h.length==i.length){return n}return n+ate(h,i.length)}}}return G1d(c)} +function AQb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;f=a.Lm();i=(HAc(),e=eBc(a),!e?null:rL(F1d(e,29),11));n=(Ef(Ose(bOe,hte(46))==-1,xMe,bOe),new T3d((h7d(),_5d),bOe));m=new T3d(L6d,f);c=EYd(n,m);h=c;if(i){if((i.a&2)!=0||(i.a&512)!=0||(i.a&iNe)!=0||(i.a&hNe)==UQe){g=(Ef(Ose(f,hte(46))==-1,xMe,f),new T3d(_5d,f));h=lYd(c,g);b=new a1d(false);(i.a&2)!=0&&T_d(b);((i.a&512)!=0||(i.a&iNe)!=0)&&l0d(b);(i.a&iNe)!=0&&k0d(b);(i.a&hNe)==UQe&&__d(b,(hNe&i.a)==UQe?i.i:null)}else{if(XCc(a)){h=lYd(c,(Ef(Ose(f,hte(46))==-1,xMe,f),new T3d(_5d,f)))}else{l=PBc(a);(i.a&1)!=0&&!!l&&T1d(l)&&(h=lYd(c,l.Jm(false)))}b=b1d(i)}N0d(b,(Qq(),$s(GK(yK(agb,1),ZJe,1,5,[cNe,DPe]))));d=F_d(b,false);k=f2d(h,h.g,29);k!=h.g&&(h.g=k);!!d&&(h.g=new A3d(29,d,h.g))}I2d(h,a);j=f2d(h,h.g,40);j!=h.g&&(h.g=j);f!=null&&(h.g=new A3d(40,f,h.g));l1d(!a.e?null:a.e.e,(Af(NYd(h),h),new P2d(m5d,h)))} +function _Hc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;i=b.e;switch(b.j.g){case 61:case 62:{g=b.b;l=b.b?b.b.f:null;g=_Hc(a,g);l=_Hc(a,l);m=OBc(l);if(OBc(l)!=(Vne(),Une)){q=b.j;n=m.so(true);if(q==(h7d(),p6d)&&!n||q==g4d&&n){j=g}else{HAc();if(OAc(g,false,a.c)){v1d(b);j=mYd(Q4d,g,l)}else{j=l}}if(j){v1d(b);g2d(i,b,j);GGb(a.c);return j}}return b}case 60:{c=b.b;o=b.b.d;e=b.b?b.b.f:null;o=_Hc(a,o);e=_Hc(a,e);j=null;p=OBc(o);f=OBc(e);if(p==(Vne(),Tne)&&f==Sne){u1d(c);j=c}else if(p==Sne&&f==Tne){u1d(c);j=hZd((h7d(),h6d),c)}else if(p==Tne){v1d(b);j=mYd((h7d(),p6d),c,e)}else if(f==Sne){v1d(b);j=mYd((h7d(),g4d),c,o)}else{HAc();if(!OAc(c,false,a.c)&&!OAc(o,false,a.c)&&c.Mm(o,false,true,false,false)){v1d(b);j=mYd((h7d(),p6d),o,e)}}if(j){g2d(i,b,j);b=j;GGb(a.c)}return b}default:h=OBc(b);if(h!=(Vne(),Une)){k=h.so(true);d=k?1:0;return ZHc(a,b,i,d)}return b;}} +function gfd(){gfd=cjb;efd=(XEb(),VEb);ffd=new $wnd.Object;ffd.angularPass=false;ffd.applyInputSourceMaps=true;ffd.assumeFunctionWrapper=false;ffd.checksOnly=false;ffd.compilationLevel='SIMPLE';ffd.dartPass=false;ffd.defines=null;ffd.dependencyMode=null;ffd.entryPoint=null;ffd.env=GQe;ffd.exportLocalPropertyDefinitions=false;ffd.extraAnnotationNames=null;ffd.generateExports=false;ffd.languageIn=MQe;ffd.languageOut=LQe;ffd.newTypeInf=false;ffd.isolationMode=pMe;ffd.outputWrapper=null;ffd.polymerPass=false;ffd.polymerVersion=null;ffd.preserveTypeAnnotations=false;ffd.processClosurePrimitives=true;ffd.processCommonJsModules=false;ffd.renamePrefixNamespace=null;ffd.rewritePolyfills=true;ffd.warningLevel=NVe;ffd.useTypesForOptimization=true;ffd.jsCode=null;ffd.externs=null;ffd.createSourceMap=false;ffd.tracerMode=NMe;ffd.moduleResolutionMode=GQe} +function bjd(a,b,c){var d,e,f,g,h,i,j,k;if(c&&a.f.size()+a.d.size()+(!a.g?0:1)==b.f.size()+b.d.size()+(!b.g?0:1)){i=!b.c?null:wld(b.c);k=!a.e?null:wld(a.e);return new cjd(a.a,b.f,b.d,b.g,b.i,!i?null:!i.a.q.isEmpty()&&!i.b.d.d.isEmpty()?Bmd(Ftd(i.a.u,i,null,null,null,false,i.a.i)):i.a.r,!k?null:!k.a.q.isEmpty()&&!k.b.d.d.isEmpty()?Bmd(Ftd(k.a.u,k,null,null,null,false,k.a.i)):k.a.r,b.j,a.b)}d=new cld(a.a);h=0;for(g=a.f.$d();g.Pd();){e=rL(g.Qd(),20);Wkd(d,e?e:(j=b.f.size(),h=b.length)return {done:true};var a=b[d++];return {value:[a,c.get(a)],done:false}}}};if(!sDe()){e.prototype.createObject=function(){return {}};e.prototype.get=function(a){return this.obj[':'+a]};e.prototype.set=function(a,b){this.obj[':'+a]=b};e.prototype[fYe]=function(a){delete this.obj[':'+a]};e.prototype.keys=function(){var a=[];for(var b in this.obj){b.charCodeAt(0)==58&&a.push(b.substring(1))}return a}}return e} +function zgc(a,b,c,d,e){var f,g,h,i,j,k,l,m;zf(!c||T1d(c));if(!d){return}if((d.a&2)!=0||(d.a&512)!=0||(d.a&iNe)!=0){if(!c){hzc(a.b.g,Rnc(b,(Yfc(),sfc),GK(yK(fgb,1),pKe,2,6,[])));c=RYd(zTe+NQb(a.b.c));H2d(c,b)}i=G1d(c);f=(lr(),new Fu);for(l=YZd(d).$d();l.Pd();){k=wL(l.Qd());Du(f,Vvd(a.b.d.q,k))}m=ur(f.a);h=(d.a&iMe)!=0?(xsd(),usd):(d.a&yOe)!=0?(xsd(),tsd):(xsd(),vsd);if((d.a&2)!=0){j=new Wud(a.b.d.d,b,i,m,0,h,(d.a&jNe)!=0)}else if((d.a&iNe)!=0){j=_ud(a.b.d.d,b,i,m,h)}else{zf((d.a&512)!=0||(d.a&iNe)!=0);j=$ud(a.b.d.d,b,i,m,h)}ODe(a.b.e,b,j);if(e){return}g=c.b;if(c.j==(h7d(),_5d)||htc(a.a,g)||wgc(a,g)||xgc(a,g)){c.j==x5d?b.j==r5d?$1d(b.e,76,true):$1d(b.e.b,76,true):!a.a.t&&ygc(a,i,j);Bsc(a.a,c,j)}}else (d.a&iMe)!=0&&hzc(a.b.g,Rnc(b,(Yfc(),Tfc),GK(yK(fgb,1),pKe,2,6,[])));(d.a&yOe)!=0&&(d.a&2)==0&&hzc(a.b.g,Rnc(b,(Yfc(),Bfc),GK(yK(fgb,1),pKe,2,6,[])))} +function O4c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;s=b.b.d;g=x1d(b,2);t=N4c(a,s,c);if(t.Ql(a.b.vj((Lhe(),nhe)))){return a.b.vj(nhe)}if(!t.dm()){l5c(a,s,z4c,GK(yK(fgb,1),pKe,2,6,[gjb(t)]));return a.b.uj(Hhe)}m=t.tm();n=(pf(g.j==(h7d(),r5d),WVe,g),x1d(g.b.d,0).Lm());o=(pf(g.j==r5d,WVe,g),x1d(g.b.d,1).Lm());if(c.a.containsKey(n)){l5c(a,b,t4c,GK(yK(fgb,1),pKe,2,6,[n]));return a.b.uj(Hhe)}if(c.b.containsKey(o)){l5c(a,b,t4c,GK(yK(fgb,1),pKe,2,6,[o]));return a.b.uj(Hhe)}f=(HAc(),lf(g.j==r5d,g),g.b?g.b.f:null);l=new RDe;for(q=m.ql().$d();q.Pd();){p=wL(q.Qd());r=m.ul(p);h=new n5c(H4c(c.b,o,r),H4c(c.a,n,p));d=N4c(a,f,h);if(d.lm()){return a.b.uj(Hhe)}if(d.Ll()||d.Ql(a.b.vj(nhe))){continue}if(!d.dm()){l5c(a,b,w4c,GK(yK(fgb,1),pKe,2,6,[gjb(d)]));return a.b.uj(Hhe)}e=d.tm();for(j=e.ql().$d();j.Pd();){i=wL(j.Qd());k=e.ul(i);k5c(a,l,i,k)}}return I4c(a,js(l))} +function OId(a){var b,c,d,e,f,g;f=eKd(a.g,0).c;if(f==(XMd(),yMd)){return PId(a)}else if(f==DMd||f==$Ld||f==FLd||(HGd(),!!rL(Fs(iGd,f),63))){return nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,GOe)&&(yJd(a,1)||eKd(a.g,1).c==cMd)?kId(a,new VJd(eKd(a.g,0).b.b)):nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,DSe)&&(yJd(a,1)||eKd(a.g,1).c==cMd)?VId(a,new VJd(eKd(a.g,0).b.b)):nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,NOe)&&(c=eKd(a.g,1).b.b.b>eKd(a.g,0).b.a.b,!(c||nJd(a,1,uMd)||nJd(a,1,fLd)||nJd(a,1,sLd)))&&(yJd(a,1)||eKd(a.g,1).c==cMd)?GHd(a,new VJd(eKd(a.g,0).b.b)):eKd(a.g,1).c==bMd?QHd(a,new VJd(eKd(a.g,0).b.b)):QId(a)}else if(f==cMd){e=eKd(a.g,0).b.b;d=SHd(a);if(oJd(a,iLd)){aHd(a,iLd);g=BHd(a,1);return new HNd(new qRd(e,a.f),d,g)}else{b=new mOd((rOd(),pOd));iId(a,b,(SJd(),RJd));g=bOd(b,new qRd(e,a.f));return new KNd(new qRd(e,a.f),null,d,g)}}else{throw Aib(new DJ(uYe))}} +function WDb(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;h=0;i=!(b.t==(xec(),uec)&&(b.a>0||dec(b)));for(k=d.b;k;k=o){w=k.b;o=k.d;if(k.j==(h7d(),y5d)||k.j==G6d||k.j==R4d){continue}j=k.j!=k6d&&l7d(k.Lm());r=j?k.Lm():''+ ++h;s=bec(b)+'.'+r;p=rL(fue(a.c,s),139);if(!!p&&!(!p.j&&!(p.t==tec||p.t==wec)&&!dec(p)&&(p.e||(!p.p||_dc(p.p))&&(p.i>0||p.n>0)&&p.o==0&&p.f==0)&&!hec(p))){continue}q=SDb(a,c,r);t=null;if(i){a2d(d,k);u1d(w)}else{t=(Ef(Ose(q,hte(46))==-1,xMe,q),new T3d(_5d,q));B1d(k,43)!=0&&(v=f2d(t,t.g,43),v!=t.g&&(t.g=v),t.g=new p3d(43,1,t.g));g2d(k,w,t);FGb(a.a,t)}l=(Ef(Ose(q,hte(46))==-1,xMe,q),new T3d(_5d,q));m1d(l,w);B1d(k,43)!=0&&(u=f2d(l,l.g,43),u!=l.g&&(l.g=u),l.g=new p3d(43,1,l.g));n=K2d(xYd(l,b7d),k);f?j1d(g,n,f):k1d(g,n,e);FGb(a.a,n);f=n;if(j&&!!p){if(!i){m=Bec(p.d,(Pec(),Iec));m.c=t;$dc(p,m)}p.d.c=l;w.j==r5d&&TDb(a,w,rL(F1d(k,29),11),p)}}} +function $xc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;kf(b.j==(h7d(),r5d)||b.j==_5d&&(HAc(),n=b.e,!!n&&(n.j==I4d||n.j==f6d||n.j==R6d)&&n.b==b));e=b.j==r5d?Uec(a.N,b):b.Lm();i=Tsc(a.C,e);o=qld(rL(NDe(a.M,i),20));for(g=(l=(new dve((new vEe(i.s)).a)).a.ke().$d(),new jve(l));g.a.Pd();){f=(d=rL(g.a.Qd(),12),wL(d.se()));if(!Jsc(i,f)){m=(lf(f.indexOf('.')==-1,f),kf(f.indexOf('.')==-1),rL(Xk(Nk(c.b,f,false)),20));!m&&(m=a.r);j=(zf(!(o==o.a.v||o==o.a.g)),rL(o.f.get(f),20));k=j.nl();!(k.size()==1&&rL(Uw(k.$d()),25).c)&&(b.j==_5d||b.j==r5d&&256!=m.kl())&&(hld(),!(0==m.kl()||0==j.kl()||0!=Xnd(m,j).kl()))&&hzc(a.Q,Rnc(b,Zvc,GK(yK(fgb,1),pKe,2,6,[f,ild(m,new zte,(evd(),dvd)).a,ild(j,new zte,dvd).a])));b.j==r5d?!(m.kl()!=0&&(m.kl()|288)==288)&&eKe!=m.kl()&&eKe!=j.kl()&&Rld(m,j,new bvd((rrd(),rrd(),qrd)))?(h=m):(h=Tnd(j,m)):(h=j);c=(kf(f.indexOf('.')==-1),qvd(c,f,h))}}return c} +function uhc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;lf(b.j==(h7d(),x5d)||(HAc(),b.j==M6d||b.j==y5d||b.j==G6d||b.j==W5d||b.j==R4d),b);kf(htc(a.a,c));b.j==y5d?(d=CTe+d):b.j==G6d&&(d=DTe+d);if(b.j==M6d&&htc(a.a,b.b)){return}f=(e=Hsc(a.a,lud(c),false),!e?null:zL(e.d,100)?rL(e.d,100):null);if(!!f&&f.c.contains(d)){return}k=Osc(a.a,lud(c));i=(HAc(),j=eBc(b),!j?null:rL(F1d(j,29),11));p=Sgc(a,i,b,null);n=p.a;o=p.b;h=egc(a.c,b);if(!!n||h){m=(l=rL(Xk(Nk(k.D,d,false)),52),!l?null:l.b);if(!!rjd(k,new kud(d))||sjd(k,d)&&!!m&&!phc(i,n,m)){hzc(a.c.g,Rnc(b,(Yfc(),Rfc),GK(yK(fgb,1),pKe,2,6,[d,'namespace '+k])));$1d(b.e,76,true);return}!n&&(n=$gc(a,b));kjd(k,d,b,n,h);r=f2d(b,b.g,76);r!=b.g&&(b.g=r);b.g=new p3d(76,1,b.g);b.j==x5d&&h&&(q=f2d(b,b.g,77),q!=b.g&&(b.g=q),b.g=new p3d(77,1,b.g))}else if(o){mjd(k,d,b,o)}else{g=PBc(b);s=!g?null:jhc(a,g);!s&&(s=a.c.d.d.G);mjd(k,d,b,s)}} +function VDc(a){HAc();switch(a.g){case 1:return '|';case 61:return '||';case 2:return '^';case 62:return '&&';case 3:return '&';case 36:return '===';case 4:return '==';case 19:return '!';case 5:return '!=';case 37:return '!==';case 10:return '<<';case 40:return 'in';case 7:return '<=';case 6:return '<';case 12:return '>>>';case 11:return '>>';case 9:return '>=';case 8:return '>';case 15:return '*';case 16:return '/';case 17:return '%';case 18:return '**';case 20:return '~';case 13:case 21:return '+';case 14:case 22:return '-';case 47:return '=';case 48:return '|=';case 49:return '^=';case 50:return '&=';case 51:return '<<=';case 52:return '>>=';case 53:return '>>>=';case 54:return '+=';case 55:return '-=';case 56:return '*=';case 59:return '**=';case 57:return '/=';case 58:return '%=';case 79:return dPe;case 25:return FUe;case 41:return GUe;default:return null;}} +function qLc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;p=G1d(b.j)+LMe;n=new JCe;for(e=b.a.$d();e.Pd();){d=rL(e.Qd(),339);for(g=d.b.$d();g.Pd();){f=rL(g.Qd(),150);k=f.b.Lm();if(qBc(b.e,k)){continue}(k==null?!!hDe(n.d,null):wDe(n.e,k))&&a2d(c,rL(k==null?Xk(hDe(n.d,null)):xDe(n.e,k),5));l=s1d(f.c,false);FDc(l,a.a);j=zYd(lYd(ODc(a.a,p+k),l));K2d(j,f.b);m=c1d(f.a);sZd(m.a,NRe);m.e=true;!!f.a&&f.a.j==(z_d(),x_d)&&N_d(m,(z_d(),y_d));d.c||c2d((HAc(),lf(l.j==(h7d(),r5d),l),l.b?l.b.f:null));n2d(j.b,F_d(m,false));l1d(c,j);k==null?iDe(n.d,null,j):yDe(n.e,k,j)}for(i=d.d.$d();i.Pd();){h=rL(i.Qd(),150);o=h.b.Lm();(o==null?!!hDe(n.d,null):wDe(n.e,o))&&a2d(c,rL(o==null?Xk(hDe(n.d,null)):xDe(n.e,o),5));j=zYd(ODc(a.a,p+o));I2d(j,h.b);m=c1d(h.a);if(h.b.j==(h7d(),y5d)){m=new a1d(true);!!h.a&&!!XZd(h.a)&&S0d(m,XZd(h.a))}n2d(j.b,F_d(m,false));l1d(c,j);o==null?iDe(n.d,null,j):yDe(n.e,o,j)}}} +function ikd(a,b,c,d,e){var f,g,h,i,j,k,l,m;if(b==b.a.v||b==b.a.g||b==b.a.s||a==a.a.s){return true}if(a==a.a.v||a==a.a.g){return false}zf(!a.c&&!b.c);if(!a.n.a.isEmpty()){if(Zjd(a,b)){return true}return ikd(gkd(a),b,c,d,e)}if(!(b.i.isEmpty()&&b.e.isEmpty()&&!!b.j&&eKe==b.j.kl())){if(a.i.size()>b.i.size()){return false}j=b.i.size()+b.e.size();for(h=0;h0?bte(i,0,Rse(i,hte(46))):i;h=wL(lw(Vrb(i),c));DGb(a.c,Szc(l,xrb,GK(yK(fgb,1),pKe,2,6,[h])))}else l.e.j==_5d&&z1d(l.e)==a.d?DGb(a.c,Szc(l,wrb,GK(yK(fgb,1),pKe,2,6,[i]))):l.j==x5d&&l.e.j!=N4d?DGb(a.c,Szc(l,xrb,GK(yK(fgb,1),pKe,2,6,[i]))):DGb(a.c,Szc(l,yrb,GK(yK(fgb,1),pKe,2,6,[i])));k.a.put(i,k)}}}for(e=new Gue((new yue(a.g)).a);e.b;){d=Fue(e);m=wL(d.se());b=rL(d.te(),5);!gue(a.i,m)&&!PCe(a.j,m)&&Krb(a,b,m)}} +function Erc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;switch(a.j.g){case 19:{n=Erc(a.b);k=Grc(Qrc(a,GK(yK(b2,1),ZJe,132,0,[n.b])),n.a);i=Grc(Mrc(n.a),n.b);return new Drc(k,i)}case 62:case 61:{b=H2d(new N2d(a.j==(h7d(),g4d)?p6d:g4d),a);f=Erc(a.b);m=Erc(a.b?a.b.f:null);k=Grc(Qrc(a,GK(yK(b2,1),ZJe,132,0,[f.b,m.b])),Mrc(Qrc(b,GK(yK(b2,1),ZJe,132,0,[f.a,m.a]))));i=Grc(Mrc(Qrc(a,GK(yK(b2,1),ZJe,132,0,[f.b,m.b]))),Krc(Qrc(b,GK(yK(b2,1),ZJe,132,0,[f.a,m.a]))));return new Drc(k,i)}case 60:{c=a.b;o=c.d;d=o.d;p=Erc(o);e=Erc(d);k=Qrc(a,GK(yK(b2,1),ZJe,132,0,[new Prc(c,null,0,false),p.b,e.b]));i=Qrc(a,GK(yK(b2,1),ZJe,132,0,[new Prc(c,null,0,false),p.a,e.a]));return new Drc(k,i)}case 46:{g=a.b;l=Erc(g.d);k=Qrc(a,GK(yK(b2,1),ZJe,132,0,[new Prc(g,null,0,false),l.b]));i=Qrc(a,GK(yK(b2,1),ZJe,132,0,[new Prc(g,null,0,false),l.a]));return new Drc(k,i)}default:{j=new Prc(a,null,0,false);h=Mrc(j);return new Drc(j,h)}}} +function $Hd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;l=eKd(a.g,0).b.b;f=false;g=false;h=false;k=true;aHd(a,(XMd(),yLd));c=null;d=null;switch(eKd(a.g,0).c.g){case 65:g=true;n=dKd(a.g);a.f=n.b.a;break;case 14:c=b?sHd(a):hId(a);k=b;break;case 29:c=NHd(a,false,b);k=false;break;case 37:c=sId(a);k=false;break;case 31:c=WHd(a);k=false;break;case 110:case 111:c=CId(a,b);k=false;break;case 109:c=qHd(a);k=false;break;case 8:f=true;m=dKd(a.g);a.f=m.b.a;c=oHd(a,1);k=false;break;case 45:h=true;d=aId(a);break;case 108:c=cJd(a);break;default:case 25:case 38:case 30:c=b?vHd(a):kJd(a,1);}j=null;if(g||h&&nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,ROe)){gHd(a,ROe);j=rL(aHd(a,DMd),134)}else if(h){for(p=d.$d();p.Pd();){o=rL(p.Qd(),18);e=rL(o,501).b;LGd(e.a)&&FJd(a,e,tYe,GK(yK(agb,1),ZJe,1,5,[e.a]))}}(k||(i=eKd(a.g,0).b.b.b>a.f.b,i||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)))&&fHd(a);return new UNd(new qRd(l,a.f),f,g,c,d,j)} +function Gxc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;if(uCc(b.e)){return Zwc(a,b,c,d)}j=rL(F1d(b,29),11);i=!!j&&(j.a&iMe)!=0;h=!!j&&(j.a&yOe)!=0;f=c;t=Iyc(a,b);for(p=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();p.Pd();){o=rL(p.Qd(),5);i&&o.Nm()?hzc(a.Q,Rnc(o,dwc,GK(yK(fgb,1),pKe,2,6,[rUe]))):h&&!o.Nm()&&hzc(a.Q,Rnc(o,dwc,GK(yK(fgb,1),pKe,2,6,[sUe])));if(o.j==(h7d(),y5d)||o.j==G6d){m=IBc(o);l=axc(a,o.b,f);g=qld(l.b);tf(g);if(o.j==y5d){v=CTe+m;q=g.k}else{v=DTe+m;q=l.b}t=pmd(t,new kud(v),q);f=l.a}else{n=JBc(o);if(!n){f=cxc(a,o,f,a.r,a.r).a;continue}r=new kud(n.Lm());k=Vec(a.N,o);if(k){s=u=k}else if(Kvd(d.nl(),r)||Kvd(d.gl(),r)){s=u=yld(d,r);(Kvd(e.nl(),r)||Kvd(e.gl(),r))&&(u=yld(e,r))}else{s=u=a.r}l=cxc(a,o,f,s,u);if(k){t=mmd(t,r,k);if(!Rld(l.b,k,new bvd((rrd(),rrd(),qrd)))){hzc(a.Q,Rnc(o,nwc,GK(yK(fgb,1),pKe,2,6,[Vyc(k,l.b)])));l.b=k}}t=pmd(t,r,l.b);f=l.a}}t=uyc(a,b,j,c,t);return new ezc(f,t)} +function Tpb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;i=(HAc(),j=eBc(b),!j?null:rL(F1d(j,29),11));if(!!i&&(s=!i.d?null:i.d.p,!s?(jye(),jye(),iye):s).contains(dNe)){return}q=_pb(aqb(b.b.k));o=(b.b?b.b.f:null).Lm();h=a.e&&CFb(a.a).yh(o);if(h&&kqb(b,c)){DGb(a.a,Szc(b,wpb,GK(yK(fgb,1),pKe,2,6,[])));return}d=Kjb(b,q,o);f=false;g=!!i&&(c.j==(h7d(),m5d)||c.j==m4d&&c.b==b);l=Pjb(q,g,o);e=rL(Fs(a.c,d),197);t=Mjb(b,q,a.c,a.e?CFb(a.a):null);if(g){m=(n=rL(F1d(c,29),11),!n||(n.a&64)==0?null:n.j);!!m&&Opb(a,m,t,e,b)}if(l){k=l.ol(o);if(!k){return}d=rL(F1d(k,51),28);f=(l.pl(o).a&2)!=0}else if(h){l=q}else if(!e){return}p=rL(F1d(b,51),28);if(g){r=!!p&&Jse(p.ji(),d.ji());u=rL(F1d(c,29),11);v=!u?(z_d(),u_d):u.j;t==(z_d(),w_d)&&!r?DGb(a.a,Szc(b,Epb,GK(yK(fgb,1),pKe,2,6,[gjb(l)]))):v!=u_d&&v!=t&&!e&&DGb(a.a,Szc(b,Fpb,GK(yK(fgb,1),pKe,2,6,[t.f!=null?t.f:''+t.g,gjb(l),v.f!=null?v.f:''+v.g])))}else{Npb(a,b,c,t,f,l,p,d)}} +function $fc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;l=Wrd(c,d);if(!l){return}if(c.a.g!=0){k=cgc(a,c,d);if(kgc(fBc(b.v))){for(h=k.$d();h.Pd();){g=rL(h.Qd(),208);!!Hud(b,d,0)||yt(a.f,b,d,g)}}}else{p=bgc(a,c,d);if(!p){return}k=(Qq(),new XD(p))}if(c.a.g!=0&&b.g==0&&!kgc(fBc(b.v))&&!Hud(b,d,1)){hzc(a.g,Rnc(rL(k.$d().Qd(),208).a,Jfc,GK(yK(fgb,1),pKe,2,6,[d,Ird(c,new zte,(evd(),dvd)).a,zud(b,new zte).a])));return}m=rL(Gt(a.f,b,d),208);n=!m?null:Eud(b,d);if(!!m&&c.a.g==0&&!!n&&!!qld(n)&&(o=Hud(c.a,d,1),!!o&&o.a==(fud(),cud))){hzc(a.g,Rnc(m.a,vfc,GK(yK(fgb,1),pKe,2,6,[d])));return}if(!n&&c.a.g!=0){dk(f,d,l)}else if(!!n&&!jgc(m)&&!(q=qld(n),r=qld(l),!q?Rld(n,l,new bvd((rrd(),rrd(),qrd))):!!r&&ikd(q,r,false,new bvd((rrd(),rrd(),qrd)),null))){hzc(a.g,Rnc(m.a,Lfc,GK(yK(fgb,1),pKe,2,6,[d,ild(l,new zte,(evd(),dvd)).a,ild(n,new zte,dvd).a])))}else if(!!n&&!!m.c){for(j=k.$d();j.Pd();){i=rL(j.Qd(),208);!!i.c&&dk(e,d,i.c)}}} +function izb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;r=c.b?c.b.f:null;v=(HAc(),nBc(c,GAc));q=r.Lm();w=Bzb(a.f,q)&&!Ezb(a.f,q);l=!!v&&(v.j==(h7d(),b7d)||v.j==T5d||v.j==S4d);p=v.b.j==(h7d(),$4d);i=a.b.i;t=VCc(!c.e?null:c.e.e);if(i&&t&&Dzc(b)==a.b.o){s=c.e;j=Dzb(a.f,q);if(j==null);else if(s.j==_5d){d=v.b.Lm();Xyb(a,d,j)}else if(s.j==$4d&&s.b.j==n6d){Kyb(a,b,s.e,q);for(n=q1d(s.b).$d();n.Pd();){m=rL(n.Qd(),5);Af(!!m.b,m);o=m.Lm();e=m.b;d=e.Lm();k=j+'.'+o;Xyb(a,d,k);dzb(a,e,a.b.b+(''+d))}}else{throw Aib(new DJ('Illegal goog.module import: '+s))}}if(a.b.i||w){if(p){if(!a.d){FGb(a.a,v);tf(v.e);a2d(v.e,v)}}else if(w){if(Dzc(b)==a.b.o){if(l||!Ezb(a.f,q)){if(!a.d){FGb(a.a,v);tf(v.e);a2d(v.e,v)}}}else{g=RYd(Czb(a.f,q));u=f2d(g,g.g,40);u!=g.g&&(g.g=u);q!=null&&(g.g=new A3d(40,q,g.g));g2d(c.e,c,g);FGb(a.a,g)}}else{tf(c.e);a2d(c.e,c);h2d(v,(Af(NYd(c),c),new P2d(m5d,c)));FGb(a.a,c)}if(w&&!a.d){h=c.b;f=h.d;nzb(f)}}} +function nBb(a,b,c,d,e,f,g,h){var i,j,k;k=new Ate;for(j=0;j=2&&(b.charCodeAt(j-1)==45&&b.charCodeAt(j-2)==45||b.charCodeAt(j-1)==93&&b.charCodeAt(j-2)==93)?(k.a+='\\x3e',k):(k.a+='>',k);break;case 60:if(!a.j&&!h){k.a+=lPe;break}Use(b,true,j+1,'/script',0,7)?(k.a+=lPe,k):Use(b,false,j+1,'!--',0,3)?(k.a+=lPe,k):(k.a+='<',k);break;default:i>31&&i<127?(k.a+=String.fromCharCode(i),k):yJ(k,i);}}return k.a} +function VIc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;Af(b.j==(h7d(),B5d),b);n=b.e;tf(n);s=b.j;f=b.b;p=f.d;i=p.d;if(!!i&&(HAc(),!OAc(i,false,a.c))){a2d(b,i);i=null;GGb(a.c)}HAc();if(!OAc(p,false,a.c)&&!!i){a2d(b,i);g2d(b,p,i);m=new N2d(h6d);g2d(b,f,m);m1d(m,f);f=m;p=f.d;i=null;GGb(a.c)}if(!OAc(p,false,a.c)&&!i){if(OAc(f,false,a.c)){a2d(b,f);o=H2d((Af(NYd(f),f),new P2d(m5d,f)),f);g2d(n,b,o);GGb(a.c);return o}else{$Dc(n,b);GGb(a.c);return null}}h=tBc(f);if(h==(Vne(),Une)){return b}if(OAc(f,false,a.c)){l=h==Tne;if(!l&&!i){i=H2d((c=new N2d(F4d),c),b);l1d(b,i)}k=l?new N2d(W6d):new N2d(n5d);g2d(b,f,k);d=l?p:i;m1d(d,H2d((Af(NYd(f),f),new P2d(m5d,f)),f));GGb(a.c)}g=h.so(true);if(!!b.b&&!!b.b.d&&b.b.d==(b.b?b.b.f:null)){zf(s==B5d);if(g){q=b.b.d;a2d(b,q);g2d(n,b,q);GGb(a.c);return q}else{YDc(b);$Dc(n,b);EDc(b,a.c);GGb(a.c);return null}}else{r=b.b.d;j=r.d;d=g?r:j;e=g?j:r;YDc(e);a2d(b,d);g2d(n,b,d);EDc(b,a.c);GGb(a.c);return d}} +function uJc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;kf(b.j==(h7d(),I4d));m=c.b;f=c.b?c.b.f:null;if(f.j!=L6d){return b}h=m.j==L6d;g=f.Lm();e=c.d;if(h){if(Jse(g,'split')){return zJc(a,b,m,e)}else if(!e){switch(g){case 'toLowerCase':return n=dte(m.Lm(),(dFe(),aFe)),o=new T3d(L6d,n),g2d(b.e,b,o),GGb(a.c),o;case 'toUpperCase':return p=ete(m.Lm(),(dFe(),aFe)),q=new T3d(L6d,p),g2d(b.e,b,q),GGb(a.c),q;}}else{if(LCc(e)){switch(g){case 'indexOf':case 'lastIndexOf':return yJc(a,b,g,m,e);case 'substr':return AJc(a,b,m,e);case 'substring':case 'slice':return BJc(a,b,m,e);case 'charAt':return wJc(a,b,m,e);case 'charCodeAt':return xJc(a,b,m,e);}}}}if(a.b&&!!e&&(h||!!m.k&&m.k.fm())){if(O1d(b,3)){k=GBc(e,a.b);if(k!=null){l=IL((wJe(k),k));j=GBc(e.d,a.b);if(j!=null){switch(g){case 'substr':i=IL((wJe(j),j));if(l>=0&&i==1){return qJc(a,b,c,e)}break;case 'substring':case 'slice':d=IL((wJe(j),j));if(d-l==1){return qJc(a,b,c,e)}}}}}}return b} +function rJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=b.b;if(!e||e.j!=(h7d(),x5d)){return b}q=e.d;if(q){if(!!q.d||!LCc(q)){return b}}d=e.b;j=d.d;if(d.j!=(h7d(),j4d)||!Jse(j.Lm(),'join')){return b}if(!!q&&q.j==L6d&&Jse(',',q.Lm())){a2d(b,q);GGb(a.c)}k=!q?',':UBc(q);c=new LEe;r=null;h=0;o=null;f=d.b;while(f){if(LCc(f)||f.j==c5d){!r?(r=new zte):(r.a+=''+k,r);vte(r,(HAc(),f.j==i6d||vDc(f)||f.j==c5d?'':UBc(f)))}else{if(r){tf(o);h+=r.a.length+2;xEe(c,J2d(bZd(r.a),o));r=null}h+=Ric(f,eKe);AEe(c,f,c.c.b,c.c)}o=f;f=f.d}if(r){tf(o);h+=r.a.length+2;xEe(c,J2d(bZd(r.a),o))}h+=c.b-1;n=Ric(b,eKe);switch(c.b){case 0:g=new T3d(L6d,'');g2d(b.e,b,g);GGb(a.c);return g;case 1:i=rL(az(c,0),5);if(h>n){return b}v1d(d);if(i.j!=L6d){p=hYd(H2d(new T3d(L6d,''),b),i);i=p}g2d(b.e,b,i);GGb(a.c);return i;default:if(O1d(d,c.b)){return b}h+=9;h+=q?Ric(q,eKe):0;if(h>n){return b}v1d(d);for(m=DEe(c,0);m.b!=m.d.c;){l=rL(SEe(m),5);l1d(d,l)}GGb(a.c);}return b} +function EKd(a,b){var c,d,e;_Jd(a);if(!$Jd(a,a.d)){gKd(a,'Unterminated string literal escape sequence',GK(yK(agb,1),ZJe,1,5,[]));return false}if(LKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){d=_Jd(a);d==13&&($Jd(a,a.d)?Ese(a.e.a,a.d):0)==10&&_Jd(a);return true}e=_Jd(a);switch(e){case 39:case 34:case 96:case 92:case 98:case 102:case 110:case 114:case 116:case 118:case 48:return true;case 49:case 50:case 51:case 52:case 53:case 54:case 55:if(b){gKd(a,xYe,GK(yK(agb,1),ZJe,1,5,[]));return false}break;case 120:return tKd(a)&&tKd(a);case 117:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==123){_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==125){gKd(a,'Empty unicode escape',GK(yK(agb,1),ZJe,1,5,[]));return false}c=true;while(($Jd(a,a.d)?Ese(a.e.a,a.d):0)!=125&&c){c=tKd(a)}_Jd(a);return c}else{return tKd(a)&&tKd(a)&&tKd(a)&&tKd(a)}}if(e==47);else if(b);else{hKd(a,"Unnecessary escape: '\\%s' is equivalent to just '%s'",GK(yK(agb,1),ZJe,1,5,[Xqe(e),Xqe(e)]))}return true} +function ypc(a,b,c,d,e){var f,g,h,i,j,k,l;switch(b.j.g){case 85:case 81:case 65:case 82:return;case 70:case 71:case 66:case 72:ypc(a,jBc(b),c,d,e);return;case 101:case 73:{l=b.b;HAc();!!l&&(l.j==(h7d(),b7d)||l.j==T5d||l.j==S4d)&&(l=l.b?l.b.f:null);if(l.j==(h7d(),_5d)){xpc(a,l,d);xpc(a,l,c)}else{ypc(a,l,c,d,e)}return}case 100:case 88:case 76:for(h=b.b;h;h=h.d){if(h.j==(h7d(),_5d)){if(h.b){ypc(a,h.b,c,d,e);e||xpc(a,h,d)}}else{f=ABc(b);for(j=new lxe(f);j.a36){return c}}}if(e.j==k6d){f=(HAc(),GBc(e,false));if(!(l==0||l==10)&&g){n=''+IL((wJe(f),f))}else{g?(k=new v3d(IL((wJe(f),f)))):(k=new v3d((wJe(f),f)));g2d(c.e,c,k);GGb(b.c);return k}}else{n=UBc(e);if(n==null){return c}f=TBc(n);if(f==null){return c}n=cEc(n);if(n.length==0){return c}}if(Jse(n,'0')){h=new v3d(0)}else if(g){if(l==0||l==16){if(n.length>1&&Kse(n.substr(0,2),'0x')){l=16;n=n.substr(2)}else if(l==0){if(!(!!b.c&&xEd(aKb(mIb(b.c.T)),(wEd(),nEd)))&&Jse(n.substr(0,1),'0')){return c}l=10}}try{i=Are(n,l)}catch(a){a=zib(a);if(zL(a,140)){return c}else throw Aib(a)}h=new v3d(i)}else{try{i=zre(n);h=new v3d(i);j=EJc(''+i)}catch(a){a=zib(a);if(zL(a,140)){return c}else throw Aib(a)}if(!Jse(EJc(n),j)){return c}}g2d(c.e,c,h);GGb(b.c);return h} +function Cub(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;w=c.e;i=G1d(b.b.d);u=i+HMe;p=x1d(b,2);if(!p||p.j!=(h7d(),j4d)){DGb(a.a,Rnc(c,tub,GK(yK(fgb,1),pKe,2,6,[])));return}o=new RCe;for(n=(!p.b?(jye(),jye(),iye):new F3d(p.b)).$d();n.Pd();){m=rL(n.Qd(),5);if(m.j!=(h7d(),L6d)){DGb(a.a,Rnc(m,tub,GK(yK(fgb,1),pKe,2,6,[])));return}OCe(o,m.Lm())}for(h=(!w.b?(jye(),jye(),iye):new F3d(w.b)).$d();h.Pd();){g=rL(h.Qd(),5);if(g.j==(h7d(),m5d)&&(e=g.b).j==m4d&&Y1d(e.b,u)){s=g.b.b.d;for(B=(!s.b?(jye(),jye(),iye):new F3d(s.b)).$d();B.Pd();){A=rL(B.Qd(),5);k=A.Lm();Aub(a,k,o,i,A,w,c)}}else if(g.j==m5d&&(f=g.b).j==m4d&&$se(G1d(f.b),u+'.')){d=g.b;v=G1d(d.b);k=ate(v,Rse(v,hte(46))+1);Aub(a,k,o,i,d,w,c)}else if(g.j==m5d&&(l=g.b).j==x5d&&$se(G1d(l),u+'.')){v=G1d(g.b);k=ate(v,Rse(v,hte(46))+1);Aub(a,k,o,i,g.b,w,c)}}for(r=(t=(new dve(o.a)).a.ke().$d(),new jve(t));r.a.Pd();){q=(j=rL(r.a.Qd(),12),wL(j.se()));DGb(a.a,Rnc(c,uub,GK(yK(fgb,1),pKe,2,6,[i,q])))}} +function Ofd(a,b){var c,d,e;e=a.c.indexOf(pWe)!=-1;for(d=new lxe(Xfd(a.c));d.aMake sure your application's host HTML page has a Standards Mode (document.compatMode=' CSS1Compat') doctype,
    e.g. by using <!doctype html> at the start of your application's HTML page.

    To continue using this unsupported rendering mode and risk layout problems, suppress this message by adding
    the following line to your*.gwt.xml module file:
      <extend-configuration-property name=\"document.compatMode\" value=\""+b+'"/>':"Your *.gwt.xml module configuration prohibits the use of the current document rendering mode (document.compatMode=' "+b+"').
    Modify your application's host HTML page doctype, or update your custom "+"'document.compatMode' configuration property settings."} +function $Dc(a,b){HAc();var c,d;if(a.j==(h7d(),X6d)&&O1d(a,3)&&b==(a.b?a.b.f:null)){WBc((kf(a.j==X6d),a.b.d))?a2d(a,b):v1d(b)}else if(b.j==M4d){d=!b.e?null:b.e.e;zf((kf(d.j==X6d),O1d(d,3)));u1d(b)}else{c=b.e;if(c.j==X6d&&c.b.d==b){d=b.e;zf((kf(d.j==X6d),O1d(d,3)));v1d(b)}else if(b.j==F4d){v1d(b)}else if(a.j==D6d||a.j==F6d||a.j==F4d||a.j==Z5d||b.j==K4d||b.j==X4d||b.j==W5d){a2d(a,b)}else if(!!a&&(a.j==b7d||a.j==T5d||a.j==S4d)||a.j==m5d){if(!!a.b&&!!a.b.d){a2d(a,b)}else{a2d(a,b);$Dc(a.e,a)}}else if(a.j==O5d&&b==(a.b?a.b.f:null)){a2d(a,b);$Dc(a.e,a)}else if(a.j==o5d){g2d(a,b,new N2d(c5d))}else if(a.j==n6d){a2d(a,b)}else if(a.j==k4d){b==(a.b?a.b.f:null)?a2d(a,b):g2d(a,b,new N2d(c5d))}else if(a.j==$4d){a2d(a,b);!!a.e.b&&$Dc(a.e,a)}else if(a.j==A6d){u1d(a)}else if(a.j==r6d){a2d(a,b)}else if(a.j==D5d){if(b==a.b){g2d(a,b,new N2d(c5d))}else{throw Aib(new Ire('Invalid attempt to remove: '+b+' from '+a))}}else{throw Aib(new Ire('Invalid attempt to remove node: '+b+' of '+a))}}} +function yBc(a){HAc();var b,c,d;switch(a.j.g){case 92:return yBc(a.b);case 47:case 46:return yBc(a.b?a.b.f:null);case 62:case 61:return KAc(yBc(a.b),yBc(a.b?a.b.f:null));case 60:return KAc(yBc(a.b.d),yBc(a.b?a.b.f:null));case 13:{c=yBc(a.b?a.b.f:null);if(c==4){return 4}b=yBc(a.b);if(b==4){return 4}if(b==6||c==6){return 0}if(!HDc(b)&&!HDc(c)){return 3}return 0}case 54:{c=yBc(a.b?a.b.f:null);if(c==4){return 4}return 0}case 29:d=a.Lm();if(Jse(d,mMe)){return 2}if(Jse(d,PNe)){return 3}if(Jse(d,AUe)){return 3}return 0;case 48:case 49:case 50:case 51:case 52:case 53:case 55:case 56:case 59:case 57:case 58:case 20:case 1:case 2:case 3:case 10:case 11:case 12:case 14:case 15:case 17:case 16:case 18:case 63:case 64:case 21:case 22:case 30:return 3;case 35:case 34:case 4:case 5:case 36:case 37:case 6:case 8:case 7:case 9:case 40:case 41:case 19:case 24:return 5;case 25:case 31:return 4;case 32:return 1;case 79:return 2;case 65:case 23:case 42:case 43:case 38:return 6;default:return 0;}} +function fEd(){fEd=cjb;JDd=new gEd('ALL',0,'all',0,0,0);KDd=new gEd('COND',1,'cond',3,3,1);LDd=new gEd('EQ',2,'eq',2,2,3);NDd=new gEd('ISCTOR',3,'isCtor',1,1,3);ODd=new gEd('ISDEFINED',4,'isDefined',1,1,4);PDd=new gEd('ISRECORD',5,'isRecord',1,1,3);QDd=new gEd('ISTEMPLATIZED',6,'isTemplatized',1,1,3);RDd=new gEd('ISUNKNOWN',7,'isUnknown',1,1,3);MDd=new gEd(UXe,8,'instanceOf',1,1,1);TDd=new gEd('MAPUNION',9,'mapunion',2,2,1);SDd=new gEd('MAPRECORD',10,'maprecord',2,2,1);UDd=new gEd(pMe,11,'none',0,0,0);VDd=new gEd('PRINTTYPE',12,'printType',2,2,1);WDd=new gEd('PROPTYPE',13,'propType',2,2,1);XDd=new gEd('RAWTYPEOF',14,'rawTypeOf',1,1,0);$Dd=new gEd('SUB',15,'sub',2,2,3);ZDd=new gEd('STREQ',16,'streq',2,2,2);YDd=new gEd('RECORD',17,'record',1,eKe,0);_Dd=new gEd('TEMPLATETYPEOF',18,ZVe,2,2,0);aEd=new gEd(eXe,19,rNe,2,eKe,0);bEd=new gEd('TYPEEXPR',20,'typeExpr',1,1,0);cEd=new gEd('TYPEOFVAR',21,'typeOfVar',1,1,1);dEd=new gEd('UNION',22,'union',2,eKe,0);eEd=new gEd(HWe,23,tUe,0,0,0)} +function D3b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;HAc();if(!!d&&(d.j==(h7d(),b7d)||d.j==T5d||d.j==S4d)&&!tCc(d.e)){x3b(a,b,c,c.d,d,d)}else if(d.j==(h7d(),m4d)){d.e.j==m5d?x3b(a,b,c,c.d,d,d.e):(e=HSe+a.b++,f=u1d(d.b?d.b.f:null),g=wYd((Ef(Ose(e,hte(46))==-1,xMe,e),new T3d(_5d,e)),f,T5d),h=lYd(u1d(d.b),(Ef(Ose(e,hte(46))==-1,xMe,e),new T3d(_5d,e))),i=(Af(NYd(h),h),new P2d(m5d,h)),j=$Yd((Ef(Ose(e,hte(46))==-1,xMe,e),new T3d(_5d,e))),k=oYd(GK(yK(veb,1),MMe,5,0,[g,i,j])),l=qYd(kYd((Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),new N2d(r6d),k),GK(yK(veb,1),MMe,5,0,[])),K2d(l,d),m=f2d(l,l.g,50),m!=l.g&&(l.g=m),l.g=new p3d(50,1,l.g),g2d(d.e,d,l),FDc(l,a.a),x3b(a,b,h.b,h.b?h.b.f:null,h,i),undefined)}else if(d.j==A6d||d.j==M6d||d.j==k4d||d.j==Y4d);else{if(d.j==q5d||d.j==p5d||tCc(d.e)){A3b(a,c)}else if(d.j==M4d){n=HSe+a.b++;o=c.d;h2d(c,(Ef(Ose(n,hte(46))==-1,xMe,n),new T3d(_5d,n)));m1d(o,wYd(c,(Ef(Ose(n,hte(46))==-1,xMe,n),new T3d(_5d,n)),T5d))}else{throw Aib(new Ire('unexpected parent'))}}} +function Otc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;k=c.e;g='';m=c;d=false;while(true){HAc();if(m.j==(h7d(),x5d)||m.j==w5d){l=m.b?m.b.f:null;if(m.j==x5d){g='.'+l.Lm()+g}else{d=true;g=''}m=m.b}else if(aDc(m)){g='.'+m.Lm()+g;i=m.e;j=i.e;if(j.j==m4d){m=j.b}else if(j.j==_5d){m=j}else if(j.j==M6d){m=j}else{return null}}else if(_Cc(m)&&m.e.j==m5d&&T1d(m.b.d)&&(m.b?m.b.f:null).j==m6d){o=m.b.d;if(!T1d(o)){return null}m=o}else{break}}if(k.j==(h7d(),I4d)&&Nzc(b)){f=CFb(a.d);e=f.dh(k);if(e){h=new cvc(e.a);h.d=true;h.g=e.b;return h}n=f.mh(k);if(n!=null){h=new cvc(n);h.d=true;return h}}if(k.j==N4d&&c==k.b){zf(c.j==_5d);h=new cvc(c.Lm());if(c.d.j==_5d){h.g=c.d.Lm();h.d=true}return h}switch(m.j.g){case 29:if(!d&&c.j==x5d&&k.j==m4d&&Jse(KMe,(c.b?c.b.f:null).Lm())){if(Otc(a,b,c.b)){g=m.Lm()+(''+g);g=bte(g,0,g.length-10);h=new cvc(g);return h}else{return null}}return Ptc(a,m.Lm()+(''+g),Hzc(b),m);case 33:if(Nzc(b)){h=new cvc(Ose(g,hte(46))==0?g.substr(1):g);h.a=true;return h}return null;default:return null;}} +function ixc(a,b){var c,d,e,f,g,h,i,j,k,l,m;for(f=(zf(!b.a.a.isEmpty()),new Gze(b.a.b.$d()));f.b.Pd();){e=rL(f.b.Qd(),87);h=rL(e.te(),5);l=h.e;Af(!!h,'Implicit return should not be in workset.');g=eyc(a,e);k=null;(l.j==(h7d(),F6d)||l.j==F4d&&l.e.j==r5d)&&(g=pvd(g));d=false;switch(h.j.g){case 82:case 81:case 74:case 75:case 69:case 89:case 80:case 65:case 85:case 44:case 77:k=g;break;case 78:c=h.b.Lm();k=Uyc(g,c,a.r);break;case 84:if(B1d(h,76)!=0){m=f2d(h,h.g,76);m!=h.g&&(h.g=m);k=g}else{k=bxc(a,h.b,g,a.r).a}break;case 0:k=Lxc(a,h,g);break;case 71:case 66:case 72:case 70:d=true;Xwc(a,e,jBc(h),g);break;case 73:k=dxc(a,h,g);break;case 101:k=exc(a,h,g);break;case 68:{d=true;Xwc(a,e,h,g);break}case 76:k=g;if(tDc(h)){break}for(j=(!h.b?(jye(),jye(),iye):new F3d(h.b)).$d();j.Pd();){i=rL(j.Qd(),5);k=Uxc(a,i,k)}break;case 67:k=axc(a,h.b,g).a;break;case 39:{k=axc(a,h.b,g).a;Vcd(a.G,k);break}default:{HAc();if(h.j!=Z5d&&nDc(h.e)){throw Aib(new DJ(qUe+h.j))}else{k=bxc(a,h,g,a.r).a;break}}}d||Nyc(a,e,k)}} +function Sld(a,b,c,d,e){var f,g,h,i;if(eKe==a.kl()||eKe==c.kl()||-1==c.kl()){return true}if(512==a.kl()){return 0!=Wld(c).kl()}if(XLe==a.kl()){return 0!=Vld(c).kl()}if(512==c.kl()){return h=a.kl(),h!=0&&(h|522)==522}if(!Cjd(a,c,d)){return false}g=a.kl()&-5;if((g|c.kl())!=c.kl()){e!=null&&Tld(a)&&(f=a.e,Rld(f.q,a,new bvd((rrd(),rrd(),qrd)))&&!Rld(f.q,c,new bvd((null,qrd)))?(e[0]=prd(f.q)):Rld(f.t,a,new bvd((null,qrd)))&&!Rld(f.t,c,new bvd((null,qrd)))?(e[0]=prd(f.t)):Rld(f.a,a,new bvd((null,qrd)))&&!Rld(f.a,c,new bvd((null,qrd)))?(e[0]=prd(f.a)):Rld(f.j,a,new bvd((null,qrd)))&&!Rld(f.j,c,new bvd((null,qrd)))?(e[0]=prd(f.j)):Rld(f.B,a,new bvd((null,qrd)))&&!Rld(f.B,c,new bvd((null,qrd)))?(e[0]=prd(f.B)):(a.kl()&1)!=0&&(c.kl()&1)==0?(e[0]=prd(Dmd(a.e,a.Dl()))):(a.kl()&2)!=0&&(c.kl()&2)==0&&(e[0]=prd(Wnd(a.e,2,a.nl(),null,eld))));return false}if(a.Dl()!=null&&!Jse(a.Dl(),c.Dl())){return false}if(a.nl().isEmpty()){return true}i=ztd(b,a.nl(),c.nl(),d,null);e!=null&&Otd(b,a.nl(),c.nl(),d,e);return i} +function hxc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;for(h=(zf(!b.a.a.isEmpty()),new Ctc((new Atc(b)).a));h.a>=0;){g=rL(Kze(h.b.a,h.a--),87);l=rL(g.te(),5);n=rL(tf(gyc(a,g)),160);switch(l.j.g){case 84:j=_wc(a,l.b,n,a.r).a;break;case 0:{p=l.b;if(!p){j=n}else{e=a.C.d.i;e=rL(Ze(e,a.r),20);j=_wc(a,p,n,e).a}break}case 76:{if(tDc(l)){j=n;break}j=n;for(m=l.b;m;m=m.d){r=m.Lm();q=m.b;f=Jsc(a.C,r);j=Uyc(j,r,a.r);if(!q||ftc(a.C,r)){continue}k=(lf(r.indexOf('.')==-1,r),kf(r.indexOf('.')==-1),rL(Xk(Nk(n.b,r,false)),20));if(!f){o=k}else{o=Xnd(f,k);o=Wyc(o,a.r)}j=_wc(a,q,j,o).a}break}case 82:case 81:case 74:case 78:case 75:case 69:case 89:case 80:case 85:case 44:case 77:j=n;break;case 71:case 72:case 73:case 101:case 66:case 70:i=l.j==(h7d(),p5d)||l.j==q5d?l.b:jBc(l);j=_wc(a,i,n,a.r).a;break;case 39:case 68:case 67:j=$wc(a,l.b,n).a;break;default:{HAc();if(l.j!=(h7d(),Z5d)&&nDc(l.e)){throw Aib(new DJ(qUe+l.j))}else{j=_wc(a,l,n,a.r).a;break}}}for(d=new lxe(g.Jk());d.a1){s=new JCe;i=new RDe;for(q=m.d.$d();q.Pd();){p=rL(q.Qd(),24);lue(i.c);i.b.b=i.b;i.b.a=i.b;L1c(a,b,c,l,s,i,p);Ok(s,i)}}r=Pde(m,new RCe,new idd);if(r){t='';for(n=0;n '}t+=_ae(rL(mw(r),68));DGb(a.a,Szc(c,p1c,GK(yK(fgb,1),pKe,2,6,[_ae(rL(r.getAtIndex(0),68)),t])))}}} +function Ygc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;l=null;m=null;o=null;j=(HAc(),k=eBc(d),!k?null:rL(F1d(k,29),11));if(!!e&&e.j==(h7d(),r5d)){l=shc(a,e,b);m=l.c;d.j==(h7d(),y5d)?(c=CTe+c):d.j==G6d&&(c=DTe+c)}else !!j&&(g=(j.a&hNe)==mNe&&((hNe&j.a)==mNe?j.i:null).a.j==(h7d(),r5d),g||(j.a&hNe)==mKe||!!j.g||TZd(j)>0||(j.a&2)!=0||(j.a&nKe)!=0&&(j.a&hNe)!=mNe)&&d.j!=(h7d(),M6d)&&(m=Ngc(a,j,c,d,b,a.a));!!j&&(j.a&hNe)==mNe?(o=qpd(a.c.d.o,j,b,a.a)):!!m&&(o=$pd(a.c.d.d,_id(m)));if(d.j==(h7d(),y5d)){f=(n=o.kl()==2&&o.nl().size()==1?rL(Uw(o.nl().$d()),25):null,!n?null:n.b);!!f&&(o=f.k)}yt(a.c.f,b,c,new Fhc(d,m,l));!!m&&m.b&&!b.e&&(b.g==0?hzc(a.c.g,Rnc(d,(Yfc(),pfc),GK(yK(fgb,1),pKe,2,6,[b.A]))):b.g!=0&&hzc(a.c.g,Rnc(d,(Yfc(),qfc),GK(yK(fgb,1),pKe,2,6,[]))));i=egc(a.c,d);if(!!o||i){if(ahc(a,b,c,d,o)){return}!o&&(o=$gc(a,d));tud(b,c,d,o,i);if(d.j==x5d){q=f2d(d,d.g,76);q!=d.g&&(d.g=q);d.g=new p3d(76,1,d.g);i&&(p=f2d(d,d.g,77),p!=d.g&&(d.g=p),d.g=new p3d(77,1,d.g))}}else{h=null;!!e&&(h=jhc(a,e));!h&&(h=a.c.d.d.G);yud(b,c,d,h)}} +function khc(a,b){var c,d,e,f,g,h,i,j,k,l;switch(b.j.g){case 38:return rqd(a.c.d.d);case 92:return rL(NDe(a.c.d.c,b),20);case 42:{if(!b.b){return aqd(a.c.d.d)}d=b.b;c=khc(a,d);if(!c){return null}while(d=d.d){if(!kld(c,khc(a,d))){return null}}return bqd(a.c.d.d,c)}case 35:case 34:return a.c.d.d.a;case 33:return Jsc(a.a,pNe);case 29:return ggc(a.c,Isc(a.a,b.Lm(),false));case 43:{g=eqd(a.c.d.d);for(i=(!b.b?(jye(),jye(),iye):new F3d(b.b)).$d();i.Pd();){h=rL(i.Qd(),5);j=khc(a,h.b);if(!j){return null}g=pmd(g,new kud(IBc(h)),j)}return g}case 26:return nhc(a,b.b,(b.b?b.b.f:null).Lm());case 27:return mhc(a,b);case 46:case 47:return khc(a,b.b?b.b.f:null);case 28:case 23:return ihc(a,b);case 62:case 61:return hhc(a,b);case 60:{f=khc(a,b.b.d);k=khc(a,b.b?b.b.f:null);return !f||!k?null:Tnd(f,k)}case 65:{l=Tsc(a.a,agc(a.c,b));e=l.c;return !e?null:$pd(a.c.d.d,_id(e))}default:switch(yBc(b)){case 1:return a.c.d.d.j;case 2:return a.c.d.d.B;case 3:return a.c.d.d.q;case 4:return a.c.d.d.t;case 5:return a.c.d.d.a;default:return null;}}} +function W3b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;o=d2d(a.f);g=d2d(a.f);e=d2d(a.f);i=g.k;m=a.u;a.a&&(m=rL(i.Yk().tm().Al().getAtIndex(0),60));d=N3b(a,(Lhe(),Dge),m);j=''+a.j.a.hb++;c=b6b((Ef(Ose(NSe+j,hte(46))==-1,xMe,NSe+j),new T3d((h7d(),_5d),NSe+j)),d);n=g4b(a,(Ef(Ose(OSe+j,hte(46))==-1,xMe,OSe+j),new T3d(_5d,OSe+j)));h=b6b((Ef(Ose(PSe+j,hte(46))==-1,xMe,PSe+j),new T3d(_5d,PSe+j)),i);o.j==b7d&&(o=d2d(o));m1d(e,IYd(e4b(a,UYd(KYd(s1d(o,false),s1d(h,false)))),nYd(new N2d(T4d))));m1d(e,wYd(s1d(o,false),DYd(s1d(c,false),s1d(n,false)),b7d));j1d(a.n.e,xYd(s1d(c,false),b7d),a.n);j1d(a.n.e,xYd(s1d(n,false),b7d),a.n);j1d(a.n.e,xYd(s1d(h,false),b7d),a.n);b=zYd(b6b(lYd(s1d(c,false),b6b(jYd(GK(yK(veb,1),MMe,5,0,[])),d)),d));f=zYd(b6b(lYd(s1d(h,false),g),i));l=AYd(s1d(o,false),h,nYd(zYd(g4b(a,qYd(EYd(s1d(c,false),new T3d(L6d,'push')),GK(yK(veb,1),MMe,5,0,[o]))))));k=BYd(g4b(a,lYd(s1d(n,false),g4b(a,new v3d(0)))),e4b(a,MYd(s1d(n,false),g4b(a,EYd(c,new T3d(L6d,DMe))))),g4b(a,LYd(n,true)),e);l1d(a.g,b);l1d(a.g,f);l1d(a.g,l);m1d(a.p,k)} +function o4b(a,b){var c,d,e;e=a.L;d=n4b(e);if(d){return d}c=u1d(rGb(a,Vd(new _d(String.fromCharCode(10)),'function $jscomp$generator$function$name() {',' var $jscomp$generator$state = 0;',GK(yK(agb,1),ZJe,1,5,[' function $jscomp$generator$impl(',' $jscomp$generator$action$arg,',' $jscomp$generator$next$arg,',' $jscomp$generator$throw$arg) {',' while (1) switch ($jscomp$generator$state) {',' case 0:',' default:',' return {value: undefined, done: true};',' }',' }',' var iterator = /** @type {!Generator} */ ({',' next: function(arg) {',' return $jscomp$generator$impl(0.0, arg, undefined);',' },',' throw: function(arg) {',' return $jscomp$generator$impl(1.0, undefined, arg);',' },'," return: function(arg) { throw Error('Not yet implemented'); },",' });',' $jscomp.initSymbolIterator();',' /** @this {!Generator} */',' iterator[Symbol.iterator] = function() { return this; };',' return iterator;','}']))).b);m1d(e.b,c);if(b){FDc(c,a);BGb(a,AFb(c));mGb(a)}return c} +function e2c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=rL(F1d(c,29),11);l=c.b;s=c.b?c.b.f:null;if(l.j==(h7d(),x5d)){m=l.b;n=(h=zL(m.k,9)?rL(m.k,9):null,!h?$1c(a,(Lhe(),Hhe)):h);p=l.b?l.b.f:null;o=p.Lm();if(m.j==x5d){i=Z1c(a,m.b);i.Wl()&&Jse((m.b?m.b.f:null).Lm(),KMe)&&i2c(a,c,m,s)}K1c(a,b,f,s);N1c(a,b,l);if(Jse(o,KMe)){if(!!n&&!!n.On()){e=n.On();if(e.Nl()){t=zL(s.k,9)?rL(s.k,9):null;N5c(a.p,s,t,'overriding prototype with non-object');return}}}v=nbe(n.Jn());if(v){if((v.sn()||v.qn()||v.rn()||qie(v.F,(Lhe(),Zge))==v||v.lm()||!!v.ho(o))&&(u=v.ho(o),!(!!u&&u.b))){d=v.fo(o);if(!d.lm()){if(!t2c(v,o)){H5c(a.p,c,(i=zL(s.k,9)?rL(s.k,9):null,!i?$1c(a,(Lhe(),Hhe)):i),d,m,o);Q1c(a,b,c,m,o,f,d)}return}}}Q1c(a,b,c,m,o,f,$1c(a,(Lhe(),Hhe)))}k=(j=zL(l.k,9)?rL(l.k,9):null,!j?$1c(a,(Lhe(),Hhe)):j);if(T1d(l)){w=t6c(Kzc(b),G1d(l));if(w){if(w.e){return}if(QBc(l).j==U6d&&Kzc(b)!=w.c){return}!!w.d&&(k=w.d)}}q=c.b?c.b.f:null;r=(g=zL(q.k,9)?rL(q.k,9):null,!g?$1c(a,(Lhe(),Hhe)):g);G5c(a.p,c,r,k,'assignment')?W1c(a,c,r):W1c(a,c,$1c(a,(Lhe(),Hhe)))} +function Xzb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;h=new yed;i=a.e.e;for(l=DEe(i,0);l.b!=l.d.c;){k=rL(SEe(l),66);c.a.containsKey(k)||k.uk().j==(h7d(),r5d)||wed(h,k)}for(n=DEe(i,0);n.b!=n.d.c;){m=rL(SEe(n),66);u:for(r=DEe(i,0);r.b!=r.d.c;){q=rL(SEe(r),66);if(Apc(a.e,m.ji())>Apc(a.e,q.ji())){continue}if(!rL(NDe(h.a,m),340)||!rL(NDe(h.a,q),340)){continue u}if(m.uk().j==(h7d(),r6d)&&q.uk().j==r6d){xed(h,m,(Lf(),fg(),dg),q)||ved(h,m,q);continue u}v:for(f=(jye(),new Gze((new qze(new nve(b.d))).b.$d()));f.b.Pd();){d=rL(f.b.Qd(),87);if(d==b.c){continue v}j=rL(d.ug(),183);o=Apc(a.e,m.ji());s=Apc(a.e,q.ji());if(Lpc(rL(j.a,161),o)&&Lpc(rL(j.a,161),s)||Lpc(rL(j.b,161),o)&&Lpc(rL(j.b,161),s)){xed(h,m,(Lf(),fg(),dg),q)||ved(h,m,q);continue u}}w:for(e=new Gze((new qze(new nve(b.d))).b.$d());e.b.Pd();){d=rL(e.b.Qd(),87);if(d==b.c){continue w}j=rL(d.ug(),183);o=Apc(a.e,m.ji());s=Apc(a.e,q.ji());p=Lpc(rL(j.b,161),o);t=Lpc(rL(j.b,161),s);g=new lAb(new oAb(m,t?null:q),new oAb(q,p?null:m));lAc(a.c,rL(d.te(),5),g);if(kAb(g,h)){continue u}}}}return h} +function lFb(){lFb=cjb;kjb();jFb=new Q_b('JSC_MODULE_DEPENDENCY_ERROR',(prb(),mrb),new _te('Bad dependency: {0} -> {1}. Modules must be listed in dependency order.'));hFb=new Q_b(wPe,mrb,new _te('required entry point "{0}" never provided'));iFb=new Q_b(wPe,mrb,new _te('unknown module "{0}" specified in entry point spec'));new Q_b('JSC_INCONSISTENT_MODULE_DEFINITIONS',mrb,new _te('Serialized module definitions are not consistent with the module definitions supplied in the command line'));new Q_b(xPe,mrb,new _te('Exceeded max number of optimization iterations: {0}'));new Q_b(xPe,mrb,new _te('Exceeded max number of code motion iterations: {0}'));kFb=xIe(zIe(),oMe);new _d(gqe);fFb=new Q_b('JSC_EMPTY_MODULE_LIST_ERROR',mrb,new _te('At least one module must be provided'));gFb=new Q_b('JSC_EMPTY_ROOT_MODULE_ERROR',mrb,new _te("Root module ''{0}'' must contain at least one source code input"));eFb=new Q_b('JSC_DUPLICATE_INPUT',mrb,new _te('Duplicate input: {0}'));dFb=new Q_b('JSC_DUPLICATE_EXTERN_INPUT',mrb,new _te('Duplicate extern input: {0}'))} +function Cyd(a){Jxd();switch(a.g){case 74:return h7d(),D4d;case 75:return h7d(),E4d;case 73:return h7d(),B4d;case 59:return h7d(),g5d;case 60:return h7d(),d6d;case 54:return h7d(),V5d;case 56:return h7d(),S5d;case 55:return h7d(),z5d;case 57:return h7d(),t5d;case 70:return h7d(),U5d;case 71:return h7d(),E6d;case 72:return h7d(),a7d;case 63:return h7d(),f4d;case 64:return h7d(),O6d;case 65:return h7d(),$5d;case 94:return h7d(),_4d;case 67:return h7d(),Y5d;case 66:return h7d(),i5d;case 61:return h7d(),H6d;case 62:return h7d(),I6d;case 16:return h7d(),H5d;case 17:return h7d(),K5d;case 53:return h7d(),Q4d;case 82:return h7d(),m4d;case 92:return h7d(),p4d;case 93:return h7d(),q4d;case 91:return h7d(),o4d;case 88:return h7d(),t4d;case 89:return h7d(),w4d;case 90:return h7d(),y4d;case 83:return h7d(),n4d;case 84:return h7d(),x4d;case 85:return h7d(),v4d;case 86:return h7d(),s4d;case 95:return h7d(),r4d;case 87:return h7d(),u4d;case 79:return h7d(),p6d;case 78:return h7d(),g4d;default:throw Aib(new Ire(!a?kKe:a.a==null?(HGd(),rL(Fs(iGd,a),63)).b:a.a));}} +function Dxc(a,b,c,d){var e,f,g,h,i,j,k,l;l=b.j;e=b.b;i=b.b?b.b.f:null;if(512==d.kl()||8==d.kl()||XLe==d.kl()||16==d.kl()){if(e.j==(h7d(),Y6d)){return Mxc(a,e,i,l,c,d)}else if(i.j==Y6d){return Mxc(a,i,e,l,c,d)}else if(qyc(e)){return Sxc(a,e,i.j==L6d?i.Lm():'',c,d)}else if(qyc(i)){return Sxc(a,i,e.j==L6d?e.Lm():'',c,d)}}f=cxc(a,e,c,a.r,a.r);j=axc(a,i,f.a);h=j.a;g=f.b;k=j.b;if(l==(h7d(),g5d)&&(512==d.kl()||8==d.kl())||l==d6d&&(XLe==d.kl()||16==d.kl())){if(g.kl()!=0&&(g.kl()|288)==288){j=cxc(a,i,h,a.r,a.g)}else{if(k.kl()!=0&&(k.kl()|288)==288){f=cxc(a,e,h,a.r,a.g);j=axc(a,i,f.a)}else if(!Rld(a.f,g,new bvd((rrd(),rrd(),qrd)))&&!Rld(a.q,g,new bvd((null,qrd)))){k=amd(k,a.g);j=cxc(a,i,h,a.r,k)}else if(!Rld(a.f,k,new bvd((null,qrd)))&&!Rld(a.q,k,new bvd((null,qrd)))){g=amd(g,a.g);f=cxc(a,e,h,a.r,g);j=axc(a,i,f.a)}}}else if(l==g5d&&(XLe==d.kl()||16==d.kl())||l==d6d&&(512==d.kl()||8==d.kl())){if(g.kl()!=0&&(g.kl()|288)==288){k=amd(k,a.g);j=cxc(a,i,h,a.r,k)}else{if(k.kl()!=0&&(k.kl()|288)==288){g=amd(g,a.g);f=cxc(a,e,h,a.r,g);j=axc(a,i,f.a)}}}j.b=a.b;return j} +function c4b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;t=a.u;if(a.a){u=c.b.k.Yk().tm();t=rL(u.Al().getAtIndex(0),60)}o=N3b(a,(Lhe(),Wge),t);n=a.a?o.tm().ul(ISe):null;k=N3b(a,Xge,t);j=a.a?k.tm().ul(MSe):null;l=a.a?k.tm().ul(JSe):null;g=(HAc(),nBc(c,GAc));m=a6b(a.c,d2d(c));if(a.a){p=Hzc(b)._j(VQe).tk().k;s=p.tm().ul(_Re);B2d(m.b,s);B2d(m.b.b,p)}i=wYd(b6b((Ef(Ose(VSe,hte(46))==-1,xMe,VSe),new T3d((h7d(),_5d),VSe)),o),(X5b(),!!o&&(m.k=o),m),b7d);h=xYd(b6b((Ef(Ose(WSe,hte(46))==-1,xMe,WSe),new T3d(_5d,WSe)),k),b7d);e=b6b(lYd(b6b((Ef(Ose(WSe,hte(46))==-1,xMe,WSe),new T3d(_5d,WSe)),k),b6b(qYd(b6b(EYd(b6b((Ef(Ose(VSe,hte(46))==-1,xMe,VSe),new T3d(_5d,VSe)),o),h4b(a,new T3d(L6d,ISe))),n),GK(yK(veb,1),MMe,5,0,[k4b(a,(Ef(Ose(XSe,hte(46))==-1,xMe,XSe),new T3d(_5d,XSe)))])),k)),k);r=e4b(a,UYd(b6b(EYd(e,h4b(a,new T3d(L6d,MSe))),j)));f=b6b(EYd(b6b((Ef(Ose(WSe,hte(46))==-1,xMe,WSe),new T3d(_5d,WSe)),k),h4b(a,new T3d(L6d,JSe))),l);v=zYd(k4b(a,kZd(s1d(f,false))));q=jZd(r,nYd(v));k1d(g.e,i,g);k1d(g.e,h,g);k1d(g.e,q,g);d.j==m5d?u1d(d):g2d(d,c,f);d4b(a,b,v,v.e);Yzc(b)} +function YPb(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p;m=c.e;h=(HAc(),!!m&&(m.j==(h7d(),b7d)||m.j==T5d||m.j==S4d));if($Bc(c)||c.j==(h7d(),I5d)||c.j==(h7d(),V4d)||h){i=h?c:c.b;n=PBc(i);if(n){YPb(a,b,n,d,e,f);n=PBc(i)}h&&!!i.d&&YPb(a,b,i.d,d,e,f);if(h&&(!n||ZBc(m.e))){return}if(i.j!=(h7d(),_5d)){return}j=i.Lm();o=Hzc(b);zf(o.fk()||o.ck());if(!f.containsKey(j)){return}p=rL(f.get(j),66);if(PCe(a.c.b,p)){return}if(!!n&&n.j==_5d&&Jse(n.Lm(),p.i)&&c.j==m4d){a2d(c,n);g2d(c.e,c,n);FGb(a.a,n);return}if(Lpc(rL(e.b,161),Apc(a.c,p.i))){return}if(Lpc(rL(e.a,161),Apc(a.c,p.i))&&WPb(a,c,d,p.i)){return}if(c.j==m4d){a2d(c,n);g2d(c.e,c,n)}else if($Bc(c)){a2d(c,n);a2d(c,i);l=new R2d(KBc(c),i,n);g2d(m,c,l)}else if(c.j==I5d||c.j==V4d){if(m.j==m5d){g2d(m,c,iZd(H2d(new v3d(0),c)))}else if(c.j==Q4d&&c!=(m.b?m.b.f:null)){a2d(m,c)}else if(m.j==o5d&&jBc(m)!=c){g2d(m,c,new N2d(c5d))}else{return}}else if(h){a2d(i,n);j1d(m.e,(Af(NYd(n),n),new P2d(m5d,n)),m);H2d(n.e,n)}else{throw Aib(new Ire('Unknown statement'))}FGb(a.a,m);return}else{for(g=c.b;g;){k=g.d;oMb(g)||YPb(a,b,g,d,e,f);g=k}return}} +function jNc(b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;r=c.b;g=r.d;if(rNc(b,r,g)){k=new JCe;for(q=g.b;q;q=q.d){v=q.b;if(q.j!=(h7d(),M6d)||!v||v.j!=L6d){DGb(b.a,Szc(c,QMc,GK(yK(fgb,1),pKe,2,6,[])));return}iue(k,q.Lm(),v.Lm())}u='BY_PART';!!g.d&&(u=g.d.Lm());try{t=(dPb(),rL(hc((hPb(),gPb),u),346))}catch(a){a=zib(a);if(zL(a,54)){DGb(b.a,Szc(c,MMc,GK(yK(fgb,1),pKe,2,6,[u])));return}else throw Aib(a)}if(t==(dPb(),bPb)){n=new idd;for(p=(s=(new dve(k)).a.ke().$d(),new jve(s));p.a.Pd();){o=(m=rL(p.a.Qd(),12),wL(m.se()));o.indexOf('-')!=-1&&(n.a[n.a.length]=o,true)}n.a.length==0||DGb(b.a,Szc(c,IMc,GK(yK(fgb,1),pKe,2,6,[pe(n)])))}else if(t==cPb){n=new idd;for(i=new Gue((new yue(k)).a);i.b;){h=Fue(i);if(wL(h.se()).length>10){continue}for(f=new Gue((new yue(k)).a);f.b;){e=Fue(f);j=wL(fue(k,wL(e.se())+'-'+wL(h.se())));j!=null&&!Jse(j,wL(e.te())+'-'+wL(h.te()))&&Vcd(n,'map('+wL(e.se())+'-'+wL(h.se())+') != map('+wL(e.se())+')-map('+wL(h.se())+')')}}n.a.length==0||DGb(b.a,Szc(c,IMc,GK(yK(fgb,1),pKe,2,6,[pe(n)])))}l=new yNc(k,t);JGb(b.a,l);FGb(b.a,d);tf(d.e);a2d(d.e,d)}} +function XDc(a){HAc();switch(a.g){case 46:return 0;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 59:case 57:case 58:case 47:return 1;case 102:return 2;case 60:return 3;case 61:return 4;case 62:return 5;case 1:return 6;case 2:return 7;case 3:return 8;case 4:case 5:case 36:case 37:return 9;case 6:case 8:case 7:case 9:case 41:case 40:return 10;case 10:case 11:case 12:return 11;case 14:case 13:return 12;case 15:case 17:case 16:return 13;case 18:return 14;case 103:case 23:case 24:case 25:case 79:case 19:case 20:case 21:case 22:return 15;case 63:case 64:return 16;case 28:case 27:case 26:case 42:case 93:case 118:case 95:case 80:case 34:case 65:case 96:case 148:case 29:case 32:case 30:case 43:case 94:case 38:case 112:case 113:case 31:case 91:case 156:case 157:case 158:case 33:case 99:case 35:case 115:case 116:case 125:return 17;case 123:return 18;case 134:case 124:return 19;case 120:case 122:case 121:case 126:case 132:case 127:case 130:case 133:case 135:return 20;case 92:return 21;default:throw Aib(new Ire('Unknown precedence for '+a));}} +function Y9c(){Y9c=cjb;U9c=new Q_b('JSC_UNDEFINED_VARIABLE',(prb(),mrb),new _te('variable {0} is undeclared'));X9c=new Q_b('JSC_VIOLATED_MODULE_DEPENDENCY',mrb,new _te('module {0} cannot reference {2}, defined in module {1}, since {1} loads after {0}'));Q9c=new Q_b('JSC_MISSING_MODULE_DEPENDENCY',orb,new _te('missing module dependency; module {0} should depend on module {1} because it references {2}'));S9c=new Q_b('JSC_STRICT_MODULE_DEPENDENCY',nrb,new _te(fNe));R9c=new Q_b('JSC_NAME_REFERENCE_IN_EXTERNS',orb,new _te('accessing name {0} in externs has no effect. Perhaps you forgot to add a var keyword?'));T9c=new Q_b('JSC_UNDEFINED_EXTERN_VAR_ERROR',orb,new _te('name {0} is not defined in the externs.'));W9c=new Q_b('JSC_VAR_MULTIPLY_DECLARED_ERROR',mrb,new _te('Variable {0} declared more than once. First occurrence: {1}'));V9c=new Q_b('JSC_VAR_ARGUMENTS_SHADOWED_ERROR',mrb,new _te('Shadowing "arguments" is not allowed'));P9c=new Q_b('JSC_LET_CONST_CLASS_MULTIPLY_DECLARED_ERROR',mrb,new _te('Duplicate let / const / class declaration in the same scope is not allowed.'))} +function Joc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;kf(b.j==(h7d(),m6d));l=new idd;d=b.b;h=b.k;while(d){if(B1d(d,73)!=0||B1d(d,74)!=0){X5b();DGb(a.c,Rnc(d,W5b,GK(yK(fgb,1),pKe,2,6,['computed getter/setter in an object literal'])));return}else if(d.j==y5d||d.j==G6d){d=d.d}else{f=d.d;a2d(b,d);l.add(d);d=f}}g='$jscomp$compprop'+(''+(new yHb(a.c)).a.hb++);l=zL(l,152)?nr(rL(l,152)):zL(l,206)?rL(l,206).a:zL(l,110)?new oA(l):new dA(l);m=b6b((Ef(Ose(g,hte(46))==-1,xMe,g),new T3d(_5d,g)),h);for(j=l.$d();j.Pd();){i=rL(j.Qd(),5);if(i.j==R4d){k=d2d(i);r=d2d(i);s=r.k;m=b6b(tYd(b6b(lYd(Noc(a,DYd(b6b((Ef(Ose(g,hte(46))==-1,xMe,g),new T3d(_5d,g)),h),k)),r),s),m),h)}else{if(!i.b){e=J2d(b6b(RYd(i.Lm()),i.k),i);l1d(i,e)}q=d2d(i);s=q.k;A2d(i,L6d);i.k=null;p=i.Nm()?w5d:x5d;c=b6b(new R2d(p,b6b((Ef(Ose(g,hte(46))==-1,xMe,g),new T3d(_5d,g)),h),i),s);m=b6b(tYd(b6b(lYd(c,q),s),m),h)}}o=b;while(HAc(),!(o.j!=Z5d&&nDc(o.e))){o=o.e}K2d(m,b);g2d(b.e,b,m);n=_5b(a.a,a.d,(Lhe(),Kge));t=wYd(b6b((Ef(Ose(g,hte(46))==-1,xMe,g),new T3d(_5d,g)),h),(X5b(),!!n&&(b.k=n),b),b7d);K2d(t,o);k1d(o.e,t,o);FGb(a.c,t)} +function dId(a){var b,c,d,e;d=eKd(a.g,0).b.b;aHd(a,(XMd(),CLd));aHd(a,bMd);if(EJd(a)){e=kJd(a,0);if(oJd(a,JLd)){e.b.size()>1&&HJd(a,'for-in statement may not have more than one variable declaration',GK(yK(agb,1),ZJe,1,5,[]));b=rL(e.b.getAtIndex(0),276);!!b.b&&(a.b.a?HJd(a,'for-in statement may not have initializer',GK(yK(agb,1),ZJe,1,5,[])):YCd(a.c,b.o.b,'for-in statement should not have initializer',GK(yK(agb,1),ZJe,1,5,[])));return bId(a,d,e)}else if(nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,'of')){e.b.size()>1&&HJd(a,'for-of statement may not have more than one variable declaration',GK(yK(agb,1),ZJe,1,5,[]));b=rL(e.b.getAtIndex(0),276);!!b.b&&HJd(a,'for-of statement may not have initializer',GK(yK(agb,1),ZJe,1,5,[]));return cId(a,d,e)}else{$Gd(a,e);return eId(a,d,e)}}if(oJd(a,uMd)){return eId(a,d,null)}c=oHd(a,0);if(oJd(a,JLd)||oJd(a,uLd)||nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,'of')){c=IJd(a,c);cNd(c)||HJd(a,qYe,GK(yK(agb,1),ZJe,1,5,[]))}if(oJd(a,JLd)||nJd(a,0,FLd)&&Jse(rL(eKd(a.g,0),129).a,'of')){if(c.p!=(GQd(),$Od)&&c.p!=gPd){return oJd(a,JLd)?bId(a,d,c):cId(a,d,c)}}return eId(a,d,c)} +function jLc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;n=(HAc(),zf(a.j==(h7d(),I4d)||a.j==f6d),FBc(a.b.d,0));if(!n||n.j!=m6d){DGb(b,Rnc(a,(XLc(),LLc),GK(yK(fgb,1),pKe,2,6,[])));return null}w=y1d(a)-1;if(w!=1){DGb(b,Rnc(a,(XLc(),VLc),GK(yK(fgb,1),pKe,2,6,[])));return null}o=qBc(n,'is');if(!o){DGb(b,Rnc(a,(XLc(),SLc),GK(yK(fgb,1),pKe,2,6,[])));return null}if(VCc(!a.e?null:a.e.e)){A=RYd(a.e.Lm())}else if(a.e.j==m4d){A=s1d(a.e.b,false)}else{q=T1d(o)?Vse(G1d(o),46,36):o.Lm();p=qc((nc(),jc),lc,q);p+='Element';A=(Ef(Ose(p,hte(46))==-1,xMe,p),new T3d(_5d,p))}t=eBc(A);!t?null:rL(F1d(t,29),11);m=null;l=qBc(n,'factoryImpl');if(!l){l=new S2d(r5d,(Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),new N2d(r6d),(k=new N2d(F4d),k));EGb(b,l);I2d(l,a)}else{m=(s=eBc(l),!s?null:rL(F1d(s,29),11))}e=qBc(n,UOe);u=!e?null:e.Lm();h=qBc(n,'behaviors');i=new eLc(b,c);j=dLc(i,h);d=new LEe;for(g=j.$d();g.Pd();){f=rL(g.Qd(),339);lLc(d,f.e)}lLc(d,$Lc(n,0,b));v=null;if(!j.isEmpty()){v=rL(j.getAtIndex(0),339).a;for(r=1;ra.g){return a}if(!!b.On()&&a.d!=-1){l=rL(Ycd(a.a,a.d),9).On();n=qee(b.On(),l,true);edd(a.a,a.d,n);a.j=null;return a}f=0;j=new lxe(a.a);while(j.al){hzc(a.Q,Rnc(b,Kwc,GK(yK(fgb,1),pKe,2,6,[Xyc(b.b),''+m,'0',pUe+l])));return pxc(a,wBc(b),c)}p=d.c;if(!f.n.a.isEmpty()){r=Wxc(a,b,p,d.a,f,i,true);f=ekd(f,r)}g=new cld(a.w);if(p){q=f.g?f.g:f.d;(!q||!!f.d)&&(q=Tnd(a.f,a.n));n=cxc(a,p,i,q,q);i=n.a;Rld(n.b,q,new bvd((null,qrd)))||hzc(a.Q,Rnc(b,pwc,GK(yK(fgb,1),pKe,2,6,[Vyc(q,n.b)])))}o=!d.a?(lr(),lr(),kr):new F3d(d.a);i=rxc(a,b,o,f,new idd,i);for(k=m;k=0||gKd(a,'Binary Integer Literal must contain at least one digit',GK(yK(agb,1),ZJe,1,5,[]));pKd(a);return new XGd((XMd(),$Ld),bte(a.e.a,b,a.d),SGd(a.e.b,b,a.d));case 111:case 79:_Jd(a);RKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)>=0||gKd(a,'Octal Integer Literal must contain at least one digit',GK(yK(agb,1),ZJe,1,5,[]));wKd(a);(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==56||($Jd(a,a.d)?Ese(a.e.a,a.d):0)==57)&&gKd(a,mXe,GK(yK(agb,1),ZJe,1,5,[]));return new XGd((XMd(),$Ld),bte(a.e.a,b,a.d),SGd(a.e.b,b,a.d));case 120:case 88:_Jd(a);Nqe($Jd(a,a.d)?Ese(a.e.a,a.d):0,16)>=0||gKd(a,'Hex Integer Literal must contain at least one digit',GK(yK(agb,1),ZJe,1,5,[]));uKd(a);return new XGd((XMd(),$Ld),bte(a.e.a,b,a.d),SGd(a.e.b,b,a.d));case 101:case 69:return iKd(a,b);case 46:return jKd(a,b);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:sKd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==46){_Jd(a);sKd(a)}return new XGd((XMd(),$Ld),bte(a.e.a,b,a.d),SGd(a.e.b,b,a.d));default:return new XGd((XMd(),$Ld),bte(a.e.a,b,a.d),SGd(a.e.b,b,a.d));}} +function v7c(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;j=null;if(!!b&&T1d(b)&&!a.g.b){A=t6c(a.g,G1d(b));if(!!A&&!!A.d&&!!A.d.On()){f=A.d.On();if((f.Nl()||f.i==(Bfe(),zfe))&&!Z1d(b,aOe,aOe.length)){j=f;c!=null&&!a.g.b&&kie(a.k.i,c,(Ef(f.Nl()||f.i==(Bfe(),zfe),hOe,f),S7d(f.p)))}}}if(!j){h=!b?e:b;k=!!b&&b.j==(h7d(),r5d);i=k?b:null;r=k?b.b.d:null;if(!!d&&(d.a&hNe)==mNe){w=e1d((hNe&d.a)==mNe?d.i:null,a.g,a.k.i);w=w.Jn();if(w.On()){j=w.On();j.A=d}}if(!j){o=hBc(e);n=gBc(o);s=null;p=null;if(n!=null){q=t6c(a.g,n);!!q&&(p=nbe(q.d));c!=null&&(s=ate(c,n.length+1))}t=I7c(p);u=null;!!t&&!!(K7d(t.p)?rL(sie(t.F,(Lhe(),Hhe)),24):t.p)&&(u=(K7d(t.p)?rL(sie(t.F,(Lhe(),Hhe)),24):t.p).cn());m=null;!!p&&s!=null&&(m=D7c(a,p,s,u));g=Nbc(Rbc(Mbc(Zbc(new $bc(c,a.k.b,h,a.g),j7c(a.k,i)),m,r),d,t),d);if(!d||(d.a&hNe)!=mKe){if(!!b&&b.j==(h7d(),r5d)&&!!b.b){l=rL(F1d(b.b,29),11);Qbc(g,l,true)}}else{Qbc(g,d,false)}v=false;if(!!p&&!!p.co()&&gee(p.co())){Tbc(g,d,Xde(p.co()));v=true}else if(!!o&&o.j==(h7d(),U6d)){Tbc(g,d,s6c(a.g));v=true}v||Sbc(g,d);j=Ibc(Pbc(g,r,d))}}!!d&&((d.a&512)!=0||(d.a&iNe)!=0)&&(d.a&iNe)!=0&&(zf(j.i==(Bfe(),zfe)),j.g=true);return j} +function jRb(a,b){iRb(b,a.F,a.p,'The ChromePass must run before after JsDoc and Es6 module checking.');iRb(b,a.P,a.ec,"Must rewrite goog.module before processing @define's, so that @defines in modules work.");iRb(b,a.M,a.dc,'The Polymer pass must run after goog.provide processing.');iRb(b,a.F,a.dc,'The Polymer pass must run after ChromePass processing.');iRb(b,a.dc,a.Bc,'The Polymer pass must run before suspiciousCode processing.');iRb(b,a._,(R_c(),C_c),'The Dart super accessors pass must run before ES6->ES3 super lowering.');Zcd(b,a.K,0)!=-1&&Af(Zcd(b,a.B,0)!=-1,'goog.scope processing requires variable checking');iRb(b,a.B,a.K,'Variable checking must happen before goog.scope processing.');iRb(b,C_c,a.hc,'Super-call method removal must run after Es6 super rewriting, because Es6 super calls are matched on their post-processed form.');iRb(b,a.M,a.hc,'Super-call method removal must run after Es6 super rewriting, because Closure base calls are expected to be in post-processed form.');iRb(b,a.J,a.hc,'Super-call method removal must run after closure code removal, because removing assertions may make more super calls eligible to be stripped.')} +function cSc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;n=b.j;p=null;switch(n.g){case 65:HAc();b.j==(h7d(),r5d)&&qCc(b.e)&&b.j==r5d&&hDc(b.b)&&(p=d._j(b.b.Lm()));!!p&&TRc(a,p)?dk(a.i,p,new wSc(a,b,d)):bSc(a,b,d);return;case 47:i=jSc(b);if(i){p=d._j(i.e.Lm());if(p){dk(a.c,p,i);hue(a.b,i.e,i);if(TRc(a,p)&&!i.c){dk(a.i,p,new wSc(a,b,d));return}}}break;case 28:j=null;m=a.f.dh(b);if(m){j=d._j(m.a)}else{f=a.f.mh(b);f!=null&&(j=d._j(f))}if(!!j&&j.gk()&&!PCe(a.o,j)){dk(a.e,j,c);dk(a.i,j,new wSc(a,b,d));return}break;case 82:if(WAc(b)){e=n5b(a.q,b,d);RRc(a,e);d=e}break;case 96:HAc();b.j==(h7d(),N4d)&&qCc(b.e)&&b.j==N4d&&hDc(b.b)&&(p=d._j(b.b.Lm()));!!p&&TRc(a,p)&&dk(a.i,p,new wSc(a,b,d));return;case 93:if(b.e.j==(h7d(),$4d)){if(YCc(b)){break}else{return}}break;case 94:if(b.e.j==(h7d(),$4d)){if(ZCc(b)){break}else{return}}break;case 29:p=d._j(b.Lm());{HAc();if(!!c&&(c.j==(h7d(),b7d)||c.j==T5d||c.j==S4d)){o=b.b;if(!!o&&!!p&&TRc(a,p)&&!OAc(o,false,a.g)){dk(a.i,p,new wSc(a,b,d));return}}else{if(!!p&&Jse(xRe,b.Lm())&&p.Hd(d.Uj())){g=p.vk();h=g.$j().b.d;for(k=h.b;k;k=k.d){l=g.Yj(k.Lm());tf(l);URc(a,l)}}!!p&&(TRc(a,p)?bue(a.b,b)||URc(a,p):URc(a,p))}}}aSc(a,b,d)} +function j7d(a){h7d();switch(a.g){case 137:case 42:case 143:case 82:case 81:case 74:case 28:case 147:case 88:case 75:case 89:case 142:case 140:case 144:case 72:case 66:case 145:case 146:case 23:case 43:case 45:case 138:case 141:case 38:case 0:case 85:case 139:case 91:case 67:case 116:case 44:case 76:case 102:return -1;case 80:case 34:case 107:case 90:case 156:case 29:case 32:case 30:case 31:case 33:case 35:return 0;case 20:case 158:case 92:case 64:case 69:case 24:case 84:case 86:case 63:case 157:case 98:case 130:case 22:case 19:case 21:case 112:case 87:case 113:case 117:case 39:case 25:case 154:case 79:return 1;case 13:case 62:case 47:case 54:case 50:case 48:case 49:case 57:case 51:case 58:case 56:case 59:case 52:case 55:case 53:case 3:case 1:case 2:case 68:case 78:case 46:case 114:case 118:case 16:case 71:case 151:case 4:case 18:case 9:case 27:case 26:case 8:case 40:case 41:case 83:case 7:case 10:case 6:case 17:case 15:case 159:case 5:case 61:case 11:case 36:case 37:case 14:case 115:case 12:case 70:case 77:return 2;case 96:case 73:case 101:case 65:case 60:case 104:case 148:return 3;default:throw Aib(new Ire('No arity defined for '+a));}} +function _Ac(a,b){HAc();var c,d,e,f;Af(a.j==(h7d(),I4d)||a.j==R6d,a);if((B1d(a,42)&15)==15){return false}if((B1d(a,42)&15&11)==11&&IAc(a)){return false}c=a.b;if(c.j==_5d){e=c.Lm();if(vAc.contains(e)){return false}}else if(c.j==x5d){if(!!a.b&&!a.b.d&&CAc.contains((c.b?c.b.f:null).Lm())){return false}if((B1d(a,42)&15&13)==13&&$Ac(c.b,(Lf(),fg(),bg))){return false}if(c.b.j==_5d&&T1d(c)&&Jse(c.b.Lm(),bTe)){switch((c.b?c.b.f:null).Lm()){case 'abs':case 'acos':case 'acosh':case 'asin':case 'asinh':case 'atan':case 'atanh':case 'atan2':case 'cbrt':case 'ceil':case 'cos':case 'cosh':case 'exp':case 'expm1':case 'floor':case 'hypot':case 'log':case 'log10':case 'log1p':case 'log2':case 'max':case 'min':case 'pow':case 'round':case 'sign':case 'sin':case 'sinh':case 'sqrt':case 'tan':case 'tanh':case 'trunc':return false;case 'random':return !(!!a.b&&!a.b.d);}}if(!!b&&!b.G){if(c.b.j==z6d&&DAc.contains((c.b?c.b.f:null).Lm())){return false}else if(sDc(c.b,b)){d=(c.b?c.b.f:null).Lm();f=c.d;if(f){if(f.j==L6d){if(EAc.contains(d)){return false}}else if(f.j==z6d){if(Jse('replace',d)){return f.d.j!=L6d}else if(EAc.contains(d)){return false}}}}}}return true} +function Vyc(a,b){Nwc();var c,d,e;e=kod(b,a);d=gvd(GK(yK(Q9,1),ZJe,20,0,[a,b]));if(!e){return wUe+ild(a,new zte,d).a+_Je+xUe+ild(b,new zte,d).a+_Je}c=vte(vte(vte(vte(new Cte(wUe),ild(a,new zte,d).a),yUe),ild(b,new zte,d).a),'\nMore details:\n');e.d==0?vte(vte(vte(vte(vte((c.a+='Incompatible types for property ',c),wL(tf(e.e))),'.\nExpected : '),imd(rL(tf(e.b),20),d)),yUe),imd(rL(tf(e.c),20),d)):e.d==1?vte((c.a+='The found type is missing property ',c),wL(tf(e.e))):e.d==2?vte(vte((c.a+='In found type, property ',c),wL(tf(e.e))),' is optional but should be required.'):e.d==3?vte(vte(vte(vte(qte((c.a+='The expected and found types are functions which have incompatible types for argument ',c),(zf(e.a>=0),e.a+1)),'.\nExpected a supertype of : '),imd(rL(tf(e.b),20),d)),'\nbut found : '),imd(rL(tf(e.c),20),d)):e.d==4?vte(vte(vte((c.a+='The expected and found types are functions which have incompatible return types.\nExpected a subtype of : ',c),imd(rL(tf(e.b),20),d)),'\nbut found : '),imd(rL(tf(e.c),20),d)):e.d==5&&vte((c.a+='The found type is a union that includes an unexpected type: ',c),imd(rL(tf(e.c),20),d));return c.a} +function R2c(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;if(b.Rn()){s3c(d,b.Rn(),c)}else if(b.Tn()){G=b.Tn();for(g=qoe(G).$d();g.Pd();){f=rL(g.Qd(),9);R2c(a,f,c,d,e)}}else if(b.On()){A=b.On();h=c.Jn().Ym().On();if(!!h&&h.Bn(b)){R2c(a,K7d(A.p)?rL(sie(A.F,(Lhe(),Hhe)),24):A.p,K7d(h.p)?rL(sie(h.F,(Lhe(),Hhe)),24):h.p,d,e);R2c(a,A.c.b,h.c.b,d,e);P2c(a,(t=A.c.a,t?!t.b?(jye(),jye(),iye):new F3d(t.b):(jye(),jye(),iye)),(s=h.c.a,s?!s.b?(jye(),jye(),iye):new F3d(s.b):(jye(),jye(),iye)),d,e)}}else if(!!b.Qn()&&!b.tn()){if(e.add(b)){B=zL(b,24)?rL(b,24):null;i=S7d(c.Jn());if(!!i&&!i.lm()&&!(i.sn()||i.qn()||i.rn()||rL(sie(i.F,(Lhe(),Zge)),68)==i)){w=abe(B);for(v=(l=(new ewe(w.a)).a.ke().b.Ho(),new kwe(l));v.a.Pd();){u=(k=rL(v.a.Qd(),12),wL(k.se()));!!ome(B.eo(),u)&&(i.sn()||i.qn()||i.rn()||qie(i.F,(Lhe(),Zge))==i||i.lm()||!!i.ho(u))&&R2c(a,B.fo(u),i.fo(u),d,e)}}e.remove(b)}}else if(b.Sn()){F=b.Sn();q=F.b.size();if(q>0){D=F.i;i=c.Jn().Ym();if(i.Bn(D)){C=b.cn();r=C.d;j=i.cn();for(n=r.size()-q;n0){if(a.n){a.j=new idd;d=new RCe;for(k=PZd(b).$d();k.Pd();){j=rL(k.Qd(),56);g=e1d(j,a.u,a.A);if(!!g&&g.Kn(new ncc(a))){c=g;!!g.Sn()&&(c=g.Sn().i);i=d.a.put(c,d);i==null||Ybc(a,Abc,GK(yK(fgb,1),pKe,2,6,[c.Um(new zte,false).a]));Vcd(a.j,rL(g,24))}}}else a.o?Ybc(a,(E1c(),Z0c),GK(yK(fgb,1),pKe,2,6,[a.i.length==0?sPe:a.i])):Ybc(a,tbc,GK(yK(fgb,1),pKe,2,6,[pTe,a.i.length==0?sPe:a.i]))}if(a.o){a.g=new idd;for(k=LZd(b).$d();k.Pd();){j=rL(k.Qd(),56);h=e1d(j,a.u,a.A);!!h&&h.Kn(new jcc(a))&&Vcd(a.g,rL(h,24))}}}return a} +function byc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;j=b.v;kf((h=rL(F1d(j,51),28),!(!!h&&h.lk())));c=new cld(a.w);f=gyc(a,a.v.b);g=dyc(a);d=b.c;A=d.f.size();t=d.f.size()+d.d.size();!d.j.a.isEmpty()&&$kd(c,d.j);n=new kdd(b.g);for(p=A-1;p>=0;p--){m=(s=d.f.size(),p2){DGb(a.a,Rnc(c,Fxb,GK(yK(fgb,1),pKe,2,6,[])));return null}g=Rxb(i,IMe);if(!!e&&((e.a&512)!=0||(e.a&iNe)!=0)){if(g){DGb(a.a,Rnc(i,wxb,GK(yK(fgb,1),pKe,2,6,[])));return null}}else if(!g){DGb(a.a,Rnc(i,uxb,GK(yK(fgb,1),pKe,2,6,[])));return null}else{g.j==r5d||DGb(a.a,Rnc(g,vxb,GK(yK(fgb,1),pKe,2,6,[])))}if(!g){g=CYd(H2d((Ef(Ose('',hte(46))==-1,xMe,''),new T3d(_5d,'')),c),H2d(new N2d(r6d),c),H2d((d=new N2d(F4d),d),c));H2d(g,c);EGb(a.a,g)}j=(k=eBc(g),!k?null:rL(F1d(k,29),11));f=null;n=null;o=Rxb(i,'statics');if(o){if(o.j==m6d){if(!Oxb(a,o,o.e)){return null}n=o}else if(o.j==r5d){f=o}else{DGb(a.a,Rnc(o,Cxb,GK(yK(fgb,1),pKe,2,6,[])));return null}}!n&&(n=VYd(GK(yK(veb,1),MMe,5,0,[])));Vxb(g.e);Vxb(n.e);!!f&&Vxb(f.e);h=new _xb(b,e,(!!p&&!!p.e&&u1d(p),p),new ayb(j,null,(!!g&&!!g.e&&u1d(g),g)),Wxb((!!n&&!!n.e&&u1d(n),n)),Wxb(i),(!!f&&!!f.e&&u1d(f),f));return h} +function gSd(a,b){var c,d,e,f,g,h,i,j,k,l,m;c=false;e=false;f=true;g=false;i=false;j=false;l=false;h=true;k=true;d=true;switch(a.b){case 99:case 67:case 116:case 84:h=false;break;case 103:case 71:c=e=g=j=l=true;break;case 102:c=e=g=i=j=true;l=true;break;case 101:case 69:c=g=i=j=l=true;break;case 97:case 65:c=i=j=l=true;break;case 100:c=e=g=j=l=true;h=false;break;case 111:case 120:case 88:i=l=true;b==null&&(c=g=j=true);h=false;break;case 110:f=false;d=h=k=false;break;case 37:d=false;h=false;break;case 115:case 83:case 98:case 66:case 104:case 72:break;default:throw Aib(new DJ('unknownFormatConversionException'));}m=null;!c&&a.d?(m='+'):!e&&a.e?(m=','):!f&&a.f?(m='-'):!g&&a.g?(m='('):!i&&a.i?(m='#'):!j&&a.j?(m=' '):!l&&a.k&&(m='0');if(m!=null){if(a.b==110){throw Aib(new DJ('IllegalFormatFlagsException:'+m))}else{throw Aib(new DJ('FormatFlagsConversionMismatchException:'+m+','+xL(a.b)))}}if((a.f||a.k)&&a.p==-1){throw Aib(new ERd('-'+xL(a.b)))}if(!d&&a.a!=-1){throw Aib(new ARd(a.o?a.o.a:''))}if(!h&&a.n!=-1){throw Aib(new BRd(a.n))}if(!k&&a.p!=-1){throw Aib(new CRd(a.p))}if(a.d&&a.j){throw Aib(new ARd("the '+' and ' ' flags are incompatible"))}if(a.f&&a.k){throw Aib(new ARd("the '-' and '0' flags are incompatible"))}} +function VXc(){VXc=cjb;PXc=new Q_b('JSC_GOOG_SCOPE_MUST_BE_ALONE',(prb(),mrb),new _te('The call to goog.scope must be alone in a single statement.'));QXc=new Q_b('JSC_GOOG_SCOPE_MUST_BE_IN_GLOBAL_SCOPE',mrb,new _te('The call to goog.scope must be in the global scope.'));NXc=new Q_b('JSC_GOOG_SCOPE_HAS_BAD_PARAMETERS',mrb,new _te('The call to goog.scope must take only a single parameter. It must be an anonymous function that itself takes no parameters.'));SXc=new Q_b('JSC_GOOG_SCOPE_REFERENCES_THIS',mrb,new _te("The body of a goog.scope function cannot reference 'this'."));TXc=new Q_b('JSC_GOOG_SCOPE_USES_RETURN',mrb,new _te("The body of a goog.scope function cannot use 'return'."));UXc=new Q_b('JSC_GOOG_SCOPE_USES_THROW',mrb,new _te("The body of a goog.scope function cannot use 'throw'."));MXc=new Q_b('JSC_GOOG_SCOPE_ALIAS_REDEFINED',mrb,new _te('The alias {0} is assigned a value more than once.'));LXc=new Q_b('JSC_GOOG_SCOPE_ALIAS_CYCLE',mrb,new _te('The aliases {0} has a cycle.'));RXc=new Q_b('JSC_GOOG_SCOPE_NON_ALIAS_LOCAL',mrb,new _te('The local variable {0} is in a goog.scope and is not an alias.'));OXc=new Q_b('JSC_GOOG_SCOPE_INVALID_VARIABLE',mrb,new _te('The variable {0} cannot be declared in this scope'))} +function X3b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;X5b();xFb(a.c,XRe,false);a.k=false;i=s1d(D1d(o4b(a.c,false)),false);++J3b;a.p=b.b?b.b.f:null;g2d(b,a.p,i);FDc(i,a.c);q=f2d(b,b.g,59);q!=b.g&&(b.g=q);j=b.k;k=a.a?j.sm().xl():null;r=a.u;if(a.a){k.Tl()&&(r=rL(k.Yk().tm().Al().getAtIndex(0),60));K3b(a,i,r)}g=c1d(rL(F1d(b,29),11));N0d(g,(Qq(),new XD(LRe)));l=F_d(g,false);p=f2d(b,b.g,29);p!=b.g&&(b.g=p);!!l&&(b.g=new A3d(29,l,b.g));l1d(a.p,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d((h7d(),_5d),LSe))),g4b(a,new v3d(-1))))));a.g=D1d(Q3b(a,i,K4d));a.n=i.b;HAc();WCc(a.p,QSe,(Lf(),fg(),cg))&&j1d(a.n.e,wYd(k4b(a,(Ef(Ose(QSe,hte(46))==-1,xMe,QSe),new T3d(_5d,QSe))),k4b(a,(Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe))),b7d),a.n);WCc(a.p,RSe,(null,cg))&&j1d(a.n.e,wYd(k4b(a,(Ef(Ose(RSe,hte(46))==-1,xMe,RSe),new T3d(_5d,RSe))),k4b(a,new N2d(U6d)),b7d),a.n);while(a.p.b){a.f=d2d(a.p);d=T3b(a);if(d){if(B1d(a.f,66)!=0){h=IL(a.f.b.Km())}else{h=J3b;++J3b}o=a.g.e;m=e4b(a,rYd(g4b(a,new v3d(h)),(f=new N2d(F4d),f)));a.g=m.b?m.b.f:null;if(o.j==X6d){o=!o.e?null:o.e.e;if(a.d.a.length!=0){n=gZd((e=new N2d(F4d),e),s1d(rL(Ycd(a.d,0),548).a,false));l1d(m.b?m.b.f:null,n);a.g=D1d(m.b?m.b.f:null).b}}j1d(o.e,m,o)}}K2d(c,c);FGb(a.c,i)} +function fOc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;switch(c.j.g){case 85:for(g=new lxe(a.e);g.a=0;k--){j=rL(Ycd(a.c,k),5);u=Dzc(b);n=u.b;(!n||!(n.j==(h7d(),b7d)&&Jse(n.b.Lm(),o)))&&(n=null);!n?u.b!=j&&m1d(u,u1d(j)):n!=j&&n.d!=j&&j1d(u,u1d(j),n)}for(i=a.b.$d();i.Pd();){h=rL(i.Qd(),277);gOc(a,b,h.a)}for(t=new lxe(a.d);t.a0);zf(j.charCodeAt(0)!=45&&j.charCodeAt(0)!=43);if(j.charCodeAt(0)==46){return EJe(zre('0'+j))}else if(j.charCodeAt(0)==48&&f>1){switch(j.charCodeAt(1)){case 46:case 101:case 69:return EJe(zre(j));case 98:case 66:{a.e=CEd(a.e,GK(yK(Hab,1),PKe,67,0,[(BFd(),OEd)]));Txd(a,OEd)||a.d.Fj('Binary integer literals are not supported in this language mode.',a.r,b.b.b.b+1,b.b.b.a);i=0;d=1;while(++d=48&&e<=55){h=h*8+Ayd(e)}else{a.a.e==0?a.d.Ej(lXe,a.r,g.b.b+1,g.b.a):a.d.Ej(mXe,a.r,g.b.b+1,g.b.a);return 0}}a.a.e==0?a.d.Ej(lXe,a.r,g.b.b+1,g.b.a):a.d.Fj(lXe,a.r,g.b.b+1,g.b.a);return h;case 56:case 57:a.d.Ej(mXe,a.r,g.b.b+1,g.b.a);return 0;default:throw Aib(new Ire('Unexpected character in number literal: '+xL(j.charCodeAt(1))));}}else{return EJe(zre(j))}} +function $Ac(a,b){HAc();var c,d,e,f,g,h;switch(a.j.g){case 92:return $Ac(a.b,b);case 47:return LCc(a.b?a.b.f:null)||b.Td(a)&&$Ac(a.b?a.b.f:null,b);case 46:return $Ac(a.b?a.b.f:null,b);case 62:case 61:return $Ac(a.b,b)&&$Ac(a.b?a.b.f:null,b);case 60:return $Ac(a.b.d,b)&&$Ac(a.b?a.b.f:null,b);case 33:return b.Td(a);case 29:return LCc(a)||b.Td(a);case 27:case 26:return b.Td(a);case 28:return Af(a.j==(h7d(),I4d),a),(B1d(a,42)&16)>0||pDc(a)||b.Td(a);case 23:return Af(a.j==(h7d(),f6d),a),(B1d(a,42)&15&13)==13||b.Td(a);case 24:case 40:case 63:case 64:case 96:case 65:case 38:case 80:return true;case 42:for(f=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();f.Pd();){e=rL(f.Qd(),5);if(!$Ac(e,b)){return false}}return true;case 43:for(h=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();h.Pd();){g=rL(h.Qd(),5);Ef(g.j==(h7d(),M6d)||g.j==y5d||g.j==G6d||g.j==W5d||g.j==R4d,'Unexpected obj literal key:',g);if(g.j==y5d||g.j==G6d){continue}if(g.j==R4d&&!$Ac(g.b.d,b)){return false}if(g.j==M6d&&!$Ac(g.b,b)){return false}}return true;case 116:for(d=(!a.b?(jye(),jye(),iye):new F3d(a.b)).$d();d.Pd();){c=rL(d.Qd(),5);if(c.j==(h7d(),T6d)){if(!$Ac(c.b,b)){return false}}}return true;default:if($Bc(a)||kDc(a.j)||LCc(a)){return true}throw Aib(new Ire('Unexpected expression node: '+a+'\n parent:'+a.e));}} +function pGb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;b=a.T.ab!=(iJb(),fJb);v1d(a.w);v1d(a.L);q=(a.T.wd!=(vKb(),sKb)&&!!a.eb&&qKc(a.eb,LPe,true),new z_c);try{for(e=new lxe(a.u);e.a0){return null}l1d(a.w,k)}if(pIb(a.T,(wEd(),pEd))||a.T.Ac){a.P=new Ebd(a,a.T.cc,a.J,(Tbd(),Sbd),a.T.bc,null);a.T.bc==(Zbd(),Ybd)&&(a.P=new Ebd(a,a.T.cc,a.J,Sbd,a.T.bc,yGb(a,a.J)));yEd(aKb(a.T.Vb),(BFd(),kFd))&&qGb(a,a.J);a.T.Ac&&xGb(a);h=new JCe;for(f=a.J.$d();f.Pd();){c=rL(f.Qd(),82);if(THb(c.c?c.c.c:(lr(),lr(),kr),c.d).isEmpty()){j=Cbd(a.P,c.a.mi().b);iue(h,hcd(j.a),c)}}i=new JCe;for(g=a.J.$d();g.Pd();){c=rL(g.Qd(),82);for(m=THb(c.c?c.c.d:(lr(),lr(),kr),c.e).$d();m.Pd();){l=wL(m.Qd());(l==null?!!hDe(h.d,null):wDe(h.e,l))&&!(l==null?!!hDe(i.d,null):wDe(i.e,l))&&iue(i,l,rL(l==null?Xk(hDe(h.d,null)):xDe(h.e,l),82))}}i.d.c+i.e.c==0||yFb(a,new nve(i))}else{a.P=(Bbd(),xbd)}nGb(a);if(a.q.a.e>0){return null}for(d=a.J.$d();d.Pd();){c=rL(d.Qd(),82);k=JHb(c,a);if(!k){continue}if(b){gXc(new kXc(a),a.w,a.L);if(a.q.a.e>0){return null}}if(a.T.nd!=null||a.T.lb){o=new lZc(c.f.a,a.T.ab!=fJb);p=new jAc(a,o,new o5b(a));aAc(p,k)}l1d(a.L,k)}if(a.q.a.e>0){return null}return a.s}finally{qFb(a);n=(Fte(),Qib(Hib(fJe()),q.a));a.T.wd!=sKb&&!!a.eb&&rKc(a.eb,LPe,n)}} +function Rqd(a){var b,c,d;c=ymd(this);this.a=rL(tf(rL(NDe(c,'BOOLEAN'),20)),20);this.b=rL(tf(rL(NDe(c,'BOTTOM'),20)),20);this.e=rL(tf(rL(NDe(c,AWe),20)),20);this.f=rL(tf(rL(NDe(c,'FALSY'),20)),20);this.j=rL(tf(rL(NDe(c,BWe),20)),20);this.q=rL(tf(rL(NDe(c,CWe),20)),20);this.t=rL(tf(rL(NDe(c,DWe),20)),20);this.u=rL(tf(rL(NDe(c,'TOP'),20)),20);rL(tf(rL(NDe(c,EWe),20)),20);this.w=rL(tf(rL(NDe(c,FWe),20)),20);this.A=rL(tf(rL(NDe(c,GWe),20)),20);this.B=rL(tf(rL(NDe(c,'UNDEFINED'),20)),20);this.G=rL(tf(rL(NDe(c,HWe),20)),20);this.C=rL(tf(rL(NDe(c,IWe),20)),20);this.D=rL(tf(rL(NDe(c,JWe),20)),20);this.F=rL(tf(rL(NDe(c,KWe),20)),20);this.k=rL(tf(rL(NDe(c,LWe),20)),20);this.n=rL(tf(rL(NDe(c,MWe),20)),20);this.o=rL(tf(rL(NDe(c,NWe),20)),20);this.p=rL(tf(rL(NDe(c,OWe),20)),20);this.r=rL(tf(rL(NDe(c,PWe),20)),20);b=(d=new RDe,ODe(d,RWe,Fkd(this,null,null,this.G,this.G,null,null,null,null,true,false)),ODe(d,SWe,Fkd(this,null,null,null,this.b,null,null,null,null,false,false)),ODe(d,xWe,new vkd(this,false)),ODe(d,wWe,new vkd(this,true)),d);this.s=rL(tf(rL(NDe(b,RWe),153)),153);this.c=rL(tf(rL(NDe(b,SWe),153)),153);this.v=rL(tf(rL(NDe(b,xWe),153)),153);this.g=rL(tf(rL(NDe(b,wWe),153)),153);this.d=srd(new Wtd(null,this.b,this.b,(fud(),eud)));this.H=a;this.$=a;this.L=a;this.i=new Vqd(this)} +function w3b(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;t=HSe+a.b++;s=K2d(wYd((Ef(Ose(t,hte(46))==-1,xMe,t),new T3d((h7d(),_5d),t)),u1d(d),b7d),c);if(e.j==S4d){m=new a1d(false);S_d(m);n2d(s,F_d(m,false))}k1d(f.e,s,f);for(g=c.b;g;g=r){r=g.d;if(g.j==M6d){if(!g.b){n=RYd(g.Lm());J2d(n,g);l1d(g,n)}j=new R2d(g.Nm()?w5d:x5d,(Ef(Ose(t,hte(46))==-1,xMe,t),new T3d(_5d,t)),bZd(g.Lm()));u=d2d(g);if(u.j==Y4d){o=d2d(u);h=d2d(u);q=HYd(aZd(j,(Ef(Ose(mMe,hte(46))==-1,xMe,mMe),new T3d(_5d,mMe))),h,s1d(j,false))}else{o=u;q=j}}else if(g.j==R4d){if((g.b?g.b.f:null).j==Y4d){o=d2d(g.b?g.b.f:null);i=DYd((Ef(Ose(t,hte(46))==-1,xMe,t),new T3d(_5d,t)),d2d(g));l=HSe+a.b++;k=wYd((Ef(Ose(l,hte(46))==-1,xMe,l),new T3d(_5d,l)),i,b7d);K2d(k,g);k1d(f.e,k,f);q=F3b((Ef(Ose(l,hte(46))==-1,xMe,l),new T3d(_5d,l)),d2d(g.b?g.b.f:null))}else{q=DYd((Ef(Ose(t,hte(46))==-1,xMe,t),new T3d(_5d,t)),d2d(g));o=d2d(g)}}else if(g.j==Y4d){o=d2d(g);h=d2d(g);j=EYd((Ef(Ose(t,hte(46))==-1,xMe,t),new T3d(_5d,t)),bZd(o.Lm()));q=HYd(aZd(j,(Ef(Ose(mMe,hte(46))==-1,xMe,mMe),new T3d(_5d,mMe))),h,s1d(j,false))}else{throw Aib(new Ire('unexpected child'))}HAc();if(!!e&&(e.j==b7d||e.j==T5d||e.j==S4d)){p=wYd(o,q,e.j)}else if(e.j==m4d){p=zYd(lYd(o,q))}else{throw Aib(new Ire('not reached'))}K2d(p,g);k1d(f.e,p,f);z3b(a,b,o,o.e)}u1d(f);Yzc(b)} +function Lxb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;f=b.a?b.a:F_d(new a1d(true),true);g=b.c.a?b.c.a:F_d(new a1d(true),true);q=b.g;p=b.c.a?b1d(g):new a1d(true);e=Vd(Xd(new _d(_Je)),!f.b?null:f.b.b,!g.b?null:g.b.b,GK(yK(agb,1),ZJe,1,5,[]));e.length==0||(p.e=true,AZd(p.a,e));s=new RCe;ie(s,(t=!f.d?null:f.d.p,!t?(jye(),jye(),iye):t));ie(s,(r=!g.d?null:g.d.p,!r?(jye(),jye(),iye):r));s.a.size()==0||N0d(p,s);(f.a&256)!=0&&W_d(p);if((!f.d?null:f.d.b)!=null){h=!f.d?null:f.d.b;X_d(p,h)}A=f.j;!!A&&A!=(z_d(),u_d)&&Y0d(p,f.j);(f.a&jNe)!=0&&O_d(p);(f.a&37)!=0&&S_d(p);(f.a&XLe)!=0&&a0d(p);if(!!f.d&&e_d(f.d,0)){DGb(a.a,Rnc(c,Bxb,GK(yK(fgb,1),pKe,2,6,[])));x0d(p)}(f.a&xOe)!=0||(g.a&xOe)!=0?W0d(p):(f.a&yOe)!=0||(g.a&yOe)!=0?Z_d(p):M0d(p);o=(f.a&512)!=0||(f.a&iNe)!=0||(g.a&512)!=0||(g.a&iNe)!=0;if(o){(f.a&iNe)!=0||(g.a&iNe)!=0?k0d(p):l0d(p);k=null;MZd(f)>0?(k=LZd(f)):MZd(g)==0&&!!q&&(k=(lr(),new UD(new f1d(new P2d((h7d(),A4d),bZd(G1d(q))),zOe))));if(k){for(j=k.$d();j.Pd();){i=rL(j.Qd(),56);c0d(p,i)}}}else{T_d(p);if(!f.d?null:f.d.a){P_d(p,!f.d?null:f.d.a)}else if(q){d=new f1d(new P2d((h7d(),A4d),bZd(G1d(q))),zOe);P_d(p,d)}n=PZd(f);for(m=n.$d();m.Pd();){l=rL(m.Qd(),56);i0d(p,l)}}u=new idd;Xcd(u,YZd(f));Xcd(u,YZd(g));for(w=new lxe(u);w.a1&&a.d&&!!c.e){u=qBc(c.e,MUe);!!u&&u.j==m6d&&nLc(a,c,u)}} +function Z$d(a,b){var c,d,e,f,g,h,i,j;if(!a&&!b){return true}if(!a||!b){return false}if(!nFe(VZd(a),VZd(b))){return false}for(h=VZd(a).$d();h.Pd();){g=wL(h.Qd());if(!nFe(WZd(a,g),WZd(b,g))){return false}}if((!a.b||!a.b.d?(lr(),lr(),kr):a.b.d).size()!=(!b.b||!b.b.d?(lr(),lr(),kr):b.b.d).size()){return false}c=(!a.b||!a.b.d?(lr(),lr(),kr):a.b.d).$d();d=(!b.b||!b.b.d?(lr(),lr(),kr):b.b.d).$d();while(c.Pd()){if(!m_d(rL(c.Qd(),507),rL(d.Qd(),507))){return false}}return nFe(!a.b?null:a.b.a,!b.b?null:b.b.a)&&nFe(!a.d?null:a.d.a,!b.d?null:b.d.a)&&(!a.b?null:a.b.b)==(!b.b?null:b.b.b)&&(!a.b?null:a.b.c)==(!b.b?null:b.b.c)&&nFe(PZd(a),PZd(b))&&nFe((hNe&a.a)==UQe?a.i:null,(hNe&b.a)==UQe?b.i:null)&&nFe(LZd(a),LZd(b))&&(!a.d?null:a.d.g)==(!b.d?null:b.d.g)&&(!a.d?null:a.d.i)==(!b.d?null:b.d.i)&&(!a.d?null:a.d.j)==(!b.d?null:b.d.j)&&nFe((f=!a.d?null:a.d.k,!f?(jye(),jye(),iye):f),(e=!b.d?null:b.d.k,!e?(jye(),jye(),iye):e))&&(!a.b?null:a.b.i)==(!b.b?null:b.b.i)&&nFe(!a.d?null:Zre(a.d.o),!b.d?null:Zre(b.d.o))&&nFe(!a.b?null:a.b.g,!b.b?null:b.b.g)&&(!a.b?null:a.b.f)==(!b.b?null:b.b.f)&&nFe((hNe&a.a)==mKe?a.i:null,(hNe&b.a)==mKe?b.i:null)&&nFe((j=!a.d?null:a.d.p,!j?(jye(),jye(),iye):j),(i=!b.d?null:b.d.p,!i?(jye(),jye(),iye):i))&&nFe(YZd(a),YZd(b))&&nFe(a.g,b.g)&&nFe(ZZd(a),ZZd(b))&&nFe((hNe&a.a)==lKe?a.i:null,(hNe&b.a)==lKe?b.i:null)&&nFe((hNe&a.a)==mNe?a.i:null,(hNe&b.a)==mNe?b.i:null)&&(!a.b?null:a.b.k)==(!b.b?null:b.b.k)&&nFe(a.j,b.j)&&a.a==b.a} +function MOb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;h=a.c.a!=0;for(j=new lxe(b);j.a1)&&nob(VMe+j,b);!!b.b&&rnb(a,b.b);return;case 103:snb(a,(BFd(),NEd),b);Pnb((h7d(),z4d),b);k=(HAc(),nBc(b,new vEc(r5d)));(!k||!(k.j==r5d&&B1d(k,61)!=0))&&nob("'await' expression is not within an async function",b);return;default:nob('Expected expression but was '+b.j,b);}} +function Gxb(){Gxb=cjb;Exb=new Q_b('JSC_GOOG_CLASS_TARGET_INVALID',(prb(),mrb),new _te('Unsupported class definition expression.'));Dxb=new Q_b('JSC_GOOG_CLASS_SUPER_CLASS_NOT_VALID',mrb,new _te('The super class must be null or a valid name reference'));xxb=new Q_b('JSC_GOOG_CLASS_DESCRIPTOR_NOT_VALID',mrb,new _te('The class must be defined by an object literal'));uxb=new Q_b('JSC_GOOG_CLASS_CONSTRUCTOR_MISSING',mrb,new _te("The 'constructor' property is missing for the class definition"));vxb=new Q_b('JSC_GOOG_CLASS_CONSTRUCTOR_NOT_VALID',mrb,new _te("The 'constructor' expression must be a function literal"));wxb=new Q_b('JSC_GOOG_CLASS_CONSTRUCTOR_ON_INTERFACE',mrb,new _te("An interface definition should not have a 'constructor' property"));Cxb=new Q_b('JSC_GOOG_CLASS_STATICS_NOT_VALID',mrb,new _te("The class 'statics' property must be an object or function literal"));Fxb=new Q_b('JSC_GOOG_CLASS_UNEXPECTED_PARAMS',mrb,new _te('Too many arguments to goog.defineClass.'));zxb=new Q_b('JSC_GOOG_CLASS_ES6_COMPUTED_PROP_NAMES_NOT_SUPPORTED',mrb,new _te('Computed property names not supported in goog.defineClass.'));Axb=new Q_b('JSC_GOOG_CLASS_ES6_SHORTHAND_ASSIGNMENT_NOT_SUPPORTED',mrb,new _te('Shorthand assignments not supported in goog.defineClass.'));yxb=new Q_b('JSC_GOOG_CLASS_ES6_ARROW_FUNCTION_NOT_SUPPORTED',mrb,new _te('Arrow functions not supported in goog.defineClass. Object literal method definition may be an alternative.'));Bxb=new Q_b('JSC_GOOG_CLASS_NG_INJECT_ON_CLASS',orb,new _te('@ngInject should be declared on the constructor, not on the class.'))} +function O0b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;m=d.d;C=A1d(d,c);B=c.b.Lm();v=(Ef(Ose(B,hte(46))==-1,xMe,B),new T3d((h7d(),_5d),B));D=f2d(v,v.g,30);D!=v.g&&(v.g=D);v.g=new p3d(30,1,v.g);n2d(v,rL(F1d(c,29),11));g2d(d,c,v);F=null;p=rL(F1d(c,29),11);if(p){F=(hNe&p.a)==mNe?p.i:null}else{n=(HAc(),r=eBc(d.e),!r?null:rL(F1d(r,29),11));!!n&&(F=WZd(n,B))}!!F&&F.a.j!=b5d&&DGb(a.a,Rnc(c,J0b,GK(yK(fgb,1),pKe,2,6,[])));if(!m.b){Yzc(b);return}A=H2d((f=new N2d(F4d),f),m);u=(Ef(Ose(B,hte(46))==-1,xMe,B),new T3d(_5d,B));s=K2d(wYd(u,(Ef(Ose(YRe,hte(46))==-1,xMe,YRe),new T3d(_5d,YRe)),T5d),m);m1d(A,s);for(j=(!m.b?(jye(),jye(),iye):new F3d(m.b)).$d();j.Pd();){i=rL(j.Qd(),5);l1d(A,u1d(i))}if(F){e=new T3d(L6d,lOe);G=F.a;t=G.j==b5d?s1d(G.b,false):s1d(G,false);m1d(e,J2d(new P2d(F4d,t),G));h=new a1d(false);S0d(h,new f1d(new P2d(A4d,e),(l=rL(F1d(c,51),28),!l?null:l.ji())));n2d(u,F_d(h,false))}w=wYd((Ef(Ose(YRe,hte(46))==-1,xMe,YRe),new T3d(_5d,YRe)),jYd(GK(yK(veb,1),MMe,5,0,[])),b7d);m1d(m,K2d(w,c));q=wYd((Ef(Ose(ZRe,hte(46))==-1,xMe,ZRe),new T3d(_5d,ZRe)),new v3d(C),b7d);k=MYd((Ef(Ose(ZRe,hte(46))==-1,xMe,ZRe),new T3d(_5d,ZRe)),EYd((Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe)),new T3d(L6d,DMe)));o=LYd((Ef(Ose(ZRe,hte(46))==-1,xMe,ZRe),new T3d(_5d,ZRe)),false);g=nYd(zYd(lYd(DYd((Ef(Ose(YRe,hte(46))==-1,xMe,YRe),new T3d(_5d,YRe)),eZd((Ef(Ose(ZRe,hte(46))==-1,xMe,ZRe),new T3d(_5d,ZRe)),new v3d(C))),DYd((Ef(Ose(xRe,hte(46))==-1,xMe,xRe),new T3d(_5d,xRe)),(Ef(Ose(ZRe,hte(46))==-1,xMe,ZRe),new T3d(_5d,ZRe))))));j1d(m,K2d(BYd(q,k,o,g),c),w);l1d(m,A);FGb(a.a,A)} +function byd(a,b,c){var d,e,f,g,h,i,j,k,l;l=b.a;c&&(l=Xse(l,'\r\n?',_Je));k=c?0:1;e=Ose(l,hte(92));if(e==-1){return c?l:bte(l,1,l.length-1)}j=new zte;while(e!=-1){e-k>0&&(j.a+=''+(l==null?kKe:l).substr(k,e-k),j);e+=1;d=l.charCodeAt(e);switch(d){case 39:case 34:case 92:j.a+=String.fromCharCode(d);break;case 98:j.a+='\b';break;case 102:j.a+='\f';break;case 110:j.a+=_Je;break;case 114:j.a+='\r';break;case 116:j.a+='\t';break;case 118:j.a+='\x0B';break;case 10:a.e=CEd(a.e,GK(yK(Hab,1),PKe,67,0,[(BFd(),uFd)]));xEd(a.a.c.a,(wEd(),nEd))?a.d.Fj('String continuations are not recommended. See https://google.github.io/styleguide/javascriptguide.xml?showone=Multiline_string_literals#Multiline_string_literals',a.r,b.b.b.b+1,b.b.b.a):a.d.Ej('String continuations are not supported in this language mode.',a.r,b.b.b.b+1,b.b.b.a);break;case 48:if(e+1>=l.length){break}case 49:case 50:case 51:case 52:case 53:case 54:case 55:h=l.charCodeAt(e+1);if(a.a.e==0||c){if(d==48&&!(h>=48&&h<=55));else{a.d.Fj('Octal literals in strings are not supported in this language mode.',a.r,b.b.b.b+1,b.b.b.a)}}if(h>=48&&h<=55){i=l.charCodeAt(e+2);if(i>=48&&i<=55){ote(j,64*Ayd(d)+8*Ayd(h)+Ayd(i)&uKe);e+=2}else{ote(j,8*Ayd(d)+Ayd(h)&uKe);e+=1}}else{ote(j,Ayd(d)&uKe)}break;case 120:ote(j,xyd(l.charCodeAt(e+1))*16+xyd(l.charCodeAt(e+2))&uKe);e+=2;break;case 117:if(l.charCodeAt(e+1)!=123){f=e+5;g=l.substr(e+1,f-(e+1))}else{f=e+2;while(Nqe(l.charCodeAt(f),16)>=0){++f}g=l.substr(e+2,f-(e+2));++f}wte(j,Uqe(Are(g,16)));e=f-1;break;default:j.a+=String.fromCharCode(d);}k=e+1;e=Pse(l,hte(92),k)}tte(j,l,k,c?l.length:l.length-1);return j.a} +function HGd(){HGd=cjb;var a,b,c,d,e,f;KFd=new IGd('BREAK',0,'break',(XMd(),$Kd));LFd=new IGd('CASE',1,'case',bLd);MFd=new IGd(cYe,2,'catch',cLd);PFd=new IGd(dYe,3,aPe,lLd);QFd=new IGd(eYe,4,cPe,mLd);SFd=new IGd(NVe,5,QOe,oLd);TFd=new IGd('DELETE',6,fYe,pLd);UFd=new IGd('DO',7,'do',qLd);VFd=new IGd('ELSE',8,'else',rLd);$Fd=new IGd(gYe,9,JOe,BLd);_Fd=new IGd('FOR',10,'for',CLd);aGd=new IGd(uTe,11,aKe,DLd);bGd=new IGd('IF',12,'if',GLd);eGd=new IGd('IN',13,'in',JLd);fGd=new IGd(UXe,14,GUe,KLd);mGd=new IGd('NEW',15,'new',VLd);sGd=new IGd(cXe,16,LOe,rMd);vGd=new IGd(hYe,17,'switch',FMd);wGd=new IGd(dXe,18,pNe,JMd);xGd=new IGd('THROW',19,KOe,KMd);zGd=new IGd('TRY',20,'try',NMd);BGd=new IGd(iYe,21,FUe,PMd);CGd=new IGd('VAR',22,'var',SMd);DGd=new IGd('VOID',23,dPe,TMd);EGd=new IGd('WHILE',24,WOe,UMd);FGd=new IGd('WITH',25,'with',VMd);NFd=new IGd(tTe,26,TOe,dLd);OFd=new IGd('CONST',27,cNe,kLd);WFd=new IGd(WWe,28,fPe,tLd);XFd=new IGd(fTe,29,POe,yLd);YFd=new IGd(XWe,30,UOe,zLd);dGd=new IGd(jYe,31,SOe,ILd);uGd=new IGd(WXe,32,YOe,EMd);cGd=new IGd(YWe,33,VOe,HLd);gGd=new IGd(ZWe,34,ePe,LLd);jGd=new IGd('LET',35,'let',PLd);oGd=new IGd($We,36,fXe,eMd);pGd=new IGd(_We,37,gXe,mMd);qGd=new IGd(aXe,38,hXe,nMd);rGd=new IGd(bXe,39,iXe,oMd);tGd=new IGd('STATIC',40,kXe,CMd);GGd=new IGd('YIELD',41,'yield',WMd);nGd=new IGd(BWe,42,kKe,ZLd);yGd=new IGd(JQe,43,_Oe,MMd);ZFd=new IGd(IQe,44,$Oe,ALd);RFd=new IGd(kYe,45,hPe,nLd);AGd=new IGd(eXe,46,rNe,OMd);kGd=new IGd('MODULE',47,FOe,TLd);lGd=new IGd(lYe,48,gPe,ULd);a=new Nu;b=new RBe(Uab);for(d=PGd(),e=0,f=d.length;e=0;m=Hzc(b)._j(e);switch(p.j.g){case 96:if(A1d(p,c)==0&&(n||f)){Vcd(a.e,p);o=PDc(a.f.a,e,c,d);j=p.e;!n&&!m?(h=K2d(wYd(o,new N2d((h7d(),i6d)),T5d),c)):(h=K2d(zYd(lYd(o,new N2d((h7d(),i6d)))),c));g2d(j,p,h);h.j==(h7d(),T5d)?g2d(h.b,h.b.b,p):g2d(h.b,h.b.b.d,p)}else if(A1d(p,c)==1){o=PDc(a.f.a,e,c,d);g2d(p,c,o)}else{c.Qm(e);q=f2d(c,c.g,40);q!=c.g&&(c.g=q);d!=null&&(c.g=new A3d(40,d,c.g))}break;case 65:if(n||f){o=PDc(a.f.a,e,c,d);j=p.e;c.Qm('');!n&&!m?(h=K2d(wYd(o,new N2d((h7d(),i6d)),b7d),c)):(h=K2d(zYd(lYd(o,new N2d((h7d(),i6d)))),c));g2d(j,p,h);h.j==(h7d(),b7d)?g2d(h.b,h.b.b,p):g2d(h.b,h.b.b.d,p);Vcd(a.c,h)}else{c.Qm(e);q=f2d(c,c.g,40);q!=c.g&&(c.g=q);d!=null&&(c.g=new A3d(40,d,c.g))}break;case 76:case 100:case 88:if(n){i=PDc(a.f.a,e,c,d);k=rL(F1d(p,29),11);r=f2d(p,p.g,29);r!=p.g&&(p.g=r);if(c.b){g=lYd(i,d2d(c));q=f2d(g,g.g,29);q!=g.g&&(g.g=q);!!k&&(g.g=new A3d(29,k,g.g));h=K2d((Af(NYd(g),g),new P2d((h7d(),m5d),g)),c);g2d(p.e,p,h)}else{q=f2d(i,i.g,29);q!=i.g&&(i.g=q);!!k&&(i.g=new A3d(29,k,i.g));h2d(p,H2d((Af(NYd(i),i),new P2d((h7d(),m5d),i)),i))}}else if(m){if(!c.b){u1d(p);break}l=MDc(a.f.a,e,c,d);g=lYd(l,d2d(c));k=rL(F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,e;if(a.f.j==(h7d(),b7d)){b4b(a);return false}else if(B1d(a.f,66)!=0){a.e.a.length!=0&&rL(Ycd(a.e,0),264).a==a.f.b.Km()&&bdd(a.e,0);a.d.a.length!=0&&rL(Ycd(a.d,0),548).b==a.f.b.Km()&&bdd(a.d,0);return true}else if(a.f.j==r5d){j1d(a.n.e,a.f,a.n);return false}else if(a.f.j==F4d){U3b(a);return false}else if(L3b(a,a.f)){switch(a.f.j.g){case 70:case 71:case 72:$3b(a,null);return false;case 73:W3b(a);return false;case 83:Z3b(a);return false;case 67:_3b(a);return false;case 66:if(B1d(a.f,67)==0){Y3b(a);return false}break;case 44:a4b(a);return false;case 84:if(a.f.b.j==g7d){l1d(a.g,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d(_5d,LSe))),g4b(a,new v3d(J3b))))));b=a.f.b;c=b.b?d2d(b):j4b(a,(Ef(Ose(mMe,hte(46))==-1,xMe,mMe),new T3d(_5d,mMe)));l1d(a.g,$Yd((d=N3b(a,(Lhe(),Xge),c.k),b6b(VYd(GK(yK(veb,1),MMe,5,0,[ZYd(new T3d(M6d,JSe),c),ZYd(new T3d(M6d,MSe),f4b(a,new N2d(n5d)))])),d))));return true}break;case 0:l1d(a.g,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d(_5d,LSe))),g4b(a,new v3d(-1))))));l1d(a.g,$Yd(O3b(a,a.f.b?d2d(a.f):j4b(a,(Ef(Ose(mMe,hte(46))==-1,xMe,mMe),new T3d(_5d,mMe))))));return false;case 75:zf(rL(Ycd(a.e,0),264).b!=-1);a.f.b?(e=P3b(a,d2d(a.f).Lm()).b):(e=rL(Ycd(a.e,0),264).b);l1d(a.g,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d(_5d,LSe))),g4b(a,new v3d(e))))));l1d(a.g,m4b());return false;case 74:if(B1d(a.f,67)==0){V3b(a);return false}break;case 39:l1d(a.g,zYd(g4b(a,lYd(g4b(a,(Ef(Ose(LSe,hte(46))==-1,xMe,LSe),new T3d(_5d,LSe))),g4b(a,new v3d(-1))))));l1d(a.g,a.f);return false;default:throw Aib(new DJ('Untranslatable control-exiting statement in generator function: '+a.f.j));}}l1d(a.g,a.f);return false} +function b3d(a){switch(a){case 30:return 'var_args_name';case 29:return 'jsdoc_info';case 32:return 'incrdecr';case 36:return 'quoted';case 37:return 'opt_arg';case 38:return 'synthetic';case 39:return 'added_block';case 40:return 'originalname';case 42:return 'side_effect_flags';case 43:return 'is_constant_name';case 46:return 'is_namespace';case 48:return 'directives';case 49:return 'direct_eval';case 50:return 'free_call';case 51:return 'source_file';case 53:return 'input_id';case 54:return 'slash_v';case 55:return 'inferred';case 56:return 'change_time';case 57:return 'reflected_object';case 58:return 'static_member';case 59:return 'generator_fn';case 60:return 'arrow_fn';case 61:return 'async_fn';case 62:return 'yield_all';case 63:return 'export_default';case 64:return 'export_all_from';case 65:return 'is_constant_var';case 66:return 'is_generator_marker';case 67:return 'is_generator_safe';case 71:return 'raw_string_value';case 72:return 'computed_prop_method';case 73:return 'computed_prop_getter';case 74:return 'computed_prop_setter';case 75:return 'computed_prop_variable';case 76:return 'analyzed_during_gti';case 77:return 'constant_property_def';case 78:return 'declared_type_expr';case 79:return 'type_before_cast';case 80:return 'opt_es6_typed';case 81:return 'generic_type';case 82:return VOe;case 83:return 'construct_signature';case 84:return 'access_modifier';case 85:return 'non_indexable';case 86:return 'parse_results';case 87:return 'goog_module';case 88:return 'goog_module_require';case 89:return 'feature_set';case 90:return 'is_module_name';case 91:return 'was_previously_provided';case 92:return 'is_es6_class';case 93:return 'transpiled';case 94:return 'DELETED';case 95:return 'goog_module_alias';default:throw Aib(new Ire('unexpected prop id '+a));}} +function The(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;switch(b.j.g){case 146:return fie(a,b.b,c,d);case 143:return The(a,b.b,c,d,e).Jn();case 141:m=b.b;if(!m){return sie(a,(Lhe(),Hhe))}return _he(a,The(a,m,c,d,e));case 142:case 144:return cie(a,The(a,b.b,c,d,e));case 139:return sie(a,(Lhe(),Bge));case 138:h=new tpe(a);for(j=b.b;j;j=j.d){npe(h,The(a,j,c,d,e),false)}return ope(h);case 80:return sie(a,(Lhe(),Hhe));case 79:return sie(a,(Lhe(),Khe));case 31:case 29:q=wie(a,d,b.Lm(),c,W2d(b.i),V2d(b.i),e);if(zL(q,24)&&!zL(q,746)&&!PCe(a.o,b.Lm())){D=b.b;o=q.lm()&&Bie(a,b.Lm());if((!q.lm()||o)&&!!D){A=(lr(),new Fu);(Jse(b.Lm(),DKe)||Jse(b.Lm(),'window.Object'))&&D.b==(D.b?D.b.f:null)&&Du(A,sie(a,(Lhe(),Hhe)));p=o?eKe:rne(q.cn());s=e&&!o;w=0;for(v=(!D.b?(jye(),jye(),iye):new F3d(D.b)).$d();v.Pd();){u=rL(v.Qd(),5);if(++w>p){EWc(a.q,'Too many template parameters',c,W2d(u.i),V2d(u.i));break}Du(A,The(a,u,c,d,s))}o?(q=new uke(a,b.Lm(),c,W2d(b.i),V2d(b.i),ur(A.a))):(q=new Dne(a,rL(q,24),ur(A.a)));tf(q)}return q.Rn()?q:iie(a,GK(yK(Web,1),oTe,9,0,[q,sie(a,(Lhe(),bhe))]))}else{return q}case 65:B=null;n=false;l=b.b;if(l.j==(h7d(),U6d)||l.j==f6d){k=l.b;i=The(a,k,c,d,e);if(i.Zl()||i.mm()){B=i}else if(l.j==U6d){B=i.Jn()}else if(l.j==f6d){B=nbe(i.Jn());!B&&EWc(a.q,e4d('msg.jsdoc.function.newnotobject',GK(yK(agb,1),ZJe,1,5,[])),c,W2d(k.i),V2d(k.i))}n=l.j==f6d;l=l.d}r=new xfe(a);if(l.j==r6d){for(g=l.b;g;g=g.d){if(g.j==b5d){g.b?ufe(r,The(a,g.b,c,d,e)):ufe(r,sie(a,(Lhe(),Hhe)))}else{C=The(a,g,c,d,e);if(g.j==h5d){f=sfe(r,GK(yK(Web,1),oTe,9,0,[C]));f||EWc(a.q,e4d(FXe,GK(yK(agb,1),ZJe,1,5,[])),c,W2d(g.i),V2d(g.i))}else{tfe(r,GK(yK(Web,1),oTe,9,0,[C]))}}}l=l.d}t=The(a,l,c,d,e);return ffe(ife(qfe(mfe(lfe(new rfe(a),r.b),t),B),n));}throw Aib(new Ire('Unexpected node in type expression: '+b))} +function fRb(a){a.v=new ARb(a);a.Ac=new fUb;a.Bc=new NUb(a);a.t=new tVb;a.r=new _Vb;a.p=new LWb;a.tb=new qXb(a);new SXb;a.lb=new yYb;a.sb=new DRb;a.M=new gSb(a);a.e=new QSb;new rTb;a.qc=new QTb;a.K=new STb;a.xb=new VTb;a.jb=new YTb;a.W=new _Tb;a.X=new cUb;a.Cb=new iUb;a.a=new lUb;a.cb=new nUb;a.O=new qUb;a.I=new tUb;a.P=new wUb;a.H=new zUb;a.N=new CUb(a);new HUb(a);a.ib=new KUb;a.hb=new QUb(a);a.bc=new TUb;a.cc=new WUb;a.Nb=new ZUb(a);a.D=new _Ub;a.ub=new cVb;a.s=new fVb;a.C=new kVb;a.B=new nVb;a.q=new qVb;a.Zb=new wVb;a.sc=new zVb(a);a.G=new BVb(a);a.wb=new EVb(a);a.Cc=new IVb;a.Wb=new LVb;a.vb=new OVb(a);a.A=new SVb(a);a.n=new WVb(a);a.g=new ZVb(a);a.Ob=new cWb;a.d=new fWb(a);a.u=new hWb;a.o=new kWb(a);a.w=new oWb;a.fc=new rWb(a);a.ec=new vWb(a);a.zc=new AWb;a.qb=new EWb(a);a.k=new JWb;a.j=new OWb;a.V=new RWb;a.uc=new WWb;a.pc=new YWb(a);new aXb(a);a.$b=new eXb;a.J=new hXb(a);a.L=new jXb;a.rc=new mXb(a);a.T=new oXb;a.S=new vXb;a.fb=new yXb;a.gb=new AXb(a);a.f=new CXb;a.eb=new EXb;a._b=new GXb(a);a.Qb=new IXb;a.Pb=new KXb;a.Db=new MXb(a);a.yb=new PXb;a.ic=new VXb;a.kc=new YXb;a.lc=new $Xb(a);a.jc=new bYb(a);new eYb(a);a.nb=new jYb;a.xc=new mYb;a.yc=new pYb;a.Bb=new sYb;a.ab=new vYb;a.bb=new BYb;a.zb=new EYb(a);a.Ab=new HYb;a.Z=new JYb(a);a.$=new LYb(a);a.pb=new NYb;a.Q=new QYb(a);a.kb=new TYb;a.U=new WYb;a.ob=new ZYb(a);a.tc=new IRb;a.R=new KRb;a.Sb=new MRb;a.Ub=new ORb;a.Tb=new QRb;a.b=new URb(a);a.Yb=new WRb;a.c=new YRb(a);a.Rb=new $Rb;a.Xb=new dSb;a.mb=new lSb;a.db=new nSb;a.Fb=new qSb;a.nc=new sSb(a);a.oc=new xSb(a);a.mc=new CSb;a.Y=new FSb;a.vc=new ISb;a.wc=new LSb;new OSb(a);a.Eb=new TSb(a);a.rb=new VSb;a.dc=new YSb;a.F=new _Sb;a._=new cTb;a.Jb=new fTb;a.Ib=new hTb;a.Lb=new jTb;a.Kb=new mTb;a.Gb=new pTb;a.Mb=new uTb;a.Hb=new wTb;a.i=new yTb(a);a.ac=new ATb;a.Dc=new DTb;a.hc=new GTb} +function Gpb(){Gpb=cjb;zpb=new Q_b('JSC_DEPRECATED_VAR',(prb(),nrb),new _te('Variable {0} has been deprecated.'));Apb=new Q_b('JSC_DEPRECATED_VAR_REASON',nrb,new _te('Variable {0} has been deprecated: {1}'));Bpb=new Q_b('JSC_DEPRECATED_PROP',nrb,new _te('Property {0} of type {1} has been deprecated.'));Cpb=new Q_b('JSC_DEPRECATED_PROP_REASON',nrb,new _te('Property {0} of type {1} has been deprecated: {2}'));xpb=new Q_b('JSC_DEPRECATED_CLASS',nrb,new _te('Class {0} has been deprecated.'));ypb=new Q_b('JSC_DEPRECATED_CLASS_REASON',nrb,new _te('Class {0} has been deprecated: {1}'));ppb=new Q_b('JSC_BAD_PACKAGE_PROPERTY_ACCESS',mrb,new _te('Access to package-private property {0} of {1} not allowed here.'));qpb=new Q_b('JSC_BAD_PRIVATE_GLOBAL_ACCESS',mrb,new _te('Access to private variable {0} not allowed outside file {1}.'));rpb=new Q_b('JSC_BAD_PRIVATE_PROPERTY_ACCESS',orb,new _te('Access to private property {0} of {1} not allowed here.'));tpb=new Q_b('JSC_BAD_PROTECTED_PROPERTY_ACCESS',orb,new _te('Access to protected property {0} of {1} not allowed here.'));spb=new Q_b('JSC_BAD_PROPERTY_OVERRIDE_IN_FILE_WITH_FILEOVERVIEW_VISIBILITY',mrb,new _te('Overridden property {0} in file with fileoverview visibility {1} must explicitly redeclare superclass visibility'));Epb=new Q_b('JSC_PRIVATE_OVERRIDE',orb,new _te('Overriding private property of {0}.'));Dpb=new Q_b('JSC_EXTEND_FINAL_CLASS',mrb,new _te('{0} is not allowed to extend final class {1}.'));Fpb=new Q_b('JSC_VISIBILITY_MISMATCH',orb,new _te('Overriding {0} property of {1} with {2} property.'));vpb=new Q_b('JSC_CONSTANT_PROPERTY_REASSIGNED_VALUE',orb,new _te('constant property {0} assigned a value more than once'));upb=new Q_b('JSC_CONSTANT_PROPERTY_DELETED',orb,new _te('constant property {0} cannot be deleted'));wpb=new Q_b('JSC_CONVENTION_MISMATCH',orb,new _te('Declared access conflicts with access convention.'))} +function txc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;if(syc(a,b)){return Sxc(a,b,D1d(b.b).Lm(),c,e)}if(b.j==(h7d(),I4d)&&!!a.B.kh(b)){return Fxc(a,a.B.kh(b),b,c)}i=b.b;if(pyc(a,i,c)){return gxc(a,b,c)}h=rL(NDe(a.u,G1d(i)),186);if(h){return Swc(a,b,c,h)}k=bxc(a,i,c,Qqd(a.w));o=k.a;k=Cyc(a,i,k.b,null,o);l=k.b;(0==l.kl()||!Rld(l,Qqd(a.w),new bvd((rrd(),rrd(),qrd))))&&hzc(a.Q,Rnc(b,wwc,GK(yK(fgb,1),pKe,2,6,[ild(l,new zte,(evd(),dvd)).a])));r=(v=l.kl()==2&&l.nl().size()==1?rL(Uw(l.nl().$d()),25):null,!v?null:v.b);if(!r||r==r.a.v||r==r.a.g||r==r.a.s){return pxc(a,wBc(b),o)}else if(r.c){return yxc(a,b,o,d)}else if(!(b.j==f6d||b.j==I4d&&Ysc(a.C)&&b.b.j==P6d)&&!!r.d&&(eKe==r.k.kl()||256==r.k.kl())){hzc(a.Q,Rnc(b,Vvc,GK(yK(fgb,1),pKe,2,6,[Wjd(r,new zte,(evd(),dvd)).a])));return pxc(a,wBc(b),o)}else if(b.j==f6d){if(!r.d||(u=xkd(r.d),!!u&&u.a.g!=0)){if(T1d(i)){A=wL(lud(i).a.getAtIndex(0));btc(a.C,A)||hzc(a.Q,Rnc(b,vwc,GK(yK(fgb,1),pKe,2,6,[Wjd(r,new zte,(evd(),dvd)).a])))}return pxc(a,wBc(b),o)}else{t=xkd(r.d);if(!!t&&t.a.g==0&&wld(r.d).a.e){hzc(a.Q,Rnc(b,Tvc,GK(yK(fgb,1),pKe,2,6,[Wjd(r,new zte,(evd(),dvd)).a])));return pxc(a,wBc(b),o)}}}else b.j==R6d&&(r=Zxc(a,b.b?b.b.f:null,b.b,r));if(!ryc(a,r,b,i)){return pxc(a,wBc(b),o)}w=r;if(!r.n.a.isEmpty()){B=i.j==x5d?i.b:null;q=b.b.d;G=Wxc(a,b,B,q,r,o,true);r=oyc(a,r,G)}g=new idd;s=b.j==R6d?b.b?b.b.f:null:b;f=wBc(b);F=rxc(a,s,f,r,g,o);if(i.j==_5d){j=i.Lm();if(etc(a.C,j)&&(D=(n=Hsc(a.C,new kud(j),false),!n?null:n.a),p=rL(F1d(D.v,51),28),!(!!p&&p.lk()))){if(ftc(a.C,j)){F=$xc(a,i,F)}else if(w.n.a.isEmpty()){if(b.j==f6d||b.j==I4d&&Ysc(a.C)&&b.b.j==P6d){m=new bzc(a,b,null,a.C,Tsc(a.C,j));ODe(a.D,b,m)}else{m=rL(NDe(a.D,b),317);m?!!m.e&&(m.e=Xnd(m.e,d)):Ef(!Wsc(a.C),'No deferred check created in backward direction for %s',b)}!!m&&(m.a=g)}}}C=b.j==f6d?r.g?r.g:r.d:r.k;Rld(C,d,new bvd((rrd(),rrd(),qrd)))&&(C=cmd(C,e));return new ezc(F,C)} +function Zfc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L;if(b.f){return}F=b.p;n=Bud(b);!!F&&!F.a.f&&Zfc(a,F.a);for(I=(!b.d?(Qq(),kD(),jD):b.d).$d();I.Pd();){G=rL(I.Qd(),99);G.a.f||Zfc(a,G.a)}w=new Zx(16,2);A=new Zx(16,2);if(F){zf(F.a.f);for(r=Kud(F.a).$d();r.Pd();){p=wL(r.Qd());F.a.e&&Oud(F.a,p)&&!b.e&&!Gud(b,p,1)&&hzc(a.g,Rnc(b.v,rfc,GK(yK(fgb,1),pKe,2,6,[p,F.a.A])));n.a.remove(p)!=null;$fc(a,b,F,p,w,A)}}for(H=(!b.d?(Qq(),kD(),jD):b.d).$d();H.Pd();){G=rL(H.Qd(),99);zf(G.a.f);for(r=Kud(G.a).$d();r.Pd();){p=wL(r.Qd());n.a.remove(p)!=null;$fc(a,b,G,p,w,A)}}for(s=(C=w.i,!C?(w.i=new dm(w,w.c)):C).$d();s.Pd();){p=wL(s.Qd());m=rL(bk(w,p),44);zf(!m.isEmpty());l=rL(Gt(a.f,b,p),208);J=ejd(m);k=l.c;e=jgc(l);if(!J){J=rL(m.$d().Qd(),291);hzc(a.g,Rnc(l.a,Ufc,GK(yK(fgb,1),pKe,2,6,[b.A,p,gjb(m)])))}else e&&(k.g?eKe:k.f.size()+k.d.size())>(J.g?eKe:J.f.size()+J.d.size())&&hzc(a.g,Rnc(l.a,Lfc,GK(yK(fgb,1),pKe,2,6,[p,Wjd(_id(J),new zte,(evd(),dvd)).a,Wjd(_id(k),new zte,dvd).a])));K=bjd(k,J,e);l.c=K;!!l.b&&rtc(l.b,K);dk(A,p,$pd(a.d.d,_id(K)))}M:for(t=(B=A.i,!B?(A.i=new dm(A,A.c)):B).$d();t.Pd();){p=wL(t.Qd());c=rL(bk(A,p),44);zf(!c.isEmpty());D=a.d.d.u;for(g=c.$d();g.Pd();){f=rL(g.Qd(),20);D=Xnd(D,f);if(0==D.kl()){hzc(a.g,Rnc(b.v,Ufc,GK(yK(fgb,1),pKe,2,6,[b.A,p,gjb(c)])));continue M}else{D=f}}tud(b,p,null,D,false)}if(!Yud(b.A,aTe,b.v)&&Rud(b)){L=b.r;!sld(L)?hzc(a.g,Rnc(b.v,Ufc,GK(yK(fgb,1),pKe,2,6,[b.A,xTe,"the keys K have types that can't be joined."]))):!tld(L)&&hzc(a.g,Rnc(b.v,Ufc,GK(yK(fgb,1),pKe,2,6,[b.A,xTe,'the values V should have a common subtype.'])))}for(q=(o=(new dve(n.a)).a.ke().$d(),new jve(o));q.a.Pd();){p=(d=rL(q.a.Qd(),12),wL(d.se()));u=rL(Gt(a.f,b,p),208);zf(!!u||Jse(b.A,yTe));if(u){v=u.a;h=(HAc(),i=eBc(v),!i?null:rL(F1d(i,29),11));!!h&&(h.a&64)!=0&&hzc(a.g,Rnc(v,Vfc,GK(yK(fgb,1),pKe,2,6,[p,b.A])))}}Aud(b);if(Yud(b.A,DKe,b.v)){j=mqd(a.d.d);j.a.f||Aud(j.a)}} +function F1b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;d=c.a;q=c.b;if(q.a.length==0){return}h=rL(F1d(d,51),28);if(!!h&&h.lk()){for(o=new lxe(q);o.a3)&&nob($Me+t,b);rnb(a,b.b);anb(a,b.b.d);y1d(b)==3&&anb(a,b.b?b.b.f:null);return;case 76:case 100:case 88:Knb(a,b.j,b);return;case 84:Pnb((h7d(),m5d),b);u=j7d(b.j);u!=-1&&(v=y1d(b),u!=v&&nob(PMe+u+QMe+v,b));rnb(a,b.b);return;case 0:Pnb((h7d(),C6d),b);Fnb(b);!!b.b&&rnb(a,b.b);return;case 39:Pnb((h7d(),V6d),b);w=j7d(b.j);w!=-1&&(A=y1d(b),w!=A&&nob(PMe+w+QMe+A,b));rnb(a,b.b);return;case 44:hob(a,b);return;case 74:Pnb((h7d(),H4d),b);Fnb(b);!!b.b&&Enb(b.b);return;case 75:Pnb((h7d(),T4d),b);Fnb(b);!!b.b&&Enb(b.b);return;case 80:case 89:d=y1d(b);0!=d&&nob(OMe+d,b);return;case 96:fnb(a,b,c);Inb(b.b);return;case 104:wnb(a,b);return;case 108:onb(a,b,c);return;case 148:snb(a,(BFd(),fFd),b);Pnb((h7d(),L5d),b);B=j7d(b.j);B!=-1&&(C=y1d(b),B!=C&&nob(PMe+B+QMe+C,b));D=b.b;Inb(D);F=D.d;F.j==c5d?(G=y1d(F),0!=G&&nob(OMe+G,F)):Anb(F);Cnb(a,b.b?b.b.f:null);return;case 151:mnb(a,b);return;case 154:iob(a,b);return;case 155:snb(a,(BFd(),KEd),b);Pnb((h7d(),W4d),b);Xmb(a,b.b);return;case 159:Lnb(a,b,c);return;default:nob('Expected statement but was '+b.j+'.',b);}} +function BFd(){BFd=cjb;PEd=new CFd('BLOCK_SCOPED_FUNCTION_DECLARATION',0,'block function',0);YEd=new CFd('ES3_KEYWORDS_AS_IDENTIFIERS',1,'ES3 keywords as identifiers',1);cFd=new CFd('GETTER',2,'getters',1);gFd=new CFd('KEYWORDS_AS_PROPERTIES',3,'reserved words as properties',1);sFd=new CFd('SETTER',4,'setters',1);uFd=new CFd('STRING_CONTINUATION',5,'string continuation',1);xFd=new CFd('TRAILING_COMMA',6,'trailing comma',1);MEd=new CFd('ARROW_FUNCTIONS',7,'arrow function',2);OEd=new CFd('BINARY_LITERALS',8,'binary literal',2);nFd=new CFd('OCTAL_LITERALS',9,'octal literal',2);REd=new CFd('CLASSES',10,TOe,2);SEd=new CFd('COMPUTED_PROPERTIES',11,'computed property',2);$Ed=new CFd('EXTENDED_OBJECT_LITERALS',12,'extended object literal',2);_Ed=new CFd('FOR_OF',13,'for-of loop',2);aFd=new CFd('GENERATORS',14,'generator',2);hFd=new CFd('LET_DECLARATIONS',15,'let declaration',2);iFd=new CFd('MEMBER_DECLARATIONS',16,'member declaration',2);qFd=new CFd('REGEXP_FLAG_Y',17,"RegExp flag 'y'",2);LEd=new CFd('ARRAY_PATTERN_REST',18,'array pattern rest',2);rFd=new CFd('REST_PARAMETERS',19,'rest parameter',2);tFd=new CFd('SPREAD_EXPRESSIONS',20,'spread expression',2);vFd=new CFd(WXe,21,YOe,2);wFd=new CFd('TEMPLATE_LITERALS',22,'template literal',2);UEd=new CFd('CONST_DECLARATIONS',23,'const declaration',2);WEd=new CFd('DESTRUCTURING',24,'destructuring',2);mFd=new CFd(XXe,25,ZOe,2);pFd=new CFd('REGEXP_FLAG_U',26,"RegExp flag 'u'",2);VEd=new CFd('DEFAULT_PARAMETERS',27,'default parameter',2);kFd=new CFd('MODULES',28,'modules',2);ZEd=new CFd('EXPONENT_OP',29,'exponent operator (**)',3);NEd=new CFd('ASYNC_FUNCTIONS',30,iPe,4);yFd=new CFd('TRAILING_COMMA_IN_PARAM_LIST',31,'trailing comma in param list',4);JEd=new CFd('ACCESSIBILITY_MODIFIER',32,'accessibility modifier',5);KEd=new CFd(YXe,33,'ambient declaration',5);QEd=new CFd(ZXe,34,'call signature',5);TEd=new CFd('CONSTRUCTOR_SIGNATURE',35,'constructor signature',5);XEd=new CFd(WWe,36,fPe,5);bFd=new CFd('GENERICS',37,'generics',5);dFd=new CFd(YWe,38,VOe,5);eFd=new CFd($Xe,39,'index signature',5);fFd=new CFd(ZWe,40,ePe,5);jFd=new CFd('MEMBER_VARIABLE_IN_CLASS',41,'member variable in class',5);lFd=new CFd(_Xe,42,'namespace declaration',5);oFd=new CFd(aYe,43,'optional parameter',5);zFd=new CFd(bYe,44,'type alias',5);AFd=new CFd('TYPE_ANNOTATION',45,'type annotation',5)} +function _Id(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T;switch(eKd(a.g,0).c.g){case 45:return KHd(a);case 30:case 25:return lJd(a);case 52:return VHd(a);case 15:return nId(a);case 10:return c=eKd(a.g,0).b.b,aHd(a,(XMd(),qLd)),d=XId(a),aHd(a,UMd),aHd(a,bMd),e=oHd(a,1),aHd(a,gLd),oJd(a,uMd)&&aHd(a,uMd),new RNd(new qRd(c,a.f),d,e);case 27:return f=eKd(a.g,0).b.b,aHd(a,(XMd(),UMd)),aHd(a,bMd),g=oHd(a,1),aHd(a,gLd),h=XId(a),new gRd(new qRd(f,a.f),g,h);case 13:return dId(a);case 6:return i=eKd(a.g,0).b.b,aHd(a,(XMd(),lLd)),j=null,k=eKd(a.g,0).b.b.b>a.f.b,k||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)||(j=(l=eKd(a.g,0).c,tCe(pCe(FLd,GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),l)||!a.b.c&&MGd(l)?cHd(a):null)),fHd(a),new NNd(new qRd(i,a.f),j);case 3:return m=eKd(a.g,0).b.b,aHd(a,(XMd(),$Kd)),n=null,o=eKd(a.g,0).b.b.b>a.f.b,o||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)||(n=(p=eKd(a.g,0).c,tCe(pCe(FLd,GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),p)||!a.b.c&&MGd(p)?cHd(a):null)),fHd(a),new oNd(new qRd(m,a.f),n);case 19:return q=eKd(a.g,0).b.b,aHd(a,(XMd(),rMd)),r=null,s=eKd(a.g,0).b.b.b>a.f.b,s||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)||(r=oHd(a,1)),fHd(a),new NQd(new qRd(q,a.f),r);case 28:return t=eKd(a.g,0).b.b,aHd(a,(XMd(),VMd)),aHd(a,bMd),u=oHd(a,1),aHd(a,gLd),v=XId(a),new hRd(new qRd(t,a.f),u,v);case 20:return w=eKd(a.g,0).b.b,aHd(a,(XMd(),FMd)),aHd(a,bMd),A=oHd(a,1),aHd(a,gLd),aHd(a,aMd),B=MHd(a),aHd(a,fLd),new RQd(new qRd(w,a.f),A,B);case 22:return C=eKd(a.g,0).b.b,aHd(a,(XMd(),KMd)),D=null,F=eKd(a.g,0).b.b.b>a.f.b,F||nJd(a,0,uMd)||nJd(a,0,fLd)||nJd(a,0,sLd)?HJd(a,"semicolon/newline not allowed after 'throw'",GK(yK(agb,1),ZJe,1,5,[])):(D=oHd(a,1)),fHd(a),new WQd(new qRd(C,a.f),D);case 23:return G=eKd(a.g,0).b.b,aHd(a,(XMd(),NMd)),H=KHd(a),I=null,oJd(a,cLd)&&(I=(P=eKd(a.g,0).b.b,aHd(a,cLd),aHd(a,bMd),nJd(a,0,cMd)||nJd(a,0,aMd)?(Q=KId(a,0)):(Q=mId(a)),aHd(a,gLd),R=KHd(a),new sNd(new qRd(P,a.f),Q,R))),J=null,oJd(a,BLd)&&(J=(S=eKd(a.g,0).b.b,aHd(a,BLd),T=KHd(a),new XNd(new qRd(S,a.f),T))),!I&&!J&&HJd(a,"'catch' or 'finally' expected.",GK(yK(agb,1),ZJe,1,5,[])),new XQd(new qRd(G,a.f),H,I,J);case 7:return K=eKd(a.g,0).b.b,aHd(a,(XMd(),mLd)),fHd(a),new ONd(new qRd(K,a.f));default:{b=eKd(a.g,0).c;if((tCe(pCe((XMd(),FLd),GK(yK(Uab,1),PKe,37,0,[OMd,nLd,TLd,ULd])),b)||!a.b.c&&MGd(b))&&nJd(a,1,iLd)){return L=eKd(a.g,0).b.b,M=bHd(a),aHd(a,iLd),new DOd(new qRd(L,a.f),M,XId(a))}}return N=eKd(a.g,0).b.b,O=oHd(a,1),fHd(a),new WNd(new qRd(N,a.f),O);}} +function Ayb(){Ayb=cjb;syb=new Q_b('JSC_GOOG_MODULE_INVALID_MODULE_NAMESPACE',(prb(),mrb),new _te('goog.module parameter must be string literals'));uyb=new Q_b('JSC_GOOG_MODULE_INVALID_PROVIDE_NAMESPACE',mrb,new _te('goog.provide parameter must be a string literal.'));vyb=new Q_b('JSC_GOOG_MODULE_INVALID_REQUIRE_NAMESPACE',mrb,new _te('goog.require parameter must be a string literal.'));oyb=new Q_b('JSC_GOOG_MODULE_INVALID_FORWARD_DECLARE_NAMESPACE',mrb,new _te('goog.forwardDeclare parameter must be a string literal.'));ryb=new Q_b('JSC_GOOG_MODULE_INVALID_GET_NAMESPACE',mrb,new _te('goog.module.get parameter must be a string literal.'));tyb=new Q_b('JSC_GOOG_MODULE_INVALID_PROVIDE_CALL',mrb,new _te('goog.provide can not be called in goog.module.'));qyb=new Q_b('JSC_GOOG_MODULE_INVALID_GET_CALL_SCOPE',mrb,new _te('goog.module.get can not be called in global scope.'));pyb=new Q_b('JSC_GOOG_MODULE_INVALID_GET_ALIAS',mrb,new _te('goog.module.get should not be aliased.'));nyb=new Q_b('JSC_GOOG_MODULE_INVALID_EXPORT_COMPUTED_PROPERTY',mrb,new _te('Computed properties are not yet supported in goog.module exports.'));yyb=new Q_b('JSC_USELESS_USE_STRICT_DIRECTIVE',nrb,new _te("'use strict' is unnecessary in goog.module files."));byb=new Q_b('JSC_DUPLICATE_MODULE',mrb,new _te('Duplicate module: {0}'));cyb=new Q_b('JSC_DUPLICATE_NAMESPACE',mrb,new _te('Duplicate namespace: {0}'));xyb=new Q_b('JSC_MISSING_MODULE_OR_PROVIDE',mrb,new _te('Required namespace "{0}" never defined.'));wyb=new Q_b(BOe,mrb,new _te('Required namespace "{0}" not provided yet.'));myb=new Q_b('JSC_IMPORT_INLINING_SHADOWS_VAR',mrb,new _te('Inlining of reference to import "{1}" shadows var "{0}".'));kyb=new Q_b('JSC_ILLEGAL_DESTRUCTURING_DEFAULT_EXPORT',mrb,new _te('Destructuring import only allowed for importing module with named exports.\nSee https://github.com/google/closure-compiler/wiki/goog.module-style'));lyb=new Q_b('JSC_ILLEGAL_DESTRUCTURING_NOT_EXPORTED',mrb,new _te('Destructuring import reference to name "{0}" was not exported in module {1}'));zyb=(Qq(),new XD(COe));dyb=EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d((h7d(),_5d),ANe)),new T3d(L6d,DOe));eyb=EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d(_5d,ANe)),new T3d(L6d,EOe));fyb=EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d(_5d,ANe)),new T3d(L6d,FOe));gyb=EYd(fyb,new T3d(L6d,'declareLegacyNamespace'));hyb=EYd(s1d(fyb,false),new T3d(L6d,GOe));iyb=EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d(_5d,ANe)),new T3d(L6d,HOe));jyb=EYd((Ef(Ose(ANe,hte(46))==-1,xMe,ANe),new T3d(_5d,ANe)),new T3d(L6d,IOe))} +function ipd(){ipd=cjb;bpd=new Q_b('JSC_NTI_INVALID_GENERICS_INSTANTIATION',(prb(),orb),new _te('Invalid generics instantiation{0}.\nExpected {1} type argument(s), but found {2}'));Xod=new Q_b('JSC_NTI_EXTENDS_NON_OBJECT',orb,new _te('{0} extends non-object type {1}.\n'));Yod=new Q_b('JSC_NTI_EXTENDS_NOT_ON_CTOR_OR_INTERF',orb,new _te('@extends used without @constructor or @interface for {0}.\n'));apd=new Q_b('JSC_NTI_INHERITANCE_CYCLE',orb,new _te('Cycle detected in inheritance chain of type {0}'));Sod=new Q_b('JSC_NTI_DICT_IMPLEMENTS_INTERF',orb,new _te("Class {0} is a dict. Dicts can't implement interfaces"));_od=new Q_b('JSC_NTI_IMPLEMENTS_WITHOUT_CONSTRUCTOR',orb,new _te(mTe));Qod=new Q_b('JSC_NTI_CONFLICTING_EXTENDED_TYPE',orb,new _te(PVe));Rod=new Q_b('JSC_NTI_CONFLICTING_IMPLEMENTED_TYPE',orb,new _te(QVe));gpd=new Q_b('JSC_NTI_UNION_IS_UNINHABITABLE',orb,new _te('Union of {0} with {1} would create an impossible type'));dpd=new Q_b('JSC_NTI_NEW_EXPECTS_OBJECT_OR_TYPEVAR',orb,new _te('The "new:" annotation only accepts object types and type variables; found {0}'));Mod=new Q_b('JSC_NTI_BAD_ARRAY_TYPE_SYNTAX',orb,new _te('The [] type syntax is not supported. Please use Array instead'));Nod=new Q_b('JSC_NTI_CANNOT_MAKE_TYPEVAR_NON_NULL',orb,new _te('Cannot use ! to restrict type variable type.\nPrefer to make type argument non-nullable and add null explicitly where needed (e.g. through ?T or T|null)'));Ood=new Q_b('JSC_NTI_CIRCULAR_TYPEDEF_ENUM',orb,new _te('Circular typedefs/enums are not allowed'));Vod=new Q_b('JSC_NTI_ENUM_WITH_TYPEVARS',orb,new _te('An enum type cannot include type variables'));Tod=new Q_b('JSC_NTI_ENUM_IS_TOP',orb,new _te('An enum type cannot be *. Use ? if you do not want the elements checked'));Uod=new Q_b('JSC_NTI_ENUM_IS_UNION',orb,new _te('An enum type cannot be a union type'));hpd=new Q_b('JSC_NTI_WRONG_PARAMETER_ORDER',orb,new _te('Wrong parameter order: required parameters are first, then optional, then varargs'));$od=new Q_b('JSC_NTI_IMPLEMENTS_NON_INTERFACE',orb,new _te('Cannot implement non-interface {0}'));Wod=new Q_b('JSC_NTI_EXTENDS_NON_INTERFACE',orb,new _te('Cannot extend non-interface {0}'));Zod=new Q_b('JSC_NTI_FUNCTION_WITH_NONFUNC_JSDOC',orb,new _te('The function is annotated with a non-function jsdoc. Ignoring jsdoc'));epd=new Q_b('JSC_NTI_TEMPLATED_GETTER_SETTER',orb,new _te("@template can't be used with getters/setters"));fpd=new Q_b('JSC_NTI_TWO_JSDOCS',orb,new _te('Found two JsDoc comments for {0}'));Pod=new P$b(GK(yK(oZ,1),ZJe,7,0,[Mod,Ood,Qod,Rod,Wod,Xod,Yod,$od,_od,apd,dpd,epd,fpd,hpd]));cpd=new P$b(GK(yK(oZ,1),ZJe,7,0,[Nod,Sod,Tod,Uod,Vod,Zod,bpd,gpd]))} +function Hnc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;g=false;k=new idd;k.a[k.a.length]='/**';(b.a&XLe)!=0?(k.a[k.a.length]='@export',true):!!b.j&&b.j!=(z_d(),u_d)&&Vcd(k,'@'+Zb(b.j).toLowerCase());(b.a&jNe)!=0&&(k.a[k.a.length]=kNe,true);(!b.d?null:b.d.g)!=null&&Vcd(k,'@lends {'+(!b.d?null:b.d.g)+'}');(b.a&37)!=0&&(b.a&4)==0&&(b.a&32)==0&&(k.a[k.a.length]='@const',true);(b.a&32)!=0&&(k.a[k.a.length]='@final',true);d=!b.d?null:b.d.c;d!=null&&(k.a[k.a.length]='@desc '+d+_Je,true);(b.a&yOe)!=0&&(k.a[k.a.length]='@dict',true);(b.a&iMe)!=0&&(k.a[k.a.length]='@struct',true);(b.a&xOe)!=0&&(k.a[k.a.length]='@unrestricted ',true);(b.a&2)!=0&&(k.a[k.a.length]='@constructor',true);((b.a&512)!=0||(b.a&iNe)!=0)&&(b.a&iNe)==0&&(k.a[k.a.length]='@interface',true);((b.a&512)!=0||(b.a&iNe)!=0)&&(b.a&iNe)!=0&&(k.a[k.a.length]='@record',true);if(!b.d?null:b.d.a){g=true;s=Inc((!b.d?null:b.d.a).a);Vcd(k,Fnc(a,UOe,s))}for(r=LZd(b).$d();r.Pd();){p=rL(r.Qd(),56);g=true;s=Inc(p.a);Vcd(k,Fnc(a,UOe,s))}for(q=PZd(b).$d();q.Pd();){p=rL(q.Qd(),56);g=true;s=Inc(p.a);Vcd(k,Fnc(a,VOe,s))}if(b.g){g=true;s=Inc(b.g.a);Vcd(k,Fnc(a,pNe,s))}if(TZd(b)>0){g=true;for(i=VZd(b).$d();i.Pd();){h=wL(i.Qd());Vcd(k,'@param '+Gnc(a,h,WZd(b,h)))}}if((b.a&hNe)==mKe){g=true;Vcd(k,Fnc(a,LOe,((hNe&b.a)==mKe?b.i:null).a))}ZZd(b).isEmpty()||Vcd(k,Fnc(a,UTe,rL(ZZd(b).getAtIndex(0),56).a));j=YZd(b);if(!j.isEmpty()){Vcd(k,VTe+Wd(new _d(String.fromCharCode(44)),j.$d()));g=true}t=c$d(b);if(!t.isEmpty()){g=true;for(f=cs(t).$d();f.Pd();){e=rL(f.Qd(),12);h=wL(e.se());o=zBb(new HBb(rL(e.te(),5)));k.a[k.a.length]=VTe+h+' := '+o+' =:'}}(b.a&64)!=0&&(k.a[k.a.length]='@override',true);(b.a&hNe)==mNe&&(b.a&4)==0&&(b.e?Vcd(k,Jnc(a,((hNe&b.a)==mNe?b.i:null).a)):Vcd(k,Fnc(a,rNe,((hNe&b.a)==mNe?b.i:null).a)));(b.a&4)!=0&&Vcd(k,Fnc(a,WTe,((hNe&b.a)==mNe?b.i:null).a));(b.a&hNe)==lKe&&Vcd(k,Fnc(a,uNe,((hNe&b.a)==lKe?b.i:null).a));(b.a&hNe)==UQe&&Vcd(k,Fnc(a,fPe,((hNe&b.a)==UQe?b.i:null).a));(b.a&8192)!=0&&(k.a[k.a.length]='@implicitCast',true);n=(m=!b.d?null:b.d.p,!m?(jye(),jye(),iye):m);if(!n.isEmpty()){c=rL(n._d(CK(fgb,pKe,2,0,6,1)),6);Oxe(c,(LC(),KC));Vcd(k,'@suppress {'+Wd(new _d(String.fromCharCode(44)),new Nue(new Zxe(c)))+'}');g=true}if((b.a&256)!=0){Vcd(k,'@deprecated '+(!b.d?null:b.d.b));g=true}if(!!b.d&&e_d(b.d,7)){g=true;k.a[k.a.length]='@polymer'}if(!!b.d&&e_d(b.d,6)){g=true;k.a[k.a.length]='@polymerBehavior'}if(!!b.d&&e_d(b.d,10)){g=true;k.a[k.a.length]='@mixinFunction'}if(!!b.d&&e_d(b.d,9)){g=true;k.a[k.a.length]='@mixinClass'}if(!!b.d&&e_d(b.d,8)){g=true;k.a[k.a.length]='@customElement'}k.a[k.a.length]='*/';l=new zte;g?Ud(new _d('\n '),l,new lxe(k)):Ud(new _d(' '),l,new lxe(k));l.a+=g?_Je:' ';return l.a} +function _wc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W;pf(!!d,'Required type null at: %s',b);kf(0!=d.kl());switch(b.j.g){case 99:case 80:return new ezc(c,a.r);case 65:{h=Uec(a.N,b);return new ezc(c,(lf(h.indexOf('.')==-1,h),kf(h.indexOf('.')==-1),rL(Xk(Nk(c.b,h,false)),20)))}case 34:case 32:case 30:case 31:case 35:return new ezc(c,Myc(a,b.j));case 43:return Exc(a,b,c,d);case 33:{e=a.C.c;if(!(!!e&&!!(e.c?e.c:e.e))){return new ezc(c,a.r)}k=Jsc(a.C,pNe);return new ezc(c,k)}case 29:return Bxc(a,b,c,d);case 63:case 64:case 20:case 22:return _wc(a,b.b,c,a.i);case 21:{j=$wc(a,b.b,c);j.b=a.i;return j}case 25:{j=$wc(a,b.b,c);j.b=a.k;return j}case 41:{g=_wc(a,b.b?b.b.f:null,c,Qqd(a.w)).a;j=$wc(a,b.b,g);j.b=a.b;return j}case 1:case 3:case 2:case 16:case 18:case 10:case 17:case 15:case 11:case 14:case 12:return m=b.b,n=b.b?b.b.f:null,o=_wc(a,n,c,a.i).a,p=_wc(a,m,o,a.i),p.b=a.i,p;case 13:return q=b.b,r=b.b?b.b.f:null,s=64==d.kl()?a.i:a.r,t=_wc(a,r,c,s),u=_wc(a,q,t.a,s),u.b=bod(u.b,t.b),u;case 61:case 62:return v=b.b,w=b.b?b.b.f:null,A=_wc(a,w,c,a.r),B=_wc(a,v,c,a.r),B.b=Tnd(A.b,B.b),B;case 36:case 37:case 4:case 5:return C=$wc(a,b.b?b.b.f:null,c).a,D=$wc(a,b.b,C),D.b=a.b,D;case 6:case 8:case 7:case 9:return zxc(a,b,c);case 47:return Twc(a,b,c,d);case 54:return F=b.b,G=b.b?b.b.f:null,H=_yc(d,a.j),I=uxc(a,F,c,H,false,false),J=64==I.c.kl()?a.i:a.j,K=_wc(a,G,c,J),K.a=uxc(a,F,K.a,H,false,false).a,K;case 48:case 49:case 50:case 51:case 52:case 53:case 55:case 56:case 57:case 58:case 59:return L=b.b,M=b.b?b.b.f:null,N=_wc(a,M,c,a.i),O=uxc(a,L,N.a,a.i,false,false),new ezc(O.a,a.i);case 26:{zf(!$Bc(b.e)||!NCc(b));if(B1d(b,76)!=0){return new ezc(c,d)}return Hxc(a,b.b,(b.b?b.b.f:null).Lm(),c,d)}case 60:return P=b.b,Q=P.d,R=Q.d,S=_wc(a,Q,c,d),T=_wc(a,R,c,d),$wc(a,P,uvd(S.a,T.a));case 28:case 23:case 115:return sxc(a,b,c,d);case 46:{j=_wc(a,b.b?b.b.f:null,c,d);j.a=$wc(a,b.b,j.a).a;return j}case 19:{j=$wc(a,b.b,c);j.b=_ld(j.b);return j}case 27:return jxc(a,b,c,d);case 79:{j=$wc(a,b.b,c);j.b=a.q;return j}case 40:return U=b.b,V=b.b?b.b.f:null,W=_wc(a,V,c,Iyc(a,b)),W=_wc(a,U,W.a,a.j),W.b=a.b,W;case 24:{j=$wc(a,b.b,c);j.b=a.b;return j}case 76:{l=b.b;i=l.Lm();zf(!l.b);return new ezc(Uyc(c,i,a.r),a.r)}case 38:return new ezc(c,rqd(a.w));case 42:return Qwc(a,b,c);case 92:{j=$wc(a,b.b,c);j.b=Tec(a.N,b);return j}case 116:return Pxc(a,b,c);case 98:case 117:return _wc(a,b.b,c,d);case 91:return b.b?_wc(a,b.b,c,d):Bxc(a,b,c,d);case 114:f=$wc(a,b.b.d,c).a;return $wc(a,b.b,f);case 102:{if(b.b){j=$wc(a,b.b,c);j.b=a.r;return j}else{return new ezc(c,a.r)}}default:throw Aib(new DJ('BWD: Unhandled expression type: '+b.j+' with parent: '+b.e));}} +function cxc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;kf(!!d&&0!=d.kl());switch(b.j.g){case 80:j=new ezc(c,a.r);break;case 65:{f=Uec(a.N,b);g=(lf(f.indexOf('.')==-1,f),kf(f.indexOf('.')==-1),rL(Xk(Nk(c.b,f,false)),20));Ef(!!g,'Could not find type for %s',f);h=$xc(a,b,c);j=new ezc(h,g);break}case 34:case 32:case 30:case 31:case 35:j=new ezc(c,Myc(a,b.j));break;case 43:j=Gxc(a,b,c,d,e);break;case 33:{j=Rxc(a,b,c,d,e);break}case 99:{j=Oxc(a,b,c);break}case 29:j=Cxc(a,b,c,d,e);break;case 62:case 61:j=wxc(a,b,c,d,e);break;case 63:case 64:j=nxc(a,b,c,d);break;case 20:case 22:j=Txc(a,b,c);break;case 21:{j=axc(a,b.b,c);j.b=a.i;break}case 25:{j=axc(a,b.b,c);j.b=a.k;break}case 41:j=oxc(a,b,c,e);break;case 13:j=Pwc(a,b,c,d);break;case 1:case 3:case 2:case 16:case 18:case 10:case 17:case 15:case 11:case 14:case 12:j=(k=b.b,l=b.b?b.b.f:null,m=bxc(a,k,c,a.i),n=bxc(a,l,m.a,a.i),wqd(a.w,m.b)||Qyc(a,k,b.j,a.i,m.b),wqd(a.w,n.b)||Qyc(a,l,b.j,a.i,n.b),n.b=a.i,n);break;case 47:j=Uwc(a,b,c,d,e);break;case 54:j=(wyc(a,b),o=b.b,p=b.b?b.b.f:null,q=_yc(d,a.j),r=vxc(a,o,c,q,false),s=r.d,Rld(s,a.j,new bvd((rrd(),rrd(),qrd)))||Qyc(a,o,(h7d(),n4d),a.j,s),t=64==s.kl()?a.i:a.j,u=bxc(a,p,r.b,t),Rld(u.b,t,new bvd((null,qrd)))||Qyc(a,p,(h7d(),n4d),t,u.b),u);break;case 48:case 49:case 50:case 51:case 52:case 53:case 55:case 56:case 57:case 58:case 59:j=Vwc(a,b,c);break;case 36:case 37:j=Nxc(a,b.j,b.b,b.b?b.b.f:null,c,e);break;case 4:case 5:j=Dxc(a,b,c,e);break;case 6:case 8:case 7:case 9:j=Axc(a,b,c);break;case 26:zf(!$Bc(b.e)||!NCc(b));if(B1d(b,76)!=0){T1d(b)&&!tDc(b)&&tyc(a,b,c,true);i=f2d(b,b.g,76);i!=b.g&&(b.g=i);j=new ezc(c,d)}else{j=Ixc(a,b.b,(b.b?b.b.f:null).Lm(),c,d,e)}break;case 60:j=(v=b.b,w=v.d,A=w.d,B=cxc(a,v,c,a.r,a.p).a,C=cxc(a,v,c,a.r,a.e).a,D=cxc(a,w,B,d,e),F=cxc(a,A,C,d,e),new ezc(uvd(D.a,F.a),Tnd(D.b,F.b)));break;case 28:case 23:case 115:j=txc(a,b,c,d,e);break;case 46:j=cxc(a,b.b?b.b.f:null,axc(a,b.b,c).a,d,e);break;case 19:{j=cxc(a,b.b,c,a.r,_ld(e));j.b=gmd(_ld(j.b));break}case 27:j=kxc(a,b,c,d,e);break;case 79:{j=axc(a,b.b,c);j.b=a.q;break}case 40:j=mxc(a,b,c,e);break;case 24:{j=axc(a,b.b,c);j.b=a.b;break}case 38:j=new ezc(c,rqd(a.w));break;case 42:j=Rwc(a,b,c);break;case 92:j=Wwc(a,b,c,e);break;case 68:j=Nxc(a,(h7d(),H6d),b.e.b,b.b,c,e);break;case 116:j=Qxc(a,b,c);break;case 117:j=bxc(a,b.b,c,d);break;case 91:b.b?(j=cxc(a,b.b,c,d,e)):(j=Cxc(a,b,c,d,e));break;case 98:j=cxc(a,b.b,c,d,e);break;case 114:j=cxc(a,b.b,c,d,e);j=cxc(a,b.b.d,j.a,d,e);break;case 102:j=Vxc(a,b,c);break;default:throw Aib(new DJ('Unhandled expression type: '+b.j));}Fyc(a,b,j.b);Gyc(b,j.b);a.C.v.j==(h7d(),r5d)&&GK(yK(agb,1),ZJe,1,5,['AnalyzeExprFWD: ',b,' ::reqtype: ',d,' ::spectype: ',e,' ::resulttype: ',j.b]);return j} +function WMc(){WMc=cjb;RMc=new Q_b('JSC_NULL_ARGUMENT_ERROR',(prb(),mrb),new _te('method "{0}" called without an argument'));CMc=new Q_b('JSC_EXPECTED_OBJECTLIT_ERROR',mrb,new _te('method "{0}" expected an object literal argument'));DMc=new Q_b('JSC_EXPECTED_STRING_ERROR',mrb,new _te('method "{0}" expected an object string argument'));GMc=new Q_b('JSC_INVALID_ARGUMENT_ERROR',mrb,new _te('method "{0}" called with invalid argument'));MMc=new Q_b('JSC_INVALID_CSS_NAME_MAP_STYLE_ERROR',mrb,new _te('Invalid CSS name map style {0}'));SMc=new Q_b('JSC_TOO_MANY_ARGUMENTS_ERROR',mrb,new _te('method "{0}" called with more than one argument'));BMc=new Q_b('JSC_DUPLICATE_NAMESPACE_ERROR',mrb,new _te('namespace "{0}" cannot be provided twice'));UMc=new Q_b('JSC_WEAK_NAMESPACE_TYPE',orb,new _te('Provided symbol declared with type Object. This is rarely useful. For more information see https://github.com/google/closure-compiler/wiki/A-word-about-the-type-Object'));zMc=new Q_b('JSC_CLASS_NAMESPACE_ERROR',mrb,new _te("\"{0}\" cannot be both provided and declared as a class. Try var {0} = class '{'...'}'"));EMc=new Q_b('JSC_FUNCTION_NAMESPACE_ERROR',mrb,new _te('"{0}" cannot be both provided and declared as a function'));PMc=new Q_b('JSC_MISSING_PROVIDE_ERROR',mrb,new _te('required "{0}" namespace never provided'));NMc=new Q_b(BOe,mrb,new _te('required "{0}" namespace not provided yet'));LMc=new Q_b('JSC_INVALID_PROVIDE_ERROR',mrb,new _te('"{0}" is not a valid {1} qualified name'));JMc=new Q_b('JSC_INVALID_DEFINE_NAME_ERROR',mrb,new _te('"{0}" is not a valid JS identifier name'));OMc=new Q_b('JSC_INVALID_MISSING_DEFINE_ANNOTATION',mrb,new _te('Missing @define annotation'));VMc=new Q_b('JSC_XMODULE_REQUIRE_ERROR',orb,new _te('namespace "{0}" is required in module {2} but provided in module {1}. Is module {2} missing a dependency on module {1}?'));HMc=new Q_b('JSC_INVALID_CLOSURE_CALL_ERROR',mrb,new _te('Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.'));QMc=new Q_b('JSC_NON_STRING_PASSED_TO_SET_CSS_NAME_MAPPING_ERROR',mrb,new _te('goog.setCssNameMapping only takes an object literal with string values'));IMc=new Q_b('INVALID_CSS_RENAMING_MAP',orb,new _te('Invalid entries in css renaming map: {0}'));FMc=new Q_b(WUe,mrb,new _te('incorrect use of goog.base: {0}'));yMc=new Q_b(WUe,mrb,new _te('incorrect use of {0}.base: {1}'));AMc=new Q_b('JSC_CLOSURE_DEFINES_ERROR',mrb,new _te('Invalid CLOSURE_DEFINES definition'));KMc=new Q_b('JSC_INVALID_FORWARD_DECLARE',mrb,new _te('Malformed goog.forwardDeclaration'));TMc=new Q_b('JSC_USE_OF_GOOG_BASE',nrb,new _te("goog.base is not compatible with ES5 strict mode.\nPlease use an alternative.\nFor EcmaScript classes use the super keyword, for traditional Closure classes\nuse the class specific base method instead. For example, for the constructor MyClass:\n MyClass.base(this, 'constructor')"))} +function ixd(){ixd=cjb;Fwd=new jxd('NG_INJECT',0);Zvd=new jxd('ABSTRACT',1);$vd=new jxd('AUTHOR',2);cwd=new jxd('CUSTOM_ELEMENT',3);_vd=new jxd('CONSISTENTIDGENERATOR',4);awd=new jxd('CONSTANT',5);bwd=new jxd(VWe,6);Uwd=new jxd('RECORD',7);dwd=new jxd('DEFINE',8);ewd=new jxd('DEPRECATED',9);fwd=new jxd('DESC',10);gwd=new jxd('DICT',11);hwd=new jxd('DISPOSES',12);iwd=new jxd(WWe,13);lwd=new jxd(XWe,14);mwd=new jxd('EXTERNS',15);jwd=new jxd(fTe,16);kwd=new jxd('EXPOSE',17);nwd=new jxd('FILE_OVERVIEW',18);owd=new jxd('FINAL',19);pwd=new jxd('HIDDEN',20);qwd=new jxd('IDGENERATOR',21);rwd=new jxd(YWe,22);swd=new jxd('IMPLICIT_CAST',23);twd=new jxd('INHERIT_DOC',24);uwd=new jxd(ZWe,25);vwd=new jxd('JAGGER_INJECT',26);wwd=new jxd('JAGGER_MODULE',27);xwd=new jxd('JAGGER_PROVIDE',28);ywd=new jxd('JAGGER_PROVIDE_PROMISE',29);zwd=new jxd('LENDS',30);Awd=new jxd('LICENSE',31);Bwd=new jxd('MEANING',32);Cwd=new jxd('MIXIN_CLASS',33);Dwd=new jxd('MIXIN_FUNCTION',34);Ewd=new jxd('MODIFIES',35);Hwd=new jxd('NO_ALIAS',36);Iwd=new jxd('NO_COLLAPSE',37);Jwd=new jxd('NO_COMPILE',38);Kwd=new jxd('NO_SIDE_EFFECTS',39);Gwd=new jxd('NOT_IMPLEMENTED',40);Lwd=new jxd('OVERRIDE',41);Mwd=new jxd($We,42);Nwd=new jxd('PARAM',43);Owd=new jxd('POLYMER',44);Pwd=new jxd('POLYMER_BEHAVIOR',45);Qwd=new jxd('PRESERVE',46);Rwd=new jxd(_We,47);Swd=new jxd(aXe,48);Twd=new jxd(bXe,49);Vwd=new jxd(cXe,50);Wwd=new jxd('SEE',51);Xwd=new jxd('STABLEIDGENERATOR',52);Ywd=new jxd('STRUCT',53);Zwd=new jxd('SUPPRESS',54);$wd=new jxd('TEMPLATE',55);_wd=new jxd(dXe,56);axd=new jxd('THROWS',57);bxd=new jxd(eXe,58);cxd=new jxd('TYPEDEF',59);dxd=new jxd('TYPE_SUMMARY',60);exd=new jxd('UNRESTRICTED',61);fxd=new jxd('VERSION',62);gxd=new jxd('WIZACTION',63);hxd=Ku(new Nu,'ngInject',Fwd).Qf('abstract',Zvd).Qf('argument',Nwd).Qf('author',$vd).Qf('consistentIdGenerator',_vd).Qf(cNe,awd).Qf('constant',awd).Qf(IMe,bwd).Qf('customElement',cwd).Qf('copyright',Awd).Qf(WTe,dwd).Qf(IRe,ewd).Qf('desc',fwd).Qf(sUe,gwd).Qf('disposes',hwd).Qf(fPe,iwd).Qf(POe,jwd).Qf('expose',kwd).Qf(UOe,lwd).Qf('externs',mwd).Qf('fileoverview',nwd).Qf('final',owd).Qf('hidden',pwd).Qf('idGenerator',qwd).Qf(VOe,rwd).Qf('implicitCast',swd).Qf('inheritDoc',twd).Qf(ePe,uwd).Qf('record',Uwd).Qf('jaggerInject',vwd).Qf('jaggerModule',wwd).Qf('jaggerProvidePromise',ywd).Qf('jaggerProvide',xwd).Qf('lends',zwd).Qf('license',Awd).Qf('meaning',Bwd).Qf('mixinClass',Cwd).Qf('mixinFunction',Dwd).Qf('modifies',Ewd).Qf('noalias',Hwd).Qf(oNe,Iwd).Qf('nocompile',Jwd).Qf('nosideeffects',Kwd).Qf('override',Lwd).Qf('owner',$vd).Qf(fXe,Mwd).Qf('param',Nwd).Qf('polymer',Owd).Qf('polymerBehavior',Pwd).Qf('preserve',Qwd).Qf(gXe,Rwd).Qf(hXe,Swd).Qf(iXe,Twd).Qf(LOe,Vwd).Qf('returns',Vwd).Qf('see',Wwd).Qf('stableIdGenerator',Xwd).Qf(rUe,Ywd).Qf('suppress',Zwd).Qf(tNe,$wd).Qf(pNe,_wd).Qf(UTe,axd).Qf(rNe,bxd).Qf(uNe,cxd).Qf('typeSummary',dxd).Qf('unrestricted',exd).Qf('version',fxd).Qf('wizaction',gxd).Pf()} +function m7d(a){var b,c,d;d=false;e:{b=null;f:switch(a.length){case 2:c=a.charCodeAt(1);if(c==102){if(a.charCodeAt(0)==105){d=true;break e}}else if(c==110){if(a.charCodeAt(0)==105){d=true;break e}}else if(c==111){if(a.charCodeAt(0)==100){d=true;break e}}break f;case 3:switch(a.charCodeAt(0)){case 102:if(a.charCodeAt(2)==114&&a.charCodeAt(1)==111){d=true;break e}break f;case 105:if(a.charCodeAt(2)==116&&a.charCodeAt(1)==110){d=true;break e}break f;case 110:if(a.charCodeAt(2)==119&&a.charCodeAt(1)==101){d=true;break e}break f;case 116:if(a.charCodeAt(2)==121&&a.charCodeAt(1)==114){d=true;break e}break f;case 118:if(a.charCodeAt(2)==114&&a.charCodeAt(1)==97){d=true;break e}break f;}break f;case 4:switch(a.charCodeAt(0)){case 98:b='byte';d=true;break f;case 99:c=a.charCodeAt(3);if(c==101){if(a.charCodeAt(2)==115&&a.charCodeAt(1)==97){d=true;break e}}else if(c==114){if(a.charCodeAt(2)==97&&a.charCodeAt(1)==104){d=true;break e}}break f;case 101:c=a.charCodeAt(3);if(c==101){if(a.charCodeAt(2)==115&&a.charCodeAt(1)==108){d=true;break e}}else if(c==109){if(a.charCodeAt(2)==117&&a.charCodeAt(1)==110){d=true;break e}}break f;case 103:b='goto';d=true;break f;case 108:b='long';d=true;break f;case 110:b=kKe;d=true;break f;case 116:c=a.charCodeAt(3);if(c==101){if(a.charCodeAt(2)==117&&a.charCodeAt(1)==114){d=true;break e}}else if(c==115){if(a.charCodeAt(2)==105&&a.charCodeAt(1)==104){d=true;break e}}break f;case 118:b=dPe;d=true;break f;case 119:b='with';d=true;break f;}break f;case 5:switch(a.charCodeAt(2)){case 97:b=TOe;d=true;break f;case 101:b='break';d=true;break f;case 105:b=WOe;d=true;break f;case 108:b=$Oe;d=true;break f;case 110:c=a.charCodeAt(0);if(c==99){b=cNe;d=true}else if(c==102){b='final';d=true}break f;case 111:c=a.charCodeAt(0);if(c==102){b='float';d=true}else if(c==115){b='short';d=true}break f;case 112:b=YOe;d=true;break f;case 114:b=KOe;d=true;break f;case 116:b='catch';d=true;break f;}break f;case 6:switch(a.charCodeAt(1)){case 97:b='native';d=true;break f;case 101:c=a.charCodeAt(0);if(c==100){b=fYe;d=true}else if(c==114){b=LOe;d=true}break f;case 104:b=UTe;d=true;break f;case 109:b=SOe;d=true;break f;case 111:b='double';d=true;break f;case 116:b=kXe;d=true;break f;case 117:b=iXe;d=true;break f;case 119:b='switch';d=true;break f;case 120:b=POe;d=true;break f;case 121:b=FUe;d=true;break f;}break f;case 7:switch(a.charCodeAt(1)){case 97:b=fXe;d=true;break f;case 101:b=QOe;d=true;break f;case 105:b=JOe;d=true;break f;case 111:b=bKe;d=true;break f;case 114:b=gXe;d=true;break f;case 120:b=UOe;d=true;break f;}break f;case 8:switch(a.charCodeAt(0)){case 97:b='abstract';d=true;break f;case 99:b=aPe;d=true;break f;case 100:b=cPe;d=true;break f;case 102:b=aKe;d=true;break f;case 118:b='volatile';d=true;break f;}break f;case 9:c=a.charCodeAt(0);if(c==105){b=ePe;d=true}else if(c==112){b=hXe;d=true}else if(c==116){b='transient';d=true}break f;case 10:c=a.charCodeAt(1);if(c==109){b=VOe;d=true}else if(c==110){b=GUe;d=true}break f;case 12:b='synchronized';d=true;break f;}if(b!=null&&b!=a&&!Jse(b,a))return false}return d} +function kvb(){kvb=cjb;Qub=new Q_b($Ne,(prb(),mrb),new _te('@export has no effect here'));Rub=new Q_b($Ne,mrb,new _te('@export is not allowed here in a non-legacy goog.module. Consider using goog.exportSymbol instead.'));Vub=new Q_b('JSC_GOOG_MODULE_IN_NON_MODULE',mrb,new _te('goog.module() call must be the first statement in a module.'));Wub=new Q_b('JSC_GOOG_MODULE_REFERENCES_THIS',mrb,new _te("The body of a goog.module cannot reference 'this'."));Yub=new Q_b('JSC_GOOG_MODULE_USES_THROW',mrb,new _te("The body of a goog.module cannot use 'throw'."));Xub=new Q_b('JSC_GOOG_MODULE_USES_GOOG_MODULE_GET',mrb,new _te("It's illegal to use a 'goog.module.get' at the module top-level. Did you mean to use goog.require instead?"));Sub=new Q_b('JSC_DUPLICATE_NAME_SHORT_REQUIRE',mrb,new _te("Found multiple goog.require statements importing identifier ''{0}''."));_ub=new Q_b('JSC_INVALID_DESTRUCTURING_REQUIRE',mrb,new _te('Destructuring goog.require must be a simple object pattern.'));$ub=new Q_b('JSC_INVALID_DESTRUCTURING_FORWARD_DECLARE',mrb,new _te('Cannot destructure a forward-declared type'));cvb=new Q_b('JSC_LET_GOOG_REQUIRE',nrb,new _te("Module imports must be constant. Please use 'const' instead of 'let'."));evb=new Q_b('JSC_MULTIPLE_MODULES_IN_FILE',mrb,new _te('There should only be a single goog.module() statement per file.'));dvb=new Q_b('JSC_MODULE_AND_PROVIDES',mrb,new _te('A file using goog.module() may not also use goog.provide() statements.'));fvb=new Q_b('JSC_ONE_REQUIRE_PER_DECLARATION',mrb,new _te('There may only be one goog.require() per var/let/const declaration.'));Zub=new Q_b('JSC_INCORRECT_SHORTNAME_CAPITALIZATION',nrb,new _te('The capitalization of short name {0} is incorrect; it should be {1}.'));Tub=new Q_b('JSC_EXPORT_NOT_A_MODULE_LEVEL_STATEMENT',mrb,new _te('Exports must be a statement at the top-level of a module'));Uub=new Q_b('JSC_EXPORT_REPEATED_ERROR',mrb,new _te('Name cannot be exported multiple times. Previous export on line {0}.'));hvb=new Q_b('JSC_REFERENCE_TO_MODULE_GLOBAL_NAME',mrb,new _te('References to the global name of a module are not allowed. Perhaps you meant exports?'));gvb=new Q_b('JSC_REFERENCE_TO_FULLY_QUALIFIED_IMPORT_NAME',nrb,new _te("Reference to fully qualified import name ''{0}''. Imports in goog.module should use the return value of goog.require / goog.forwardDeclare instead."));ivb=new Q_b('JSC_REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME',nrb,new _te("Reference to fully qualified import name ''{0}''. Please use the short name ''{1}'' instead."));avb=new Q_b('JSC_JSDOC_REFERENCE_TO_FULLY_QUALIFIED_IMPORT_NAME',nrb,new _te("Reference to fully qualified import name ''{0}'' in JSDoc. Imports in goog.module should use the return value of goog.require / goog.forwardDeclare instead."));bvb=new Q_b('JSC_JSDOC_REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME',nrb,new _te("Reference to fully qualified import name ''{0}'' in JSDoc. Please use the short name ''{1}'' instead."));jvb=new Q_b('JSC_REQUIRE_NOT_AT_TOP_LEVEL',mrb,new _te('goog.require() must be called at file scope.'))} +function Wyd(a,b){switch(b.p.g){case 42:return czd(a,rL(b,165));case 28:return Yyd(a,rL(b,606));case 74:return qAd(a,rL(b,492));case 75:return rAd(a,rL(rL(b,493).a,134));case 76:return sAd(a,rL(b,494));case 44:return zAd(a,rL(b,495));case 2:return ezd(a,rL(b,496));case 14:return fzd(a,rL(b,607));case 49:return Hzd(a,rL(b,359));case 17:return nAd(a,rL(b,608));case 18:return oAd(a,rL(b,609));case 22:return hzd(a,rL(b,610));case 13:return tzd(a,rL(b,611));case 8:return vzd(a,rL(b,612));case 5:return Vxd((rL(b,311),a).a,(h7d(),c5d));case 6:return Azd(a,rL(b,497));case 24:return Vxd((rL(b,613),a).a,(h7d(),U4d));case 25:return Vxd((rL(b,614),a).a,(h7d(),U6d));case 11:return Dzd(a,rL(b,615));case 10:return Czd(a,rL(b,616));case 1:return Gzd(a,rL(b,617));case 55:return wzd(a,rL(b,422));case 46:return cAd(a,rL(b,423));case 43:return szd(a,rL(b,498));case 7:return Lzd(a,rL(b,618));case 20:return Qzd(a,rL(b,619));case 56:return bAd(a,rL(b,424));case 26:return Tzd(a,rL(b,232).a,false);case 47:return Wzd(a,rL(b,425));case 29:return Zzd(a,rL(b,620));case 36:return nzd(a,rL(b,499));case 37:return ozd(a,rL(b,621));case 88:return pzd(a,rL(b,622));case 38:return qzd(a,rL(b,360));case 39:return rzd(a,rL(b,623));case 15:return hAd(a,rL(b,624));case 45:return BAd(a,rL(b,426));case 0:return azd(a,rL(b,593));case 27:return Rzd(a,rL(b,500));case 19:return pAd(a,rL(b,625));case 21:return tAd(a,rL(b,626));case 23:return uAd(a,rL(b,627));case 3:return EAd(a,rL(b,628));case 12:return DAd(a,rL(b,629));case 4:return CAd(a,rL(b,276));case 9:return FAd(a,rL(b,630));case 16:return GAd(a,rL(b,631));case 41:return jzd(a,rL(b,427));case 64:return Vxd((rL(b,313),a).a,(h7d(),c5d));case 57:return Bzd(a,rL(b,632));case 40:return $xd((rL(b,428),a).a,(h7d(),_5d),pXe);case 35:return dAd(a,rL(b,361));case 33:return Kzd(a,rL(b,633));case 34:return iAd(a,rL(b,634));case 62:return Fzd(a,rL(b,233));case 50:return izd(a,rL(b,635));case 58:return mAd(a,rL(b,636));case 93:return Xzd(a,rL(b,637));case 72:return HAd(a,rL(b,638));case 94:return bzd(a,rL(b,639));case 71:return Ezd(a,rL(b,640));case 67:return yzd(a,rL(b,641));case 68:return zzd(a,rL(b,501));case 69:return Mzd(a,rL(b,502));case 70:return Nzd(a,rL(b,642));case 59:return Zyd(a,rL(b,643));case 61:return $zd(a,rL(b,644));case 60:return _yd(a,rL(b,645));case 30:return kzd(a,rL(b,646));case 32:return lzd(a,rL(b,647));case 31:return mzd(a,rL(b,648));case 73:return uzd(a,rL(b,362));case 65:return gAd(a,rL(b,503));case 63:return jAd(a,rL(b,649));case 77:return wAd(a,rL(b,504));case 79:return yAd(a,rL(b,429));case 80:return _zd(a,rL(b,505));case 81:return aAd(a,rL(b,650));case 82:return $yd(a,rL(b,651));case 83:return eAd(a,rL(b,652));case 84:return AAd(a,rL(b,653));case 85:return Izd(a,rL(b,654));case 78:return xAd(a,rL(b,655));case 86:return Jzd(a,rL(b,656));case 87:return Szd(a,rL(b,430));case 51:return Pzd(a,rL(b,657));case 54:return xzd(a,rL(b,658));case 89:return vAd(a,rL(b,659));case 90:return Xyd(a,rL(b,660));case 52:return Uzd(a,rL(b,661));case 91:return Ozd(a,rL(b,662));case 92:return gzd(a,rL(b,663));}return a.a.d.Ej('Unsupported syntax: '+b.p,a.a.r,(Jxd(),b.o.b.b+1),0),Vxd(a.a,(h7d(),c5d))} +function GQd(){GQd=cjb;eQd=new HQd('PROGRAM',0);FPd=new HQd('FUNCTION_DECLARATION',1);_Od=new HQd('BLOCK',2);CQd=new HQd('VARIABLE_STATEMENT',3);AQd=new HQd('VARIABLE_DECLARATION',4);vPd=new HQd('EMPTY_STATEMENT',5);zPd=new HQd('EXPRESSION_STATEMENT',6);KPd=new HQd('IF_STATEMENT',7);uPd=new HQd('DO_WHILE_STATEMENT',8);DQd=new HQd('WHILE_STATEMENT',9);CPd=new HQd('FOR_IN_STATEMENT',10);EPd=new HQd('FOR_STATEMENT',11);BQd=new HQd('VARIABLE_DECLARATION_LIST',12);qPd=new HQd('CONTINUE_STATEMENT',13);aPd=new HQd('BREAK_STATEMENT',14);iQd=new HQd('RETURN_STATEMENT',15);EQd=new HQd('WITH_STATEMENT',16);dPd=new HQd('CASE_CLAUSE',17);sPd=new HQd('DEFAULT_CLAUSE',18);mQd=new HQd('SWITCH_STATEMENT',19);PPd=new HQd('LABELLED_STATEMENT',20);rQd=new HQd('THROW_STATEMENT',21);ePd=new HQd(cYe,22);sQd=new HQd('TRY_STATEMENT',23);rPd=new HQd('DEBUGGER_STATEMENT',24);qQd=new HQd('THIS_EXPRESSION',25);JPd=new HQd('IDENTIFIER_EXPRESSION',26);QPd=new HQd('LITERAL_EXPRESSION',27);VOd=new HQd('ARRAY_LITERAL_EXPRESSION',28);_Pd=new HQd('OBJECT_LITERAL_EXPRESSION',29);hPd=new HQd('COMPREHENSION',30);jPd=new HQd('COMPREHENSION_IF',31);iPd=new HQd('COMPREHENSION_FOR',32);IPd=new HQd('GET_ACCESSOR',33);jQd=new HQd('SET_ACCESSOR',34);fQd=new HQd('PROPERTY_NAME_ASSIGNMENT',35);kPd=new HQd('COMPUTED_PROPERTY_DEFINITION',36);lPd=new HQd('COMPUTED_PROPERTY_GETTER',37);nPd=new HQd('COMPUTED_PROPERTY_METHOD',38);oPd=new HQd('COMPUTED_PROPERTY_SETTER',39);UPd=new HQd('MISSING_PRIMARY_EXPRESSION',40);gPd=new HQd('COMMA_EXPRESSION',41);$Od=new HQd('BINARY_OPERATOR',42);pPd=new HQd('CONDITIONAL_EXPRESSION',43);xQd=new HQd('UNARY_EXPRESSION',44);zQd=new HQd('UPDATE_EXPRESSION',45);RPd=new HQd('MEMBER_EXPRESSION',46);YPd=new HQd('NEW_EXPRESSION',47);UOd=new HQd('ARGUMENT_LIST',48);bPd=new HQd('CALL_EXPRESSION',49);fPd=new HQd('CLASS_DECLARATION',50);OPd=new HQd('INTERFACE_DECLARATION',51);WPd=new HQd(_Xe,52);XPd=new HQd('NAMESPACE_NAME',53);wPd=new HQd('ENUM_DECLARATION',54);SPd=new HQd('MEMBER_LOOKUP_EXPRESSION',55);dQd=new HQd('PAREN_EXPRESSION',56);APd=new HQd(gYe,57);lQd=new HQd('SUPER_EXPRESSION',58);WOd=new HQd(AYe,59);YOd=new HQd('ASSIGNMENT_REST_ELEMENT',60);aQd=new HQd(BYe,61);BPd=new HQd('FORMAL_PARAMETER_LIST',62);kQd=new HQd('SPREAD_EXPRESSION',63);$Pd=new HQd(BWe,64);hQd=new HQd('REST_PARAMETER',65);VPd=new HQd('MODULE_IMPORT',66);xPd=new HQd('EXPORT_DECLARATION',67);yPd=new HQd('EXPORT_SPECIFIER',68);LPd=new HQd('IMPORT_DECLARATION',69);MPd=new HQd('IMPORT_SPECIFIER',70);DPd=new HQd('FOR_OF_STATEMENT',71);FQd=new HQd('YIELD_EXPRESSION',72);tPd=new HQd('DEFAULT_PARAMETER',73);nQd=new HQd('TEMPLATE_LITERAL_EXPRESSION',74);oQd=new HQd('TEMPLATE_LITERAL_PORTION',75);pQd=new HQd('TEMPLATE_SUBSTITUTION',76);vQd=new HQd('TYPE_NAME',77);wQd=new HQd('TYPE_QUERY',78);tQd=new HQd('TYPED_PARAMETER',79);bQd=new HQd(aYe,80);cQd=new HQd('PARAMETERIZED_TYPE_TREE',81);XOd=new HQd(CYe,82);gQd=new HQd(DYe,83);yQd=new HQd(EYe,84);GPd=new HQd(FYe,85);HPd=new HQd(GYe,86);TPd=new HQd('MEMBER_VARIABLE',87);mPd=new HQd('COMPUTED_PROPERTY_MEMBER_VARIABLE',88);uQd=new HQd(bYe,89);TOd=new HQd(YXe,90);NPd=new HQd($Xe,91);cPd=new HQd(ZXe,92);ZPd=new HQd('NEW_TARGET_EXPRESSION',93);ZOd=new HQd('AWAIT_EXPRESSION',94)} +function XMd(){XMd=cjb;sLd=new $Md('END_OF_FILE',0,'End of File');xLd=new $Md(qMe,1,'error');FLd=new $Md('IDENTIFIER',2,'identifier');$Kd=new ZMd('BREAK',3);bLd=new ZMd('CASE',4);cLd=new ZMd(cYe,5);lLd=new ZMd(dYe,6);mLd=new ZMd(eYe,7);oLd=new ZMd(NVe,8);pLd=new ZMd('DELETE',9);qLd=new ZMd('DO',10);rLd=new ZMd('ELSE',11);BLd=new ZMd(gYe,12);CLd=new ZMd('FOR',13);DLd=new ZMd(uTe,14);GLd=new ZMd('IF',15);JLd=new ZMd('IN',16);KLd=new ZMd(UXe,17);VLd=new ZMd('NEW',18);rMd=new ZMd(cXe,19);FMd=new ZMd(hYe,20);JMd=new ZMd(dXe,21);KMd=new ZMd('THROW',22);NMd=new ZMd('TRY',23);PMd=new ZMd(iYe,24);SMd=new ZMd('VAR',25);TMd=new ZMd('VOID',26);UMd=new ZMd('WHILE',27);VMd=new ZMd('WITH',28);dLd=new ZMd(tTe,29);kLd=new ZMd('CONST',30);tLd=new ZMd(WWe,31);yLd=new ZMd(fTe,32);zLd=new ZMd(XWe,33);ILd=new ZMd(jYe,34);EMd=new ZMd(WXe,35);HLd=new ZMd(YWe,36);LLd=new ZMd(ZWe,37);PLd=new ZMd('LET',38);eMd=new ZMd($We,39);mMd=new ZMd(_We,40);nMd=new ZMd(aXe,41);oMd=new ZMd(bXe,42);CMd=new ZMd('STATIC',43);WMd=new ZMd('YIELD',44);aMd=new $Md('OPEN_CURLY',45,'{');fLd=new $Md('CLOSE_CURLY',46,'}');bMd=new $Md('OPEN_PAREN',47,'(');gLd=new $Md('CLOSE_PAREN',48,')');cMd=new $Md('OPEN_SQUARE',49,'[');hLd=new $Md('CLOSE_SQUARE',50,']');hMd=new $Md('PERIOD',51,'.');uMd=new $Md('SEMI_COLON',52,';');jLd=new $Md('COMMA',53,',');_Ld=new $Md('OPEN_ANGLE',54,'<');eLd=new $Md('CLOSE_ANGLE',55,'>');OLd=new $Md('LESS_EQUAL',56,'<=');ELd=new $Md('GREATER_EQUAL',57,'>=');WKd=new $Md('ARROW',58,'=>');vLd=new $Md('EQUAL_EQUAL',59,'==');WLd=new $Md('NOT_EQUAL',60,'!=');wLd=new $Md('EQUAL_EQUAL_EQUAL',61,'===');XLd=new $Md('NOT_EQUAL_EQUAL',62,'!==');iMd=new $Md('PLUS',63,'+');QLd=new $Md('MINUS',64,'-');yMd=new $Md('STAR',65,'*');AMd=new $Md('STAR_STAR',66,'**');fMd=new $Md('PERCENT',67,'%');kMd=new $Md('PLUS_PLUS',68,'++');SLd=new $Md('MINUS_MINUS',69,'--');MLd=new $Md('LEFT_SHIFT',70,'<<');sMd=new $Md('RIGHT_SHIFT',71,'>>');QMd=new $Md('UNSIGNED_RIGHT_SHIFT',72,'>>>');TKd=new $Md('AMPERSAND',73,'&');YKd=new $Md('BAR',74,'|');_Kd=new $Md('CARET',75,'^');XKd=new $Md('BANG',76,'!');LMd=new $Md('TILDE',77,'~');VKd=new $Md('AND',78,'&&');dMd=new $Md('OR',79,'||');pMd=new $Md('QUESTION',80,'?');iLd=new $Md('COLON',81,':');uLd=new $Md('EQUAL',82,'=');jMd=new $Md('PLUS_EQUAL',83,'+=');RLd=new $Md('MINUS_EQUAL',84,'-=');zMd=new $Md('STAR_EQUAL',85,'*=');BMd=new $Md('STAR_STAR_EQUAL',86,'**=');gMd=new $Md('PERCENT_EQUAL',87,'%=');NLd=new $Md('LEFT_SHIFT_EQUAL',88,'<<=');tMd=new $Md('RIGHT_SHIFT_EQUAL',89,'>>=');RMd=new $Md('UNSIGNED_RIGHT_SHIFT_EQUAL',90,'>>>=');UKd=new $Md('AMPERSAND_EQUAL',91,'&=');ZKd=new $Md('BAR_EQUAL',92,'|=');aLd=new $Md('CARET_EQUAL',93,'^=');vMd=new $Md('SLASH',94,'/');wMd=new $Md('SLASH_EQUAL',95,'/=');lMd=new $Md('POUND',96,'#');ZLd=new ZMd(BWe,97);MMd=new ZMd(JQe,98);ALd=new ZMd(IQe,99);$Ld=new $Md(CWe,100,'number literal');DMd=new $Md(DWe,101,'string literal');qMd=new $Md('REGULAR_EXPRESSION',102,'regular expression literal');xMd=new $Md('SPREAD',103,OOe);GMd=new $Md('TEMPLATE_HEAD',104,'template head');HMd=new $Md('TEMPLATE_MIDDLE',105,'template middle');IMd=new $Md('TEMPLATE_TAIL',106,'template tail');YLd=new $Md('NO_SUBSTITUTION_TEMPLATE',107,'no substitution template');OMd=new ZMd(eXe,108);nLd=new ZMd(kYe,109);TLd=new ZMd('MODULE',110);ULd=new ZMd(lYe,111)} +function nKd(a){var b,c;rKd(a);b=a.d;if(!$Jd(a,a.d)){return WJd(a,(XMd(),sLd),b)}c=_Jd(a);switch(c){case 123:return WJd(a,(XMd(),aMd),b);case 125:return WJd(a,(XMd(),fLd),b);case 40:return WJd(a,(XMd(),bMd),b);case 41:return WJd(a,(XMd(),gLd),b);case 91:return WJd(a,(XMd(),cMd),b);case 93:return WJd(a,(XMd(),hLd),b);case 46:if(IKd($Jd(a,a.d)?Ese(a.e.a,a.d):0)){return sKd(a),iKd(a,b)}if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==46&&($Jd(a,a.d+1)?Ese(a.e.a,a.d+1):0)==46){_Jd(a);_Jd(a);return WJd(a,(XMd(),xMd),b)}return WJd(a,(XMd(),hMd),b);case 59:return WJd(a,(XMd(),uMd),b);case 44:return WJd(a,(XMd(),jLd),b);case 126:return WJd(a,(XMd(),LMd),b);case 63:return WJd(a,(XMd(),pMd),b);case 58:return WJd(a,(XMd(),iLd),b);case 60:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 60:_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),NLd),b)}return WJd(a,(XMd(),MLd),b);case 61:_Jd(a);return WJd(a,(XMd(),OLd),b);default:return WJd(a,(XMd(),_Ld),b);}case 62:if(a.f>0){return WJd(a,(XMd(),eLd),b)}switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 62:_Jd(a);switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 61:_Jd(a);return WJd(a,(XMd(),tMd),b);case 62:_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),RMd),b)}return WJd(a,(XMd(),QMd),b);default:return WJd(a,(XMd(),sMd),b);}case 61:_Jd(a);return WJd(a,(XMd(),ELd),b);default:return WJd(a,(XMd(),eLd),b);}case 61:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 61:_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),wLd),b)}return WJd(a,(XMd(),vLd),b);case 62:_Jd(a);return WJd(a,(XMd(),WKd),b);default:return WJd(a,(XMd(),uLd),b);}case 33:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),XLd),b)}return WJd(a,(XMd(),WLd),b)}return WJd(a,(XMd(),XKd),b);case 42:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),zMd),b)}else if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==42){_Jd(a);if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),BMd),b)}else{return WJd(a,(XMd(),AMd),b)}}return WJd(a,(XMd(),yMd),b);case 37:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),gMd),b)}return WJd(a,(XMd(),fMd),b);case 94:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),aLd),b)}return WJd(a,(XMd(),_Kd),b);case 47:if(($Jd(a,a.d)?Ese(a.e.a,a.d):0)==61){_Jd(a);return WJd(a,(XMd(),wMd),b)}return WJd(a,(XMd(),vMd),b);case 43:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 43:_Jd(a);return WJd(a,(XMd(),kMd),b);case 61:_Jd(a);return WJd(a,(XMd(),jMd),b);default:return WJd(a,(XMd(),iMd),b);}case 45:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 45:_Jd(a);return WJd(a,(XMd(),SLd),b);case 61:_Jd(a);return WJd(a,(XMd(),RLd),b);default:return WJd(a,(XMd(),QLd),b);}case 38:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 38:_Jd(a);return WJd(a,(XMd(),VKd),b);case 61:_Jd(a);return WJd(a,(XMd(),UKd),b);default:return WJd(a,(XMd(),TKd),b);}case 124:switch($Jd(a,a.d)?Ese(a.e.a,a.d):0){case 124:_Jd(a);return WJd(a,(XMd(),dMd),b);case 61:_Jd(a);return WJd(a,(XMd(),ZKd),b);default:return WJd(a,(XMd(),YKd),b);}case 35:return WJd(a,(XMd(),lMd),b);case 48:return lKd(a,b);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return sKd(a),jKd(a,b);case 34:case 39:return mKd(a,b,c);case 96:return !$Jd(a,a.d)&&fKd(a,RGd(a.e.b,b),wYe,GK(yK(agb,1),ZJe,1,5,[])),cKd(a,(XMd(),YLd),GMd);default:return kKd(a,b,c);}} +function zie(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb;g=new Dae(a);Hie(a,(Lhe(),Gge),g);w=new Dle(a);Hie(a,bhe,w);G=new Rle(a);Hie(a,hhe,G);V=new Mme(a);Hie(a,whe,V);db=new vpe(a,false);Hie(a,Hhe,db);hb=new vpe(a,true);Hie(a,Hge,hb);gb=new Tpe(a);Hie(a,Khe,gb);b=new R9d(a);Hie(a,Bge,b);a.i=new Yme(a,'IObject#KEY1');a.g=new Yme(a,'IObject#VALUE');a.a=new Yme(a,'T');Z=new Rce(a,null,null,true,null);Hie(a,Ahe,Z);I=new see(a,DKe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[b])),null),null,gie(a,(lr(),new fD(Er(GK(yK(agb,1),ZJe,1,5,[a.i,a.g])))),null),true,true,false);I.c.b=(Ef(I.i==(Bfe(),yfe)||I.i==zfe,hOe,I),S7d(I.p));mee(I,Z,null);Hie(a,jhe,I);M=(Ef(I.i==yfe||I.i==zfe,hOe,I),S7d(I.p));Hie(a,nhe,M);L=aee(I);Hie(a,mhe,L);n=new see(a,gNe,null,new kae(a,die(a,true,GK(yK(Web,1),oTe,9,0,[b])),db),null,null,true,true,false);nee(n,M,null);Hie(a,Qge,n);o=aee(n);Hie(a,Sge,o);v=new ele(a);Hie(a,ahe,v);t=new Kke(a);Hie(a,$ge,t);u=new tle(a);Hie(a,_ge,u);c=new see(a,lOe,null,new kae(a,die(a,true,GK(yK(Web,1),oTe,9,0,[b])),null),null,ine(gie(a,new UD(a.a),null),gie(a,new UD(a.g),new UD(a.a))),true,true,false);c.c.b=(Ef(c.i==yfe||c.i==zfe,hOe,c),S7d(c.p));aee(c);Hie(a,Cge,c);d=(Ef(c.i==yfe||c.i==zfe,hOe,c),S7d(c.p));Hie(a,Dge,d);e=new see(a,GKe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[b])),g),null,null,true,true,false);aee(e);Hie(a,Ege,e);f=(Ef(e.i==yfe||e.i==zfe,hOe,e),S7d(e.p));Hie(a,Fge,f);h=new see(a,nSe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[db,db,db,db,db,db,db])),V),null,null,true,true,false);aee(h);Hie(a,Ige,h);i=(Ef(h.i==yfe||h.i==zfe,hOe,h),S7d(h.p));Hie(a,Jge,i);j=new efe(a,gSe);Hie(a,Lge,j);k=(Ef(j.i==yfe||j.i==zfe,hOe,j),S7d(j.p));Hie(a,Mge,k);l=new efe(a,hSe);nee(l,k,null);Hie(a,Nge,l);m=(Ef(l.i==yfe||l.i==zfe,hOe,l),S7d(l.p));Hie(a,Oge,m);N=new efe(a,iSe);nee(N,k,null);Hie(a,ohe,N);O=(Ef(N.i==yfe||N.i==zfe,hOe,N),S7d(N.p));Hie(a,phe,O);P=new efe(a,jSe);nee(P,k,null);Hie(a,qhe,P);Q=(Ef(P.i==yfe||P.i==zfe,hOe,P),S7d(P.p));Hie(a,rhe,Q);X=new efe(a,kSe);nee(X,k,null);Hie(a,yhe,X);Y=(Ef(X.i==yfe||X.i==zfe,hOe,X),S7d(X.p));Hie(a,zhe,Y);$=new efe(a,lSe);nee($,k,null);Hie(a,Dhe,$);ab=(Ef($.i==yfe||$.i==zfe,hOe,$),S7d($.p));Hie(a,Ehe,ab);eb=new efe(a,mSe);nee(eb,k,null);Hie(a,Ihe,eb);fb=(Ef(eb.i==yfe||eb.i==zfe,hOe,eb),S7d(eb.p));Hie(a,Jhe,fb);B=new see(a,HKe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[b])),G),null,null,true,true,false);aee(B);Hie(a,dhe,B);C=(Ef(B.i==yfe||B.i==zfe,hOe,B),S7d(B.p));Hie(a,ehe,C);R=new see(a,NNe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[b,b])),null),null,null,true,true,false);R.c.b=(Ef(R.i==yfe||R.i==zfe,hOe,R),S7d(R.p));aee(R);Hie(a,she,R);S=(Ef(R.i==yfe||R.i==zfe,hOe,R),S7d(R.p));Hie(a,the,S);T=new see(a,IKe,null,new kae(a,bie(a,GK(yK(Web,1),oTe,9,0,[b])),V),null,null,true,true,false);aee(T);Hie(a,uhe,T);U=(Ef(T.i==yfe||T.i==zfe,hOe,T),S7d(T.p));Hie(a,vhe,U);A=iie(a,GK(yK(Web,1),oTe,9,0,[w,gb]));Hie(a,che,A);J=iie(a,GK(yK(Web,1),oTe,9,0,[M,G,V]));Hie(a,khe,J);K=iie(a,GK(yK(Web,1),oTe,9,0,[M,G,V,g]));Hie(a,lhe,K);F=iie(a,GK(yK(Web,1),oTe,9,0,[G,V,g]));Hie(a,ghe,F);D=iie(a,GK(yK(Web,1),oTe,9,0,[G,V]));Hie(a,fhe,D);W=iie(a,GK(yK(Web,1),oTe,9,0,[U,V]));Hie(a,xhe,W);H=iie(a,GK(yK(Web,1),oTe,9,0,[C,G]));Hie(a,ihe,H);cb=Xhe(a,db,GK(yK(Web,1),oTe,9,0,[db]));Hie(a,Ghe,cb);bb=new _ie(a,new kae(a,die(a,true,GK(yK(Web,1),oTe,9,0,[db])),db),db);Hie(a,Fhe,bb);Hie(a,Rge,bb);n.p=bb;zf(!(!!bb.k||!bb.B));bb.s=o;s=$he(a,v,GK(yK(Web,1),oTe,9,0,[b]));Hie(a,Zge,s);q=new see(a,'global this',null,new kae(a,die(a,false,GK(yK(Web,1),oTe,9,0,[b])),G),null,null,true,true,false);p=(Ef(q.i==yfe||q.i==zfe,hOe,q),S7d(q.p));Hie(a,Uge,p);r=$he(a,b,GK(yK(Web,1),oTe,9,0,[v]));Hie(a,Vge,r);Iie(a,KMe,I)} +function h7d(){h7d=cjb;C6d=new i7d(cXe,0);D4d=new i7d('BITOR',1);E4d=new i7d('BITXOR',2);B4d=new i7d('BITAND',3);g5d=new i7d('EQ',4);d6d=new i7d('NE',5);V5d=new i7d('LT',6);S5d=new i7d('LE',7);z5d=new i7d('GT',8);t5d=new i7d('GE',9);U5d=new i7d('LSH',10);E6d=new i7d('RSH',11);a7d=new i7d('URSH',12);f4d=new i7d('ADD',13);O6d=new i7d('SUB',14);$5d=new i7d('MUL',15);_4d=new i7d('DIV',16);Y5d=new i7d('MOD',17);i5d=new i7d('EXPONENT',18);h6d=new i7d('NOT',19);C4d=new i7d('BITNOT',20);w6d=new i7d('POS',21);e6d=new i7d('NEG',22);f6d=new i7d('NEW',23);Z4d=new i7d('DELPROP',24);Y6d=new i7d(iYe,25);x5d=new i7d('GETPROP',26);w5d=new i7d('GETELEM',27);I4d=new i7d('CALL',28);_5d=new i7d('NAME',29);k6d=new i7d(CWe,30);L6d=new i7d(DWe,31);i6d=new i7d(BWe,32);U6d=new i7d(dXe,33);n5d=new i7d(IQe,34);W6d=new i7d(JQe,35);H6d=new i7d('SHEQ',36);I6d=new i7d('SHNE',37);z6d=new i7d('REGEXP',38);V6d=new i7d('THROW',39);H5d=new i7d('IN',40);K5d=new i7d(UXe,41);j4d=new i7d('ARRAYLIT',42);m6d=new i7d('OBJECTLIT',43);X6d=new i7d('TRY',44);r6d=new i7d('PARAM_LIST',45);Q4d=new i7d('COMMA',46);m4d=new i7d('ASSIGN',47);p4d=new i7d('ASSIGN_BITOR',48);q4d=new i7d('ASSIGN_BITXOR',49);o4d=new i7d('ASSIGN_BITAND',50);t4d=new i7d('ASSIGN_LSH',51);w4d=new i7d('ASSIGN_RSH',52);y4d=new i7d('ASSIGN_URSH',53);n4d=new i7d('ASSIGN_ADD',54);x4d=new i7d('ASSIGN_SUB',55);v4d=new i7d('ASSIGN_MUL',56);r4d=new i7d('ASSIGN_DIV',57);u4d=new i7d('ASSIGN_MOD',58);s4d=new i7d('ASSIGN_EXPONENT',59);A5d=new i7d('HOOK',60);p6d=new i7d('OR',61);g4d=new i7d('AND',62);I5d=new i7d('INC',63);V4d=new i7d('DEC',64);r5d=new i7d(uTe,65);B5d=new i7d('IF',66);Q6d=new i7d(hYe,67);K4d=new i7d('CASE',68);X4d=new i7d('DEFAULT_CASE',69);e7d=new i7d('WHILE',70);a5d=new i7d('DO',71);o5d=new i7d('FOR',72);p5d=new i7d('FOR_IN',73);H4d=new i7d('BREAK',74);T4d=new i7d(dYe,75);b7d=new i7d('VAR',76);f7d=new i7d('WITH',77);M4d=new i7d(cYe,78);c7d=new i7d('VOID',79);c5d=new i7d('EMPTY',80);D6d=new i7d('ROOT',81);F4d=new i7d('BLOCK',82);O5d=new i7d('LABEL',83);m5d=new i7d('EXPR_RESULT',84);F6d=new i7d('SCRIPT',85);y5d=new i7d('GETTER_DEF',86);G6d=new i7d('SETTER_DEF',87);S4d=new i7d('CONST',88);U4d=new i7d(eYe,89);P5d=new i7d('LABEL_NAME',90);M6d=new i7d('STRING_KEY',91);L4d=new i7d('CAST',92);k4d=new i7d(AYe,93);n6d=new i7d(BYe,94);$4d=new i7d('DESTRUCTURING_LHS',95);N4d=new i7d(tTe,96);O4d=new i7d('CLASS_MEMBERS',97);W5d=new i7d('MEMBER_FUNCTION_DEF',98);P6d=new i7d(WXe,99);T5d=new i7d('LET',100);q5d=new i7d('FOR_OF',101);g7d=new i7d('YIELD',102);z4d=new i7d('AWAIT',103);D5d=new i7d(jYe,104);F5d=new i7d('IMPORT_SPECS',105);E5d=new i7d('IMPORT_SPEC',106);G5d=new i7d('IMPORT_STAR',107);j5d=new i7d(fTe,108);l5d=new i7d('EXPORT_SPECS',109);k5d=new i7d('EXPORT_SPEC',110);Z5d=new i7d('MODULE_BODY',111);A6d=new i7d('REST',112);J6d=new i7d('SPREAD',113);R4d=new i7d('COMPUTED_PROP',114);R6d=new i7d('TAGGED_TEMPLATELIT',115);S6d=new i7d('TEMPLATELIT',116);T6d=new i7d('TEMPLATELIT_SUB',117);Y4d=new i7d('DEFAULT_VALUE',118);g6d=new i7d(XXe,119);N6d=new i7d(TYe,120);G4d=new i7d(UYe,121);l6d=new i7d(VYe,122);s5d=new i7d(FYe,123);q6d=new i7d('PARAMETERIZED_TYPE',124);_6d=new i7d(EYe,125);i4d=new i7d('ANY_TYPE',126);j6d=new i7d('NULLABLE_TYPE',127);d7d=new i7d('VOID_TYPE',128);B6d=new i7d('REST_PARAMETER_TYPE',129);a6d=new i7d('NAMED_TYPE',130);o6d=new i7d(aYe,131);y6d=new i7d(DYe,132);$6d=new i7d('UNDEFINED_TYPE',133);l4d=new i7d(CYe,134);u5d=new i7d('GENERIC_TYPE',135);v5d=new i7d(GYe,136);h4d=new i7d(HXe,137);s6d=new i7d('PIPE',138);K6d=new i7d('STAR',139);f5d=new i7d('EOC',140);x6d=new i7d('QMARK',141);b5d=new i7d('ELLIPSIS',142);A4d=new i7d('BANG',143);h5d=new i7d('EQUALS',144);Q5d=new i7d('LB',145);R5d=new i7d('LC',146);P4d=new i7d('COLON',147);L5d=new i7d(ZWe,148);M5d=new i7d('INTERFACE_EXTENDS',149);N5d=new i7d('INTERFACE_MEMBERS',150);d5d=new i7d(WWe,151);e5d=new i7d('ENUM_MEMBERS',152);C5d=new i7d(YWe,153);Z6d=new i7d(bYe,154);W4d=new i7d(kYe,155);X5d=new i7d('MEMBER_VARIABLE_DEF',156);J5d=new i7d($Xe,157);J4d=new i7d(ZXe,158);b6d=new i7d(lYe,159);c6d=new i7d('NAMESPACE_ELEMENTS',160);t6d=new i7d('PLACEHOLDER1',161);u6d=new i7d('PLACEHOLDER2',162);v6d=new i7d('PLACEHOLDER3',163)} +function E1c(){E1c=cjb;z1c=new Q_b('JSC_INTERNAL_ERROR_UNEXPECTED_TOKEN',(prb(),mrb),new _te("Internal Error: TypeCheck doesn''t know how to handle {0}"));_0c=new Q_b('JSC_DETERMINISTIC_TEST',orb,new _te('condition always evaluates to {2}\nleft : {0}\nright: {1}'));l1c=new Q_b('JSC_INEXISTENT_ENUM_ELEMENT',orb,new _te('element {0} does not exist on this enum'));m1c=new Q_b(OVe,orb,new _te(hUe));y1c=new Q_b('JSC_POSSIBLE_INEXISTENT_PROPERTY',nrb,new _te(hUe));n1c=new Q_b(OVe,nrb,new _te('Property {0} never defined on {1}. Did you mean {2}?'));w1c=new Q_b('JSC_NOT_A_CONSTRUCTOR',orb,new _te('cannot instantiate non-constructor'));o1c=new Q_b('JSC_INSTANTIATE_ABSTRACT_CLASS',orb,new _te('cannot instantiate abstract class'));X0c=new Q_b('JSC_BAD_TYPE_FOR_BIT_OPERATION',orb,new _te('operator {0} cannot be applied to {1}'));x1c=new Q_b('JSC_NOT_FUNCTION_TYPE',orb,new _te('{0} expressions are not callable'));$0c=new Q_b('JSC_CONSTRUCTOR_NOT_CALLABLE',orb,new _te(eUe));U0c=new Q_b('JSC_ABSTRACT_SUPER_METHOD_NOT_CALLABLE',orb,new _te(lUe));d1c=new Q_b('JSC_FUNCTION_MASKS_VARIABLE',orb,new _te('function {0} masks variable (IE bug)'));u1c=new Q_b('JSC_MULTIPLE_VAR_DEF',orb,new _te('declaration of multiple variables with shared type information'));a1c=new Q_b('JSC_ENUM_DUP',mrb,new _te('enum element {0} already defined'));s1c=new Q_b('JSC_INVALID_INTERFACE_MEMBER_DECLARATION',orb,new _te('interface members can only be empty property declarations, empty functions{0}'));q1c=new Q_b('JSC_INTERFACE_METHOD_NOT_EMPTY',orb,new _te(wTe));Y0c=new Q_b('JSC_CONFLICTING_EXTENDED_TYPE',orb,new _te(PVe));b1c=new Q_b('JSC_ES5_CLASS_EXTENDING_ES6_CLASS',orb,new _te('ES5 class {0} cannot extend ES6 class {1}'));p1c=new Q_b('JSC_INTERFACE_EXTENDS_LOOP',orb,new _te('extends loop involving {0}, loop: {1}'));Z0c=new Q_b('JSC_CONFLICTING_IMPLEMENTED_TYPE',orb,new _te(QVe));W0c=new Q_b('JSC_IMPLEMENTS_NON_INTERFACE',orb,new _te('can only implement interfaces'));f1c=new Q_b('JSC_HIDDEN_SUPERCLASS_PROPERTY',nrb,new _te('property {0} already defined on superclass {1}; use @override to override it'));e1c=new Q_b('JSC_HIDDEN_INTERFACE_PROPERTY',nrb,new _te('property {0} already defined on interface {1}; use @override to override it'));g1c=new Q_b('JSC_HIDDEN_SUPERCLASS_PROPERTY_MISMATCH',orb,new _te('mismatch of the {0} property type and the type of the property it overrides from superclass {1}\noriginal: {2}\noverride: {3}'));B1c=new Q_b('JSC_UNKNOWN_OVERRIDE',orb,new _te('property {0} not defined on any superclass of {1}'));r1c=new Q_b('JSC_INTERFACE_METHOD_OVERRIDE',orb,new _te('property {0} is already defined by the {1} extended interface'));A1c=new Q_b('JSC_UNKNOWN_EXPR_TYPE',nrb,new _te('could not determine the type of this expression'));C1c=new Q_b('JSC_UNRESOLVED_TYPE',orb,new _te('could not resolve the name {0} to a type'));D1c=new Q_b('JSC_WRONG_ARGUMENT_COUNT',orb,new _te(iUe));h1c=new Q_b('JSC_ILLEGAL_IMPLICIT_CAST',orb,new _te('Illegal annotation on {0}. @implicitCast may only be used in externs.'));k1c=new Q_b('JSC_INCOMPATIBLE_EXTENDED_PROPERTY_TYPE',orb,new _te('Interface {0} has a property {1} with incompatible types in its super interfaces {2} and {3}'));c1c=new Q_b('JSC_EXPECTED_THIS_TYPE',orb,new _te('"{0}" must be called with a "this" type'));t1c=new Q_b('JSC_IN_USED_WITH_STRUCT',orb,new _te(gUe));j1c=new Q_b('JSC_ILLEGAL_PROPERTY_CREATION',orb,new _te('Cannot add a property to a struct instance after it is constructed. (If you already declared the property, make sure to give it a type.)'));i1c=new Q_b('JSC_ILLEGAL_OBJLIT_KEY',orb,new _te(fUe));v1c=new Q_b('JSC_NON_STRINGIFIABLE_OBJECT_KEY',orb,new _te('Object type "{0}" contains non-stringifiable key and it may lead to an error. Please use ES6 Map instead or implement your own Map structure.'));T0c=new Q_b('JSC_ABSTRACT_METHOD_IN_CONCRETE_CLASS',orb,new _te('Abstract methods can only appear in abstract classes. Please declare the class as @abstract'));V0c=new P$b(GK(yK(oZ,1),ZJe,7,0,[_0c,l1c,m1c,y1c,n1c,w1c,o1c,X0c,x1c,$0c,d1c,u1c,a1c,s1c,q1c,Y0c,Z0c,W0c,g1c,B1c,r1c,C1c,D1c,h1c,k1c,c1c,t1c,j1c,i1c,v1c,T0c,U0c,b1c,(zWc(),wWc),yWc,(f7c(),e7c),c7c,$6c,b7c,(Gbc(),Dbc)]))} +function Yfc(){Yfc=cjb;Cfc=new Q_b('JSC_NTI_DUPLICATE_JSDOC',(prb(),orb),new _te('Found two JsDoc comments for variable: {0}.\n'));Rfc=new Q_b('JSC_NTI_REDECLARED_PROPERTY',orb,new _te('Found two declarations for property {0} on {1}.\n'));Lfc=new Q_b('JSC_NTI_INVALID_PROP_OVERRIDE',orb,new _te('Invalid redeclaration of property {0}.\ninherited type : {1}\noverriding type : {2}\n'));Afc=new Q_b('JSC_NTI_CTOR_IN_DIFFERENT_SCOPE',orb,new _te('Modifying the prototype is only allowed if the constructor is in the same scope\n'));Wfc=new Q_b('JSC_NTI_UNRECOGNIZED_TYPE_NAME',orb,new _te('Type annotation references non-existent type {0}.'));Tfc=new Q_b('JSC_NTI_STRUCT_WITHOUT_CTOR_OR_INTERF',orb,new _te('@struct used without @constructor, @interface, or @record.'));Bfc=new Q_b('JSC_NTI_DICT_WITHOUT_CTOR',orb,new _te('@dict used without @constructor.'));Efc=new Q_b('JSC_NTI_EXPECTED_CONSTRUCTOR',orb,new _te('Expected constructor name but found {0}.'));Ffc=new Q_b('JSC_NTI_EXPECTED_INTERFACE',orb,new _te('Expected interface name but found {0}.'));Hfc=new Q_b('JSC_NTI_INEXISTENT_PARAM',orb,new _te(nTe));yfc=new Q_b('JSC_NTI_CONST_WITHOUT_INITIALIZER',orb,new _te('Constants must be initialized when they are defined.'));zfc=new Q_b('JSC_NTI_COULD_NOT_INFER_CONST_TYPE',orb,new _te('All constants must be typed. The compiler could not infer the type of constant {0}. Please use an explicit type annotation. For more information, see:\nhttps://github.com/google/closure-compiler/wiki/Using-NTI-(new-type-inference)#warnings-about-uninferred-constants'));Ofc=new Q_b('JSC_NTI_MISPLACED_CONST_ANNOTATION',orb,new _te('This property cannot be @const. The @const annotation is only allowed for properties of namespaces, prototype properties, static properties of constructors, and properties of the form this.prop declared inside constructors and prototype methods.'));vfc=new Q_b('JSC_NTI_CANNOT_OVERRIDE_FINAL_METHOD',orb,new _te('Final method {0} cannot be overriden.'));ufc=new Q_b('JSC_NTI_CANNOT_INIT_TYPEDEF',orb,new _te('A typedef variable represents a type name; it cannot be assigned a value.'));sfc=new Q_b('JSC_NTI_ANONYMOUS_NOMINAL_TYPE',orb,new _te('Must specify a name when defining a class or interface.'));Nfc=new Q_b('JSC_NTI_MALFORMED_ENUM',orb,new _te('An enum must be initialized to a non-empty object literal.'));Dfc=new Q_b('JSC_NTI_DUPLICATE_PROP_IN_ENUM',orb,new _te('Property {0} appears twice in the enum declaration.'));Mfc=new Q_b('JSC_NTI_LENDS_ON_BAD_TYPE',orb,new _te('May only lend properties to namespaces, constructors and their prototypes. Found {0}.'));Gfc=new Q_b('JSC_NTI_FUNCTION_CONSTRUCTOR_NOT_DEFINED',mrb,new _te('You must provide externs that define the built-in Function constructor.'));Kfc=new Q_b('JSC_NTI_INVALID_INTERFACE_PROP_INITIALIZER',orb,new _te('Invalid initialization of interface property.'));Sfc=new Q_b('JSC_NTI_SETTER_WITH_RETURN',orb,new _te('Cannot declare a return type on a setter.'));Xfc=new Q_b('JSC_NTI_WRONG_PARAMETER_COUNT',orb,new _te('Function definition does not have the declared number of parameters.\nExpected: {0}\nFound: {1}'));tfc=new Q_b('JSC_NTI_CANNOT_ADD_PROPERTIES_TO_TYPEDEF',orb,new _te('A typedef should only be used in type annotations, not as a value. Adding properties to typedefs is not allowed.'));Ufc=new Q_b('JSC_NTI_SUPER_INTERFACES_HAVE_INCOMPATIBLE_PROPERTIES',orb,new _te('Interface {0} has a property {1} with incompatible types in its super interfaces: {2}'));Qfc=new Q_b('JSC_NTI_ONE_TYPE_FOR_MANY_VARS',orb,new _te('Having one type annotation for multiple variables is not allowed.'));Vfc=new Q_b('JSC_NTI_UNKNOWN_OVERRIDE',orb,new _te('property {0} not defined on any supertype of {1}'));Jfc=new Q_b('JSC_NTI_INTERFACE_METHOD_NOT_IMPLEMENTED',orb,new _te(vTe));Ifc=new Q_b('JSC_NTI_INTERFACE_METHOD_NOT_EMPTY',orb,new _te(wTe));pfc=new Q_b('JSC_NTI_ABSTRACT_METHOD_IN_CONCRETE_CLASS',orb,new _te('Abstract methods can only appear in abstract classes. Please declare class {0} as @abstract'));qfc=new Q_b('JSC_NTI_ABSTRACT_METHOD_IN_INTERFACE',orb,new _te('Abstract methods cannot appear in interfaces'));rfc=new Q_b('JSC_NTI_ABSTRACT_METHOD_NOT_IMPLEMENTED_IN_CONCRETE_CLASS',orb,new _te('Abstract method {0} from superclass {1} not implemented'));wfc=new P$b(GK(yK(oZ,1),ZJe,7,0,[pfc,vfc,Bfc,Dfc,Efc,Ffc,Gfc,Hfc,Jfc,Ifc,Kfc,Lfc,Mfc,Qfc,Rfc,Tfc,Ufc,Vfc,Wfc,Xfc]));Pfc=new P$b(GK(yK(oZ,1),ZJe,7,0,[qfc,rfc,sfc,tfc,ufc,yfc,zfc,Afc,Cfc,Nfc,Ofc,Sfc]));xfc=new kud('jscomp$infer$const$property')} +function K_b(){K_b=cjb;F_b=new Q_b('JSC_UNUSED',(prb(),orb),new _te(zRe));ct(ARe,pRe,BRe,CRe,DRe,ERe,GK(yK(fgb,1),pKe,2,6,[FRe,GRe]));J_b=new JCe;N_b('commonJsModuleLoad',GK(yK(oZ,1),ZJe,7,0,[(HNc(),FNc),GNc]));n_b=N_b(HRe,GK(yK(oZ,1),ZJe,7,0,[(Jqb(),Iqb)]));h_b=N_b(IRe,GK(yK(oZ,1),ZJe,7,0,[(Gpb(),zpb),Apb,Bpb,Cpb,xpb,ypb]));N_b('underscore',GK(yK(oZ,1),ZJe,7,0,[(lhd(),hhd),ihd]));I_b=N_b(dNe,GK(yK(oZ,1),ZJe,7,0,[qpb,rpb,ppb,tpb,Dpb,Epb,Fpb,wpb]));Y$b=L_b('accessControls',I_b);x_b=N_b('nonStandardJsDocs',GK(yK(oZ,1),ZJe,7,0,[(zWc(),hWc),nWc,oWc]));N_b('invalidCasts',GK(yK(oZ,1),ZJe,7,0,[(z5c(),v5c),(Nwc(),jwc)]));L_b(JRe,new O$b(JRe,GK(yK(oZ,1),ZJe,7,0,[F_b])));C_b=N_b('strictModuleDepCheck',GK(yK(oZ,1),ZJe,7,0,[(Y9c(),S9c),(xqb(),vqb)]));N_b('violatedModuleDep',GK(yK(oZ,1),ZJe,7,0,[X9c]));N_b('externsValidation',GK(yK(oZ,1),ZJe,7,0,[R9c,T9c]));N_b('ambiguousFunctionDecl',GK(yK(oZ,1),ZJe,7,0,[(m$c(),d$c)]));N_b('unknownDefines',GK(yK(oZ,1),ZJe,7,0,[(sOc(),rOc)]));N_b('tweakValidation',GK(yK(oZ,1),ZJe,7,0,[(SOc(),JOc),QOc,ROc]));N_b('missingOverride',GK(yK(oZ,1),ZJe,7,0,[(E1c(),e1c),f1c]));p_b=N_b('missingProperties',GK(yK(oZ,1),ZJe,7,0,[m1c,n1c,y1c,hwc,zwc]));N_b('j2clChecks',GK(yK(oZ,1),ZJe,7,0,[(emc(),cmc)]));s_b=N_b('missingReturn',GK(yK(oZ,1),ZJe,7,0,[(nsb(),msb)]));N_b('internetExplorerChecks',GK(yK(oZ,1),ZJe,7,0,[vWc]));E_b=N_b('undefinedVars',GK(yK(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vc,Xvc,Wvc]));Z$b=N_b('accessControlsConst',GK(yK(oZ,1),ZJe,7,0,[upb,vpb]));f_b=N_b('constantProperty',GK(yK(oZ,1),ZJe,7,0,[upb,vpb,Xvc,Wvc]));N_b('typeInvalidation',GK(yK(oZ,1),ZJe,7,0,[(I0b(),F0b),G0b]));i_b=N_b(DPe,GK(yK(oZ,1),ZJe,7,0,[W9c,q5c,r5c,qad,Rfc]));N_b(TPe,GK(yK(oZ,1),ZJe,7,0,[lWc,vWc]));l_b=N_b('es5StrictUncommon',GK(yK(oZ,1),ZJe,7,0,[mWc,iWc,l$c,i$c,h$c,c$c,_Zc,e$c,g$c]));k_b=N_b('es5StrictReflection',GK(yK(oZ,1),ZJe,7,0,[a$c,b$c,k$c,j$c]));j_b=M_b('es5Strict',GK(yK(nZ,1),ZJe,97,0,[l_b,k_b]));q_b=N_b(MRe,GK(yK(oZ,1),ZJe,7,0,[(btb(),atb),(Ayb(),xyb)]));r_b=N_b(zNe,GK(yK(oZ,1),ZJe,7,0,[(zrb(),yrb)]));M_b(GRe,GK(yK(nZ,1),ZJe,97,0,[A_b,D_b,E_b,q_b,Q$b((Gbc(),zbc)),Q$b((WMc(),PMc)),p_b,i_b,Q$b(mOc),Q$b((T1b(),S1b))]));B_b=N_b('strictMissingRequire',GK(yK(oZ,1),ZJe,7,0,[yrb,wrb,xrb]));N_b('legacyGoogScopeRequire',GK(yK(oZ,1),ZJe,7,0,[wrb,vrb]));m_b=N_b(BNe,GK(yK(oZ,1),ZJe,7,0,[vrb]));N_b('misplacedTypeAnnotation',GK(yK(oZ,1),ZJe,7,0,[(Xqb(),Pqb),Qqb,Rqb,Uqb,Tqb,Vqb,Wqb]));N_b('misplacedMsgAnnotation',GK(yK(oZ,1),ZJe,7,0,[Wqb]));N_b(gRe,GK(yK(oZ,1),ZJe,7,0,[(xgd(),wgd),(Itb(),Htb),Dtb,Ftb,Etb,Gtb,_0c,FNc]));N_b('functionParams',GK(yK(oZ,1),ZJe,7,0,[xbc,ybc]));N_b('deprecatedAnnotations',GK(yK(oZ,1),ZJe,7,0,[Oqb]));H_b=N_b(NRe,GK(yK(oZ,1),ZJe,7,0,[(dub(),cub)]));G_b=N_b('unusedLocalVariables',GK(yK(oZ,1),ZJe,7,0,[sad]));N_b('jsdocMissingType',GK(yK(oZ,1),ZJe,7,0,[qWc]));N_b('unnecessaryEscape',GK(yK(oZ,1),ZJe,7,0,[xWc]));o_b=M_b(oRe,GK(yK(nZ,1),ZJe,97,0,[Zgd,new P$b(GK(yK(oZ,1),ZJe,7,0,[(Cgd(),Bgd),(Kgd(),Ggd),Hgd,Igd,Jgd,(Ugd(),Rgd),Sgd,(Ghd(),Fhd),(cid(),_hd),bid,(lid(),kid),(vid(),qid),tid,sid,rid,(Hid(),Gid),(Oid(),Nid),(kvb(),Vub),Zub,cvb,avb,bvb,gvb,ivb,yyb,pWc]))]));N_b('strictModuleChecks',GK(yK(oZ,1),ZJe,7,0,[Rub,cvb,avb,bvb,gvb,ivb]));_$b=N_b(BRe,GK(yK(oZ,1),ZJe,7,0,[(rgd(),pgd),(Phd(),Mhd),Ohd,(iic(),hic),uWc]));$$b=M_b(pRe,GK(yK(nZ,1),ZJe,97,0,[_$b,H_b]));N_b('useOfGoogBase',GK(yK(oZ,1),ZJe,7,0,[TMc]));N_b('closureDepMethodUsageChecks',GK(yK(oZ,1),ZJe,7,0,[HMc]));N_b('transitionalSuspiciousCodeWarnings',GK(yK(oZ,1),ZJe,7,0,[(nHc(),jHc),mHc,iHc]));N_b('lateProvide',GK(yK(oZ,1),ZJe,7,0,[NMc,wyb]));N_b('missingPolyfill',GK(yK(oZ,1),ZJe,7,0,[(PVc(),OVc)]));N_b('invalidProvide',GK(yK(oZ,1),ZJe,7,0,[LMc]));N_b('es6Typed',GK(yK(oZ,1),ZJe,7,0,[rWc]));N_b('duplicateZipContents',GK(yK(oZ,1),ZJe,7,0,[(ZYc(),YYc)]))} +function Nwc(){Nwc=cjb;swc=new Q_b('JSC_NTI_MISTYPED_ASSIGN_RHS',(prb(),orb),new _te('The right side in the assignment is not a subtype of the left side.\n{0}'));owc=new Q_b('JSC_NTI_INVALID_OPERAND_TYPE',orb,new _te('Invalid type(s) for operator {0}.\n{1}'));Cwc=new Q_b('JSC_NTI_RETURN_NONDECLARED_TYPE',orb,new _te('Returned type does not match declared return type.\n{0}'));mwc=new Q_b('JSC_NTI_INVALID_INFERRED_RETURN_TYPE',orb,new _te('Function called in context that expects incompatible type.\n{0}'));kwc=new Q_b('JSC_NTI_INVALID_DECLARED_RETURN_TYPE_OF_GENERATOR_FUNCTION',orb,new _te('A generator function must return a (supertype of) Generator.\n{0}.'));iwc=new Q_b('JSC_NTI_INVALID_ARGUMENT_TYPE',orb,new _te('Invalid type for parameter {0} of function {1}.\n{2}'));Dwc=new Q_b('JSC_NTI_TEMPLATE_ARGUMENT_MISMATCH',orb,new _te('Invalid type for the first parameter of tag function {0}.\n{1}'));Ewc=new Q_b('JSC_NTI_TEMPLATE_ARGUMENT_MISSING',orb,new _te('A tag function must take at least one argument.\n'));Zvc=new Q_b('JSC_NTI_CROSS_SCOPE_GOTCHA',orb,new _te('Variable {0} typed inconsistently across scopes.\nIn outer scope : {1}\nIn inner scope : {2}\n'));zwc=new Q_b('JSC_NTI_POSSIBLY_INEXISTENT_PROPERTY',orb,new _te('Property {0} may not be present on {1}.'));Awc=new Q_b('JSC_NTI_PROPERTY_ACCESS_ON_NONOBJECT',orb,new _te('Cannot access property {0} of non-object type {1}.'));xwc=new Q_b('JSC_NTI_NOT_UNIQUE_INSTANTIATION',orb,new _te('When instantiating a polymorphic function, you can only specify one type for each type variable.\n Found {0} types for type variable {1}: {2},\n when instantiating type: {3}'));lwc=new Q_b('JSC_NTI_INVALID_INDEX_TYPE',orb,new _te('Invalid type for index.\n{0}'));Qvc=new Q_b('JSC_NTI_BOTTOM_INDEX_TYPE',orb,new _te('This IObject {0} cannot be accessed with a valid type.\n Usually the result of a bad union type.\n'));nwc=new Q_b('JSC_NTI_INVALID_OBJLIT_PROPERTY_TYPE',orb,new _te('Invalid type for object-literal property.\n{0}'));$vc=new Q_b('JSC_NTI_FORIN_EXPECTS_OBJECT',orb,new _te('For/in expects an object, found type {0}.'));_vc=new Q_b('JSC_NTI_FORIN_EXPECTS_STRING_KEY',orb,new _te('For/in creates string keys, but variable has declared type {1}.'));awc=new Q_b('JSC_NTI_FOROF_EXPECTS_ITERABLE',orb,new _te('For/of expects an iterable, found type {0}.'));twc=new Q_b('JSC_NTI_MISTYPED_FOROF_ELEMENT_TYPE',orb,new _te('Invalid type for for/of element.\n{0}'));Yvc=new Q_b('JSC_NTI_CONST_REASSIGNED',orb,new _te('Cannot change the value of a constant.'));Xvc=new Q_b('JSC_NTI_CONST_PROPERTY_REASSIGNED',orb,new _te('Cannot change the value of a constant property.'));Wvc=new Q_b('JSC_NTI_CONSTANT_PROPERTY_DELETED',orb,new _te('Constant property {0} cannot be deleted'));vwc=new Q_b('JSC_NTI_NOT_A_CONSTRUCTOR',orb,new _te('Expected a constructor but found type {0}.'));Tvc=new Q_b('JSC_NTI_CANNOT_INSTANTIATE_ABSTRACT_CLASS',orb,new _te('Cannot instantiate abstract class {0}.'));Fwc=new Q_b('JSC_UNDEFINED_SUPER_CLASS',orb,new _te('Undefined super class for {0}.'));Pvc=new Q_b('JSC_NTI_ASSERT_FALSE',orb,new _te('Assertion is always false. Please use a throw or fail() instead.'));Gwc=new Q_b('JSC_NTI_UNKNOWN_ASSERTION_TYPE',orb,new _te('Assert with unknown asserted type.'));pwc=new Q_b('JSC_NTI_INVALID_THIS_TYPE_IN_BIND',orb,new _te('Invalid type for the first argument to bind.\n{0}'));Svc=new Q_b('JSC_NTI_CANNOT_BIND_CTOR',orb,new _te('We do not support using .bind on constructor functions.'));cwc=new Q_b('JSC_NTI_GOOG_BIND_EXPECTS_FUNCTION',orb,new _te('The first argument to goog.bind/goog.partial must be a function, found: {0}'));Rvc=new Q_b('JSC_NTI_BOTTOM_PROP',orb,new _te('Property {0} of {1} cannot have a valid type.Maybe the result of a union of incompatible types?'));jwc=new Q_b('JSC_NTI_INVALID_CAST',orb,new _te('invalid cast - the types do not have a common subtype\nfrom: {0}\nto : {1}'));bwc=new Q_b('JSC_NTI_USED_GLOBAL_THIS',orb,new _te('Dangerous use of the global THIS object'));rwc=new Q_b('JSC_NTI_MISSING_RETURN_STATEMENT',orb,new _te(INe));Vvc=new Q_b('JSC_NTI_CONSTRUCTOR_NOT_CALLABLE',orb,new _te(eUe));dwc=new Q_b('JSC_NTI_ILLEGAL_OBJLIT_KEY',orb,new _te(fUe));fwc=new Q_b('JSC_NTI_ILLEGAL_PROPERTY_CREATION',orb,new _te('Cannot add property {0} to a struct instance after it is constructed.'));qwc=new Q_b('JSC_NTI_IN_USED_WITH_STRUCT',orb,new _te(gUe));Ovc=new Q_b('JSC_NTI_ADDING_PROPERTY_TO_NON_OBJECT',orb,new _te('Cannot create property {0} on non-object type {1}.'));hwc=new Q_b('JSC_NTI_INEXISTENT_PROPERTY',orb,new _te(hUe));wwc=new Q_b('JSC_NTI_NOT_FUNCTION_TYPE',orb,new _te('Cannot call non-function type {0}'));Kwc=new Q_b('JSC_NTI_WRONG_ARGUMENT_COUNT',orb,new _te(iUe));ewc=new Q_b('JSC_NTI_ILLEGAL_PROPERTY_ACCESS',orb,new _te(jUe));Jwc=new Q_b('JSC_NTI_UNKNOWN_TYPEOF_VALUE',orb,new _te(kUe));Iwc=new Q_b('JSC_NTI_UNKNOWN_NAMESPACE_PROPERTY',orb,new _te('Cannot determine the type of namespace property {0}. Maybe a prefix of the property name has been redefined?'));gwc=new Q_b('JSC_INCOMPATIBLE_STRICT_COMPARISON',orb,new _te('Cannot perform strict equality / inequality comparisons on incompatible types:\nleft : {0}\nright: {1}'));Nvc=new Q_b('JSC_NTI_ABSTRACT_SUPER_METHOD_NOT_CALLABLE',orb,new _te(lUe));Bwc=new Q_b('JSC_NTI_REFLECT_CONSTRUCTOR_EXPECTED',orb,new _te(mUe));ywc=new Q_b('JSC_NTI_NULLABLE_DEREFERENCE',nrb,new _te('Attempt to use nullable type {0}.'));Hwc=new Q_b('JSC_NTI_UNKNOWN_EXPR_TYPE',nrb,new _te('This {0} expression has the unknown type.'));Mwc=new Q_b('JSC_NTI_YIELD_NONDECLARED_TYPE',orb,new _te('Yielded type does not match declared return type.\n{0}'));Lwc=new Q_b('JSC_NTI_YIELD_ALL_EXPECTS_ITERABLE',orb,new _te('Expression yield* expects an iterable, found type {0}.'));Uvc=new P$b(GK(yK(oZ,1),ZJe,7,0,[Nvc,Svc,Tvc,Wvc,Xvc,Yvc,Bwc,Vvc,_vc,awc,twc,bwc,cwc,dwc,ewc,fwc,qwc,hwc,iwc,Dwc,Ewc,jwc,lwc,nwc,rwc,swc,vwc,wwc,zwc,Cwc,Gwc,Jwc,Kwc,Lwc,kwc]));uwc=new P$b(GK(yK(oZ,1),ZJe,7,0,[Ovc,Pvc,Qvc,Rvc,Zvc,$vc,gwc,mwc,owc,pwc,xwc,Awc,Iwc,Mwc]))} +function XAb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb;if(!a.c.Qh()){return}if(a.g&&!!rL(F1d(b,29),11)){D=Hnc(a.e,rL(F1d(b,29),11));Jse(D,'/** */ ')||sAb(a.c,D)}Y=b.j;K=VDc(Y);p=y1d(b);s=b.b;F=b.b?b.b.f:null;if(K!=null&&s!=F){Ff(p==2,K,p);L=lBb(a,b);T=c==3?3:4;H=c==2&&s.j==(h7d(),n6d);b.j==(h7d(),m4d)&&H&&sAb(a.c,'(');if($Bc(b)||Y==i5d){aBb(a,s,L+1,c);uAb(a.c,K,true);aBb(a,F,L,T)}else{oBb(a,b,Y,K,c,T,L,L+1)}b.j==m4d&&H&&sAb(a.c,')');return}a.c.ci(b);switch(Y.g){case 44:{zf(s.d.j==(h7d(),F4d)&&!L1d(s.d));zf(p>=2&&p<=3);sAb(a.c,'try');a.di(s,4);n=s.d.b;!!n&&a.di(n,4);if(p==3){a.c.$h();sAb(a.c,JOe);a.di(F,4)}break}case 78:zf(p==2);a.c.$h();sAb(a.c,'catch');a.c.$h();sAb(a.c,'(');a.di(s,4);sAb(a.c,')');a.di(F,4);break;case 39:zf(p==1);sAb(a.c,KOe);a.c.$h();a.di(s,4);a.c.Wh(true);break;case 0:sAb(a.c,LOe);if(p==1){a.c.$h();a.di(s,4)}else{zf(p==0)}a.c.Wh(false);break;case 76:sAb(a.c,VJe);eBb(a,s,false,c==3?3:4,',');(!b.e||(HAc(),b.j!=(h7d(),Z5d)&&nDc(b.e)))&&a.c.Wh(false);break;case 88:sAb(a.c,'const ');eBb(a,s,false,c==3?3:4,',');(!b.e||(HAc(),b.j!=(h7d(),Z5d)&&nDc(b.e)))&&a.c.Wh(false);break;case 100:sAb(a.c,'let ');eBb(a,s,false,c==3?3:4,',');(!b.e||(HAc(),b.j!=(h7d(),Z5d)&&nDc(b.e)))&&a.c.Wh(false);break;case 90:zf(b.Lm().length!=0);cBb(a,b.Lm());break;case 95:a.di(s,4);if(s!=F){zf(p==2);uAb(a.c,'=',true);a.di(F,4)}break;case 29:a.k&&wL(F1d(b,40))!=null?cBb(a,wL(F1d(b,40))):cBb(a,b.Lm());B1d(b,80)!=0&&sAb(a.c,'?');kBb(a,b);if(!!s&&s.j!=(h7d(),c5d)){zf(p==1);uAb(a.c,'=',true);s.j==(h7d(),Q4d)||s.j==L4d&&s.b.j==Q4d?aBb(a,s,XDc(m4d),4):aBb(a,s,0,c==3?3:4)}break;case 42:sAb(a.c,'[');$Ab(a,s);sAb(a.c,']');break;case 93:sAb(a.c,'[');$Ab(a,s);sAb(a.c,']');kBb(a,b);break;case 45:sAb(a.c,'(');eBb(a,s,true,4,',');sAb(a.c,')');break;case 118:a.di(s,4);kBb(a,b);uAb(a.c,'=',true);a.di(s.d,4);break;case 46:zf(p==2);oBb(a,b,(h7d(),Q4d),',',c,c==3?3:4,0,0);break;case 30:zf(p==0);a.c.Jh(b.Km(),b);break;case 25:case 79:case 19:case 20:case 21:{zf(p==1);uAb(a.c,WDc(Y),false);aBb(a,s,XDc(Y),4);break}case 22:{zf(p==1);if(b.b.j==(h7d(),k6d)){a.c.Jh(-b.b.Km(),b.b)}else{uAb(a.c,WDc(Y),false);aBb(a,s,XDc(Y),4)}break}case 60:{zf(p==3);L=XDc(Y);T=c==3?3:4;aBb(a,s,L+1,c);uAb(a.c,'?',true);aBb(a,s.d,1,T);uAb(a.c,':',true);aBb(a,F,1,T);break}case 38:if(s.j!=(h7d(),L6d)||F.j!=L6d){throw Aib(new xqe('Expected children to be strings'))}S='/'+nBb(a,s.Lm(),'"',"'",'`',wKe,false,true)+'/';if(p==2){YAb(a,S+F.Lm())}else{zf(p==1);sAb(a.c,S)}break;case 65:{if(b.No!=veb){throw Aib(new xqe(MOe))}zf(p==3);b.j==(h7d(),r5d)&&B1d(b,60)!=0?(zf(s.Lm().length==0),Z=($=b.e,!!$&&(HAc(),bCc($.j)||uDc($.j)||wDc($.j)||$.j==R6d||$.j==x5d||($.j==w5d||$.j==I4d||$.j==A5d)&&(ab=b.e,!!ab&&b==ab.b))),Z&&sAb(a.c,'('),bb=rL(F1d(s,81),5),!!bb&&a.di(bb,4),b.j==r5d&&B1d(b,61)!=0&&sAb(a.c,NOe),a.di(s.d,4),kBb(a,b),uAb(a.c,'=>',true),F.j==F4d?a.di(F,4):aBb(a,F,XDc(Q4d)+1,c),a.c.Th(c==0),Z&&sAb(a.c,')'),undefined):bBb(a,b,s,F,c);break}case 112:sAb(a.c,OOe);a.di(s,4);kBb(a,b);break;case 113:sAb(a.c,OOe);a.di(b.b,4);break;case 108:sAb(a.c,POe);B1d(b,63)!=0&&sAb(a.c,QOe);if(B1d(b,64)!=0){sAb(a.c,'*');zf(!!s&&s.j==(h7d(),c5d))}else{a.di(s,4)}if(p==2){sAb(a.c,ROe);a.di(F,4)}mBb(a,s,c);break;case 104:sAb(a.c,SOe);U=s.d;if(s.j!=(h7d(),c5d)){a.di(s,4);U.j==c5d||a.c.Yh()}U.j==c5d||a.di(U,4);(s.j!=c5d||U.j!=c5d)&&sAb(a.c,ROe);a.di(F,4);a.c.Wh(false);break;case 109:case 105:sAb(a.c,'{');for(j=s;j;j=j.d){j!=s&&a.c.Yh();a.di(j,4)}sAb(a.c,'}');break;case 110:case 106:a.di(s,4);if(s!=F){sAb(a.c,'as');a.di(F,4)}break;case 107:sAb(a.c,'*');sAb(a.c,'as');YAb(a,b.Lm());break;case 96:{zf(p==3);q=c==2;q&&sAb(a.c,'(');V=s.d;sAb(a.c,TOe);s.j==(h7d(),c5d)||a.di(s,4);v=rL(F1d(s,81),5);!!v&&a.di(v,4);if(V.j!=c5d){sAb(a.c,UOe);a.di(V,4)}B=rL(F1d(b,82),5);if(B){sAb(a.c,VOe);o=B.b;a.di(o,4);while(o=o.d){sAb(a.c,',');a.c.$h();a.di(o,4)}}a.di(F,4);xAb(a.c,c==0);q&&sAb(a.c,')')}break;case 97:case 150:case 160:vAb(a.c);for(k=s;k;k=k.d){a.di(k,4);mBb(a,k,c);a.c.Uh()}wAb(a.c,false);break;case 152:vAb(a.c);for(l=s;l;l=l.d){a.di(l,4);!!l.d&&sAb(a.c,',');a.c.Uh()}wAb(a.c,false);break;case 86:case 87:case 98:case 156:{zf(b.e.j==(h7d(),m6d)||b.e.j==O4d||b.e.j==N5d||b.e.j==y6d||b.e.j==J5d);e=rL(F1d(b,84),197);!!e&&YAb(a,(e.f!=null?e.f:''+e.g).toLowerCase()+' ');B1d(b,58)!=0&&sAb(a.c,'static ');if(b.j!=X5d&&B1d(b.b,59)!=0){zf(Y==W5d);sAb(a.c,'*')}b.j==W5d&&Q1d(b.b)&&sAb(a.c,'async ');switch(Y.g){case 86:zf(!s.b.d.b);sAb(a.c,'get ');break;case 87:zf(M1d(s.b.d));sAb(a.c,'set ');}G=b.Lm();if(b.j==X5d){YAb(a,b.Lm());B1d(b,80)!=0&&sAb(a.c,'?');kBb(a,b)}else{zf(p==1);zf(s.j==r5d);zf(s.b.Lm().length==0);M=s.b.d;h=s.b?s.b.f:null;if(!b.Nm()&&(p7d(),n7d.test(G))&&OCc(G)){sAb(a.c,G);jBb(a,s.b)}else{r=uBb(G);isNaN(r)?dBb(a,b):a.c.Jh(r,b)}B1d(s,80)!=0&&sAb(a.c,'?');a.di(M,4);kBb(a,s);a.di(h,4)}break}case 85:case 111:case 82:case 81:{if(b.No!=veb){throw Aib(new xqe(MOe))}R=b.j==(h7d(),F4d)&&B1d(b,38)==0;R&&vAb(a.c);Q=Y==F6d||Y==F4d&&!R&&b.e.j==F6d;for(m=s;m;m=m.d){a.di(m,0);(m.j==r5d||m.j==N4d)&&a.c._h();Q&&a.c.ai()}R&&wAb(a.c,a.c.Ph(b,c==0));break}case 72:zf(p==4);sAb(a.c,'for');a.c.$h();sAb(a.c,'(');HAc();!!s&&(s.j==(h7d(),b7d)||s.j==T5d||s.j==S4d)?a.di(s,3):aBb(a,s,0,3);sAb(a.c,';');s.d.j==(h7d(),c5d)||a.c.$h();a.di(s.d,4);sAb(a.c,';');s.d.d.j==c5d||a.c.$h();a.di(s.d.d,4);sAb(a.c,')');fBb(a,F,c==1?1:4,false);break;case 73:zf(p==3);sAb(a.c,'for');a.c.$h();sAb(a.c,'(');a.di(s,4);sAb(a.c,'in');a.di(s.d,4);sAb(a.c,')');fBb(a,F,c==1?1:4,false);break;case 101:zf(p==3);sAb(a.c,'for');a.c.$h();sAb(a.c,'(');a.di(s,4);sAb(a.c,'of');a.di(s.d,4);sAb(a.c,')');fBb(a,F,c==1?1:4,false);break;case 71:zf(p==2);sAb(a.c,'do');fBb(a,s,4,false);a.c.$h();sAb(a.c,WOe);a.c.$h();sAb(a.c,'(');a.di(F,4);sAb(a.c,')');a.c.Wh(false);break;case 70:zf(p==2);sAb(a.c,WOe);a.c.$h();sAb(a.c,'(');a.di(s,4);sAb(a.c,')');fBb(a,F,c==1?1:4,false);break;case 80:zf(p==0);break;case 26:{if(a.k&&wL(F1d(b,40))!=null){Y1d(b.b,'$jscomp.scope')&&b.e.j==(h7d(),m4d)&&sAb(a.c,VJe);cBb(a,wL(F1d(b,40)));break}Bf(p==2,'Bad GETPROP: expected 2 children, but got %s',p);Af(F.j==(h7d(),L6d),'Bad GETPROP: RHS should be STRING');H=s.j==k6d;H&&sAb(a.c,'(');aBb(a,s,XDc(Y),c);H&&sAb(a.c,')');if(a.i&&m7d(F.Lm())){sAb(a.c,'[');a.di(F,4);sAb(a.c,']')}else{sAb(a.c,'.');cBb(a,F.Lm())}break}case 27:Df(p==2,p,b);aBb(a,s,XDc(Y),c);sAb(a.c,'[');a.di(s.d,4);sAb(a.c,']');break;case 77:zf(p==2);sAb(a.c,'with(');a.di(s,4);sAb(a.c,')');fBb(a,F,c==1?1:4,false);break;case 63:case 64:{zf(p==1);J=Y==(h7d(),I5d)?'++':'--';O=B1d(b,32)!=0;if(O){aBb(a,s,XDc(Y),c);uAb(a.c,J,false)}else{uAb(a.c,J,false);a.di(s,4)}break}case 28:if(s.j==(h7d(),_5d)&&Jse(XOe,s.Lm())&&B1d(s,49)==0||B1d(b,50)!=0&&(HAc(),s.j==x5d||s.j==w5d)){sAb(a.c,'(0,');aBb(a,s,XDc(Q4d),4);sAb(a.c,')')}else{aBb(a,s,XDc(Y),c)}g=s.d;sAb(a.c,'(');eBb(a,g,true,4,',');sAb(a.c,')');break;case 66:zf(p==2||p==3);w=p==3;f=c==1&&!w;f&&vAb(a.c);sAb(a.c,'if');a.c.$h();sAb(a.c,'(');a.di(s,4);sAb(a.c,')');if(w){fBb(a,s.d,1,false);a.c.$h();sAb(a.c,'else');fBb(a,F,c==1?1:4,false)}else{fBb(a,s.d,4,false)}f&&wAb(a.c,false);break;case 32:zf(p==0);a.c.Hh(kKe);break;case 33:zf(p==0);sAb(a.c,pNe);break;case 99:zf(p==0);sAb(a.c,YOe);break;case 119:zf(p==0);sAb(a.c,ZOe);break;case 102:sAb(a.c,'yield');if(B1d(b,62)!=0){tf(s);sAb(a.c,'*')}if(s){a.c.$h();aBb(a,s,XDc(Y),4)}break;case 103:sAb(a.c,'await ');aBb(a,s,XDc(Y),4);break;case 34:zf(p==0);a.c.Hh($Oe);break;case 35:zf(p==0);a.c.Hh(_Oe);break;case 75:zf(p<=1);sAb(a.c,aPe);if(p==1){if(s.j!=(h7d(),P5d)){throw Aib(new xqe(bPe))}sAb(a.c,' ');a.di(s,4)}a.c.Wh(false);break;case 89:zf(p==0);sAb(a.c,cPe);a.c.Wh(false);break;case 74:zf(p<=1);sAb(a.c,'break');if(p==1){if(s.j!=(h7d(),P5d)){throw Aib(new xqe(bPe))}sAb(a.c,' ');a.di(s,4)}a.c.Wh(false);break;case 84:zf(p==1);a.di(s,2);a.c.Wh(false);break;case 23:sAb(a.c,'new ');P=XDc(Y);RAc(s,(h7d(),I4d),(HAc(),AAc))&&(P=XDc(s.j)+1);aBb(a,s,P,4);I=s.d;if(I){sAb(a.c,'(');eBb(a,I,true,4,',');sAb(a.c,')')}break;case 91:hBb(a,b);break;case 31:Af(p==0,'A string may not have children');dBb(a,b);break;case 24:zf(p==1);sAb(a.c,'delete ');a.di(s,4);break;case 43:{H=c==2;H&&sAb(a.c,'(');sAb(a.c,'{');for(m=s;m;m=m.d){m!=s&&a.c.Yh();zf((HAc(),m.j==(h7d(),M6d)||m.j==y5d||m.j==G6d||m.j==W5d||m.j==R4d));a.di(m,4)}sAb(a.c,'}');H&&sAb(a.c,')');break}case 114:d=rL(F1d(b,84),197);!!d&&YAb(a,(d.f!=null?d.f:''+d.g).toLowerCase()+' ');B1d(b,58)!=0&&sAb(a.c,'static ');B1d(b,73)!=0?sAb(a.c,'get '):B1d(b,74)!=0?sAb(a.c,'set '):B1d(F,59)!=0?sAb(a.c,'*'):F.j==(h7d(),r5d)&&B1d(F,61)!=0&&sAb(a.c,NOe);sAb(a.c,'[');a.di(s,4);sAb(a.c,']');kBb(a,b);if(B1d(b,72)!=0||B1d(b,73)!=0||B1d(b,74)!=0){t=s.d;N=t.b.d;h=t.b?t.b.f:null;a.di(N,4);a.di(h,4)}else{C=b.e.j==(h7d(),O4d);A=s.d;if(A){Af(!C,'initializers should only exist in object literals, not classes');uAb(a.c,':',false);a.di(A,4)}else{Af(B1d(b,75)!=0,b)}}break;case 94:gBb(a,b);kBb(a,b);break;case 67:sAb(a.c,'switch(');a.di(s,4);sAb(a.c,')');vAb(a.c);ZAb(a,s.d);wAb(a.c,c==0);break;case 68:zf(p==2);sAb(a.c,'case ');a.di(s,4);_Ab(a,F);break;case 69:zf(p==1);sAb(a.c,QOe);_Ab(a,s);break;case 83:zf(p==2);if(s.j!=(h7d(),P5d)){throw Aib(new xqe(bPe))}a.di(s,4);sAb(a.c,':');F.j==F4d||a.c.$h();fBb(a,F,c==1?1:4,true);break;case 92:a.g&&sAb(a.c,'(');a.di(s,4);a.g&&sAb(a.c,')');break;case 115:a.di(s,2);a.di(s.d,4);break;case 116:sAb(a.c,'`');for(i=s;i;i=i.d){if(i.j==(h7d(),L6d)){YAb(a,nBb(a,i.Lm(),'"',"'",'\\`',oKe,false,false))}else{a.c.Kh('${');a.di(i.b,2);sAb(a.c,'}')}}sAb(a.c,'`');break;case 120:sAb(a.c,dKe);break;case 121:sAb(a.c,bKe);break;case 122:sAb(a.c,cKe);break;case 126:sAb(a.c,'any');break;case 128:sAb(a.c,dPe);break;case 130:a.di(s,4);break;case 134:aBb(a,s,XDc((h7d(),l4d)),c);sAb(a.c,'[]');break;case 123:sAb(a.c,'(');eBb(a,s.d,true,4,',');sAb(a.c,')');uAb(a.c,'=>',true);a.di(s,4);break;case 125:eBb(a,s,true,4,'|');break;case 132:sAb(a.c,'{');eBb(a,s,false,4,',');sAb(a.c,'}');break;case 124:a.di(s,4);sAb(a.c,'<');eBb(a,s.d,true,4,',');sAb(a.c,'>');break;case 136:sAb(a.c,'<');eBb(a,s,false,0,',');sAb(a.c,'>');break;case 135:cBb(a,b.Lm());if(b.b){sAb(a.c,UOe);a.c.$h();a.di(b.b,4)}break;case 148:{zf(p==3);X=s.d;sAb(a.c,ePe);a.di(s,4);v=rL(F1d(s,81),5);!!v&&a.di(v,4);if(X.j!=(h7d(),c5d)){sAb(a.c,UOe);W=X.b;a.di(W,4);while(W=W.d){sAb(a.c,',');a.c.$h();a.di(W,4)}}a.di(F,4)}break;case 151:{zf(p==2);sAb(a.c,fPe);a.di(s,4);a.di(F,4);break}case 159:{zf(p==2);sAb(a.c,gPe);a.di(s,4);a.di(F,4);break}case 154:sAb(a.c,rNe);YAb(a,b.Lm());uAb(a.c,'=',true);a.di(F,4);a.c.Wh(true);break;case 155:sAb(a.c,hPe);a.di(s,4);mBb(a,b,c);break;case 157:sAb(a.c,'[');a.di(s,4);sAb(a.c,']');kBb(a,b);a.c.Wh(true);break;case 158:B1d(b,83)!=0&&sAb(a.c,'new ');u=rL(F1d(b,81),5);!!u&&a.di(u,4);a.di(s,4);kBb(a,b);a.c.Wh(true);break;default:throw Aib(new DJ('Unknown type '+Y+_Je+G2d(b)));}a.c.Vh(b)} +function oBd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb;u=a.i.g;i=CCd(a.i);e=a.i.n;d=rL(Fs(a.a,e),65);if(!d||e.length==0){WAd(a,BVe,e,a.i.g,CCd(a.i))}else{J_d(a.e,e,u,i);switch(d.g){case 0:p$d(a.e.a)?UAd(a,'msg.jsdoc.nginject.extra',a.i.g,CCd(a.i)):x0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 26:j$d(a.e.a)?UAd(a,'msg.jsdoc.jaggerInject.extra',a.i.g,CCd(a.i)):m0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 27:k$d(a.e.a)?UAd(a,'msg.jsdoc.jaggerModule.extra',a.i.g,CCd(a.i)):n0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 28:l$d(a.e.a)?UAd(a,'msg.jsdoc.jaggerProvide.extra',a.i.g,CCd(a.i)):o0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 29:m$d(a.e.a)?UAd(a,'msg.jsdoc.jaggerProvidePromise.extra',a.i.g,CCd(a.i)):p0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 1:O_d(a.e)||XAd(a,vXe,a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 2:if(a.e.d){g=eBd(a);f=g.a;f.length==0?UAd(a,'msg.jsdoc.authormissing',a.i.g,CCd(a.i)):C_d(a.e,f);b=g.b}else{b=bBd(a,!a.n?DCd(a.i):_Ad(a))}return b;case 4:R_d(a.e)||UAd(a,'msg.jsdoc.consistidgen',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 61:W0d(a.e)||XAd(a,vXe,a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 53:M0d(a.e)||XAd(a,vXe,a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 11:Z_d(a.e)||XAd(a,vXe,a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 6:T_d(a.e)||(i$d(a.e.a)?XAd(a,wXe,a.i.g,CCd(a.i)):XAd(a,vXe,a.i.g,CCd(a.i)));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 7:k0d(a.e)||XAd(a,'msg.jsdoc.record',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 9:W_d(a.e)||UAd(a,'msg.jsdoc.deprecated',a.i.g,CCd(a.i));J=dBd(a,b,a.f?0:2,false);I=J.a;I.length>0&&X_d(a.e,I);b=J.b;return b;case 25:l0d(a.e)||((a.e.a.a&2)!=0?XAd(a,wXe,a.i.g,CCd(a.i)):XAd(a,vXe,a.i.g,CCd(a.i)));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 10:if(JZd(a.e.a)!=null){UAd(a,'msg.jsdoc.desc.extra',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a))}else{k=dBd(a,b,a.f?0:2,false);j=k.a;Y_d(a.e,j);b=k.b;return b}case 18:l='';if(a.e.d&&!gBd(a,64)){m=dBd(a,b,a.f?0:1,false);l=m.a;b=m.b}else{b=bBd(a,!a.n?DCd(a.i):_Ad(a))}e0d(a.e,l)||UAd(a,'msg.jsdoc.fileoverview.extra',a.i.g,CCd(a.i));return b;case 31:case 46:H=dBd(a,b,0,true);G=H.a;G.length>0&&!!a.c&&D_d(a.c,G);b=H.b;return b;case 13:b=!a.n?DCd(a.i):_Ad(a);u=a.i.g;i=CCd(a.i);hb=null;if(b!=(wCd(),iCd)&&b!=gCd){lb=nBd(a,b,a.i.g,CCd(a.i),b==lCd,false);if(!!lb&&lb.j==(h7d(),L6d)){ib=lb.Lm();!Jse(ib,cKe)&&!Jse(ib,dKe)&&!Jse(ib,bKe)&&(lb=RBd(a,(h7d(),A4d),lb))}hb=!lb?null:new f1d(lb,(P=rL(F1d(a.k,51),28),!P?null:P.ji()))}else{a.n=b}!hb&&(hb=$Ad(a,kBd(a,cKe,a.i.g,CCd(a.i))));__d(a.e,hb)||a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(Q=rL(F1d(a.k,51),28),!Q?null:Q.ji()),u,i);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 17:b0d(a.e)||UAd(a,'msg.jsdoc.expose',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 15:d0d(a.e)||UAd(a,'msg.jsdoc.externs',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 60:T0d(a.e)||UAd(a,'msg.jsdoc.typesummary',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 14:case 22:PBd(a);b=!a.n?DCd(a.i):_Ad(a);u=a.i.g;i=CCd(a.i);v=false;if(b==(wCd(),lCd)){b=!a.n?DCd(a.i):_Ad(a);v=true}if(b==vCd){lb=nBd(a,b,u,i,v,true);u=a.i.g;i=CCd(a.i);lb=RBd(a,(h7d(),A4d),lb);hb=!lb?null:new f1d(lb,(P=rL(F1d(a.k,51),28),!P?null:P.ji()));if(d==(ixd(),lwd)){Vcd(c,new VBd(hb,a.i.g,CCd(a.i)))}else{zf(d==rwd);i0d(a.e,hb)||a.b.Fj(tXe+e4d('msg.jsdoc.implements.duplicate',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i)}b=!a.n?DCd(a.i):_Ad(a);v?b!=rCd?XAd(a,xXe,a.i.g,CCd(a.i)):(b=!a.n?DCd(a.i):_Ad(a)):b!=iCd&&b!=hCd&&b!=gCd&&XAd(a,'msg.end.annotation.expected',a.i.g,CCd(a.i))}else{a.b.Fj(tXe+e4d('msg.no.type.name',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i)}b=bBd(a,b);return b;case 20:g0d(a.e)||UAd(a,'msg.jsdoc.hidden',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 30:PBd(a);v=false;if(hBd(a,(wCd(),lCd))){!a.n?DCd(a.i):_Ad(a);v=true}if(hBd(a,vCd)){!a.n?DCd(a.i):_Ad(a);q0d(a.e,a.i.n)||XAd(a,'msg.jsdoc.lends.incompatible',a.i.g,CCd(a.i))}else{XAd(a,'msg.jsdoc.lends.missing',a.i.g,CCd(a.i))}v&&!hBd(a,rCd)&&XAd(a,xXe,a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 32:A=dBd(a,b,a.f?0:2,false);w=A.a;b=A.b;t0d(a.e,w)||UAd(a,'msg.jsdoc.meaning.extra',a.i.g,CCd(a.i));return b;case 36:y0d(a.e)||UAd(a,'msg.jsdoc.noalias',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 38:A0d(a.e)||UAd(a,'msg.jsdoc.nocompile',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 37:z0d(a.e)||UAd(a,'msg.jsdoc.nocollapse',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 40:return bBd(a,!a.n?DCd(a.i):_Ad(a));case 24:case 41:E0d(a.e)||XAd(a,'msg.jsdoc.override',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 44:q$d(a.e.a)?UAd(a,'msg.jsdoc.polymer.extra',a.i.g,CCd(a.i)):H0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 45:r$d(a.e.a)?UAd(a,'msg.jsdoc.polymerBehavior.extra',a.i.g,CCd(a.i)):I0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 3:h$d(a.e.a)?UAd(a,'msg.jsdoc.customElement.extra',a.i.g,CCd(a.i)):U_d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 33:n$d(a.e.a)?UAd(a,'msg.jsdoc.mixinClass.extra',a.i.g,CCd(a.i)):u0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 34:o$d(a.e.a)?UAd(a,'msg.jsdoc.mixinFunction.extra',a.i.g,CCd(a.i)):v0d(a.e);return bBd(a,!a.n?DCd(a.i):_Ad(a));case 57:{PBd(a);b=!a.n?DCd(a.i):_Ad(a);CCd(a.i);hb=null;if(b==(wCd(),lCd)){hb=$Ad(a,nBd(a,b,a.i.g,CCd(a.i),b==lCd,false));if(!hb){return bBd(a,!a.n?DCd(a.i):_Ad(a))}}b=_Ad(a);R0d(a.e,hb);r=gBd(a,64);if(a.e.d&&!r){k=dBd(a,b,a.f?0:2,false);j=k.a;j.length>0&&Q0d(a.e,hb,j);b=k.b}else{b=bBd(a,!a.n?DCd(a.i):_Ad(a))}return b}case 43:PBd(a);b=!a.n?DCd(a.i):_Ad(a);u=a.i.g;i=CCd(a.i);hb=null;o=false;if(b==(wCd(),lCd)){hb=$Ad(a,(kf(b==lCd),qb=a.i.g,rb=CCd(a.i),sb=(kf(b==lCd),PBd(a),tb=zBd(a,!a.n?DCd(a.i):_Ad(a)),!!tb&&(hBd(a,rCd)?!a.n?DCd(a.i):_Ad(a):(XAd(a,xXe,a.i.g,CCd(a.i)),null)),tb),MBd(a,qb,rb,sb,true),sb));if(!hb){return bBd(a,!a.n?DCd(a.i):_Ad(a))}PBd(a);b=!a.n?DCd(a.i):_Ad(a);u=a.i.g;i=CCd(a.i);o=true}B=null;s=nCd==b;s&&(b=!a.n?DCd(a.i):_Ad(a));if(vCd!=b){a.b.Fj(tXe+e4d('msg.missing.variable.name',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i)}else{o||TAd(a,a.i.g,CCd(a.i));B=a.i.n;if(s){b=!a.n?DCd(a.i):_Ad(a);if(jCd==b){b=!a.n?DCd(a.i):_Ad(a);vCd==b&&(b=!a.n?DCd(a.i):_Ad(a))}tCd!=b?(XAd(a,'msg.jsdoc.missing.rb',a.i.g,CCd(a.i)),null):!!hb&&(hb=hb.a.j==(h7d(),h5d)||hb.a.j==b5d?hb:new f1d(new P2d(h5d,hb.a),hb.b))}p7d();if(n7d.test(B)){F0d(a.e,B,hb)||(H_d(a.e,B)?a.b.Fj(tXe+e4d('msg.dup.variable.name',GK(yK(agb,1),ZJe,1,5,[B]))+uXe,(P=rL(F1d(a.k,51),28),!P?null:P.ji()),u,i):a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[B]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i))}else{a.b.Fj(e4d('msg.invalid.variable.name',GK(yK(agb,1),ZJe,1,5,[B])),(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i);B=null}}if(B==null){b=bBd(a,b);return b}K_d(a.e,B,a.k,u,i);if(a.e.d&&b!=bCd){F=dBd(a,b,a.f?0:2,false);D=F.a;D.length>0&&G0d(a.e,B,D);b=F.b}else b!=gCd&&b!=hCd&&(b=bBd(a,!a.n?DCd(a.i):_Ad(a)));return b;case 39:B0d(a.e)||UAd(a,'msg.jsdoc.nosideeffects',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 35:b=yBd(a,!a.n?DCd(a.i):_Ad(a));return b;case 23:j0d(a.e)||XAd(a,'msg.jsdoc.implicitcast',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 51:if(a.e.d){L=eBd(a);K=L.a;K.length==0?UAd(a,'msg.jsdoc.seemissing',a.i.g,CCd(a.i)):E_d(a.e,K);b=L.b}else{b=bBd(a,!a.n?DCd(a.i):_Ad(a))}return b;case 52:L0d(a.e)||UAd(a,'msg.jsdoc.stableidgen',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 54:b=DBd(a,!a.n?DCd(a.i):_Ad(a));return b;case 55:{bb=a.i.g;$=CCd(a.i);ab=dBd(a,b,1,false);db=ab.a;mb='';t=false;nb=true;if(db.indexOf(':=')!=-1){gb=db.indexOf(':=');cb=db.substr(0,gb);if(db.indexOf('=:')!=-1){t=true;eb=db.indexOf('=:');mb=fte(db.substr(gb+2,eb-(gb+2)))}else{nb=false;a.b.Fj(tXe+e4d('msg.jsdoc.typetransformation.missing.delimiter',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),bb,$)}}else{db.indexOf(_Je)!=-1?(cb=bte(db,0,Ose(db,hte(10)))):(cb=db)}C=Jg(Lg(Pg((Ac(),new ld(44))),(Qd(),Od)),cb);if(C.b.size()==1&&wL(C.a.getAtIndex(0)).length==0){a.b.Fj(tXe+e4d('msg.jsdoc.templatemissing',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),bb,$)}else{for(jb=new Gze(C.b.$d());jb.b.Pd();){ib=wL(jb.b.Qd());ib.length!=0&&yd((xd(),wd,ib.charCodeAt(0)))&&Dc(new Jd((sd(),rd),new ld(95)),ib)?t||O0d(a.e,ib)||a.b.Fj(tXe+e4d(yXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(P=rL(F1d(a.k,51),28),!P?null:P.ji()),bb,$):a.b.Fj(tXe+e4d('msg.jsdoc.template.invalid.type.name',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),bb,$)}}if(t){C.b.size()>1&&a.b.Fj(tXe+e4d('msg.jsdoc.typetransformation.with.multiple.names',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(P=rL(F1d(a.k,51),28),!P?null:P.ji()),bb,$);if(mb.length==0){nb=false;a.b.Fj(tXe+e4d('msg.jsdoc.typetransformation.expression.missing',GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),bb,$)}if(nb){fb=new IDd(mb,rL(F1d(a.k,51),28),a.b,bb,$);gDd(fb)&&!U0d(a.e,wL(C.a.getAtIndex(0)),fb.e)&&a.b.Fj(tXe+e4d(yXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),bb,$)}}b=ab.b;return b}case 21:b=wBd(a,!a.n?DCd(a.i):_Ad(a));return b;case 63:Z0d(a.e)||UAd(a,'msg.jsdoc.wizaction',a.i.g,CCd(a.i));return bBd(a,!a.n?DCd(a.i):_Ad(a));case 12:{ab=eBd(a);C=Jg(Lg(Pg((Ac(),new ld(44))),(Qd(),Od)),ab.a);C.a.isEmpty()||wL(C.a.getAtIndex(0)).length==0?XAd(a,'msg.jsdoc.disposeparameter.missing',a.i.g,CCd(a.i)):$_d(a.e,C)||XAd(a,'msg.jsdoc.disposeparameter.error',a.i.g,CCd(a.i));b=ab.b;return b}case 62:pb=eBd(a);ob=pb.a;ob.length==0?UAd(a,'msg.jsdoc.versionmissing',a.i.g,CCd(a.i)):X0d(a.e,ob)||UAd(a,'msg.jsdoc.extraversion',a.i.g,CCd(a.i));b=pb.b;return b;case 5:case 19:case 8:case 16:case 50:case 42:case 47:case 48:case 49:case 56:case 58:case 59:u=a.i.g;i=CCd(a.i);p=gBd(a,123);q=d==(ixd(),Mwd)||d==Rwd||d==Swd||d==Twd||d==awd||d==owd||d==jwd;h=q||d==Vwd;hb=null;d==Vwd&&!p&&TAd(a,a.i.g,CCd(a.i));if(p||!h){PBd(a);b=!a.n?DCd(a.i):_Ad(a);kb=nBd(a,b,a.i.g,CCd(a.i),b==(wCd(),lCd),false);d==_wd&&(kb=RBd(a,(h7d(),A4d),kb));hb=!kb?null:new f1d(kb,(O=rL(F1d(a.k,51),28),!O?null:O.ji()))}n=!hb&&!h;if(!n){(!!hb&&q||d==bxd)&&!S0d(a.e,hb)&&a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(P=rL(F1d(a.k,51),28),!P?null:P.ji()),u,i);r=gBd(a,64);switch(d.g){case 5:S_d(a.e)||UAd(a,'msg.jsdoc.const',a.i.g,CCd(a.i));break;case 19:f0d(a.e)||XAd(a,'msg.jsdoc.final',a.i.g,CCd(a.i));break;case 8:V_d(a.e,hb)||a.b.Fj(e4d('msg.jsdoc.define',GK(yK(agb,1),ZJe,1,5,[])),(S=rL(F1d(a.k,51),28),!S?null:S.ji()),u,i);if(!r){return LBd(a,b)}break;case 16:a0d(a.e)?Y0d(a.e,(z_d(),y_d))||a.b.Fj(e4d(zXe,GK(yK(agb,1),ZJe,1,5,[])),(T=rL(F1d(a.k,51),28),!T?null:T.ji()),u,i):a.b.Fj(e4d('msg.jsdoc.export',GK(yK(agb,1),ZJe,1,5,[])),(U=rL(F1d(a.k,51),28),!U?null:U.ji()),u,i);if(!r){return LBd(a,b)}break;case 47:Y0d(a.e,(z_d(),w_d))||a.b.Fj(e4d(zXe,GK(yK(agb,1),ZJe,1,5,[])),(V=rL(F1d(a.k,51),28),!V?null:V.ji()),u,i);if(!r){return LBd(a,b)}break;case 42:Y0d(a.e,(z_d(),v_d))||a.b.Fj(e4d(zXe,GK(yK(agb,1),ZJe,1,5,[])),(W=rL(F1d(a.k,51),28),!W?null:W.ji()),u,i);if(!r){return LBd(a,b)}break;case 48:Y0d(a.e,(z_d(),x_d))||a.b.Fj(e4d(zXe,GK(yK(agb,1),ZJe,1,5,[])),(X=rL(F1d(a.k,51),28),!X?null:X.ji()),u,i);if(!r){return LBd(a,b)}break;case 49:Y0d(a.e,(z_d(),y_d))||a.b.Fj(e4d(zXe,GK(yK(agb,1),ZJe,1,5,[])),(Y=rL(F1d(a.k,51),28),!Y?null:Y.ji()),u,i);if(!r){return LBd(a,b)}break;case 50:!hb&&(hb=$Ad(a,jBd(a,(h7d(),x6d))));if(!K0d(a.e,hb)){a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(Z=rL(F1d(a.k,51),28),!Z?null:Z.ji()),u,i);break}if(a.e.d&&!r){N=dBd(a,b,a.f?0:2,false);M=N.a;M.length>0&&J0d(a.e,M);b=N.b}else{b=bBd(a,!a.n?DCd(a.i):_Ad(a))}return b;case 56:P0d(a.e,hb)||a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(R=rL(F1d(a.k,51),28),!R?null:R.ji()),u,i);break;case 59:V0d(a.e,hb)||a.b.Fj(tXe+e4d(vXe,GK(yK(agb,1),ZJe,1,5,[]))+uXe,(O=rL(F1d(a.k,51),28),!O?null:O.ji()),u,i);}}return bBd(a,!a.n?DCd(a.i):_Ad(a));}}return !a.n?DCd(a.i):_Ad(a)} +function pSd(){pSd=cjb;nSd=LSd(GK(yK(NL,1),ULe,17,15,[65,91,97,123,181,182,192,215,216,223,224,247,248,304,306,312,313,329,330,383,384,397,398,411,412,426,428,442,444,446,447,448,452,496,497,545,546,564,570,575,577,592,595,597,598,600,601,602,603,604,608,609,611,612,616,618,619,620,623,624,626,627,629,630,637,638,640,641,643,644,648,653,658,659,837,838,891,894,902,903,904,907,908,909,910,912,913,930,931,944,945,975,976,978,981,983,984,1011,1013,1014,1015,1020,1021,1154,1162,1300,1329,1367,1377,1415,4256,4294,7549,7550,7680,7830,7835,7836,7840,7930,7936,7958,7960,7966,7968,8006,8008,8014,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,8062,8112,8114,8120,8124,8126,8127,8136,8140,8144,8146,8152,8156,8160,8162,8165,8166,8168,8173,8184,8188,8498,8499,8526,8527,8544,8576,8579,8581,9398,9450,11264,11311,11312,11359,11360,11373,11381,11383,11392,11492,11520,11558,65313,65339,65345,65371]));ISd(65,90);oSd=Fr(new rSd(-10795,(uSd(),new FSd(JSd(GK(yK(NL,1),ULe,17,15,[570]))))),new rSd(-10792,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[574])))),new rSd(-10743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[619])))),new rSd(-10727,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[637])))),new rSd(-7264,LSd(GK(yK(NL,1),ULe,17,15,[4256,4294]))),new rSd(-7205,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[921])))),new rSd(-3814,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[7549])))),new rSd(-743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[181])))),new rSd(-219,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[439])))),new rSd(-218,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[422,425,430])))),new rSd(-217,LSd(GK(yK(NL,1),ULe,17,15,[433,435]))),new rSd(-214,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[415])))),GK(yK(edb,1),ZJe,27,0,[new rSd(-213,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[413])))),new rSd(-211,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[406,412])))),new rSd(-210,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[385])))),new rSd(-209,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[407])))),new rSd(-207,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[404])))),new rSd(-206,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[390])))),new rSd(-205,LSd(GK(yK(NL,1),ULe,17,15,[393,395,403,404]))),new rSd(-203,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[400])))),new rSd(-202,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[399])))),new rSd(-195,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[384])))),new rSd(-163,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[410])))),new rSd(-130,LSd(GK(yK(NL,1),ULe,17,15,[414,415,891,894]))),new rSd(-128,LSd(GK(yK(NL,1),ULe,17,15,[8056,8058]))),new rSd(-126,LSd(GK(yK(NL,1),ULe,17,15,[8060,8062]))),new rSd(-121,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[255])))),new rSd(-112,LSd(GK(yK(NL,1),ULe,17,15,[8058,8060]))),new rSd(-100,LSd(GK(yK(NL,1),ULe,17,15,[8054,8056]))),new rSd(-97,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[405])))),new rSd(-96,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[917])))),new rSd(-86,LSd(GK(yK(NL,1),ULe,17,15,[922,923,8050,8054]))),new rSd(-84,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[837])))),new rSd(-80,LSd(GK(yK(NL,1),ULe,17,15,[929,930,XLe,1040]))),new rSd(-79,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[398])))),new rSd(-74,LSd(GK(yK(NL,1),ULe,17,15,[8048,8050]))),new rSd(-71,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[581])))),new rSd(-69,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[580])))),new rSd(-64,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[908])))),new rSd(-63,LSd(GK(yK(NL,1),ULe,17,15,[910,912]))),new rSd(-62,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[914])))),new rSd(-59,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[7776])))),new rSd(-57,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[920])))),new rSd(-56,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[447])))),new rSd(-54,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[928])))),new rSd(-48,LSd(GK(yK(NL,1),ULe,17,15,[1329,1367,11264,11311]))),new rSd(-47,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[934])))),new rSd(-38,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[902])))),new rSd(-37,LSd(GK(yK(NL,1),ULe,17,15,[904,907]))),new rSd(-32,LSd(GK(yK(NL,1),ULe,17,15,[65,91,192,215,216,223,913,930,931,940,1040,1072,65313,65339]))),new rSd(-31,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[931])))),new rSd(-28,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[8498])))),new rSd(-26,LSd(GK(yK(NL,1),ULe,17,15,[9398,9424]))),new rSd(-16,LSd(GK(yK(NL,1),ULe,17,15,[8544,8560]))),new rSd(-15,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1216])))),new rSd(-8,LSd(GK(yK(NL,1),ULe,17,15,[7936,7944,7952,7958,7968,7976,7984,7992,8000,8006,8017,8018,8019,8020,8021,8022,8023,8024,8032,8040,8112,8114,8144,8146,8160,8162]))),new rSd(-7,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1010,8165])))),new rSd(-2,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[452,455,458,497])))),new rSd(-1,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,306,308,310,313,315,317,319,321,323,325,327,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,377,379,381,386,388,391,395,401,408,416,418,420,423,428,431,435,437,440,444,452,455,458,461,463,465,467,469,471,473,475,478,480,482,484,486,488,490,492,494,497,500,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,546,548,550,552,554,556,558,560,562,571,577,582,584,586,588,590,984,986,988,990,992,994,996,998,1000,1002,1004,1006,1015,1018,1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1162,1164,1166,1168,1170,1172,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212,1214,1217,1219,1221,1223,1225,1227,1229,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,8579,11360,11367,11369,11371,11381,11392,11394,11396,11398,11400,11402,11404,11406,11408,11410,11412,11414,11416,11418,11420,11422,11424,11426,11428,11430,11432,11434,11436,11438,11440,11442,11444,11446,11448,11450,11452,11454,11456,11458,11460,11462,11464,11466,11468,11470,11472,11474,11476,11478,11480,11482,11484,11486,11488,11490])))),new rSd(1,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,307,309,311,314,316,318,320,322,324,326,328,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,378,380,382,387,389,392,396,402,409,417,419,421,424,429,432,436,438,441,445,453,456,459,462,464,466,468,470,472,474,476,479,481,483,485,487,489,491,493,495,498,501,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,547,549,551,553,555,557,559,561,563,572,578,583,585,587,589,591,985,987,989,991,993,995,997,999,1001,1003,1005,1007,1016,1019,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1218,1220,1222,1224,1226,1228,1230,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,7681,7683,7685,7687,7689,7691,7693,7695,7697,7699,7701,7703,7705,7707,7709,7711,7713,7715,7717,7719,7721,7723,7725,7727,7729,7731,7733,7735,7737,7739,7741,7743,7745,7747,7749,7751,7753,7755,7757,7759,7761,7763,7765,7767,7769,7771,7773,7775,7777,7779,7781,7783,7785,7787,7789,7791,7793,7795,7797,7799,7801,7803,7805,7807,7809,7811,7813,7815,7817,7819,7821,7823,7825,7827,7829,7841,7843,7845,7847,7849,7851,7853,7855,7857,7859,7861,7863,7865,7867,7869,7871,7873,7875,7877,7879,7881,7883,7885,7887,7889,7891,7893,7895,7897,7899,7901,7903,7905,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,8580,11361,11368,11370,11372,11382,11393,11395,11397,11399,11401,11403,11405,11407,11409,11411,11413,11415,11417,11419,11421,11423,11425,11427,11429,11431,11433,11435,11437,11439,11441,11443,11445,11447,11449,11451,11453,11455,11457,11459,11461,11463,11465,11467,11469,11471,11473,11475,11477,11479,11481,11483,11485,11487,11489,11491])))),new rSd(2,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[454,457,460,499])))),new rSd(7,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1017,8172])))),new rSd(8,LSd(GK(yK(NL,1),ULe,17,15,[7944,7952,7960,7966,7976,7984,7992,8000,8008,8014,8025,8026,8027,8028,8029,8030,8031,8032,8040,8048,8120,8122,8152,8154,8168,8170]))),new rSd(15,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1231])))),new rSd(16,LSd(GK(yK(NL,1),ULe,17,15,[8560,8576]))),new rSd(26,LSd(GK(yK(NL,1),ULe,17,15,[9424,9450]))),new rSd(28,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[8526])))),new rSd(31,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[962])))),new rSd(32,LSd(GK(yK(NL,1),ULe,17,15,[97,123,224,247,248,255,945,962,963,972,1072,1104,65345,65371]))),new rSd(37,LSd(GK(yK(NL,1),ULe,17,15,[941,944]))),new rSd(38,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[940])))),new rSd(47,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[981])))),new rSd(48,LSd(GK(yK(NL,1),ULe,17,15,[1377,1415,11312,11359]))),new rSd(54,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[982])))),new rSd(56,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[503])))),new rSd(57,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[977])))),new rSd(59,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[7835])))),new rSd(62,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[976])))),new rSd(63,LSd(GK(yK(NL,1),ULe,17,15,[973,975]))),new rSd(64,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[972])))),new rSd(69,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[649])))),new rSd(71,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[652])))),new rSd(74,LSd(GK(yK(NL,1),ULe,17,15,[8122,8124]))),new rSd(79,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[477])))),new rSd(80,LSd(GK(yK(NL,1),ULe,17,15,[1009,1010,1104,1120]))),new rSd(84,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[921])))),new rSd(86,LSd(GK(yK(NL,1),ULe,17,15,[1008,1009,8136,8140]))),new rSd(96,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1013])))),new rSd(97,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[502])))),new rSd(100,LSd(GK(yK(NL,1),ULe,17,15,[8154,8156]))),new rSd(112,LSd(GK(yK(NL,1),ULe,17,15,[8170,8172]))),new rSd(121,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[376])))),new rSd(126,LSd(GK(yK(NL,1),ULe,17,15,[8186,8188]))),new rSd(128,LSd(GK(yK(NL,1),ULe,17,15,[8184,8186]))),new rSd(130,LSd(GK(yK(NL,1),ULe,17,15,[544,545,1021,XLe]))),new rSd(163,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[573])))),new rSd(195,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[579])))),new rSd(202,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[601])))),new rSd(203,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[603])))),new rSd(205,LSd(GK(yK(NL,1),ULe,17,15,[598,600,608,609]))),new rSd(206,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[596])))),new rSd(207,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[611])))),new rSd(209,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[616])))),new rSd(210,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[595])))),new rSd(211,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[617,623])))),new rSd(213,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[626])))),new rSd(214,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[629])))),new rSd(217,LSd(GK(yK(NL,1),ULe,17,15,[650,652]))),new rSd(218,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[640,643,648])))),new rSd(219,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[658])))),new rSd(743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[924])))),new rSd(3814,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11363])))),new rSd(7205,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[8126])))),new rSd(7264,LSd(GK(yK(NL,1),ULe,17,15,[11520,11558]))),new rSd(10727,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11364])))),new rSd(10743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11362])))),new rSd(10792,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11366])))),new rSd(10795,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11365]))))]));Fr(new rSd(-10743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[619])))),new rSd(-10727,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[637])))),new rSd(-3814,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[7549])))),new rSd(-743,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[181])))),new rSd(-195,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[384])))),new rSd(-163,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[410])))),new rSd(-130,LSd(GK(yK(NL,1),ULe,17,15,[414,415,891,894]))),new rSd(-128,LSd(GK(yK(NL,1),ULe,17,15,[8056,8058]))),new rSd(-126,LSd(GK(yK(NL,1),ULe,17,15,[8060,8062]))),new rSd(-121,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[255])))),new rSd(-112,LSd(GK(yK(NL,1),ULe,17,15,[8058,8060]))),new rSd(-100,LSd(GK(yK(NL,1),ULe,17,15,[8054,8056]))),GK(yK(edb,1),ZJe,27,0,[new rSd(-97,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[405])))),new rSd(-86,LSd(GK(yK(NL,1),ULe,17,15,[8050,8054]))),new rSd(-84,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[837])))),new rSd(-74,LSd(GK(yK(NL,1),ULe,17,15,[8048,8050]))),new rSd(-56,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[447])))),new rSd(-8,LSd(GK(yK(NL,1),ULe,17,15,[7936,7944,7952,7958,7968,7976,7984,7992,8000,8006,8017,8018,8019,8020,8021,8022,8023,8024,8032,8040,8112,8114,8144,8146,8160,8162]))),new rSd(-7,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1010,8165])))),new rSd(1,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,307,309,311,314,316,318,320,322,324,326,328,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,378,380,382,387,389,392,396,402,409,417,419,421,424,429,432,436,438,441,445,453,456,459,462,464,466,468,470,472,474,476,479,481,483,485,487,489,491,493,495,498,501,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,547,549,551,553,555,557,559,561,563,572,578,583,585,587,589,591,985,987,989,991,993,995,997,999,1001,1003,1005,1007,1016,1019,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1218,1220,1222,1224,1226,1228,1230,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,7681,7683,7685,7687,7689,7691,7693,7695,7697,7699,7701,7703,7705,7707,7709,7711,7713,7715,7717,7719,7721,7723,7725,7727,7729,7731,7733,7735,7737,7739,7741,7743,7745,7747,7749,7751,7753,7755,7757,7759,7761,7763,7765,7767,7769,7771,7773,7775,7777,7779,7781,7783,7785,7787,7789,7791,7793,7795,7797,7799,7801,7803,7805,7807,7809,7811,7813,7815,7817,7819,7821,7823,7825,7827,7829,7841,7843,7845,7847,7849,7851,7853,7855,7857,7859,7861,7863,7865,7867,7869,7871,7873,7875,7877,7879,7881,7883,7885,7887,7889,7891,7893,7895,7897,7899,7901,7903,7905,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,8580,11361,11368,11370,11372,11382,11393,11395,11397,11399,11401,11403,11405,11407,11409,11411,11413,11415,11417,11419,11421,11423,11425,11427,11429,11431,11433,11435,11437,11439,11441,11443,11445,11447,11449,11451,11453,11455,11457,11459,11461,11463,11465,11467,11469,11471,11473,11475,11477,11479,11481,11483,11485,11487,11489,11491])))),new rSd(2,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[454,457,460,499])))),new rSd(15,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1231])))),new rSd(16,LSd(GK(yK(NL,1),ULe,17,15,[8560,8576]))),new rSd(26,LSd(GK(yK(NL,1),ULe,17,15,[9424,9450]))),new rSd(28,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[8526])))),new rSd(31,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[962])))),new rSd(32,LSd(GK(yK(NL,1),ULe,17,15,[97,123,224,247,248,255,945,962,963,972,1072,1104,65345,65371]))),new rSd(37,LSd(GK(yK(NL,1),ULe,17,15,[941,944]))),new rSd(38,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[940])))),new rSd(47,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[981])))),new rSd(48,LSd(GK(yK(NL,1),ULe,17,15,[1377,1415,11312,11359]))),new rSd(54,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[982])))),new rSd(57,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[977])))),new rSd(59,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[7835])))),new rSd(62,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[976])))),new rSd(63,LSd(GK(yK(NL,1),ULe,17,15,[973,975]))),new rSd(64,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[972])))),new rSd(69,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[649])))),new rSd(71,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[652])))),new rSd(79,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[477])))),new rSd(80,LSd(GK(yK(NL,1),ULe,17,15,[1009,1010,1104,1120]))),new rSd(86,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1008])))),new rSd(96,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[1013])))),new rSd(202,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[601])))),new rSd(203,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[603])))),new rSd(205,LSd(GK(yK(NL,1),ULe,17,15,[598,600,608,609]))),new rSd(206,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[596])))),new rSd(207,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[611])))),new rSd(209,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[616])))),new rSd(210,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[595])))),new rSd(211,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[617,623])))),new rSd(213,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[626])))),new rSd(214,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[629])))),new rSd(217,LSd(GK(yK(NL,1),ULe,17,15,[650,652]))),new rSd(218,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[640,643,648])))),new rSd(219,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[658])))),new rSd(7205,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[8126])))),new rSd(7264,LSd(GK(yK(NL,1),ULe,17,15,[11520,11558]))),new rSd(10792,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11366])))),new rSd(10795,new FSd(JSd(GK(yK(NL,1),ULe,17,15,[11365]))))]))} +function AUd(){var a;a=new zte;a.a+='{"externs/es3.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview ECMAScript 3 Built-Ins. This include common extensions so this\\n * is actually ES3+Reality.\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n * @author nicksantos@google.com (Nick Santos)\\n * @author arv@google.com (Erik Arvidsson)\\n * @author johnlenz@google.com (John Lenz)\\n */\\n\\n\\n// START ES6 RETROFIT CODE\\n// symbol, Symbol and Symbol.iterator are actually ES6 types but some\\n// Some types require them to be part of their definition (such as Array).\\n\\n\\n// TODO(johnlenz): symbol should be a primitive type.\\n/** @typedef {?} */\\nvar symbol;\\n\\n/**\\n * @param {string=} opt_description\\n * @return {symbol}\\n */\\nfunction Symbol(opt_description) {}\\n\\n\\n/**\\n * @param {string} sym\\n * @return {symbol|undefined}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for\\n */\\nSymbol.for;\\n\\n\\n/**\\n * @param {symbol} sym\\n * @return {string|undefined}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/keyFor\\n */\\nSymbol.keyFor;\\n\\n\\n// Well known symbols\\n\\n/** @const {symbol} */\\nSymbol.iterator;\\n\\n/** @const {symbol} */\\nSymbol.toStringTag;\\n\\n/** @const {symbol} */\\nSymbol.unscopables;\\n\\n\\n/**\\n * @record\\n * @template VALUE\\n */\\nfunction IIterableResult() {};\\n\\n/** @type {boolean} */\\nIIterableResult.prototype.done;\\n\\n/** @type {VALUE} */\\nIIterableResult.prototype.value;\\n\\n\\n\\n/**\\n * @interface\\n * @template VALUE\\n */\\nfunction Iterable() {}\\n\\n// TODO(johnlenz): remove the suppression when the compiler understands\\n// \\"symbol\\" natively\\n/**\\n * @return {!Iterator}\\n * @suppress {externsValidation}\\n */\\nIterable.prototype[Symbol.iterator] = function() {};\\n\\n\\n\\n/**\\n * @interface\\n * @template VALUE\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol\\n */\\nfunction Iterator() {}\\n\\n/**\\n * @param {VALUE=} value\\n * @return {!IIterableResult}\\n */\\nIterator.prototype.next;\\n\\n\\n/**\\n * Use this to indicate a type is both an Iterator and an Iterable.\\n * @interface\\n * @extends {Iterator}\\n * @extends {Iterable}\\n * @template T\\n */\\nfunction IteratorIterable() {}\\n\\n// END ES6 RETROFIT CODE\\n\\n\\n/**\\n * @interface\\n * @template KEY1, VALUE1\\n */\\nfunction IObject() {}\\n\\n/**\\n * @record\\n * @extends {IObject}\\n * @template VALUE2\\n */\\nfunction IArrayLike() {}\\n\\n/** @type {number} */\\nIArrayLike.prototype.length;\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments\\n */\\nfunction Arguments() {}\\n\\n/**\\n * @type {Function}\\n * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments/callee\\n */\\nArguments.prototype.callee;\\n\\n/**\\n * Use the non-standard {@see Function.prototype.caller} property of a function\\n * object instead.\\n * @type {Function}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/caller\\n * @deprecated\\n */\\nArguments.prototype.caller;\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments/length\\n */\\nArguments.prototype.length;\\n\\n/**\\n * Not actually a global variable, but we need it in order for the current type\\n * checker to typecheck the \\"arguments\\" variable in a function correctly.\\n * TODO(tbreisacher): When the old type checker is gone, delete this and add\\n * an \'arguments\' variable of type Array in the d8 externs.\\n *\\n * @type {!Arguments}\\n * @see http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments\\n */\\nvar arguments;\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\\n * @const\\n */\\nvar Infinity;\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\\n * @const\\n */\\nvar NaN;\\n\\n/**\\n * @type {undefined}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\\n * @const\\n */\\nvar undefined;\\n\\n/**\\n * @param {string} uri\\n * @return {string}\\n * @throws {URIError} when used wrongly.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI\\n */\\nfunction decodeURI(uri) {}\\n\\n/**\\n * @param {string} uri\\n * @return {string}\\n * @throws {URIError} when used wrongly.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent\\n */\\nfunction decodeURIComponent(uri) {}\\n\\n/**\\n * @param {string} uri\\n * @return {string}\\n * @throws {URIError} if one attempts to encode a surrogate which is not part of\\n * a high-low pair.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI\\n */\\nfunction encodeURI(uri) {}\\n\\n/**\\n * @param {string} uri\\n * @return {string}\\n * @throws {URIError} if one attempts to encode a surrogate which is not part of\\n * a high-low pair.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent\\n */\\nfunction encodeURIComponent(uri) {}\\n\\n/**\\n * Should only be used in browsers where encode/decodeURIComponent\\n * are not present, as the latter handle fancy Unicode characters.\\n * @param {string} str\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Predefined_Functions/escape_and_unescape_Functions\\n */\\nfunction escape(str) {}\\n\\n/**\\n * Should only be used in browsers where encode/decodeURIComponent\\n * are not present, as the latter handle fancy Unicode characters.\\n * @param {string} str\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Predefined_Functions/escape_and_unescape_Functions\\n */\\nfunction unescape(str) {}\\n\\n/**\\n * @param {*} num\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite\\n */\\nfunction isFinite(num) {}\\n\\n/**\\n * @param {*} num\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN\\n */\\nfunction isNaN(num) {}\\n\\n/**\\n * @param {*} num\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat\\n */\\nfunction parseFloat(num) {}\\n\\n/**\\n * Parse an integer. Use of {@code parseInt} without {@code base} is strictly\\n * banned in Google. If you really want to parse octal or hex based on the\\n * leader, then pass {@code undefined} as the base.\\n *\\n * @param {*} num\\n * @param {number|undefined} base\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt\\n */\\nfunction parseInt(num, base) {}\\n\\n/**\\n * @param {string} code\\n * @return {*}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval\\n */\\nfunction eval(code) {}\\n\\n\\n\\n/**\\n * @constructor\\n * @param {*=} opt_value\\n * @return {!Object}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\\n */\\nfunction Object(opt_value) {}\\n\\n/**\\n * The constructor of the current object.\\n * @type {Function}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor\\n */\\nObject.prototype.constructor = function() {};\\n\\n/**\\n * Binds an object\'s property to a function to be called when that property is\\n * looked up.\\n * Mozilla-only.\\n *\\n * @param {string} sprop\\n * @param {Function} fun\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineGetter\\n * @return {undefined}\\n */\\nObject.prototype.__defineGetter__ = function(sprop, fun) {};\\n\\n/**\\n * Binds an object\'s property to a function to be called when an attempt is made\\n * to set that property.\\n * Mozilla-only.\\n *\\n * @param {string} sprop\\n * @param {Function} fun\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineSetter\\n * @return {undefined}\\n */\\nObject.prototype.__defineSetter__ = function(sprop, fun) {};\\n\\n/**\\n * Returns whether the object has a property with the specified name.\\n *\\n * @param {*} propertyName Implicitly cast to a string.\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty\\n */\\nObject.prototype.hasOwnProperty = function(propertyName) {};\\n\\n/**\\n * Returns whether an object exists in another object\'s prototype chain.\\n *\\n * @param {Object} other\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf\\n */\\nObject.prototype.isPrototypeOf = function(other) {};\\n\\n/**\\n * Return the function bound as a getter to the specified property.\\n * Mozilla-only.\\n *\\n * @param {string} sprop a string containing the name of the property whose\\n * getter should be returned\\n * @return {Function}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/lookupGetter\\n */\\nObject.prototype.__lookupGetter__ = function(sprop) {};\\n\\n/**\\n * Return the function bound as a setter to the specified property.\\n * Mozilla-only.\\n *\\n * @param {string} sprop a string containing the name of the property whose\\n * setter should be returned.\\n * @return {Function}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/lookupSetter\\n */\\nObject.prototype.__lookupSetter__ = function(sprop) {};\\n\\n/**\\n * Executes a function when a non-existent method is called on an object.\\n * Mozilla-only.\\n *\\n * @param {Function} fun\\n * @return {*}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/noSuchMethod\\n */\\nObject.prototype.__noSuchMethod__ = function(fun) {};\\n\\n/**\\n * Points to an object\'s context. For top-level objects, this is the e.g. window.\\n * Mozilla-only.\\n *\\n * @type {Object}\\n * @deprecated\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/parent\\n */\\nObject.prototype.__parent__;\\n\\n/**\\n * Points to the object which was used as prototype when the object was instantiated.\\n * Mozilla-only.\\n *\\n * Will be null on Object.prototype.\\n *\\n * @type {Object}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto\\n */\\nObject.prototype.__proto__;\\n\\n/**\\n * Determine whether the specified property in an object can be enumerated by a\\n * for..in loop, with the exception of properties inherited through the\\n * prototype chain.\\n *\\n * @param {string} propertyName\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable\\n */\\nObject.prototype.propertyIsEnumerable = function(propertyName) {};\\n\\n/**\\n * Returns a localized string representing the object.\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString\\n */\\nObject.prototype.toLocaleString = function() {};\\n\\n/**\\n * Returns a string representing the source code of the object.\\n * Mozilla-only.\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource\\n */\\nObject.prototype.toSource = function() {};\\n\\n/**\\n * Returns a string representing the object.\\n * @this {*}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString\\n */\\nObject.prototype.toString = function() {};\\n\\n/**\\n * Removes a watchpoint set with the {@see Object.prototype.watch} method.\\n * Mozilla-only.\\n * @param {string} prop The name of a property of the object.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/unwatch\\n * @return {undefined}\\n */\\nObject.prototype.unwatch = function(prop) {};\\n\\n/**\\n * Returns the object\'s {@code this} value.\\n * @return {*}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf\\n */\\nObject.prototype.valueOf = function() {};\\n\\n/**\\n * Sets a watchpoint method.\\n * Mozilla-only.\\n * @param {string} prop The name of a property of the object.\\n * @param {Function} handler A function to call.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch\\n * @return {undefined}\\n */\\nObject.prototype.watch = function(prop, handler) {};\\n\\n\\n/**\\n * @constructor\\n * @param {...*} var_args\\n * @throws {Error}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\\n */\\nfunction Function(var_args) {}\\n\\n/**\\n * @param {...*} var_args\\n * @return {*}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call\\n */\\nFunction.prototype.call = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {*}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply\\n */\\nFunction.prototype.apply = function(var_args) {};\\n\\nFunction.prototype.arguments;\\n\\n/**\\n * @type {number}\\n * @deprecated\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/arity\\n */\\nFunction.prototype.arity;\\n\\n/**\\n * Nonstandard; Mozilla and JScript only.\\n * @type {Function}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller\\n */\\nFunction.prototype.caller;\\n\\n/**\\n * Nonstandard.\\n * @type {?}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/displayName\\n */\\nFunction.prototype.displayName;\\n\\n/**\\n * Expected number of arguments.\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length\\n */\\nFunction.prototype.length;\\n\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name\\n */\\nFunction.prototype.name;\\n\\n/**\\n * @this {Function}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nFunction.prototype.toString = function() {};\\n\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @param {...*} var_args\\n * @return {!Array}\\n * @nosideeffects\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\\n */\\nfunction Array(var_args) {}\\n\\n/**\\n * @return {Iterator}\\n * @suppress {externsValidation}\\n */\\nArray.prototype[Symbol.iterator] = function() {};\\n\\n// Functions:\\n\\n/**\\n * Returns a new array comprised of this array joined with other array(s)\\n * and/or value(s).\\n *\\n * @param {...*} var_args\\n * @return {!Array}\\n * @this {*}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat\\n */\\nArray.prototype.concat = function(var_args) {};\\n\\n/**\\n * Joins all elements of an array ';a.a+='into a string.\\n *\\n * @param {*=} opt_separator Specifies a string to separate each element of the\\n * array. The separator is converted to a string if necessary. If omitted,\\n * the array elements are separated with a comma.\\n * @return {string}\\n * @this {IArrayLike|string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join\\n */\\nArray.prototype.join = function(opt_separator) {};\\n\\n/**\\n * Removes the last element from an array and returns that element.\\n *\\n * @return {T}\\n * @this {IArrayLike}\\n * @modifies {this}\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop\\n */\\nArray.prototype.pop = function() {};\\n\\n/**\\n * Mutates an array by appending the given elements and returning the new\\n * length of the array.\\n *\\n * @param {...T} var_args\\n * @return {number} The new length of the array.\\n * @this {IArrayLike}\\n * @template T\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push\\n */\\nArray.prototype.push = function(var_args) {};\\n\\n/**\\n * Transposes the elements of an array in place: the first array element becomes the\\n * last and the last becomes the first. The mutated array is also returned.\\n *\\n * @return {THIS} A reference to the original modified array.\\n * @this {THIS}\\n * @template THIS\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse\\n */\\nArray.prototype.reverse = function() {};\\n\\n/**\\n * Removes the first element from an array and returns that element. This\\n * method changes the length of the array.\\n *\\n * @this {IArrayLike}\\n * @modifies {this}\\n * @return {T}\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift\\n */\\nArray.prototype.shift = function() {};\\n\\n/**\\n * Extracts a section of an array and returns a new array.\\n *\\n * @param {*=} opt_begin Zero-based index at which to begin extraction. A\\n * non-number type will be auto-cast by the browser to a number.\\n * @param {*=} opt_end Zero-based index at which to end extraction. slice\\n * extracts up to but not including end.\\n * @return {!Array}\\n * @this {IArrayLike|string}\\n * @template T\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice\\n */\\nArray.prototype.slice = function(opt_begin, opt_end) {};\\n\\n/**\\n * Sorts the elements of an array in place.\\n *\\n * @param {function(T,T):number=} opt_compareFunction Specifies a function that\\n * defines the sort order.\\n * @this {IArrayLike}\\n * @template T\\n * @modifies {this}\\n * @return {!Array}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\\n */\\nArray.prototype.sort = function(opt_compareFunction) {};\\n\\n/**\\n * Changes the content of an array, adding new elements while removing old\\n * elements.\\n *\\n * @param {*=} opt_index Index at which to start changing the array. If negative,\\n * will begin that many elements from the end. A non-number type will be\\n * auto-cast by the browser to a number.\\n * @param {*=} opt_howMany An integer indicating the number of old array elements\\n * to remove.\\n * @param {...T} var_args\\n * @return {!Array}\\n * @this {IArrayLike}\\n * @modifies {this}\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice\\n */\\nArray.prototype.splice = function(opt_index, opt_howMany, var_args) {};\\n\\n/**\\n * @return {string}\\n * @this {Object}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSource\\n */\\nArray.prototype.toSource;\\n\\n/**\\n * @this {Array}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nArray.prototype.toString = function() {};\\n\\n/**\\n * Adds one or more elements to the beginning of an array and returns the new\\n * length of the array.\\n *\\n * @param {...*} var_args\\n * @return {number} The new length of the array\\n * @this {IArrayLike}\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift\\n */\\nArray.prototype.unshift = function(var_args) {};\\n\\n/**\\n * Apply a function simultaneously against two values of the array (from\\n * left-to-right) as to reduce it to a single value.\\n *\\n * @param {?function(?, T, number, !Array) : R} callback\\n * @param {*=} opt_initialValue\\n * @return {R}\\n * @this {IArrayLike|string}\\n * @template T,R\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce\\n */\\nArray.prototype.reduce = function(callback, opt_initialValue) {};\\n\\n/**\\n * Apply a function simultaneously against two values of the array (from\\n * right-to-left) as to reduce it to a single value.\\n *\\n * @param {?function(?, T, number, !Array) : R} callback\\n * @param {*=} opt_initialValue\\n * @return {R}\\n * @this {IArrayLike|string}\\n * @template T,R\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight\\n */\\nArray.prototype.reduceRight = function(callback, opt_initialValue) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {?function(this:S, T, number, !Array): ?} callback\\n * @param {S=} opt_thisobj\\n * @return {boolean}\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\\n */\\nArray.prototype.every = function(callback, opt_thisobj) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {?function(this:S, T, number, !Array): ?} callback\\n * @param {S=} opt_thisobj\\n * @return {!Array}\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\\n */\\nArray.prototype.filter = function(callback, opt_thisobj) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {?function(this:S, T, number, !Array): ?} callback\\n * @param {S=} opt_thisobj\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\\n * @return {undefined}\\n */\\nArray.prototype.forEach = function(callback, opt_thisobj) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {T} obj\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @this {IArrayLike|string}\\n * @nosideeffects\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\\n */\\nArray.prototype.indexOf = function(obj, opt_fromIndex) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {T} obj\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @this {IArrayLike|string}\\n * @nosideeffects\\n * @template T\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf\\n */\\nArray.prototype.lastIndexOf = function(obj, opt_fromIndex) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {?function(this:S, T, number, !Array): R} callback\\n * @param {S=} opt_thisobj\\n * @return {!Array}\\n * @this {IArrayLike|string}\\n * @template T,S,R\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map\\n */\\nArray.prototype.map = function(callback, opt_thisobj) {};\\n\\n/**\\n * Available in ECMAScript 5, Mozilla 1.6+.\\n * @param {?function(this:S, T, number, !Array): ?} callback\\n * @param {S=} opt_thisobj\\n * @return {boolean}\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some\\n */\\nArray.prototype.some = function(callback, opt_thisobj) {};\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/index\\n */\\nArray.prototype.index;\\n\\n/**\\n * @type {?string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/input\\n */\\nArray.prototype.input;\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length\\n */\\nArray.prototype.length;\\n\\n/**\\n * @param {IArrayLike} arr\\n * @param {?function(this:S, T, number, ?) : ?} callback\\n * @param {S=} opt_context\\n * @return {boolean}\\n * @template T,S\\n */\\nArray.every = function(arr, callback, opt_context) {};\\n\\n/**\\n * @param {IArrayLike} arr\\n * @param {?function(this:S, T, number, ?) : ?} callback\\n * @param {S=} opt_context\\n * @return {!Array}\\n * @template T,S\\n */\\nArray.filter = function(arr, callback, opt_context) {};\\n\\n/**\\n * @param {IArrayLike} arr\\n * @param {?function(this:S, T, number, ?) : ?} callback\\n * @param {S=} opt_context\\n * @template T,S\\n * @return {undefined}\\n */\\nArray.forEach = function(arr, callback, opt_context) {};\\n\\n/**\\n * Mozilla 1.6+ only.\\n * @param {IArrayLike} arr\\n * @param {T} obj\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @template T\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\\n */\\nArray.indexOf = function(arr, obj, opt_fromIndex) {};\\n\\n/**\\n * Mozilla 1.6+ only.\\n * @param {IArrayLike} arr\\n * @param {T} obj\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @template T\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf\\n */\\nArray.lastIndexOf = function(arr, obj, opt_fromIndex) {};\\n\\n/**\\n * @param {IArrayLike} arr\\n * @param {?function(this:S, T, number, !Array): R} callback\\n * @param {S=} opt_context\\n * @return {!Array}\\n * @template T,S,R\\n */\\nArray.map = function(arr, callback, opt_context) {};\\n\\n/**\\n * @param {IArrayLike} arr\\n * @param {?function(this:S, T, number, ?) : ?} callback\\n * @param {S=} opt_context\\n * @return {boolean}\\n * @template T,S\\n */\\nArray.some = function(arr, callback, opt_context) {};\\n\\n/**\\n * Introduced in 1.8.5.\\n * @param {*} arr\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\\n */\\nArray.isArray = function(arr) {};\\n\\n/**\\n * @constructor\\n * @param {*=} opt_value\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\n */\\nfunction Boolean(opt_value) {}\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toSource\\n * @override\\n */\\nBoolean.prototype.toSource = function() {};\\n\\n/**\\n * @this {boolean|Boolean}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nBoolean.prototype.toString = function() {};\\n\\n/**\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean/valueOf\\n * @override\\n */\\nBoolean.prototype.valueOf = function() {};\\n\\n/**\\n * @constructor\\n * @param {*=} opt_value\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\\n */\\nfunction Number(opt_value) {}\\n\\n/**\\n * @this {Number|number}\\n * @param {number=} opt_fractionDigits\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential\\n */\\nNumber.prototype.toExponential = function(opt_fractionDigits) {};\\n\\n/**\\n * @this {Number|number}\\n * @param {*=} opt_digits\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed\\n */\\nNumber.prototype.toFixed = function(opt_digits) {};\\n\\n/**\\n * @this {Number|number}\\n * @param {number=} opt_precision\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision\\n */\\nNumber.prototype.toPrecision = function(opt_precision) {};\\n\\n/**\\n * Returns a string representing the number.\\n * @this {Number|number}\\n * @param {(number|Number)=} opt_radix An optional radix.\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString\\n * @override\\n */\\nNumber.prototype.toString = function(opt_radix) {};\\n\\n// Properties.\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE\\n */\\nNumber.MAX_VALUE;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE\\n */\\nNumber.MIN_VALUE;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN\\n */\\nNumber.NaN;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY\\n */\\nNumber.NEGATIVE_INFINITY;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY\\n */\\nNumber.POSITIVE_INFINITY;\\n\\n\\n/**\\n * @const\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math\\n */\\nvar Math = {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs\\n */\\nMath.abs = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos\\n */\\nMath.acos = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin\\n */\\nMath.asin = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan\\n */\\nMath.atan = function(x) {};\\n\\n/**\\n * @param {?} y\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2\\n */\\nMath.atan2 = function(y, x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil\\n */\\nMath.ceil = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos\\n */\\nMath.cos = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp\\n */\\nMath.exp = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor\\n */\\nMath.floor = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log\\n */\\nMath.log = function(x) {};\\n\\n/**\\n * @param {...?} var_args\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max\\n */\\nMath.max = function(var_args) {};\\n\\n/**\\n * @param {...?} var_args\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min\\n */\\nMath.min = function(var_args) {};\\n\\n/**\\n * @param {?} x\\n * @param {?} y\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow\\n */\\nMath.pow = function(x, y) {};\\n\\n/**\\n * @return {number}\\n * @noside';a.a+='effects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random\\n */\\nMath.random = function() {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\\n */\\nMath.round = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin\\n */\\nMath.sin = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt\\n */\\nMath.sqrt = function(x) {};\\n\\n/**\\n * @param {?} x\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan\\n */\\nMath.tan = function(x) {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/toSource\\n */\\nMath.toSource = function() {};\\n\\n// Properties:\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E\\n */\\nMath.E;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2\\n */\\nMath.LN2;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10\\n */\\nMath.LN10;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E\\n */\\nMath.LOG2E;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E\\n */\\nMath.LOG10E;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI\\n */\\nMath.PI;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2\\n */\\nMath.SQRT1_2;\\n\\n/**\\n * @const {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2\\n */\\nMath.SQRT2;\\n\\n\\n/**\\n * @param {?=} opt_yr_num\\n * @param {?=} opt_mo_num\\n * @param {?=} opt_day_num\\n * @param {?=} opt_hr_num\\n * @param {?=} opt_min_num\\n * @param {?=} opt_sec_num\\n * @param {?=} opt_ms_num\\n * @constructor\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\\n */\\nfunction Date(opt_yr_num, opt_mo_num, opt_day_num, opt_hr_num, opt_min_num,\\n opt_sec_num, opt_ms_num) {}\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now\\n */\\nDate.now = function() {};\\n\\n/**\\n * Parses a string representation of a date, and returns the number\\n * of milliseconds since January 1, 1970, 00:00:00, local time.\\n * @param {*} date\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse\\n */\\nDate.parse = function(date) {};\\n\\n/**\\n * @param {number} year\\n * @param {number} month\\n * @param {number=} opt_date\\n * @param {number=} opt_hours\\n * @param {number=} opt_minute\\n * @param {number=} opt_second\\n * @param {number=} opt_ms\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC\\n */\\nDate.UTC = function(year, month,\\n opt_date, opt_hours, opt_minute, opt_second, opt_ms) {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDate\\n */\\nDate.prototype.getDate = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay\\n */\\nDate.prototype.getDay = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth\\n */\\nDate.prototype.getMonth = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear\\n */\\nDate.prototype.getFullYear = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getYear\\n */\\nDate.prototype.getYear = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours\\n */\\nDate.prototype.getHours = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes\\n */\\nDate.prototype.getMinutes = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds\\n */\\nDate.prototype.getSeconds = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds\\n */\\nDate.prototype.getMilliseconds = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime\\n */\\nDate.prototype.getTime = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset\\n */\\nDate.prototype.getTimezoneOffset = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDate\\n */\\nDate.prototype.getUTCDate = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDay\\n */\\nDate.prototype.getUTCDay = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth\\n */\\nDate.prototype.getUTCMonth = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear\\n */\\nDate.prototype.getUTCFullYear = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCHours\\n */\\nDate.prototype.getUTCHours = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes\\n */\\nDate.prototype.getUTCMinutes = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds\\n */\\nDate.prototype.getUTCSeconds = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds\\n */\\nDate.prototype.getUTCMilliseconds = function() {};\\n\\n/**\\n * Sets the day of the month for a specified date according to local time.\\n *\\n * @param {number} dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate\\n * @return {number}\\n */\\nDate.prototype.setDate = function(dayValue) {};\\n\\n/**\\n * Set the month for a specified date according to local time.\\n *\\n * @param {number} monthValue\\n * @param {number=} opt_dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth\\n * @return {number}\\n */\\nDate.prototype.setMonth = function(monthValue, opt_dayValue) {};\\n\\n/**\\n * Sets the full year for a specified date according to local time.\\n *\\n * @param {number} yearValue\\n * @param {number=} opt_monthValue\\n * @param {number=} opt_dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear\\n * @return {number}\\n */\\nDate.prototype.setFullYear =\\n function(yearValue, opt_monthValue, opt_dayValue) {};\\n\\n/**\\n * Sets the year for a specified date according to local time.\\n *\\n * @param {number} yearValue\\n * @deprecated\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setYear\\n * @return {number}\\n */\\nDate.prototype.setYear = function(yearValue) {};\\n\\n/**\\n * Sets the hours for a specified date according to local time.\\n *\\n * @param {number} hoursValue\\n * @param {number=} opt_minutesValue\\n * @param {number=} opt_secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours\\n * @return {number}\\n */\\nDate.prototype.setHours = function(hoursValue, opt_minutesValue,\\n opt_secondsValue, opt_msValue) {};\\n\\n/**\\n * Sets the minutes for a specified date according to local time.\\n *\\n * @param {number} minutesValue\\n * @param {number=} opt_secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes\\n * @return {number}\\n */\\nDate.prototype.setMinutes =\\n function(minutesValue, opt_secondsValue, opt_msValue) {};\\n\\n/**\\n * Sets the seconds for a specified date according to local time.\\n *\\n * @param {number} secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds\\n * @return {number}\\n */\\nDate.prototype.setSeconds = function(secondsValue, opt_msValue) {};\\n\\n/**\\n * Sets the milliseconds for a specified date according to local time.\\n *\\n * @param {number} millisecondsValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds\\n * @return {number}\\n */\\nDate.prototype.setMilliseconds = function(millisecondsValue) {};\\n\\n/**\\n * Sets the Date object to the time represented by a number of milliseconds\\n * since January 1, 1970, 00:00:00 UTC.\\n *\\n * @param {number} timeValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setTime\\n * @return {number}\\n */\\nDate.prototype.setTime = function(timeValue) {};\\n\\n/**\\n * Sets the day of the month for a specified date according to universal time.\\n *\\n * @param {number} dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCDate\\n * @return {number}\\n */\\nDate.prototype.setUTCDate = function(dayValue) {};\\n\\n/**\\n * Sets the month for a specified date according to universal time.\\n *\\n * @param {number} monthValue\\n * @param {number=} opt_dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth\\n * @return {number}\\n */\\nDate.prototype.setUTCMonth = function(monthValue, opt_dayValue) {};\\n\\n/**\\n * Sets the full year for a specified date according to universal time.\\n *\\n * @param {number} yearValue\\n * @param {number=} opt_monthValue\\n * @param {number=} opt_dayValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear\\n * @return {number}\\n */\\nDate.prototype.setUTCFullYear = function(yearValue, opt_monthValue,\\n opt_dayValue) {};\\n\\n/**\\n * Sets the hour for a specified date according to universal time.\\n *\\n * @param {number} hoursValue\\n * @param {number=} opt_minutesValue\\n * @param {number=} opt_secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours\\n * @return {number}\\n */\\nDate.prototype.setUTCHours = function(hoursValue, opt_minutesValue,\\n opt_secondsValue, opt_msValue) {};\\n\\n/**\\n * Sets the minutes for a specified date according to universal time.\\n *\\n * @param {number} minutesValue\\n * @param {number=} opt_secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes\\n * @return {number}\\n */\\nDate.prototype.setUTCMinutes = function(minutesValue, opt_secondsValue,\\n opt_msValue) {};\\n\\n\\n/**\\n * Sets the seconds for a specified date according to universal time.\\n *\\n * @param {number} secondsValue\\n * @param {number=} opt_msValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds\\n * @return {number}\\n */\\nDate.prototype.setUTCSeconds = function(secondsValue, opt_msValue) {};\\n\\n/**\\n * Sets the milliseconds for a specified date according to universal time.\\n *\\n * @param {number} millisecondsValue\\n * @modifies {this}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds\\n * @return {number}\\n */\\nDate.prototype.setUTCMilliseconds = function(millisecondsValue) {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toSource\\n * @override\\n */\\nDate.prototype.toSource = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toDateString\\n */\\nDate.prototype.toDateString = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toGMTString\\n */\\nDate.prototype.toGMTString = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString\\n */\\nDate.prototype.toTimeString = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString\\n */\\nDate.prototype.toUTCString = function() {};\\n\\n/**\\n * @param {(string|Array)=} opt_locales\\n * @param {Object=} opt_options\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\\n */\\nDate.prototype.toLocaleDateString = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {string} formatString\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat\\n */\\nDate.prototype.toLocaleFormat = function(formatString) {};\\n\\n/**\\n * @param {string|Array=} opt_locales\\n * @param {Object=} opt_options\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString\\n * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.3.1\\n * @override\\n */\\nDate.prototype.toLocaleString = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {(string|Array)=} opt_locales\\n * @param {Object=} opt_options\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString\\n */\\nDate.prototype.toLocaleTimeString = function(opt_locales, opt_options) {};\\n\\n/**\\n * @this {Date}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nDate.prototype.toString = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.or';a.a+='g/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf\\n */\\nDate.prototype.valueOf;\\n\\n/**\\n * @constructor\\n * @implements {Iterable}\\n * @param {*=} opt_str\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\\n */\\nfunction String(opt_str) {}\\n\\n/**\\n * @param {...number} var_args\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode\\n */\\nString.fromCharCode = function(var_args) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/anchor\\n */\\nString.prototype.anchor = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/big\\n */\\nString.prototype.big = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/blink\\n */\\nString.prototype.blink = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/bold\\n */\\nString.prototype.bold = function() {};\\n\\n/**\\n * Returns the specified character from a string.\\n *\\n * @this {String|string}\\n * @param {number} index\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt\\n */\\nString.prototype.charAt = function(index) {};\\n\\n/**\\n * Returns a number indicating the Unicode value of the character at the given\\n * index.\\n *\\n * @this {String|string}\\n * @param {number=} opt_index\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\\n */\\nString.prototype.charCodeAt = function(opt_index) {};\\n\\n/**\\n * Combines the text of two or more strings and returns a new string.\\n *\\n * @this {String|string}\\n * @param {...*} var_args\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat\\n */\\nString.prototype.concat = function(var_args) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fixed\\n */\\nString.prototype.fixed = function() {};\\n\\n/**\\n * @this {String|string}\\n * @param {string} color\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fontcolor\\n */\\nString.prototype.fontcolor = function(color) {};\\n\\n/**\\n * @this {String|string}\\n * @param {number} size\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fontsize\\n */\\nString.prototype.fontsize = function(size) {};\\n\\n/**\\n * Returns the index within the calling String object of the first occurrence\\n * of the specified value, starting the search at fromIndex, returns -1 if the\\n * value is not found.\\n *\\n * @this {String|string}\\n * @param {string|null} searchValue\\n * @param {(number|null)=} opt_fromIndex\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf\\n */\\nString.prototype.indexOf = function(searchValue, opt_fromIndex) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/italics\\n */\\nString.prototype.italics = function() {};\\n\\n/**\\n * Returns the index within the calling String object of the last occurrence of\\n * the specified value, or -1 if not found. The calling string is searched\\n * backward, starting at fromIndex.\\n *\\n * @this {String|string}\\n * @param {string|null} searchValue\\n * @param {(number|null)=} opt_fromIndex\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf\\n */\\nString.prototype.lastIndexOf = function(searchValue, opt_fromIndex) {};\\n\\n/**\\n * @this {String|string}\\n * @param {string} hrefAttribute\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/link\\n */\\nString.prototype.link = function(hrefAttribute) {};\\n\\n/**\\n * Returns a number indicating whether a reference string comes before or after\\n * or is the same as the given string in sort order.\\n *\\n * @this {*}\\n * @param {?string} compareString\\n * @param {string|Array=} locales\\n * @param {Object=} options\\n * @return {number}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/String/localeCompare\\n * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.1.1\\n */\\nString.prototype.localeCompare = function(compareString, locales, options) {};\\n\\n/**\\n * Used to retrieve the matches when matching a string against a regular\\n * expression.\\n *\\n * @this {String|string}\\n * @param {*} regexp\\n * @return {Array} This should really return an Array with a few\\n * special properties, but we do not have a good way to model this in\\n * our type system. Also see Regexp.prototype.exec.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match\\n */\\nString.prototype.match = function(regexp) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/quote\\n */\\nString.prototype.quote = function() {};\\n\\n/**\\n * Finds a match between a regular expression and a string, and replaces the\\n * matched substring with a new substring.\\n *\\n * This may have side-effects if the replacement function has side-effects.\\n *\\n * @this {String|string}\\n * @param {RegExp|string} regex\\n * @param {string|Function} str\\n * @param {string=} opt_flags\\n * @return {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace\\n */\\nString.prototype.replace = function(regex, str, opt_flags) {};\\n\\n/**\\n * Executes the search for a match between a regular expression and this String\\n * object.\\n *\\n * @this {String|string}\\n * @param {RegExp|string} regexp\\n * @return {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search\\n */\\nString.prototype.search = function(regexp) {};\\n\\n/**\\n * @this {String|string}\\n * @param {number} begin\\n * @param {number=} opt_end\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice\\n */\\nString.prototype.slice = function(begin, opt_end) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/small\\n */\\nString.prototype.small = function() {};\\n\\n/**\\n * @this {String|string}\\n * @param {*=} opt_separator\\n * @param {number=} opt_limit\\n * @return {!Array}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split\\n */\\nString.prototype.split = function(opt_separator, opt_limit) {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/strike\\n */\\nString.prototype.strike = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/sub\\n */\\nString.prototype.sub = function() {};\\n\\n/**\\n * @this {String|string}\\n * @param {number} start\\n * @param {number=} opt_length\\n * @return {string} The specified substring.\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr\\n */\\nString.prototype.substr = function(start, opt_length) {};\\n\\n/**\\n * @this {String|string}\\n * @param {number} start\\n * @param {number=} opt_end\\n * @return {string} The specified substring.\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring\\n */\\nString.prototype.substring = function(start, opt_end) {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/sup\\n */\\nString.prototype.sup = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase\\n */\\nString.prototype.toLocaleUpperCase = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase\\n */\\nString.prototype.toLocaleLowerCase = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase\\n */\\nString.prototype.toLowerCase = function() {};\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase\\n */\\nString.prototype.toUpperCase = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toSource\\n * @override\\n */\\nString.prototype.toSource = function() {};\\n\\n/**\\n * @this {string|String}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nString.prototype.toString = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf\\n */\\nString.prototype.valueOf;\\n\\n/**\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length\\n */\\nString.prototype.length;\\n\\n/**\\n * @constructor\\n * @param {*=} opt_pattern\\n * @param {*=} opt_flags\\n * @return {!RegExp}\\n * @throws {SyntaxError} if opt_pattern is an invalid pattern.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nfunction RegExp(opt_pattern, opt_flags) {}\\n\\n/**\\n * @param {*} pattern\\n * @param {*=} opt_flags\\n * @return {void}\\n * @modifies {this}\\n * @deprecated\\n * @see http://msdn.microsoft.com/en-us/library/x9cswe0z(v=VS.85).aspx\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/compile\\n */\\nRegExp.prototype.compile = function(pattern, opt_flags) {};\\n\\n/**\\n * @param {*} str The string to search.\\n * @return {Array} This should really return an Array with a few\\n * special properties, but we do not have a good way to model this in\\n * our type system. Also see String.prototype.match.\\n * @see http://msdn.microsoft.com/en-us/library/z908hy33(VS.85).aspx\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec\\n */\\nRegExp.prototype.exec = function(str) {};\\n\\n/**\\n * @param {*} str The string to search.\\n * @return {boolean} Whether the string was matched.\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test\\n */\\nRegExp.prototype.test = function(str) {};\\n\\n/**\\n * @this {RegExp}\\n * @return {string}\\n * @nosideeffects\\n * @override\\n */\\nRegExp.prototype.toString = function() {};\\n\\n// Constructor properties:\\n\\n/**\\n * The string against which the last regexp was matched.\\n * @type {string}\\n * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_input.html\\n */\\nRegExp.input;\\n\\n/**\\n * The last matched characters.\\n * @type {string}\\n * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_lastMatch.html\\n */\\nRegExp.lastMatch;\\n\\n/**\\n * The last matched parenthesized substring, if any.\\n * @type {string}\\n * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_lastParen.html\\n */\\nRegExp.lastParen;\\n\\n/**\\n * The substring of the input up to the characters most recently matched.\\n * @type {string}\\n * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_leftContext.html\\n */\\nRegExp.leftContext;\\n\\n/**\\n * The substring of the input after the characters most recently matched.\\n * @type {string}\\n * @see http://www.devguru.com/Technologies/Ecmascript/Quickref/regexp_rightContext.html\\n */\\nRegExp.rightContext;\\n\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$1;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$2;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$3;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$4;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$5;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$6;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$7;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$8;\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\n */\\nRegExp.$9;\\n\\n// Prototype properties:\\n\\n/**\\n * Whether to test the regular expression against all possible matches\\n * in a string, or only against the first.\\n * @type {boolean}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global\\n */\\nRegExp.prototype.global;\\n\\n/**\\n * Whether to ignore case while attempting a match in a string.\\n * @type {boolean}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase\\n */\\nRegExp.prototype.ignoreCase;\\n\\n/**\\n * The index at which to start the next match.\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex\\n */\\nRegExp.prototype.lastIndex;\\n\\n/**\\n * Whether or not to search in strings across multiple lines.\\n * @type {boolean}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline\\n */\\nRegExp.prototype.multiline;\\n\\n/**\\n * The text of the pattern.\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source\\n */\\nRegExp.prototype.source;\\n\\n\\n/**\\n * @constructor\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!Error}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\\n */\\nfunction Error(opt_message, opt_file, opt_line) {}\\n\\n\\n/**\\n * Chrome/v8 specific, altering the maximum depth of the stack trace\\n * (10 by default).\\n * @type {number}\\n * @see http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\\n */\\nError.stackTraceLimit;\\n\\n\\n/**\\n * Chrome/v8 specific, adds a stack trace to the error object. The optional\\n * constructorOpt parameter allows you to pass in a function value. When\\n * collecting the stack trace all frames above the topmost call to this\\n * function, including that call';a.a+=', will be left out of the stack trace.\\n * @param {Object} error The object to add the stack trace to.\\n * @param {Function=} opt_constructor A function in the stack trace\\n * @see http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\\n * @return {undefined}\\n */\\nError.captureStackTrace = function(error, opt_constructor){};\\n\\n\\n/**\\n * IE-only.\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/2w6a45b5.aspx\\n */\\nError.prototype.description;\\n\\n\\n/**\\n * Mozilla-only.\\n * @type {number}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber\\n */\\nError.prototype.lineNumber;\\n\\n/**\\n * Mozilla-only\\n * @type {string}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName\\n */\\nError.prototype.fileName;\\n\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name\\n */\\nError.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message\\n */\\nError.prototype.message;\\n\\n/**\\n * Doesn\'t seem to exist, but closure/debug.js references it.\\n */\\nError.prototype.sourceURL;\\n\\n/** @type {string} */\\nError.prototype.stack;\\n\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!EvalError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\\n */\\nfunction EvalError(opt_message, opt_file, opt_line) {}\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!RangeError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\\n */\\nfunction RangeError(opt_message, opt_file, opt_line) {}\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!ReferenceError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\\n */\\nfunction ReferenceError(opt_message, opt_file, opt_line) {}\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!SyntaxError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\\n */\\nfunction SyntaxError(opt_message, opt_file, opt_line) {}\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!TypeError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\\n */\\nfunction TypeError(opt_message, opt_file, opt_line) {}\\n\\n/**\\n * @constructor\\n * @extends {Error}\\n * @param {*=} opt_message\\n * @param {*=} opt_file\\n * @param {*=} opt_line\\n * @return {!URIError}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\\n */\\nfunction URIError(opt_message, opt_file, opt_line) {}\\n\\n\\n// JScript extensions.\\n// @see http://msdn.microsoft.com/en-us/library/894hfyb4(VS.80).aspx\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/7sw4ddf8.aspx\\n * @type {function(new:?, string, string=)}\\n */\\nfunction ActiveXObject(progId, opt_location) {}\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see http://msdn.microsoft.com/en-us/library/9k34bww2(VS.80).aspx\\n */\\nfunction ScriptEngine() {}\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://msdn.microsoft.com/en-us/library/yf25ky07(VS.80).aspx\\n */\\nfunction ScriptEngineMajorVersion() {}\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://msdn.microsoft.com/en-us/library/wx3812cz(VS.80).aspx\\n */\\nfunction ScriptEngineMinorVersion() {}\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n * @see http://msdn.microsoft.com/en-us/library/e98hsk2f(VS.80).aspx\\n */\\nfunction ScriptEngineBuildVersion() {}\\n","externs/es5.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for ECMAScript 5.\\n * @see https://es5.github.io/\\n * @externs\\n * @author djlee@google.com (DJ Lee)\\n */\\n\\n\\n/**\\n * @param {Object|undefined} selfObj Specifies the object to which |this| should\\n * point when the function is run. If the value is null or undefined, it\\n * will default to the global object.\\n * @param {...*} var_args Additional arguments that are partially\\n * applied to fn.\\n * @return {!Function} A partially-applied form of the Function on which\\n * bind() was invoked as a method.\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\\n */\\nFunction.prototype.bind = function(selfObj, var_args) {};\\n\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/Trim\\n */\\nString.prototype.trim = function() {};\\n\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimLeft\\n */\\nString.prototype.trimLeft = function() {};\\n\\n\\n/**\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimRight\\n */\\nString.prototype.trimRight = function() {};\\n\\n\\n/**\\n * A object property descriptor used by Object.create, Object.defineProperty,\\n * Object.defineProperties, Object.getOwnPropertyDescriptor.\\n *\\n * Note: not a real constructor.\\n * @constructor\\n * @template THIS\\n */\\nfunction ObjectPropertyDescriptor() {}\\n\\n/** @type {*} */\\nObjectPropertyDescriptor.prototype.value;\\n\\n/** @type {(function(this: THIS):?)|undefined} */\\nObjectPropertyDescriptor.prototype.get;\\n\\n/** @type {(function(this: THIS, ?):void)|undefined} */\\nObjectPropertyDescriptor.prototype.set;\\n\\n/** @type {boolean|undefined} */\\nObjectPropertyDescriptor.prototype.writable;\\n\\n/** @type {boolean|undefined} */\\nObjectPropertyDescriptor.prototype.enumerable;\\n\\n/** @type {boolean|undefined} */\\nObjectPropertyDescriptor.prototype.configurable;\\n\\n\\n/**\\n * @param {?Object} proto\\n * @param {?Object=} opt_properties A map of ObjectPropertyDescriptors.\\n * @return {!Object}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create\\n */\\nObject.create = function(proto, opt_properties) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @param {string} prop\\n * @param {!Object} descriptor A ObjectPropertyDescriptor.\\n * @return {!Object}\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty\\n */\\nObject.defineProperty = function(obj, prop, descriptor) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @param {!Object} props A map of ObjectPropertyDescriptors.\\n * @return {!Object}\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperties\\n */\\nObject.defineProperties = function(obj, props) {};\\n\\n\\n/**\\n * @param {T} obj\\n * @param {string} prop\\n * @return {!ObjectPropertyDescriptor|undefined}\\n * @nosideeffects\\n * @template T\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\\n */\\nObject.getOwnPropertyDescriptor = function(obj, prop) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {!Array}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys\\n */\\nObject.keys = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {!Array}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames\\n */\\nObject.getOwnPropertyNames = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {Object}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/GetPrototypeOf\\n */\\nObject.getPrototypeOf = function(obj) {};\\n\\n\\n/**\\n * @param {T} obj\\n * @return {T}\\n * @template T\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/preventExtensions\\n */\\nObject.preventExtensions = function(obj) {};\\n\\n\\n/**\\n * @param {T} obj\\n * @return {T}\\n * @template T\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/seal\\n */\\nObject.seal = function(obj) {};\\n\\n\\n/**\\n * @param {T} obj\\n * @return {T}\\n * @template T\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze\\n */\\nObject.freeze = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isExtensible\\n */\\nObject.isExtensible = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isSealed\\n */\\nObject.isSealed = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isFrozen\\n */\\nObject.isFrozen = function(obj) {};\\n\\n\\n/**\\n * @param {string=} opt_key The JSON key for this object.\\n * @return {*} The serializable representation of this object. Note that this\\n * need not be a string. See http://goo.gl/PEUvs.\\n * @see https://es5.github.io/#x15.12.3\\n */\\nObject.prototype.toJSON = function(opt_key) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toISOString\\n * @return {string}\\n */\\nDate.prototype.toISOString = function() {};\\n\\n\\n/**\\n * @param {*=} opt_ignoredKey\\n * @return {string}\\n * @override\\n */\\nDate.prototype.toJSON = function(opt_ignoredKey) {};\\n\\n\\n/**\\n * A fake type to model the JSON object.\\n * @constructor\\n */\\nfunction JSONType() {}\\n\\n\\n/**\\n * @param {string} jsonStr The string to parse.\\n * @param {(function(string, *) : *)=} opt_reviver\\n * @return {*} The JSON object.\\n * @throws {Error}\\n */\\nJSONType.prototype.parse = function(jsonStr, opt_reviver) {};\\n\\n\\n/**\\n * @param {*} jsonObj Input object.\\n * @param {(Array|(function(string, *) : *)|null)=} opt_replacer\\n * @param {(number|string)=} opt_space\\n * @return {string} JSON string which represents jsonObj.\\n * @throws {Error}\\n */\\nJSONType.prototype.stringify = function(jsonObj, opt_replacer, opt_space) {};\\n\\n\\n/**\\n * @type {!JSONType}\\n * @suppress {duplicate}\\n */\\nvar JSON;\\n","externs/es6.js":"/*\\n * Copyright 2014 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for ECMAScript 6 and later.\\n * @see https://tc39.github.io/ecma262/\\n * @see https://www.khronos.org/registry/typedarray/specs/latest/\\n * @externs\\n */\\n\\n\\n\\n/**\\n * @constructor\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\\n * @implements {IteratorIterable}\\n * @template VALUE\\n */\\nfunction Generator() {}\\n\\n/**\\n * @param {?=} opt_value\\n * @return {!IIterableResult}\\n * @override\\n */\\nGenerator.prototype.next = function(opt_value) {};\\n\\n/**\\n * @param {VALUE} value\\n * @return {!IIterableResult}\\n */\\nGenerator.prototype.return = function(value) {};\\n\\n/**\\n * @param {?} exception\\n * @return {!IIterableResult}\\n */\\nGenerator.prototype.throw = function(exception) {};\\n\\n\\n// TODO(johnlenz): Array and Arguments should be Iterable.\\n\\n\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.log10 = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.log2 = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.log1p = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.expm1 = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.cosh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.sinh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.tanh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.acosh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.asinh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.atanh = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.trunc = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.sign = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n */\\nMath.cbrt = function(value) {};\\n\\n/**\\n * @param {number} value1\\n * @param {...number} var_args\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot\\n */\\nMath.hypot = function(value1, var_args) {};\\n\\n/**\\n * @param {number} value1\\n * @param {number} value2\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul\\n */\\nMath.imul = function(value1, value2) {};\\n\\n/**\\n * @param {number} value\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\\n */\\nMath.clz32 = function(value) {};\\n\\n\\n/**\\n * @param {*} a\\n * @param {*} b\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\\n */\\nObject.is;\\n\\n\\n/**\\n * Returns a language-sensitive string representation of this number.\\n * @param {(string|!Array)=} opt_locales\\n * @param {Object=} opt_options\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString\\n * @see http://www.ecma-international.org/ecma-402/1.0/#sec-13.2.1\\n * @override\\n */\\nNumber.prototype.toLocaleString = function(opt_locales, opt_options) {};\\n\\n\\n/**\\n * Pads the end of the string so that it reaches the given length.\\n * NOTE: this is an ES2017 (ES8) extern.\\n *\\n * @param {number} targetLength The target length.\\n * @param {string=} opt_padString The string to pad with.\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd\\n */\\nString.prototype.padEnd = function(targetLength, opt_padString) {};\\n\\n/**\\n * Pads the start of the string so that it reaches the given length.\\n * NOTE: this is an ES2017 (';a.a+='ES8) extern.\\n *\\n * @param {number} targetLength The target length.\\n * @param {string=} opt_padString The string to pad with.\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\\n */\\nString.prototype.padStart = function(targetLength, opt_padString) {};\\n\\n/**\\n * Repeats the string the given number of times.\\n *\\n * @param {number} count The number of times the string is repeated.\\n * @this {String|string}\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\\n */\\nString.prototype.repeat = function(count) {};\\n\\n/**\\n * @constructor\\n * @extends {Array}\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-gettemplateobject\\n */\\nvar ITemplateArray = function() {};\\n\\n/**\\n * @type {!Array}\\n */\\nITemplateArray.prototype.raw;\\n\\n/**\\n * @param {!ITemplateArray} template\\n * @param {...*} var_args Substitution values.\\n * @return {string}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw\\n */\\nString.raw = function(template, var_args) {};\\n\\n\\n/**\\n * @param {number} codePoint\\n * @param {...number} var_args Additional codepoints\\n * @return {string}\\n */\\nString.fromCodePoint = function(codePoint, var_args) {};\\n\\n\\n/**\\n * @param {number} index\\n * @return {number}\\n * @nosideeffects\\n */\\nString.prototype.codePointAt = function(index) {};\\n\\n\\n/**\\n * @param {string=} opt_form\\n * @return {string}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize\\n */\\nString.prototype.normalize = function(opt_form) {};\\n\\n\\n/**\\n * @param {string} searchString\\n * @param {number=} opt_position\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\\n */\\nString.prototype.startsWith = function(searchString, opt_position) {};\\n\\n/**\\n * @param {string} searchString\\n * @param {number=} opt_position\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\\n */\\nString.prototype.endsWith = function(searchString, opt_position) {};\\n\\n/**\\n * @param {string} searchString\\n * @param {number=} opt_position\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\\n */\\nString.prototype.includes = function(searchString, opt_position) {};\\n\\n\\n/**\\n * @see http://dev.w3.org/html5/postmsg/\\n * @interface\\n */\\nfunction Transferable() {}\\n\\n/**\\n * @param {number} length The length in bytes\\n * @constructor\\n * @noalias\\n * @throws {Error}\\n * @implements {Transferable}\\n */\\nfunction ArrayBuffer(length) {}\\n\\n/** @type {number} */\\nArrayBuffer.prototype.byteLength;\\n\\n/**\\n * @param {number} begin\\n * @param {number=} opt_end\\n * @return {!ArrayBuffer}\\n * @nosideeffects\\n */\\nArrayBuffer.prototype.slice = function(begin, opt_end) {};\\n\\n/**\\n * @param {*} arg\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView\\n */\\nArrayBuffer.isView = function(arg) {};\\n\\n\\n/**\\n * @constructor\\n * @noalias\\n */\\nfunction ArrayBufferView() {}\\n\\n/** @type {!ArrayBuffer} */\\nArrayBufferView.prototype.buffer;\\n\\n/** @type {number} */\\nArrayBufferView.prototype.byteOffset;\\n\\n/** @type {number} */\\nArrayBufferView.prototype.byteLength;\\n\\n\\n/**\\n * @typedef {!ArrayBuffer|!ArrayBufferView}\\n */\\nvar BufferSource;\\n\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @extends {ArrayBufferView}\\n */\\nfunction TypedArray() {};\\n\\n/** @const {number} */\\nTypedArray.prototype.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {number} target\\n * @param {number} start\\n * @param {number=} opt_end\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin\\n */\\nTypedArray.prototype.copyWithin = function(target, start, opt_end) {};\\n\\n/**\\n * @return {!IteratorIterable>}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/entries\\n */\\nTypedArray.prototype.entries = function() {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : ?} callback\\n * @param {S=} opt_thisArg\\n * @return {boolean}\\n * @template S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every\\n */\\nTypedArray.prototype.every = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {number} value\\n * @param {number=} opt_begin\\n * @param {number=} opt_end\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill\\n */\\nTypedArray.prototype.fill = function(value, opt_begin, opt_end) {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : boolean} callback\\n * @param {S=} opt_thisArg\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS,S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter\\n */\\nTypedArray.prototype.filter = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : boolean} callback\\n * @param {S=} opt_thisArg\\n * @return {(number|undefined)}\\n * @template S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find\\n */\\nTypedArray.prototype.find = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : boolean} callback\\n * @param {S=} opt_thisArg\\n * @return {number}\\n * @template S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex\\n */\\nTypedArray.prototype.findIndex = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : ?} callback\\n * @param {S=} opt_thisArg\\n * @return {undefined}\\n * @template S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach\\n */\\nTypedArray.prototype.forEach = function(callback, opt_thisArg) {};\\n\\n/**\\n * NOTE: this is an ES2016 (ES7) extern.\\n * @param {number} searchElement\\n * @param {number=} opt_fromIndex\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes\\n */\\nTypedArray.prototype.includes = function(searchElement, opt_fromIndex) {};\\n\\n/**\\n * @param {number} searchElement\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf\\n */\\nTypedArray.prototype.indexOf = function(searchElement, opt_fromIndex) {};\\n\\n/**\\n * @param {string=} opt_separator\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join\\n */\\nTypedArray.prototype.join = function(opt_separator) {};\\n\\n/**\\n * @return {!IteratorIterable}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/keys\\n */\\nTypedArray.prototype.keys = function() {};\\n\\n/**\\n * @param {number} searchElement\\n * @param {number=} opt_fromIndex\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf\\n */\\nTypedArray.prototype.lastIndexOf = function(searchElement, opt_fromIndex) {};\\n\\n/** @type {number} */\\nTypedArray.prototype.length;\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : number} callback\\n * @param {S=} opt_thisArg\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS,S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map\\n */\\nTypedArray.prototype.map = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {function((number|INIT|RET), number, number, !TypedArray) : RET} callback\\n * @param {INIT=} opt_initialValue\\n * @return {RET}\\n * @template INIT,RET\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce\\n */\\nTypedArray.prototype.reduce = function(callback, opt_initialValue) {};\\n\\n/**\\n * @param {function((number|INIT|RET), number, number, !TypedArray) : RET} callback\\n * @param {INIT=} opt_initialValue\\n * @return {RET}\\n * @template INIT,RET\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight\\n */\\nTypedArray.prototype.reduceRight = function(callback, opt_initialValue) {};\\n\\n/**\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse\\n */\\nTypedArray.prototype.reverse = function() {};\\n\\n/**\\n * @param {!ArrayBufferView|!Array} array\\n * @param {number=} opt_offset\\n * @return {undefined}\\n * @throws {!RangeError}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set\\n */\\nTypedArray.prototype.set = function(array, opt_offset) {};\\n\\n/**\\n * @param {number=} opt_begin\\n * @param {number=} opt_end\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice\\n */\\nTypedArray.prototype.slice = function(opt_begin, opt_end) {};\\n\\n/**\\n * @param {function(this:S, number, number, !TypedArray) : boolean} callback\\n * @param {S=} opt_thisArg\\n * @return {boolean}\\n * @template S\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some\\n */\\nTypedArray.prototype.some = function(callback, opt_thisArg) {};\\n\\n/**\\n * @param {(function(number, number) : number)=} opt_compareFunction\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort\\n */\\nTypedArray.prototype.sort = function(opt_compareFunction) {};\\n\\n/**\\n * @param {number} begin\\n * @param {number=} opt_end\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray\\n */\\nTypedArray.prototype.subarray = function(begin, opt_end) {};\\n\\n/**\\n * @return {!IteratorIterable}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/values\\n */\\nTypedArray.prototype.values = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString\\n * @override\\n */\\nTypedArray.prototype.toLocaleString = function() {};\\n\\n/**\\n * @return {string}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString\\n * @override\\n */\\nTypedArray.prototype.toString = function() {};\\n\\n/** @override */\\nTypedArray.prototype[Symbol.iterator] = function() {};\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments} If the user passes a backing array, then indexed\\n * accesses will modify the backing array. JSCompiler does not model\\n * this well. In other words, if you have:\\n * \\n * var x = new ArrayBuffer(1);\\n * var y = new Int8Array(x);\\n * y[0] = 2;\\n * <\/code>\\n * JSCompiler will not recognize that the last assignment modifies x.\\n * We workaround this by marking all these arrays as @modifies {arguments},\\n * to introduce the possibility that x aliases y.\\n */\\nfunction Int8Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nInt8Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Int8Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nInt8Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Int8Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nInt8Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Uint8Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nUint8Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Uint8Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nUint8Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Uint8Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nUint8Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Uint8ClampedArray(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nUint8ClampedArray.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Uint8ClampedArray}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nUint8ClampedArray.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Uint8ClampedArray}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nUint8ClampedArray.of = function(var_args) {};\\n\\n\\n/**\\n * @typedef {Uint8ClampedArray}\\n * @deprecated CanvasPixelArray has been replaced by Uint8ClampedArray\\n * in the latest spec.\\n * @see http://www.w3.org/TR/2dcontext/#imagedata\\n */\\nvar CanvasPixelArray;\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Int16Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nInt16Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Int16Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nInt16Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Int16Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nInt16Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\';a.a+="n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Uint16Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nUint16Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Uint16Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nUint16Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Uint16Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nUint16Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Int32Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nInt32Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Int32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nInt32Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Int32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nInt32Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Uint32Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nUint32Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Uint32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nUint32Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Uint32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nUint32Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Float32Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nFloat32Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Float32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nFloat32Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Float32Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nFloat32Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {number|ArrayBufferView|Array|ArrayBuffer} length or array\\n * or buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_length\\n * @constructor\\n * @extends {TypedArray}\\n * @noalias\\n * @throws {Error}\\n * @modifies {arguments}\\n */\\nfunction Float64Array(length, opt_byteOffset, opt_length) {}\\n\\n/** @const {number} */\\nFloat64Array.BYTES_PER_ELEMENT;\\n\\n/**\\n * @param {!Array} source\\n * @param {function(this:S, number): number=} opt_mapFn\\n * @param {S=} opt_this\\n * @template S\\n * @return {!Float64Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from\\n */\\nFloat64Array.from = function(source, opt_mapFn, opt_this) {};\\n\\n/**\\n * @param {...number} var_args\\n * @return {!Float64Array}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of\\n */\\nFloat64Array.of = function(var_args) {};\\n\\n\\n/**\\n * @param {ArrayBuffer} buffer\\n * @param {number=} opt_byteOffset\\n * @param {number=} opt_byteLength\\n * @constructor\\n * @extends {ArrayBufferView}\\n * @noalias\\n * @throws {Error}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/DataView\\n */\\nfunction DataView(buffer, opt_byteOffset, opt_byteLength) {}\\n\\n/**\\n * @param {number} byteOffset\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getInt8 = function(byteOffset) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getUint8 = function(byteOffset) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getInt16 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getUint16 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getInt32 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getUint32 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getFloat32 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {boolean=} opt_littleEndian\\n * @return {number}\\n * @throws {Error}\\n */\\nDataView.prototype.getFloat64 = function(byteOffset, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setInt8 = function(byteOffset, value) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setUint8 = function(byteOffset, value) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setInt16 = function(byteOffset, value, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setUint16 = function(byteOffset, value, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setInt32 = function(byteOffset, value, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setUint32 = function(byteOffset, value, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setFloat32 = function(\\n byteOffset, value, opt_littleEndian) {};\\n\\n/**\\n * @param {number} byteOffset\\n * @param {number} value\\n * @param {boolean=} opt_littleEndian\\n * @throws {Error}\\n * @return {undefined}\\n */\\nDataView.prototype.setFloat64 = function(\\n byteOffset, value, opt_littleEndian) {};\\n\\n\\n/**\\n * @see https://github.com/promises-aplus/promises-spec\\n * @typedef {{then: ?}}\\n */\\nvar Thenable;\\n\\n\\n/**\\n * This is not an official DOM interface. It is used to add generic typing\\n * and respective type inference where available.\\n * {@see goog.Thenable} inherits from this making all promises\\n * interoperate.\\n * @interface\\n * @template TYPE\\n */\\nfunction IThenable() {}\\n\\n\\n/**\\n * @param {?(function(TYPE):VALUE)=} opt_onFulfilled\\n * @param {?(function(*): *)=} opt_onRejected\\n * @return {RESULT}\\n * @template VALUE\\n *\\n * When a Promise (or thenable) is returned from the fulfilled callback,\\n * the result is the payload of that promise, not the promise itself.\\n *\\n * @template RESULT := type('IThenable',\\n * cond(isUnknown(VALUE), unknown(),\\n * mapunion(VALUE, (V) =>\\n * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),\\n * templateTypeOf(V, 0),\\n * cond(sub(V, 'Thenable'),\\n * unknown(),\\n * V)))))\\n * =:\\n */\\nIThenable.prototype.then = function(opt_onFulfilled, opt_onRejected) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\\n * @param {function(\\n * function((TYPE|IThenable|Thenable|null)=),\\n * function(*=))} resolver\\n * @constructor\\n * @implements {IThenable}\\n * @template TYPE\\n */\\nfunction Promise(resolver) {}\\n\\n\\n/**\\n * @param {VALUE=} opt_value\\n * @return {RESULT}\\n * @template VALUE\\n * @template RESULT := type('Promise',\\n * cond(isUnknown(VALUE), unknown(),\\n * mapunion(VALUE, (V) =>\\n * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),\\n * templateTypeOf(V, 0),\\n * cond(sub(V, 'Thenable'),\\n * unknown(),\\n * V)))))\\n * =:\\n */\\nPromise.resolve = function(opt_value) {};\\n\\n\\n/**\\n * @param {*=} opt_error\\n * @return {!Promise}\\n */\\nPromise.reject = function(opt_error) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\\n * @param {!Iterable} iterable\\n * @return {!Promise>}\\n * @template VALUE\\n * @template RESULT := mapunion(VALUE, (V) =>\\n * cond(isUnknown(V),\\n * unknown(),\\n * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),\\n * templateTypeOf(V, 0),\\n * cond(sub(V, 'Thenable'), unknown(), V))))\\n * =:\\n */\\nPromise.all = function(iterable) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\\n * @param {!Iterable} iterable\\n * @return {!Promise}\\n * @template VALUE\\n * @template RESULT := mapunion(VALUE, (V) =>\\n * cond(isUnknown(V),\\n * unknown(),\\n * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),\\n * templateTypeOf(V, 0),\\n * cond(sub(V, 'Thenable'), unknown(), V))))\\n * =:\\n */\\nPromise.race = function(iterable) {};\\n\\n\\n/**\\n * @param {?(function(this:void, TYPE):VALUE)=} opt_onFulfilled\\n * @param {?(function(this:void, *): *)=} opt_onRejected\\n * @return {RESULT}\\n * @template VALUE\\n *\\n * When a Promise (or thenable) is returned from the fulfilled callback,\\n * the result is the payload of that promise, not the promise itself.\\n *\\n * @template RESULT := type('Promise',\\n * cond(isUnknown(VALUE), unknown(),\\n * mapunion(VALUE, (V) =>\\n * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'),\\n * templateTypeOf(V, 0),\\n * cond(sub(V, 'Thenable'),\\n * unknown(),\\n * V)))))\\n * =:\\n * @override\\n */\\nPromise.prototype.then = function(opt_onFulfilled, opt_onRejected) {};\\n\\n\\n/**\\n * @param {function(*): RESULT} onRejected\\n * @return {!Promise}\\n * @template RESULT\\n */\\nPromise.prototype.catch = function(onRejected) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of\\n * @param {...T} var_args\\n * @return {!Array}\\n * @template T\\n */\\nArray.of = function(var_args) {};\\n\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from\\n * @param {string|!IArrayLike|!Iterable} arrayLike\\n * @param {function(this:S, (string|T), number): R=} opt_mapFn\\n * @param {S=} opt_this\\n * @return {!Array}\\n * @template T,S,R\\n */\\nArray.from = function(arrayLike, opt_mapFn, opt_this) {};\\n\\n\\n/** @return {!IteratorIterable} */\\nArray.prototype.keys;\\n\\n\\n/**\\n * @return {!IteratorIterable>} Iterator of [key, value] pairs.\\n */\\nArray.prototype.entries;\\n\\n\\n/**\\n * @param {!function(this:S, T, number, !Array): boolean} predicate\\n * @param {S=} opt_this\\n * @return {T|undefined}\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.find\\n */\\nArray.prototype.find = function(predicate, opt_this) {};\\n\\n\\n/**\\n * @param {!function(this:S, T, number, !Array): boolean} predicate\\n * @param {S=} opt_this\\n * @return {number}\\n * @this {IArrayLike|string}\\n * @template T,S\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.findindex\\n */\\nArray.prototype.findIndex = function(predicate, opt_this) {};\\n\\n\\n/**\\n * @param {T} value\\n * @param {number=} opt_begin\\n * @param {number=} opt_end\\n * @return {!IArrayLike}\\n * @this {!IArrayLike|string}\\n * @template T\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.fill\\n */\\nArray.prototype.fill = function(value, opt_begin, opt_end) {};\\n\\n\\n/**\\n * @param {number} target\\n * @param {number} start\\n * @param {number=} opt_end\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.copywithin\\n * @template T\\n * @return {!IArrayLike}\\n */\\nArray.prototype.copyWithin = function(target, start, opt_end) {};\\n\\n\\n/**\\n * NOTE: this is an ES2016 (ES7) extern.\\n * @param {T} searchElement\\n * @param {number=} opt_fromIndex\\n * @return {boolean}\\n * @this {!IArrayLike|string}\\n * @template T\\n * @see https://tc39.github.io/ecma262/#sec-array.prototype.includes\\n */\\nArray.prototype.includes = function(searchElement, opt_fromIndex) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @return {!Array}\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-object.getownpropertysymbols\\n */\\nObject.getOwnPropertySymbols = function(obj) {};\\n\\n\\n/**\\n * @param {!Object} obj\\n * @param {?} proto\\n * @return {!Object}\\n * @see http://www.ecma-international.org/ecma-262/6.0/#sec-object.setprototypeof\\n */\\nObject.setPrototypeOf = function(obj, proto) {};\\n\\n\\n/**\\n * @const {number}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON\\n */\\nNumber.EPSILON;\\n\\n/**\\n * @const {number}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER\\n */\\nNumber.MIN_SAFE_INTEGER;\\n\\n/**\\n * @const {number}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER\\n */\\nNumber.MAX_SAFE_INTEGER;\\n\\n\\n\\n/**\\n * Parse an integer. Use of {@code parseInt} without {@code base} is strictly\\n * banned in Google. If you really want to parse octal or hex based on the\\n * leader, then pass {@code undefined} as the base.\\n *\\n * @param {string} string\\n * @param {number|undefined} radix\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt\\n */\\nNumber.parseInt = function(string, radix) {};\\n\\n/**\\n * @param {string} string\\n * @return {number}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat\\n */\\nNumber.parseFloat = function(string) {};\\n\\n/**\\n * @param {number} value\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN\\n */\\nNumber.isNaN = function(value) {};\\n\\n/**\\n *";a.a+=' @param {number} value\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite\\n */\\nNumber.isFinite = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\\n */\\nNumber.isInteger = function(value) {};\\n\\n/**\\n * @param {number} value\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger\\n */\\nNumber.isSafeInteger = function(value) {};\\n\\n\\n\\n/**\\n * @param {!Object} target\\n * @param {...Object} var_args\\n * @return {!Object}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\\n */\\nObject.assign = function(target, var_args) {};\\n\\n/**\\n * TODO(dbeam): find a better place for ES2017 externs like this one.\\n * NOTE: this is an ES2017 (ES8) extern.\\n * @param {!Object} obj\\n * @return {!Array} values\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\\n * @throws {Error}\\n * @template T\\n */\\nObject.values = function(obj) {};\\n\\n/**\\n * NOTE: this is an ES2017 (ES8) extern.\\n * @param {!Object} obj\\n * @return {!Array>} entries\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries\\n * @throws {Error}\\n * @template T\\n */\\nObject.entries = function(obj) {};\\n\\n/**\\n * NOTE: this is an ES2017 (ES8) extern.\\n * @param {!Object} obj\\n * @return {!Object} descriptors\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors\\n * @throws {Error}\\n * @template T\\n */\\nObject.getOwnPropertyDescriptors = function(obj) {};\\n\\n\\n\\n/**\\n * @const\\n * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\\n */\\nvar Reflect = {};\\n\\n/**\\n * @param {function(this: THIS, ...?): RESULT} target\\n * @param {THIS} thisArg\\n * @param {!Array} argList\\n * @return {RESULT}\\n * @template THIS, RESULT\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply\\n */\\nReflect.apply = function(target, thisArg, argList) {};\\n\\n/**\\n * @param {function(new: ?, ...?)} target\\n * @param {!Array} argList\\n * @param {function(new: TARGET, ...?)=} opt_newTarget\\n * @return {TARGET}\\n * @template TARGET\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/construct\\n */\\nReflect.construct = function(target, argList, opt_newTarget) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @param {!Object} attributes\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty\\n */\\nReflect.defineProperty = function(target, propertyKey, attributes) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/deleteProperty\\n */\\nReflect.deleteProperty = function(target, propertyKey) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @param {!Object=} opt_receiver\\n * @return {*}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/get\\n */\\nReflect.get = function(target, propertyKey, opt_receiver) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @return {?ObjectPropertyDescriptor}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getOwnPropertyDescriptor\\n */\\nReflect.getOwnPropertyDescriptor = function(target, propertyKey) {};\\n\\n/**\\n * @param {!Object} target\\n * @return {?Object}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getPrototypeOf\\n */\\nReflect.getPrototypeOf = function(target) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has\\n */\\nReflect.has = function(target, propertyKey) {};\\n\\n/**\\n * @param {!Object} target\\n * @return {boolean}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible\\n */\\nReflect.isExtensible = function(target) {};\\n\\n/**\\n * @param {!Object} target\\n * @return {!Array<(string|symbol)>}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys\\n */\\nReflect.ownKeys = function(target) {};\\n\\n/**\\n * @param {!Object} target\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions\\n */\\nReflect.preventExtensions = function(target) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {string} propertyKey\\n * @param {*} value\\n * @param {!Object=} opt_receiver\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/set\\n */\\nReflect.set = function(target, propertyKey, value, opt_receiver) {};\\n\\n/**\\n * @param {!Object} target\\n * @param {?Object} proto\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/setPrototypeOf\\n */\\nReflect.setPrototypeOf = function(target, proto) {};\\n","externs/es6_collections.js":"/*\\n * Copyright 2014 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for ECMAScript 6.\\n * @see http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts\\n * @externs\\n */\\n\\n// TODO(johnlenz): Use Tuples for the Map and Set iterators where appropriate.\\n\\n/**\\n * @constructor @struct\\n * @param {Iterable>|!Array>=} opt_iterable\\n * @implements {Iterable>}\\n * @template KEY, VALUE\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\\n */\\nfunction Map(opt_iterable) {}\\n\\n/** @return {void} */\\nMap.prototype.clear;\\n\\n/**\\n * @param {KEY} key\\n * @return {boolean}\\n */\\nMap.prototype.delete;\\n\\n/**\\n * @return {!IteratorIterable>}\\n * @nosideeffects\\n */\\nMap.prototype.entries;\\n\\n/**\\n * @param {function(this:THIS, VALUE, KEY, MAP)} callback\\n * @param {THIS=} opt_thisArg\\n * @this {MAP}\\n * @template MAP,THIS\\n */\\nMap.prototype.forEach;\\n\\n/**\\n * @param {KEY} key\\n * @return {VALUE}\\n * @nosideeffects\\n */\\nMap.prototype.get;\\n\\n/**\\n * @param {KEY} key\\n * @return {boolean}\\n * @nosideeffects\\n */\\nMap.prototype.has;\\n\\n/**\\n * @return {!IteratorIterable}\\n */\\nMap.prototype.keys;\\n\\n/**\\n * @param {KEY} key\\n * @param {VALUE} value\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n */\\nMap.prototype.set;\\n\\n/**\\n * @type {number}\\n * (readonly)\\n */\\nMap.prototype.size;\\n\\n/**\\n * @return {!IteratorIterable}\\n * @nosideeffects\\n */\\nMap.prototype.values;\\n\\n/**\\n * @return {!Iterator>}\\n */\\nMap.prototype[Symbol.iterator] = function() {};\\n\\n\\n/**\\n * @constructor @struct\\n * @param {Iterable>|!Array>=} opt_iterable\\n * @template KEY, VALUE\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\\n */\\nfunction WeakMap(opt_iterable) {}\\n\\n/** @return {void} */\\nWeakMap.prototype.clear;\\n\\n/**\\n * @param {KEY} key\\n * @return {boolean}\\n */\\nWeakMap.prototype.delete;\\n\\n/**\\n * @param {KEY} key\\n * @return {VALUE}\\n * @nosideeffects\\n */\\nWeakMap.prototype.get;\\n\\n/**\\n * @param {KEY} key\\n * @return {boolean}\\n * @nosideeffects\\n */\\nWeakMap.prototype.has;\\n\\n/**\\n * @param {KEY} key\\n * @param {VALUE} value\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n */\\nWeakMap.prototype.set;\\n\\n\\n\\n/**\\n * @constructor @struct\\n * @param {Iterable|Array=} opt_iterable\\n * @implements {Iterable}\\n * @template VALUE\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\\n */\\nfunction Set(opt_iterable) {}\\n\\n/**\\n * @param {VALUE} value\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n */\\nSet.prototype.add;\\n\\n/**\\n * @return {void}\\n */\\nSet.prototype.clear;\\n\\n/**\\n * @param {VALUE} value\\n * @return {boolean}\\n */\\nSet.prototype.delete;\\n\\n/**\\n * @return {!IteratorIterable>} Where each array has two entries:\\n * [value, value]\\n * @nosideeffects\\n */\\nSet.prototype.entries;\\n\\n/**\\n * @param {function(this: THIS, VALUE, VALUE, SET)} callback\\n * @param {THIS=} opt_thisArg\\n * @this {SET}\\n * @template SET,THIS\\n */\\nSet.prototype.forEach;\\n\\n/**\\n * @param {VALUE} value\\n * @return {boolean}\\n * @nosideeffects\\n */\\nSet.prototype.has;\\n\\n/**\\n * @type {number} (readonly)\\n */\\nSet.prototype.size;\\n\\n/**\\n * @return {!IteratorIterable}\\n * @nosideeffects\\n */\\nSet.prototype.keys;\\n\\n/**\\n * @return {!IteratorIterable}\\n * @nosideeffects\\n */\\nSet.prototype.values;\\n\\n/**\\n * @return {!Iterator}\\n */\\nSet.prototype[Symbol.iterator] = function() {};\\n\\n\\n\\n/**\\n * @constructor @struct\\n * @param {Iterable|Array=} opt_iterable\\n * @template VALUE\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\\n */\\nfunction WeakSet(opt_iterable) {}\\n\\n/**\\n * @param {VALUE} value\\n * @return {THIS}\\n * @this {THIS}\\n * @template THIS\\n */\\nWeakSet.prototype.add;\\n\\n/**\\n * @return {void}\\n */\\nWeakSet.prototype.clear;\\n\\n/**\\n * @param {VALUE} value\\n * @return {boolean}\\n */\\nWeakSet.prototype.delete;\\n\\n/**\\n * @param {VALUE} value\\n * @return {boolean}\\n * @nosideeffects\\n */\\nWeakSet.prototype.has;\\n","externs/intl.js":"/*\\n * Copyright 2013 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for the JS Internationalization API as defined in\\n * http://www.ecma-international.org/ecma-402/1.0/\\n *\\n * @externs\\n */\\n\\n/** @const */\\nvar Intl = {};\\n\\n/**\\n * NOTE: this API is not from ecma402 and is subject to change.\\n * @param {string|Array=} opt_locales\\n * @param {{type: (string|undefined)}=}\\n * opt_options\\n * @constructor\\n */\\nIntl.v8BreakIterator = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {string} text\\n * @return {undefined}\\n */\\nIntl.v8BreakIterator.prototype.adoptText = function(text) {};\\n\\n/**\\n * @return {string}\\n */\\nIntl.v8BreakIterator.prototype.breakType = function() {};\\n\\n/**\\n * @return {number}\\n */\\nIntl.v8BreakIterator.prototype.current = function() {};\\n\\n/**\\n * @return {number}\\n */\\nIntl.v8BreakIterator.prototype.first = function() {};\\n\\n/**\\n * @return {number}\\n */\\nIntl.v8BreakIterator.prototype.next = function() {};\\n\\n/**\\n * @constructor\\n * @param {string|Array=} opt_locales\\n * @param {{usage: (string|undefined), localeMatcher: (string|undefined),\\n * sensitivity: (string|undefined), ignorePunctuation: (boolean|undefined),\\n * numeric: (boolean|undefined), caseFirst: (string|undefined)}=}\\n * opt_options\\n */\\nIntl.Collator = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {Array} locales\\n * @param {{localeMatcher: (string|undefined)}=} opt_options\\n * @return {Array}\\n */\\nIntl.Collator.supportedLocalesOf = function(locales, opt_options) {};\\n\\n/**\\n * @param {string} arg1\\n * @param {string} arg2\\n * @return {number}\\n */\\nIntl.Collator.prototype.compare = function(arg1, arg2) {};\\n\\n/**\\n * @return {{locale: string, usage: string, sensitivity: string,\\n * ignorePunctuation: boolean, collation: string, numeric: boolean,\\n * caseFirst: string}}\\n */\\nIntl.Collator.prototype.resolvedOptions = function() {};\\n\\n/**\\n * @constructor\\n * @param {string|Array=} opt_locales\\n * @param {{localeMatcher: (string|undefined), useGrouping: (boolean|undefined),\\n * numberingSystem: (string|undefined), style: (string|undefined),\\n * currency: (string|undefined), currencyDisplay: (string|undefined),\\n * minimumIntegerDigits: (number|undefined),\\n * minimumFractionDigits: (number|undefined),\\n * maximumFractionDigits: (number|undefined),\\n * minimumSignificantDigits: (number|undefined),\\n * maximumSignificantDigits: (number|undefined)}=}\\n * opt_options\\n */\\nIntl.NumberFormat = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {Array} locales\\n * @param {{localeMatcher: (string|undefined)}=} opt_options\\n * @return {Array}\\n */\\nIntl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};\\n\\n/**\\n * @param {number} num\\n * @return {string}\\n */\\nIntl.NumberFormat.prototype.format = function(num) {};\\n\\n/**\\n * @return {{locale: string, numberingSystem: string, style: string,\\n * currency: (string|undefined), currencyDisplay: (string|undefined),\\n * minimumIntegerDigits: number, minimumFractionDigits: number,\\n * maximumFractionDigits: number, minimumSignificantDigits: number,\\n * maximumSignificantDigits: number, useGrouping: boolean}}\\n */\\nIntl.NumberFormat.prototype.resolvedOptions = function() {};\\n\\n/**\\n * @constructor\\n * @param {string|Array=} opt_locales\\n * @param {{localeMatcher: (string|undefined),\\n * formatMatcher: (string|undefined), calendar: (string|undefined),\\n * numberingSystem: (string|undefined), tz: (string|undefined),\\n * weekday: (string|undefined), era: (string|undefined),\\n * year: (string|undefined), month: (string|undefined),\\n * day: (string|undefined), hour: (string|undefined),\\n * minute: (string|undefined), second: (string|undefined),\\n * timeZoneName: (string|undefined), hour12: (boolean|undefined)}=}\\n * opt_options\\n */\\nIntl.DateTimeFormat = function(opt_locales, opt_options) {};\\n\\n/**\\n * @param {Array} locales\\n * @param {{localeMatcher: string}=} opt_options\\n * @return {Array}\\n */\\nIntl.DateTimeFormat.supportedLocalesOf = function(locales, opt_options) {};\\n\\n/**\\n * @param {(!Date|number)=} date\\n * @return {string}\\n */\\nIntl.DateTimeFormat.prototype.format = function(date) {};\\n\\n/**\\n * @return {{locale: string, calendar: string, numberingSystem: string,\\n * timeZone: (string|undefined), weekday: (string|undefined),\\n * era: (string|undefined), year: (string|undefined),\\n * month: (string|undefined), day: (string|undefined),\\n * hour: (string|undefined), minute: (string|undefined),\\n * second: (string|undefined), timeZoneName: (string|undefined),\\n * hour12: (boolean|undefined)}}\\n */\\nIntl.DateTimeFormat.prototype.resolvedOptions = function() {};\\n","externs/w3c_event.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file e';a.a+='xcept in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s event specification.\\n * The whole file has been fully type annotated.\\n * Created from\\n * http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n\\n/**\\n * @interface\\n * @see https://dom.spec.whatwg.org/#interface-eventtarget\\n */\\nfunction EventTarget() {}\\n\\n/**\\n * @param {string} type\\n * @param {EventListener|function(!Event):(boolean|undefined)} listener\\n * @param {(boolean|!AddEventListenerOptions)=} opt_options\\n * @return {undefined}\\n * @see https://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener\\n */\\nEventTarget.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/**\\n * @param {string} type\\n * @param {EventListener|function(!Event):(boolean|undefined)} listener\\n * @param {(boolean|!EventListenerOptions)=} opt_options\\n * @return {undefined}\\n * @see https://dom.spec.whatwg.org/#dom-eventtarget-removeeventlistener\\n */\\nEventTarget.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/**\\n * @param {!Event} evt\\n * @return {boolean}\\n * @see https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent\\n */\\nEventTarget.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * @interface\\n */\\nfunction EventListener() {}\\n\\n/**\\n * @param {!Event} evt\\n * @return {undefined}\\n */\\nEventListener.prototype.handleEvent = function(evt) {};\\n\\n// The EventInit interface and the parameters to the Event constructor are part\\n// of DOM Level 3 (suggested) and the DOM \\"Living Standard\\" (mandated). They are\\n// included here as externs cannot be redefined. The same applies to other\\n// *EventInit interfaces and *Event constructors throughout this file. See:\\n// http://www.w3.org/TR/DOM-Level-3-Events/#event-initializers\\n// http://dom.spec.whatwg.org/#constructing-events\\n// https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#event-constructors\\n\\n/**\\n * @record\\n * @see https://dom.spec.whatwg.org/#dictdef-eventinit\\n */\\nfunction EventInit() {}\\n\\n/** @type {(undefined|boolean)} */\\nEventInit.prototype.bubbles;\\n\\n/** @type {(undefined|boolean)} */\\nEventInit.prototype.cancelable;\\n\\n/** @type {(undefined|boolean)} */\\nEventInit.prototype.composed;\\n\\n\\n/**\\n * @constructor\\n * @param {string} type\\n * @param {EventInit=} opt_eventInitDict\\n */\\nfunction Event(type, opt_eventInitDict) {}\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html\\n */\\nEvent.CAPTURING_PHASE;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html\\n */\\nEvent.AT_TARGET;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html\\n */\\nEvent.BUBBLING_PHASE;\\n\\n/** @type {string} */\\nEvent.prototype.type;\\n\\n/** @type {EventTarget} */\\nEvent.prototype.target;\\n\\n/** @type {EventTarget} */\\nEvent.prototype.currentTarget;\\n\\n/** @type {number} */\\nEvent.prototype.eventPhase;\\n\\n/** @type {boolean} */\\nEvent.prototype.bubbles;\\n\\n/** @type {boolean} */\\nEvent.prototype.cancelable;\\n\\n/** @type {number} */\\nEvent.prototype.timeStamp;\\n\\n/**\\n * Present for events spawned in browsers that support shadow dom.\\n * @type {Array|undefined}\\n */\\nEvent.prototype.path;\\n\\n/**\\n * Present for events spawned in browsers that support shadow dom.\\n * @type {function():Array|undefined}\\n * @see https://www.w3.org/TR/shadow-dom/#widl-Event-deepPath\\n */\\nEvent.prototype.deepPath;\\n\\n/**\\n * @return {undefined}\\n */\\nEvent.prototype.stopPropagation = function() {};\\n\\n/**\\n * @return {undefined}\\n */\\nEvent.prototype.preventDefault = function() {};\\n\\n/**\\n * @param {string} eventTypeArg\\n * @param {boolean=} canBubbleArg\\n * @param {boolean=} cancelableArg\\n * @return {undefined}\\n */\\nEvent.prototype.initEvent = function(eventTypeArg, canBubbleArg, cancelableArg) {};\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://dom.spec.whatwg.org/#dictdef-customeventinit\\n */\\nfunction CustomEventInit() {}\\n\\n/** @type {(*|undefined)} */\\nCustomEventInit.prototype.detail;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @param {string} type\\n * @param {CustomEventInit=} opt_eventInitDict\\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent\\n */\\nfunction CustomEvent(type, opt_eventInitDict) {}\\n\\n/**\\n * @param {string} eventType\\n * @param {boolean} bubbles\\n * @param {boolean} cancelable\\n * @param {*} detail\\n * @return {undefined}\\n */\\nCustomEvent.prototype.initCustomEvent = function(\\n eventType, bubbles, cancelable, detail) {};\\n\\n/**\\n * @type {*}\\n */\\nCustomEvent.prototype.detail;\\n\\n/**\\n * @interface\\n */\\nfunction DocumentEvent() {}\\n\\n/**\\n * @param {string} eventType\\n * @return {!Event}\\n */\\nDocumentEvent.prototype.createEvent = function(eventType) {};\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://w3c.github.io/uievents/#idl-uieventinit\\n */\\nfunction UIEventInit() {}\\n\\n/** @type {undefined|?Window} */\\nUIEventInit.prototype.view;\\n\\n/** @type {undefined|number} */\\nUIEventInit.prototype.detail;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @param {string} type\\n * @param {UIEventInit=} opt_eventInitDict\\n */\\nfunction UIEvent(type, opt_eventInitDict) {}\\n\\n/** @type {number} */\\nUIEvent.prototype.detail;\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {Window} viewArg\\n * @param {number} detailArg\\n * @return {undefined}\\n */\\nUIEvent.prototype.initUIEvent = function(typeArg, canBubbleArg, cancelableArg,\\n viewArg, detailArg) {};\\n\\n/**\\n * @record\\n * @extends {UIEventInit}\\n * @see https://w3c.github.io/uievents/#dictdef-eventmodifierinit\\n */\\nfunction EventModifierInit() {}\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.ctrlKey;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.shiftKey;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.altKey;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.metaKey;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierAltGraph;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierCapsLock;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierFn;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierFnLock;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierHyper;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierNumLock;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierScrollLock;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierSuper;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierSymbol;\\n\\n/** @type {undefined|boolean} */\\nEventModifierInit.prototype.modifierSymbolLock;\\n\\n/**\\n * @record\\n * @extends {EventModifierInit}\\n * @see https://w3c.github.io/uievents/#idl-mouseeventinit\\n */\\nfunction MouseEventInit() {}\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.screenX;\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.screenY;\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.clientX;\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.clientY;\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.button;\\n\\n/** @type {undefined|number} */\\nMouseEventInit.prototype.buttons;\\n\\n/** @type {undefined|?EventTarget} */\\nMouseEventInit.prototype.relatedTarget;\\n\\n/**\\n * @constructor\\n * @extends {UIEvent}\\n * @param {string} type\\n * @param {MouseEventInit=} opt_eventInitDict\\n */\\nfunction MouseEvent(type, opt_eventInitDict) {}\\n\\n/** @type {number} */\\nMouseEvent.prototype.screenX;\\n\\n/** @type {number} */\\nMouseEvent.prototype.screenY;\\n\\n/** @type {number} */\\nMouseEvent.prototype.clientX;\\n\\n/** @type {number} */\\nMouseEvent.prototype.clientY;\\n\\n/** @type {boolean} */\\nMouseEvent.prototype.ctrlKey;\\n\\n/** @type {boolean} */\\nMouseEvent.prototype.shiftKey;\\n\\n/** @type {boolean} */\\nMouseEvent.prototype.altKey;\\n\\n/** @type {boolean} */\\nMouseEvent.prototype.metaKey;\\n\\n/** @type {number} */\\nMouseEvent.prototype.button;\\n\\n/** @type {EventTarget} */\\nMouseEvent.prototype.relatedTarget;\\n\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction MutationEvent() {}\\n\\n/** @type {Node} */\\nMutationEvent.prototype.relatedNode;\\n\\n/** @type {string} */\\nMutationEvent.prototype.prevValue;\\n\\n/** @type {string} */\\nMutationEvent.prototype.newValue;\\n\\n/** @type {string} */\\nMutationEvent.prototype.attrName;\\n\\n/** @type {number} */\\nMutationEvent.prototype.attrChange;\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {Node} relatedNodeArg\\n * @param {string} prevValueArg\\n * @param {string} newValueArg\\n * @param {string} attrNameArg\\n * @param {number} attrChangeArg\\n * @return {undefined}\\n */\\nMutationEvent.prototype.initMutationEvent = function(typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg) {};\\n\\n\\n// DOM3\\n/**\\n * @record\\n * @extends {EventModifierInit}\\n * @see https://w3c.github.io/uievents/#idl-keyboardeventinit\\n */\\nfunction KeyboardEventInit() {}\\n\\n/** @type {undefined|string} */\\nKeyboardEventInit.prototype.key;\\n\\n/** @type {undefined|string} */\\nKeyboardEventInit.prototype.code;\\n\\n/** @type {undefined|number} */\\nKeyboardEventInit.prototype.location;\\n\\n/** @type {undefined|boolean} */\\nKeyboardEventInit.prototype.repeat;\\n\\n/** @type {undefined|boolean} */\\nKeyboardEventInit.prototype.isComposing;\\n\\n/** @type {undefined|string} */\\nKeyboardEventInit.prototype.char;\\n\\n/** @type {undefined|string} */\\nKeyboardEventInit.prototype.locale;\\n\\n/**\\n * @constructor\\n * @extends {UIEvent}\\n * @param {string} type\\n * @param {KeyboardEventInit=} opt_eventInitDict\\n */\\nfunction KeyboardEvent(type, opt_eventInitDict) {}\\n\\n/** @type {string} */\\nKeyboardEvent.prototype.keyIdentifier;\\n\\n/** @type {boolean} */\\nKeyboardEvent.prototype.ctrlKey;\\n\\n/** @type {boolean} */\\nKeyboardEvent.prototype.shiftKey;\\n\\n/** @type {boolean} */\\nKeyboardEvent.prototype.altKey;\\n\\n/** @type {boolean} */\\nKeyboardEvent.prototype.metaKey;\\n\\n/**\\n * @param {string} keyIdentifierArg\\n * @return {boolean}\\n */\\nKeyboardEvent.prototype.getModifierState = function(keyIdentifierArg) {};\\n\\n/**\\n * @record\\n * @extends {UIEventInit}\\n * @see https://w3c.github.io/uievents/#idl-focuseventinit\\n */\\nfunction FocusEventInit() {}\\n\\n/** @type {undefined|?EventTarget} */\\nFocusEventInit.prototype.relatedTarget;\\n\\n\\n/**\\n * The FocusEvent interface provides specific contextual information associated\\n * with Focus events.\\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent\\n *\\n * @constructor\\n * @extends {UIEvent}\\n * @param {string} type\\n * @param {FocusEventInit=} opt_eventInitDict\\n */\\nfunction FocusEvent(type, opt_eventInitDict) {}\\n\\n/** @type {EventTarget} */\\nFocusEvent.prototype.relatedTarget;\\n\\n\\n/**\\n * See https://dom.spec.whatwg.org/#dictdef-eventlisteneroptions\\n * @record\\n */\\nvar EventListenerOptions = function() {};\\n\\n/** @type {boolean|undefined} */\\nEventListenerOptions.prototype.capture;\\n\\n/**\\n * See https://dom.spec.whatwg.org/#dictdef-addeventlisteneroptions\\n * @record\\n * @extends {EventListenerOptions}\\n */\\nvar AddEventListenerOptions = function() {};\\n\\n/** @type {boolean|undefined} */\\nAddEventListenerOptions.prototype.passive;\\n\\n/** @type {boolean|undefined} */\\nAddEventListenerOptions.prototype.once;\\n\\n/**\\n * @record\\n * @extends {UIEventInit}\\n * @see https://w3c.github.io/uievents/#idl-inputeventinit\\n * @see https://w3c.github.io/input-events/#interface-InputEvent\\n */\\nfunction InputEventInit() {}\\n\\n/** @type {undefined|?string} */\\nInputEventInit.prototype.data;\\n\\n/** @type {undefined|boolean} */\\nInputEventInit.prototype.isComposing;\\n\\n/** @type {undefined|string} */\\nInputEventInit.prototype.inputType;\\n\\n/** @type {undefined|?DataTransfer} */\\nInputEventInit.prototype.dataTransfer;\\n\\n\\n// TODO(charleyroy): Add getTargetRanges() once a consensus has been made\\n// regarding how to structure these values. See\\n// https://github.com/w3c/input-events/issues/38.\\n/**\\n * @constructor\\n * @extends {UIEvent}\\n * @param {string} type\\n * @param {InputEventInit=} opt_eventInitDict\\n * @see https://www.w3.org/TR/uievents/#interface-inputevent\\n * @see https://w3c.github.io/input-events/#interface-InputEvent\\n */\\nfunction InputEvent(type, opt_eventInitDict) {}\\n\\n/** @type {string} */\\nInputEvent.prototype.data;\\n\\n/** @type {boolean} */\\nInputEvent.prototype.isComposed;\\n\\n/** @type {string} */\\nInputEvent.prototype.inputType;\\n\\n/** @type {?DataTransfer} */\\nInputEvent.prototype.dataTransfer;\\n","externs/w3c_event3.js":"/*\\n * Copyright 2010 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s event Level 3 specification.\\n * This file depends on w3c_event.js.\\n * The whole file has been partially type annotated.\\n * Created from\\n * http://www.w3.org/TR/DOM-Level-3-Events/#ecma-script-binding-ecma-binding\\n *\\n * @externs\\n * @author ericdingle@google.com (Eric Dingle)\\n */\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {Window} viewArg\\n * @param {string} keyIdentifierArg\\n * @param {number} keyLocationArg\\n * @param {string} modifiersList\\n * @return {undefined}\\n */\\nKeyboardEvent.prototype.initKeyboardEvent = function(typeArg, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, modifiersList) {};\\n\\n/** @type {string} */\\nKeyboardEvent.prototype.char;\\n\\n/** @type {string} */\\nKeyboardEvent.prototype.code;\\n\\n/** @type {string} */\\nKeyboardEvent.prototype.key;\\n\\n/** @type {number} */\\nKeyboardEvent.prototype.location;\\n\\n/** @type {boolean} */\\nKeyboardEvent.prototype.repeat;\\n\\n/** @type {string} */\\nKeyboardEvent.prototype.locale;\\n\\n/** @type {number} */\\nMouseEvent.prototype.buttons;\\n\\n/**\\n * @param {string} keyIdentifierArg\\n * @return {boolean}\\n */\\nMouseEvent.prototype.getModifierState = function(keyIdentifierArg) {};\\n\\n/** @type {boolean} */\\nEvent.prototype.defaultPrevented;\\n\\n/** @type {string} */\\nEvent.prototype.namespaceURI;\\n\\n/** @return {undefined} */\\nEvent.prototype.stopImmediatePropagation = function() {};\\n","externs/gecko_event.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over\\n * W3C\'s event specification by Gecko. This file depends on\\n * w3c_event.js.\\n *\\n * @externs\\n * @author acleung@google.com (Alan ';a.a+='Leung)\\n */\\n\\n// TODO: Almost all of it has not been annotated with types.\\n\\n/** @type {number} */ Event.prototype.HORIZONTAL_AXIS;\\n/** @type {number} */ Event.prototype.VERTICAL_AXIS;\\n/** @type {boolean} */ Event.prototype.altKey;\\n/** @type {number} */ Event.prototype.axis;\\n/** @type {number} */ Event.prototype.button;\\n/** @type {boolean} */ Event.prototype.cancelBubble;\\n/** @type {number} */ Event.prototype.charCode;\\n/** @type {number} */ Event.prototype.clientX;\\n/** @type {number} */ Event.prototype.clientY;\\n/** @type {boolean} */ Event.prototype.ctrlKey;\\n/** @type {EventTarget} */ Event.prototype.explicitOriginalTarget;\\n/** @type {boolean} */ Event.prototype.isChar;\\n/** @type {boolean} */ Event.prototype.isTrusted;\\n/** @type {number} */ Event.prototype.keyCode;\\n/** @type {number} */ Event.prototype.layerX;\\n/** @type {number} */ Event.prototype.layerY;\\n/** @type {boolean} */ Event.prototype.metaKey;\\n/** @type {EventTarget} */ Event.prototype.originalTarget;\\n/** @type {number} */ Event.prototype.pageX;\\n/** @type {number} */ Event.prototype.pageY;\\n/** @type {EventTarget|undefined} */ Event.prototype.relatedTarget;\\n/** @type {number} */ Event.prototype.screenX;\\n/** @type {number} */ Event.prototype.screenY;\\n/** @type {boolean} */ Event.prototype.shiftKey;\\n/** @type {Window} */ Event.prototype.view;\\n/** @type {number} */ Event.prototype.which;\\n\\n/** @constructor */ function nsIDOMPageTransitionEvent() {}\\n/** @type {boolean} */ nsIDOMPageTransitionEvent.prototype.persisted;\\n\\n//Methods\\nEvent.prototype.initKeyEvent;\\nEvent.prototype.initMouseEvent;\\nEvent.prototype.initUIEvent;\\nEvent.prototype.initMessageEvent;\\nEvent.prototype.preventBubble;\\nEvent.prototype.preventCapture;\\n","externs/ie_event.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over the\\n * W3C\'s event specification by IE in JScript. This file depends on\\n * w3c_event.js.\\n *\\n * @see http://msdn.microsoft.com/en-us/library/ms535863.aspx\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n/** @type {string} */\\nEvent.prototype.Abstract;\\n\\n/** @type {boolean} */\\nEvent.prototype.altLeft;\\n\\n/** @type {string} */\\nEvent.prototype.Banner;\\n\\n/**\\n * A ClipboardData on IE, but a DataTransfer on WebKit.\\n * @see http://msdn.microsoft.com/en-us/library/ms535220.aspx\\n * @type {(ClipboardData|undefined)}\\n */\\nEvent.prototype.clipboardData;\\n\\n/** @type {boolean} */\\nEvent.prototype.contentOverflow;\\n\\n/** @type {boolean} */\\nEvent.prototype.ctrlLeft;\\n\\n/** @type {string} */\\nEvent.prototype.dataFld;\\n\\nEvent.prototype.domain;\\n\\n/** @type {Element} */\\nEvent.prototype.fromElement;\\n\\n/** @type {string} */\\nEvent.prototype.MoreInfo;\\n\\n/** @type {string} */\\nEvent.prototype.nextPage;\\n\\n/** @type {number} */\\nEvent.prototype.offsetX;\\n\\n/** @type {number} */\\nEvent.prototype.offsetY;\\n\\n/** @type {string} */\\nEvent.prototype.propertyName;\\n\\n/** @type {string} */\\nEvent.prototype.qualifier;\\n\\n/** @type {number} */\\nEvent.prototype.reason;\\n\\n/** @type {Object<*>} */\\nEvent.prototype.recordset;\\n\\n/** @type {boolean} */\\nEvent.prototype.repeat;\\n\\n/** @type {(boolean|string|undefined)} */\\nEvent.prototype.returnValue;\\n\\n/** @type {string} */\\nEvent.prototype.saveType;\\n\\nEvent.prototype.scheme;\\n\\n/** @type {boolean} */\\nEvent.prototype.shiftLeft;\\n\\n/** @type {Window} */\\nEvent.prototype.source;\\n\\n/** @type {Element} */\\nEvent.prototype.srcElement;\\n\\nEvent.prototype.srcFilter;\\n\\n/** @type {string} */\\nEvent.prototype.srcUrn;\\n\\n/** @type {Element} */\\nEvent.prototype.toElement;\\n\\nEvent.prototype.userName;\\n\\n/** @type {number} */\\nEvent.prototype.wheelDelta;\\n\\n/** @type {number} */\\nEvent.prototype.x;\\n\\n/** @type {number} */\\nEvent.prototype.y;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441257.aspx\\n */\\nfunction MSPointerPoint() {}\\n\\n/** @type {number} */\\nMSPointerPoint.prototype.pointerId;\\n\\n/** @type {number} */\\nMSPointerPoint.prototype.pointerType;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441233.aspx\\n */\\nfunction MSPointerEvent() {}\\n\\n/** @type {number} */\\nMSPointerEvent.MSPOINTER_TYPE_MOUSE;\\n\\n/** @type {number} */\\nMSPointerEvent.MSPOINTER_TYPE_PEN;\\n\\n/** @type {number} */\\nMSPointerEvent.MSPOINTER_TYPE_TOUCH;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.height;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.hwTimestamp;\\n\\n/** @type {boolean} */\\nMSPointerEvent.prototype.isPrimary;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.pointerId;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.pointerType;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.pressure;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.rotation;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.tiltX;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.tiltY;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.timeStamp;\\n\\n/** @type {number} */\\nMSPointerEvent.prototype.width;\\n\\n/**\\n * @param {number} pointerId\\n * @return {undefined}\\n */\\nMSPointerEvent.prototype.msReleasePointerCapture;\\n\\n/**\\n * @param {number} pointerId\\n * @return {undefined}\\n */\\nMSPointerEvent.prototype.msSetPointerCapture;\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {Window} viewArg\\n * @param {number} detailArg\\n * @param {number} screenXArg\\n * @param {number} screenYArg\\n * @param {number} clientXArg\\n * @param {number} clientYArg\\n * @param {boolean} ctrlKeyArg\\n * @param {boolean} altKeyArg\\n * @param {boolean} shiftKeyArg\\n * @param {boolean} metaKeyArg\\n * @param {number} buttonArg\\n * @param {Element} relatedTargetArg\\n * @param {number} offsetXArg\\n * @param {number} offsetYArg\\n * @param {number} widthArg\\n * @param {number} heightArg\\n * @param {number} pressure\\n * @param {number} rotation\\n * @param {number} tiltX\\n * @param {number} tiltY\\n * @param {number} pointerIdArg\\n * @param {number} pointerType\\n * @param {number} hwTimestampArg\\n * @param {boolean} isPrimary\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441246.aspx\\n */\\nMSPointerEvent.prototype.initPointerEvent;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/ie/hh968249(v=vs.85).aspx\\n */\\nfunction MSGesture() {}\\n\\n/**\\n * @type {Element}\\n */\\nMSGesture.prototype.target;\\n\\n/**\\n * @param {number} pointerId\\n * @return {undefined}\\n */\\nMSGesture.prototype.addPointer = function(pointerId) {};\\n\\nMSGesture.prototype.stop = function() {};\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @see http://msdn.microsoft.com/en-us/library/ie/hh772076(v=vs.85).aspx\\n */\\nfunction MSGestureEvent() {}\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.expansion;\\n\\n/** @type {!MSGesture} */\\nMSGestureEvent.prototype.gestureObject;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.hwTimestamp;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.rotation;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.scale;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.translationX;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.translationY;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.velocityAngular;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.velocityExpansion;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.velocityX;\\n\\n/** @type {number} */\\nMSGestureEvent.prototype.velocityY;\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {Window} viewArg\\n * @param {number} detailArg\\n * @param {number} screenXArg\\n * @param {number} screenYArg\\n * @param {number} clientXArg\\n * @param {number} clientYArg\\n * @param {number} offsetXArg\\n * @param {number} offsetYArg\\n * @param {number} translationXArg\\n * @param {number} translationYArg\\n * @param {number} scaleArg\\n * @param {number} expansionArg\\n * @param {number} rotationArg\\n * @param {number} velocityXArg\\n * @param {number} velocityYArg\\n * @param {number} velocityExpansionArg\\n * @param {number} velocityAngularArg\\n * @param {number} hwTimestampArg\\n * @param {EventTarget} relatedTargetArg\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441187.aspx\\n */\\nMSGestureEvent.prototype.initGestureEvent;\\n","externs/webkit_event.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over W3C\'s\\n * event specification by WebKit. This file depends on w3c_event.js.\\n * All the provided definitions have been type annotated\\n *\\n * @externs\\n * @author djlee@google.com (DJ Lee)\\n */\\n\\n/** @type {number} */\\nEvent.prototype.wheelDeltaX;\\n\\n/** @type {number} */\\nEvent.prototype.wheelDeltaY;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @see http://developer.apple.com/library/safari/documentation/AudioVideo/Reference/WebKitAnimationEventClassReference/WebKitAnimationEvent/WebKitAnimationEvent.html\\n */\\nfunction WebKitAnimationEvent() {}\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nWebKitAnimationEvent.prototype.animationName;\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nWebKitAnimationEvent.prototype.elapsedTime;","externs/w3c_device_sensor_event.js":"/*\\n * Copyright 2013 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s device orientation and device motion\\n * events specification.\\n * This file depends on w3c_event.js.\\n * The whole file has been partially type annotated.\\n * Created from http://dev.w3.org/geo/api/spec-source-orientation.\\n *\\n * @externs\\n * @author lukaszbk@google.com (Lukasz Bieniasz-Krzywiec)\\n */\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction DeviceOrientationEvent() {}\\n\\n/** @type {?number} */\\nDeviceOrientationEvent.prototype.alpha;\\n\\n/** @type {?number} */\\nDeviceOrientationEvent.prototype.beta;\\n\\n/** @type {?number} */\\nDeviceOrientationEvent.prototype.gamma;\\n\\n/** @type {boolean} */\\nDeviceOrientationEvent.prototype.absolute;\\n\\n/**\\n * @type {?number}\\n * @see https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html#//apple_ref/javascript/instp/DeviceOrientationEvent/webkitCompassAccuracy\\n */\\nDeviceOrientationEvent.prototype.webkitCompassAccuracy;\\n\\n/**\\n * @type {?number}\\n * @see https://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html#//apple_ref/javascript/instp/DeviceOrientationEvent/webkitCompassHeading\\n */\\nDeviceOrientationEvent.prototype.webkitCompassHeading;\\n\\n/**\\n * @constructor\\n */\\nfunction DeviceAcceleration() {}\\n\\n/** @type {?number} */\\nDeviceAcceleration.prototype.x;\\n\\n/** @type {?number} */\\nDeviceAcceleration.prototype.y;\\n\\n/** @type {?number} */\\nDeviceAcceleration.prototype.z;\\n\\n/**\\n * @constructor\\n */\\nfunction DeviceRotationRate() {}\\n\\n/** @type {?number} */\\nDeviceRotationRate.prototype.alpha;\\n\\n/** @type {?number} */\\nDeviceRotationRate.prototype.beta;\\n\\n/** @type {?number} */\\nDeviceRotationRate.prototype.gamma;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction DeviceMotionEvent() {}\\n\\n/** @type {?DeviceAcceleration} */\\nDeviceMotionEvent.prototype.acceleration;\\n\\n/** @type {?DeviceAcceleration} */\\nDeviceMotionEvent.prototype.accelerationIncludingGravity;\\n\\n/** @type {?DeviceRotationRate} */\\nDeviceMotionEvent.prototype.rotationRate;\\n\\n/** @type {?number} */\\nDeviceMotionEvent.prototype.interval;\\n","externs/w3c_dom1.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s DOM Level 1 specification.\\n * The whole file has been fully type annotated. Created from\\n * http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n */\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-17189187\\n */\\nfunction DOMException() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.INDEX_SIZE_ERR = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.DOMSTRING_SIZE_ERR = 2;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.HIERARCHY_REQUEST_ERR = 3;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.WRONG_DOCUMENT_ERR = 4;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.INVALID_CHARACTER_ERR = 5;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.NO_DATA_ALLOWED_ERR = 6;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.NO_MODIFICATION_ALLOWED_ERR = 7;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.NOT_FOUND_ERR = 8;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.NOT_SUPPORTED_ERR = 9;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nDOMException.INUSE_ATTRIBUTE_ERR = 10;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF\\n */\\nfunction ExceptionCode() {}\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-o';a.a+="ne-core.html#ID-102161490\\n */\\nfunction DOMImplementation() {}\\n\\n/**\\n * @param {string} feature\\n * @param {string} version\\n * @return {boolean}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5CED94D7\\n * @nosideeffects\\n */\\nDOMImplementation.prototype.hasFeature = function(feature, version) {};\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nfunction Node() {}\\n\\n/** @override */\\nNode.prototype.addEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nNode.prototype.removeEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nNode.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * @type {NamedNodeMap}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-attributes\\n */\\nNode.prototype.attributes;\\n\\n/**\\n * @type {!NodeList}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-childNodes\\n */\\nNode.prototype.childNodes;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-firstChild\\n */\\nNode.prototype.firstChild;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-lastChild\\n */\\nNode.prototype.lastChild;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nextSibling\\n */\\nNode.prototype.nextSibling;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeName\\n */\\nNode.prototype.nodeName;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeValue\\n */\\nNode.prototype.nodeValue;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeType\\n */\\nNode.prototype.nodeType;\\n\\n/**\\n * @type {Document}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-ownerDocument\\n */\\nNode.prototype.ownerDocument;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-parentNode\\n */\\nNode.prototype.parentNode;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-previousSibling\\n */\\nNode.prototype.previousSibling;\\n\\n/**\\n * @param {Node} newChild\\n * @return {!Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-appendChild\\n */\\nNode.prototype.appendChild = function(newChild) {};\\n\\n/**\\n * @param {boolean} deep\\n * @return {!Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-cloneNode\\n * @nosideeffects\\n */\\nNode.prototype.cloneNode = function(deep) {};\\n\\n/**\\n * @return {boolean}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-hasChildNodes\\n * @nosideeffects\\n */\\nNode.prototype.hasChildNodes = function() {};\\n\\n/**\\n * @param {Node} newChild\\n * @param {Node} refChild\\n * @return {!Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-insertBefore\\n */\\nNode.prototype.insertBefore = function(newChild, refChild) {};\\n\\n/**\\n * @param {Node} oldChild\\n * @return {!Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeChild\\n */\\nNode.prototype.removeChild = function(oldChild) {};\\n\\n/**\\n * @param {Node} newChild\\n * @param {Node} oldChild\\n * @return {!Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-replaceChild\\n */\\nNode.prototype.replaceChild = function(newChild, oldChild) {};\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.ATTRIBUTE_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.CDATA_SECTION_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.COMMENT_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.DOCUMENT_FRAGMENT_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.DOCUMENT_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.DOCUMENT_TYPE_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.ELEMENT_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.ENTITY_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.ENTITY_REFERENCE_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.PROCESSING_INSTRUCTION_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.TEXT_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.XPATH_NAMESPACE_NODE;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247\\n */\\nNode.NOTATION_NODE;\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-B63ED1A3\\n */\\nfunction DocumentFragment() {}\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document\\n */\\nfunction Document() {}\\n\\n/**\\n * @type {DocumentType}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-doctype\\n */\\nDocument.prototype.doctype;\\n\\n/**\\n * @type {!Element}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-documentElement\\n */\\nDocument.prototype.documentElement;\\n\\n/**\\n * @type {DOMImplementation}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-implementation\\n */\\nDocument.prototype.implementation;\\n\\n/**\\n * @param {string} name\\n * @return {!Attr}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createAttribute\\n * @nosideeffects\\n */\\nDocument.prototype.createAttribute = function(name) {};\\n\\n/**\\n * @param {string} data\\n * @return {!Comment}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createComment\\n * @nosideeffects\\n */\\nDocument.prototype.createComment = function(data) {};\\n\\n/**\\n * @param {string} data\\n * @return {!CDATASection}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createCDATASection\\n * @nosideeffects\\n */\\nDocument.prototype.createCDATASection = function(data) {};\\n\\n/**\\n * @return {!DocumentFragment}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createDocumentFragment\\n * @nosideeffects\\n */\\nDocument.prototype.createDocumentFragment = function() {};\\n\\n/**\\n * Create a DOM element.\\n *\\n * Web components introduced the second parameter as a way of extending existing\\n * tags (e.g. document.createElement('button', 'fancy-button')).\\n *\\n * @param {string} tagName\\n * @param {string=} opt_typeExtension\\n * @return {!Element}\\n * @nosideeffects\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement\\n * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-instantiate\\n */\\nDocument.prototype.createElement = function(tagName, opt_typeExtension) {};\\n\\n/**\\n * @param {string} name\\n * @return {!EntityReference}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createEntityReference\\n * @nosideeffects\\n */\\nDocument.prototype.createEntityReference = function(name) {};\\n\\n/**\\n * @param {string} target\\n * @param {string} data\\n * @return {!ProcessingInstruction}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createProcessingInstruction\\n * @nosideeffects\\n */\\nDocument.prototype.createProcessingInstruction = function(target, data) {};\\n\\n/**\\n * @param {number|string} data\\n * @return {!Text}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createTextNode\\n * @nosideeffects\\n */\\nDocument.prototype.createTextNode = function(data) {};\\n\\n/**\\n * @param {string} tagname\\n * @return {!NodeList}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-A6C9094\\n * @nosideeffects\\n */\\nDocument.prototype.getElementsByTagName = function(tagname) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @template T\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177\\n */\\nfunction NodeList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-203510337\\n */\\nNodeList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {T|null}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-844377136\\n */\\nNodeList.prototype.item = function(index) {};\\n\\n/**\\n * @param {?function(this:S, T, number, !NodeList): ?} callback\\n * @param {S=} opt_thisobj\\n * @this {NodeList}\\n * @template T,S\\n * @return {undefined}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach\\n */\\nNodeList.prototype.forEach = function(callback, opt_thisobj) {};\\n\\n/**\\n * @constructor\\n * @implements {IObject<(string|number), T>}\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @template T\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1780488922\\n */\\nfunction NamedNodeMap() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6D0FB19E\\n */\\nNamedNodeMap.prototype.length;\\n\\n/**\\n * @param {string} name\\n * @return {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1074577549\\n * @nosideeffects\\n */\\nNamedNodeMap.prototype.getNamedItem = function(name) {};\\n\\n/**\\n * @param {number} index\\n * @return {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-349467F9\\n * @nosideeffects\\n */\\nNamedNodeMap.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} name\\n * @return {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D58B193\\n */\\nNamedNodeMap.prototype.removeNamedItem = function(name) {};\\n\\n/**\\n * @param {Node} arg\\n * @return {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1025163788\\n */\\nNamedNodeMap.prototype.setNamedItem = function(arg) {};\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-FF21A306\\n */\\nfunction CharacterData() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-72AB8359\\n */\\nCharacterData.prototype.data;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7D61178C\\n */\\nCharacterData.prototype.length;\\n\\n/**\\n * @param {string} arg\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-32791A2F\\n */\\nCharacterData.prototype.appendData = function(arg) {};\\n\\n/**\\n * @param {number} offset\\n * @param {number} count\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7C603781\\n */\\nCharacterData.prototype.deleteData = function(offset, count) {};\\n\\n/**\\n * @param {number} offset\\n * @param {string} arg\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-3EDB695F\\n */\\nCharacterData.prototype.insertData = function(offset, arg) {};\\n\\n/**\\n * @param {number} offset\\n * @param {number} count\\n * @param {string} arg\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E5CBA7FB\\n */\\nCharacterData.prototype.replaceData = function(offset, count, arg) {};\\n\\n/**\\n * @param {number} offset\\n * @param {number} count\\n * @return {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6531BCCF\\n * @nosideeffects\\n */\\nCharacterData.prototype.substringData = function(offset, count) {};\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-637646024\\n */\\nfunction Attr() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1112119403\\n */\\nAttr.prototype.name;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-862529273\\n */\\nAttr.prototype.specified;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-221662474\\n */\\nAttr.prototype.value;\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614\\n */\\nfunction Element() {}\\n\\n/**\\n * An Element always contains a non-null NamedNodeMap containing the attributes\\n * of this node.\\n * @type {!NamedNodeMap}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-attributes\\n */\\nElement.prototype.attributes;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-tagName\\n */\\nElement.prototype.tagName;\\n\\n/**\\n * @implicitCast\\n * @type {?}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/className\\n * We type it as ? even though it is a string, because some SVG elements have\\n * className that is an object, which isn't a subtype of string.\\n * Alternative: TypeScript types this as string and types className on\\n * SVGElement as ?.\\n */\\nElement.prototype.className;\\n\\n/**\\n * @param {string} name\\n * @param {number?=} opt_flags\\n * @return {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttribute\\n * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx\\n * @nosideeffects\\n */\\nElement.prototype.getAttribute = function(name, opt_flags) {};\\n\\n/**\\n * @param {string} name\\n * @return {Attr}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttributeNode\\n * @nosideeffects\\n */\\nElement.prototype.getAttributeNode = function(name) {};\\n\\n/**\\n * @param {string} tagname\\n * @return {!NodeList}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1938918D\\n * @nosideeffects\\n */\\nElement.prototype.getElementsByTagName = function(tagname) {};\\n\\n/**\\n * @param {string} name\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttribute\\n */\\nElement.prototype.removeAttribute = function(name) {};\\n\\n/**\\n * @param {Attr} oldAttr\\n * @return {?Attr}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttributeNode\\n */\\nElement.prototype.removeAttributeNode = function(oldAttr) {};\\n\\n/**\\n * @param {string} name\\n * @param {string|number|boolean} value Values are converted to strings with\\n * ToString, so we accept number and boolean since both convert easily to\\n * strings.\\n * @return {undefined}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one";a.a+='-core.html#method-setAttribute\\n */\\nElement.prototype.setAttribute = function(name, value) {};\\n\\n/**\\n * @param {Attr} newAttr\\n * @return {?Attr}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttributeNode\\n */\\nElement.prototype.setAttributeNode = function(newAttr) {};\\n\\n// Event handlers\\n// The DOM level 3 spec has a good index of these\\n// http://www.w3.org/TR/DOM-Level-3-Events/#event-types\\n\\n/** @type {?function (Event)} */ Element.prototype.onabort;\\n/** @type {?function (Event)} */ Element.prototype.onbeforeinput;\\n/** @type {?function (Event)} */ Element.prototype.onbeforeunload;\\n/** @type {?function (Event)} */ Element.prototype.onblur;\\n/** @type {?function (Event)} */ Element.prototype.onchange;\\n/** @type {?function (Event)} */ Element.prototype.onclick;\\n/** @type {?function (Event)} */ Element.prototype.oncompositionstart;\\n/** @type {?function (Event)} */ Element.prototype.oncompositionupdate;\\n/** @type {?function (Event)} */ Element.prototype.oncompositionend;\\n/** @type {?function (Event)} */ Element.prototype.oncontextmenu;\\n/** @type {?function (Event)} */ Element.prototype.oncopy;\\n/** @type {?function (Event)} */ Element.prototype.oncut;\\n/** @type {?function (Event)} */ Element.prototype.ondblclick;\\n/** @type {?function (Event)} */ Element.prototype.onerror;\\n/** @type {?function (Event)} */ Element.prototype.onfocus;\\n/** @type {?function (Event)} */ Element.prototype.onfocusin;\\n/** @type {?function (Event)} */ Element.prototype.onfocusout;\\n/** @type {?function (Event)} */ Element.prototype.oninput;\\n/** @type {?function (Event)} */ Element.prototype.onkeydown;\\n/** @type {?function (Event)} */ Element.prototype.onkeypress;\\n/** @type {?function (Event)} */ Element.prototype.onkeyup;\\n/** @type {?function (Event)} */ Element.prototype.onload;\\n/** @type {?function (Event)} */ Element.prototype.onunload;\\n/** @type {?function (Event)} */ Element.prototype.onmousedown;\\n/** @type {?function (Event)} */ Element.prototype.onmousemove;\\n/** @type {?function (Event)} */ Element.prototype.onmouseout;\\n/** @type {?function (Event)} */ Element.prototype.onmouseover;\\n/** @type {?function (Event)} */ Element.prototype.onmouseup;\\n/** @type {?function (Event)} */ Element.prototype.onmousewheel;\\n/** @type {?function (Event)} */ Element.prototype.onpaste;\\n/** @type {?function (Event)} */ Element.prototype.onreset;\\n/** @type {?function (Event)} */ Element.prototype.onresize;\\n/** @type {?function (Event)} */ Element.prototype.onscroll;\\n/** @type {?function (Event)} */ Element.prototype.onselect;\\n/** @type {?function (Event=)} */ Element.prototype.onsubmit;\\n/** @type {?function (Event)} */ Element.prototype.ontextinput;\\n/** @type {?function (Event)} */ Element.prototype.onwheel;\\n\\n/**\\n * @constructor\\n * @extends {CharacterData}\\n * @param {string=} contents Optional textual content.\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772\\n */\\nfunction Text(contents) {}\\n\\n/**\\n * @param {number} offset\\n * @return {Text}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-38853C1D\\n */\\nText.prototype.splitText = function(offset) {};\\n\\n/**\\n * @constructor\\n * @extends {CharacterData}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1728279322\\n */\\nfunction Comment() {}\\n\\n/**\\n * @constructor\\n * @extends {Text}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-667469212\\n */\\nfunction CDATASection() {}\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-412266927\\n */\\nfunction DocumentType() {}\\n\\n/**\\n * @type {NamedNodeMap}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1788794630\\n */\\nDocumentType.prototype.entities;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1844763134\\n */\\nDocumentType.prototype.name;\\n\\n/**\\n * @type {NamedNodeMap}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D46829EF\\n */\\nDocumentType.prototype.notations;\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5431D1B9\\n */\\nfunction Notation() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-54F2B4D0\\n */\\nNotation.prototype.publicId;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E8AAB1D0\\n */\\nNotation.prototype.systemId;\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-527DCFF2\\n */\\nfunction Entity() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7303025\\n */\\nEntity.prototype.publicId;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7C29F3E\\n */\\nEntity.prototype.systemId;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6ABAEB38\\n */\\nEntity.prototype.notationName;\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-11C98490\\n */\\nfunction EntityReference() {}\\n\\n/**\\n * @constructor\\n * @extends {Node}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1004215813\\n */\\nfunction ProcessingInstruction() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-837822393\\n */\\nProcessingInstruction.prototype.data;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1478689192\\n */\\nProcessingInstruction.prototype.target;\\n\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction Window() {}\\nWindow.prototype.Window;\\n\\n/** @override */\\nWindow.prototype.addEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWindow.prototype.removeEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWindow.prototype.dispatchEvent = function(evt) {};\\n\\n/** @type {?function (Event)} */ Window.prototype.onabort;\\n/** @type {?function (Event)} */ Window.prototype.onbeforeunload;\\n/** @type {?function (Event)} */ Window.prototype.onblur;\\n/** @type {?function (Event)} */ Window.prototype.onchange;\\n/** @type {?function (Event)} */ Window.prototype.onclick;\\n/** @type {?function (Event)} */ Window.prototype.onclose;\\n/** @type {?function (Event)} */ Window.prototype.oncontextmenu;\\n/** @type {?function (Event)} */ Window.prototype.ondblclick;\\n/** @type {?function (Event)} */ Window.prototype.ondragdrop;\\n// onerror has a special signature.\\n// See https://developer.mozilla.org/en/DOM/window.onerror\\n// and http://msdn.microsoft.com/en-us/library/cc197053(VS.85).aspx\\n/** @type {?function (string, string, number)} */\\nWindow.prototype.onerror;\\n/** @type {?function (Event)} */ Window.prototype.onfocus;\\n/** @type {?function (Event)} */ Window.prototype.onhashchange;\\n/** @type {?function (Event)} */ Window.prototype.onkeydown;\\n/** @type {?function (Event)} */ Window.prototype.onkeypress;\\n/** @type {?function (Event)} */ Window.prototype.onkeyup;\\n/** @type {?function (Event)} */ Window.prototype.onload;\\n/** @type {?function (Event)} */ Window.prototype.onmousedown;\\n/** @type {?function (Event)} */ Window.prototype.onmousemove;\\n/** @type {?function (Event)} */ Window.prototype.onmouseout;\\n/** @type {?function (Event)} */ Window.prototype.onmouseover;\\n/** @type {?function (Event)} */ Window.prototype.onmouseup;\\n/** @type {?function (Event)} */ Window.prototype.onmousewheel;\\n/** @type {?function (Event)} */ Window.prototype.onpaint;\\n/** @type {?function (Event)} */ Window.prototype.onpopstate;\\n/** @type {?function (Event)} */ Window.prototype.onreset;\\n/** @type {?function (Event)} */ Window.prototype.onresize;\\n/** @type {?function (Event)} */ Window.prototype.onscroll;\\n/** @type {?function (Event)} */ Window.prototype.onselect;\\n/** @type {?function (Event=)} */ Window.prototype.onsubmit;\\n/** @type {?function (Event)} */ Window.prototype.onunload;\\n/** @type {?function (Event)} */ Window.prototype.onwheel;\\n","externs/w3c_dom2.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s DOM Level 2 specification.\\n * This file depends on w3c_dom1.js.\\n * The whole file has been fully type annotated.\\n * Created from\\n * http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\\n *\\n * @externs\\n */\\n\\n/**\\n * @param {string} s id.\\n * @return {Element}\\n * @nosideeffects\\n * @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#ID-getElBId\\n */\\nDocument.prototype.getElementById = function(s) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} qualifiedName\\n * @param {string=} opt_typeExtension\\n * @return {!Element}\\n * @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#ID-DocCrElNS\\n */\\nDocument.prototype.createElementNS =\\n function(namespaceURI, qualifiedName, opt_typeExtension) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} qualifiedName\\n * @return {!Attr}\\n * @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#ID-DocCrElNS\\n */\\nDocument.prototype.createAttributeNS =\\n function(namespaceURI, qualifiedName) {};\\n\\n/**\\n * @param {string} namespace\\n * @param {string} name\\n * @return {!NodeList}\\n * @nosideeffects\\n * @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#ID-getElBTNNS\\n */\\nDocument.prototype.getElementsByTagNameNS = function(namespace, name) {};\\n\\n/**\\n * @param {Node} externalNode\\n * @param {boolean} deep\\n * @return {Node}\\n * @see https://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#Core-Document-importNode\\n */\\nDocument.prototype.importNode = function(externalNode, deep) {};\\n\\n/**\\n * @constructor\\n * @implements {IObject<(string|number),T>}\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @template T\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75708506\\n */\\nfunction HTMLCollection() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40057551\\n */\\nHTMLCollection.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {T|null}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33262535\\n * @nosideeffects\\n */\\nHTMLCollection.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} name\\n * @return {T|null}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-21069976\\n * @nosideeffects\\n */\\nHTMLCollection.prototype.namedItem = function(name) {};\\n\\n/**\\n * @constructor\\n * @implements {IObject<(string|number),HTMLOptionElement>}\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection\\n */\\nfunction HTMLOptionsCollection() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection-length\\n */\\nHTMLOptionsCollection.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {Node}\\n * @see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection-item\\n * @nosideeffects\\n */\\nHTMLOptionsCollection.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @extends {Document}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-26809268\\n */\\nfunction HTMLDocument() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-18446827\\n */\\nHTMLDocument.prototype.title;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-95229140\\n */\\nHTMLDocument.prototype.referrer;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-2250147\\n */\\nHTMLDocument.prototype.domain;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46183437\\n */\\nHTMLDocument.prototype.URL;\\n\\n/**\\n * @type {!HTMLBodyElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-56360201\\n */\\nHTMLDocument.prototype.body;\\n\\n/**\\n * @type {!HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-90379117\\n */\\nHTMLDocument.prototype.images;\\n\\n/**\\n * @type {!HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85113862\\n */\\nHTMLDocument.prototype.applets;\\n\\n/**\\n * @type {!HTMLCollection<(!HTMLAnchorElement|!HTMLAreaElement)>}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-7068919\\n */\\nHTMLDocument.prototype.links;\\n\\n/**\\n * @type {!HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-1689064\\n */\\nHTMLDocument.prototype.forms;\\n\\n/**\\n * @type {!HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-7577272\\n */\\nHTMLDocument.prototype.anchors;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8747038\\n */\\nHTMLDocument.prototype.cookie;\\n\\n/**\\n * @param {string=} opt_mimeType\\n * @param {string=} opt_replace\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-72161170\\n * Even though official spec says \\"no parameters\\" some old browsers might take\\n * optional parameters: https://msdn.microsoft.com/en-us/library/ms536652(v=vs.85).aspx\\n * @override\\n */\\nHTMLDocument.prototype.open = function(opt_mimeType, opt_replace) {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-98948567\\n * @override\\n */\\nHTMLDocument.prototype.close = function() {};\\n\\n/**\\n * @param {string} text\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75233634\\n * @override\\n */\\nHTMLDocument.prototype.write = function(text) {};\\n\\n/**\\n * @param {string} text\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35318390\\n * @override\\n */\\nHTMLDocument.prototype.writeln = function(text) {};\\n\\n/**\\n * @param {string} elementName\\n * @return {!NodeList}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-71555259\\n * @nosideeffects\\n */\\nHTMLDocument.prototype.getElementsByName = function(elementName) {};\\n\\n/**\\n * @param {Node} root\\n * @param {number=} whatToShow\\n * @param {NodeFilter=} filter\\n * @param {boolean=} entityReferenceExpansion\\n * @return {!NodeIterator}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-Document\\n * @nosideeffects\\n */\\nHTMLDocument.prototype.createNodeIterator = function(\\n root, whatToShow, filter, entityReferenceExpansion) {};\\n\\n/**\\n * @param {Node} root\\n * @param {number=} whatToShow\\n * @param {NodeFilter=} filter\\n * @param {boolean=} entityReferenceExpansion\\n * @return {!TreeWalker}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-Document\\n * @nosideeffects\\n */\\nHTMLDocument.prototype.createTreeWalker = function(\\n root, whatToShow, filter, entityReferenceExpansion) {};\\n\\n\\n/** @typedef {{\\n createNodeIterator: function(Node, number=, NodeFilter=, boolean=) : NodeIterator,\\n createTreeWalker: function(N';a.a+='ode, number=, NodeFilter=, boolean=) : TreeWalker\\n}} */\\nvar TraversalDocument;\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter\\n*/\\nfunction NodeFilter() {}\\n\\n/* Constants for whatToShow */\\n/** @const {number} */ NodeFilter.SHOW_ALL;\\n/** @const {number} */ NodeFilter.SHOW_ATTRIBUTE;\\n/** @const {number} */ NodeFilter.SHOW_CDATA_SECTION;\\n/** @const {number} */ NodeFilter.SHOW_COMMENT;\\n/** @const {number} */ NodeFilter.SHOW_DOCUMENT;\\n/** @const {number} */ NodeFilter.SHOW_DOCUMENT_FRAGMENT;\\n/** @const {number} */ NodeFilter.SHOW_DOCUMENT_TYPE;\\n/** @const {number} */ NodeFilter.SHOW_ELEMENT;\\n/** @const {number} */ NodeFilter.SHOW_ENTITY;\\n/** @const {number} */ NodeFilter.SHOW_ENTITY_REFERENCE;\\n/** @const {number} */ NodeFilter.SHOW_NOTATION;\\n/** @const {number} */ NodeFilter.SHOW_PROCESSING_INSTRUCTION;\\n/** @const {number} */ NodeFilter.SHOW_TEXT;\\n\\n/* Consants for acceptNode */\\n/** @const {number} */ NodeFilter.FILTER_ACCEPT;\\n/** @const {number} */ NodeFilter.FILTER_REJECT;\\n/** @const {number} */ NodeFilter.FILTER_SKIP;\\n\\n/**\\n * @param {Node} n\\n * @return {number} Any of NodeFilter.FILTER_* constants.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter-acceptNode\\n*/\\nNodeFilter.prototype.acceptNode = function(n) {};\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator\\n*/\\nfunction NodeIterator() {}\\n\\n/**\\n * Detach and invalidate the NodeIterator.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator-detach\\n * @return {undefined}\\n */\\nNodeIterator.prototype.detach = function() {};\\n\\n/**\\n * @return {Node} Next node in the set.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator-nextNode\\n */\\nNodeIterator.prototype.nextNode = function() {};\\n\\n/**\\n * @return {Node} Previous node in the set.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator-previousNode\\n */\\nNodeIterator.prototype.previousNode = function() {};\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker\\n*/\\nfunction TreeWalker() {}\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-firstChild\\n */\\nTreeWalker.prototype.firstChild = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null..\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-lastChild\\n */\\nTreeWalker.prototype.lastChild = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-nextNode\\n */\\nTreeWalker.prototype.nextNode = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-nextSibling\\n */\\nTreeWalker.prototype.nextSibling = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-parentNode\\n */\\nTreeWalker.prototype.parentNode = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-previousNode\\n */\\nTreeWalker.prototype.previousNode = function() {};\\n\\n/**\\n * @return {?Node} The new Node or null.\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker-previousSibling\\n */\\nTreeWalker.prototype.previousSibling = function() {};\\n\\n/**\\n * @type {Node}\\n */\\nTreeWalker.prototype.root;\\n\\n/**\\n * @type {number}\\n */\\nTreeWalker.prototype.whatToShow;\\n\\n/**\\n * @type {NodeFilter}\\n */\\nTreeWalker.prototype.filter;\\n\\n/**\\n * @type {boolean}\\n */\\nTreeWalker.prototype.expandEntityReference;\\n\\n/**\\n * @type {Node}\\n */\\nTreeWalker.prototype.currentNode;\\n\\n/**\\n * @constructor\\n * @extends {Element}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58190037\\n */\\nfunction HTMLElement() {}\\n\\n/**\\n * @implicitCast\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63534901\\n */\\nHTMLElement.prototype.id;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78276800\\n */\\nHTMLElement.prototype.title;\\n\\n/**\\n * @type {!CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle\\n */\\nHTMLElement.prototype.style;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59132807\\n */\\nHTMLElement.prototype.lang;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-52460740\\n */\\nHTMLElement.prototype.dir;\\n\\n/**\\n * @implicitCast\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-95362176\\n */\\nHTMLElement.prototype.className;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40676705\\n */\\nHTMLElement.prototype.tabIndex;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33759296\\n */\\nfunction HTMLHtmlElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-9383775\\n */\\nHTMLHtmlElement.prototype.version;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77253168\\n */\\nfunction HTMLHeadElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96921909\\n */\\nHTMLHeadElement.prototype.profile;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @implements {LinkStyle}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35143001\\n */\\nfunction HTMLLinkElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87355129\\n */\\nHTMLLinkElement.prototype.disabled;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63954491\\n */\\nHTMLLinkElement.prototype.charset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33532588\\n */\\nHTMLLinkElement.prototype.href;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85145682\\n */\\nHTMLLinkElement.prototype.hreflang;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75813125\\n */\\nHTMLLinkElement.prototype.media;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-41369587\\n */\\nHTMLLinkElement.prototype.rel;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40715461\\n */\\nHTMLLinkElement.prototype.rev;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-84183095\\n */\\nHTMLLinkElement.prototype.target;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32498296\\n */\\nHTMLLinkElement.prototype.type;\\n\\n/** @type {StyleSheet} */\\nHTMLLinkElement.prototype.sheet;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79243169\\n */\\nfunction HTMLTitleElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77500413\\n */\\nHTMLTitleElement.prototype.text;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-37041454\\n */\\nfunction HTMLMetaElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87670826\\n */\\nHTMLMetaElement.prototype.content;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77289449\\n */\\nHTMLMetaElement.prototype.httpEquiv;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-31037081\\n */\\nHTMLMetaElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35993789\\n */\\nHTMLMetaElement.prototype.scheme;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-73629039\\n */\\nfunction HTMLBaseElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-65382887\\n */\\nHTMLBaseElement.prototype.href;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-73844298\\n */\\nHTMLBaseElement.prototype.target;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85283003\\n */\\nfunction HTMLIsIndexElement() {}\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87069980\\n */\\nHTMLIsIndexElement.prototype.form;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33589862\\n */\\nHTMLIsIndexElement.prototype.prompt;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @implements {LinkStyle}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-16428977\\n */\\nfunction HTMLStyleElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-51162010\\n */\\nHTMLStyleElement.prototype.disabled;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76412738\\n */\\nHTMLStyleElement.prototype.media;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22472002\\n */\\nHTMLStyleElement.prototype.type;\\n\\n/** @type {StyleSheet} */\\nHTMLStyleElement.prototype.sheet;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-62018039\\n */\\nfunction HTMLBodyElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59424581\\n */\\nHTMLBodyElement.prototype.aLink;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-37574810\\n */\\nHTMLBodyElement.prototype.background;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-24940084\\n */\\nHTMLBodyElement.prototype.bgColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-7662206\\n */\\nHTMLBodyElement.prototype.link;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-73714763\\n */\\nHTMLBodyElement.prototype.text;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-83224305\\n */\\nHTMLBodyElement.prototype.vLink;\\n\\n/**\\n * @constructor\\n * @extends {HTMLCollection}\\n * @implements {IObject)>}\\n * @implements {IArrayLike}\\n * @template T\\n * @see https://html.spec.whatwg.org/multipage/infrastructure.html#the-htmlformcontrolscollection-interface\\n */\\nfunction HTMLFormControlsCollection() {}\\n\\n/**\\n * @param {string} name\\n * @return {T|RadioNodeList|null}\\n * @see https://html.spec.whatwg.org/multipage/infrastructure.html#dom-htmlformcontrolscollection-nameditem\\n * @nosideeffects\\n * @override\\n * @suppress {newCheckTypes}\\n */\\nHTMLFormControlsCollection.prototype.namedItem = function(name) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40002357\\n */\\nfunction HTMLFormElement() {}\\n\\n/**\\n * @type {HTMLFormControlsCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76728479\\n */\\nHTMLFormElement.prototype.elements;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#HTML-HTMLFormElement-length\\n */\\nHTMLFormElement.prototype.length;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22051454\\n */\\nHTMLFormElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-19661795\\n */\\nHTMLFormElement.prototype.acceptCharset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-74049184\\n */\\nHTMLFormElement.prototype.action;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-84227810\\n */\\nHTMLFormElement.prototype.enctype;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-82545539\\n */\\nHTMLFormElement.prototype.method;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6512890\\n */\\nHTMLFormElement.prototype.target;\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76767676\\n */\\nHTMLFormElement.prototype.submit = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76767677\\n */\\nHTMLFormElement.prototype.reset = function() {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-94282980\\n */\\nfunction HTMLSelectElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58783172\\n */\\nHTMLSelectElement.prototype.type;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85676760\\n */\\nHTMLSelectElement.prototype.selectedIndex;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59351919\\n */\\nHTMLSelectElement.prototype.value;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-5933486\\n */\\nHTMLSelectElement.prototype.length;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-20489458\\n */\\nHTMLSelectElement.prototype.form;\\n\\n/**\\n * @type {!HTMLOptionsCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-30606413\\n */\\nHTMLSelectElement.prototype.options;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79102918\\n */\\nHTMLSelectElement.prototype.disabled;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-13246613\\n */\\nHTMLSelectElement.prototype.multiple;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-41636323\\n */\\nHTMLSelectElement.prototype.name;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-18293826\\n */\\nHTMLSelectElement.prototype.size;\\n\\n/**\\n * @param {HTMLElement} element\\n * @param {HTMLElement=} opt_before\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-14493106\\n */\\nHTMLSelectElement.prototype.add = function(element, opt_before) {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-28216144\\n * @override\\n */\\nHTMLSelectElement.prototype.blur = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32130014\\n * @override\\n */\\nHTMLSelectElement.prototype.focus = function() {};\\n\\n/**\\n * @param {number=} opt_index\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-33404570\\n * @override\\n */\\nHTMLSelectElement.prototype.remove = function(opt_index) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-38450247\\n */\\nfunction HTMLOptGroup';a.a+='Element() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-15518803\\n */\\nHTMLOptGroupElement.prototype.disabled;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-95806054\\n */\\nHTMLOptGroupElement.prototype.label;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70901257\\n */\\nfunction HTMLOptionElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-37770574\\n */\\nHTMLOptionElement.prototype.defaultSelected;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-23482473\\n */\\nHTMLOptionElement.prototype.disabled;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-17116503\\n */\\nHTMLOptionElement.prototype.form;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-14038413\\n */\\nHTMLOptionElement.prototype.index;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40736115\\n */\\nHTMLOptionElement.prototype.label;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70874476\\n */\\nHTMLOptionElement.prototype.selected;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-48154426\\n */\\nHTMLOptionElement.prototype.text;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6185554\\n */\\nHTMLOptionElement.prototype.value;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6043025\\n */\\nfunction HTMLInputElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-15328520\\n */\\nHTMLInputElement.prototype.accept;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59914154\\n */\\nHTMLInputElement.prototype.accessKey;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96991182\\n */\\nHTMLInputElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-92701314\\n */\\nHTMLInputElement.prototype.alt;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-30233917\\n */\\nHTMLInputElement.prototype.checked;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-20509171\\n */\\nHTMLInputElement.prototype.defaultChecked;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-26091157\\n */\\nHTMLInputElement.prototype.defaultValue;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-50886781\\n */\\nHTMLInputElement.prototype.disabled;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63239895\\n */\\nHTMLInputElement.prototype.form;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-54719353\\n */\\nHTMLInputElement.prototype.maxLength;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-89658498\\n */\\nHTMLInputElement.prototype.name;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88461592\\n */\\nHTMLInputElement.prototype.readOnly;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79659438\\n */\\nHTMLInputElement.prototype.size;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-97320704\\n */\\nHTMLInputElement.prototype.src;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-62176355\\n */\\nHTMLInputElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-62883744\\n */\\nHTMLInputElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32463706\\n */\\nHTMLInputElement.prototype.useMap;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-49531485\\n */\\nHTMLInputElement.prototype.value;\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-26838235\\n * @override\\n */\\nHTMLInputElement.prototype.blur = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-2651361\\n * @override\\n */\\nHTMLInputElement.prototype.click = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-65996295\\n * @override\\n */\\nHTMLInputElement.prototype.focus = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-34677168\\n */\\nHTMLInputElement.prototype.select = function() {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-24874179\\n */\\nfunction HTMLTextAreaElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-93102991\\n */\\nHTMLTextAreaElement.prototype.accessKey;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-51387225\\n */\\nHTMLTextAreaElement.prototype.cols;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-36152213\\n */\\nHTMLTextAreaElement.prototype.defaultValue;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-98725443\\n */\\nHTMLTextAreaElement.prototype.disabled;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-18911464\\n */\\nHTMLTextAreaElement.prototype.form;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70715578\\n */\\nHTMLTextAreaElement.prototype.name;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39131423\\n */\\nHTMLTextAreaElement.prototype.readOnly;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46975887\\n */\\nHTMLTextAreaElement.prototype.rows;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-60363303\\n */\\nHTMLTextAreaElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#HTML-HTMLTextAreaElement-type\\n */\\nHTMLTextAreaElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70715579\\n */\\nHTMLTextAreaElement.prototype.value;\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6750689\\n * @override\\n */\\nHTMLTextAreaElement.prototype.blur = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39055426\\n * @override\\n */\\nHTMLTextAreaElement.prototype.focus = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-48880622\\n */\\nHTMLTextAreaElement.prototype.select = function() {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-34812697\\n */\\nfunction HTMLButtonElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-73169431\\n */\\nHTMLButtonElement.prototype.accessKey;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-92757155\\n */\\nHTMLButtonElement.prototype.disabled;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-71254493\\n */\\nHTMLButtonElement.prototype.form;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11029910\\n */\\nHTMLButtonElement.prototype.name;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39190908\\n */\\nHTMLButtonElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-27430092\\n */\\nHTMLButtonElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-72856782\\n */\\nHTMLButtonElement.prototype.value;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-13691394\\n */\\nfunction HTMLLabelElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43589892\\n */\\nHTMLLabelElement.prototype.accessKey;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32480901\\n */\\nHTMLLabelElement.prototype.form;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96509813\\n */\\nHTMLLabelElement.prototype.htmlFor;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-7365882\\n */\\nfunction HTMLFieldSetElement() {}\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75392630\\n */\\nHTMLFieldSetElement.prototype.form;\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/TR/html5/forms.html#attr-fieldset-disabled\\n */\\nHTMLFieldSetElement.prototype.disabled;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-21482039\\n */\\nfunction HTMLLegendElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11297832\\n */\\nHTMLLegendElement.prototype.accessKey;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79538067\\n */\\nHTMLLegendElement.prototype.align;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-29594519\\n */\\nHTMLLegendElement.prototype.form;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-86834457\\n */\\nfunction HTMLUListElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39864178\\n */\\nHTMLUListElement.prototype.compact;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96874670\\n */\\nHTMLUListElement.prototype.type;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58056027\\n */\\nfunction HTMLOListElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76448506\\n */\\nHTMLOListElement.prototype.compact;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-14793325\\n */\\nHTMLOListElement.prototype.start;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40971103\\n */\\nHTMLOListElement.prototype.type;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-52368974\\n */\\nfunction HTMLDListElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-21738539\\n */\\nHTMLDListElement.prototype.compact;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-71600284\\n */\\nfunction HTMLDirectoryElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75317739\\n */\\nHTMLDirectoryElement.prototype.compact;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-72509186\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-menu-element\\n */\\nfunction HTMLMenuElement() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68436464\\n */\\nHTMLMenuElement.prototype.compact;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-74680021\\n */\\nfunction HTMLLIElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-52387668\\n */\\nHTMLLIElement.prototype.type;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-45496263\\n */\\nHTMLLIElement.prototype.value;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22445964\\n */\\nfunction HTMLDivElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70908791\\n */\\nHTMLDivElement.prototype.align;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-84675076\\n */\\nfunction HTMLParagraphElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-53465507\\n */\\nHTMLParagraphElement.prototype.align;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43345119\\n */\\nfunction HTMLHeadingElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6796462\\n */\\nHTMLHeadingElement.prototype.align;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70319763\\n */\\nfunction HTMLQuoteElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-53895598\\n */\\nHTMLQuoteElement.prototype.cite;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11383425\\n */\\nfunction HTMLPreElement() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-13894083\\n */\\nHTMLPreElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-56836063\\n */\\nfunction HTMLBRElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-82703081\\n */\\nHTMLBRElement.prototype.clear;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32774408\\n */\\nfunction HTMLBaseFontElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87502302\\n */\\nHTMLBaseFontElement.prototype.color;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88128969\\n */\\nHTMLBaseFontElement.prototype.face;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-38930424\\n */\\nHTMLBaseFontElement.prototype.size;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43943847\\n */\\nfunction HTMLFontElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-53532975\\n */\\nHTMLFontElement.prototype.color;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-55715655\\n */\\nHTMLFontElement.prototype.face;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-90127284\\n */\\nHTMLFontElement.prototype.size;\\n\\n/**';a.a+='\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68228811\\n */\\nfunction HTMLHRElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-15235012\\n */\\nHTMLHRElement.prototype.align;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79813978\\n */\\nHTMLHRElement.prototype.noShade;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77612587\\n */\\nHTMLHRElement.prototype.size;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87744198\\n */\\nHTMLHRElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79359609\\n */\\nfunction HTMLModElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75101708\\n */\\nHTMLModElement.prototype.cite;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88432678\\n */\\nHTMLModElement.prototype.dateTime;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-48250443\\n */\\nfunction HTMLAnchorElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-89647724\\n */\\nHTMLAnchorElement.prototype.accessKey;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67619266\\n */\\nHTMLAnchorElement.prototype.charset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-92079539\\n */\\nHTMLAnchorElement.prototype.coords;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88517319\\n */\\nHTMLAnchorElement.prototype.href;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87358513\\n */\\nHTMLAnchorElement.prototype.hreflang;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-32783304\\n */\\nHTMLAnchorElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-3815891\\n */\\nHTMLAnchorElement.prototype.rel;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58259771\\n */\\nHTMLAnchorElement.prototype.rev;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-49899808\\n */\\nHTMLAnchorElement.prototype.shape;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-41586466\\n */\\nHTMLAnchorElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6414197\\n */\\nHTMLAnchorElement.prototype.target;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63938221\\n */\\nHTMLAnchorElement.prototype.type;\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-65068939\\n * @override\\n */\\nHTMLAnchorElement.prototype.blur = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-47150313\\n * @override\\n */\\nHTMLAnchorElement.prototype.focus = function() {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-17701901\\n */\\nfunction HTMLImageElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-3211094\\n */\\nHTMLImageElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-95636861\\n */\\nHTMLImageElement.prototype.alt;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-136671\\n */\\nHTMLImageElement.prototype.border;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-91561496\\n */\\nHTMLImageElement.prototype.height;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-53675471\\n */\\nHTMLImageElement.prototype.hspace;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58983880\\n */\\nHTMLImageElement.prototype.isMap;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77376969\\n */\\nHTMLImageElement.prototype.longDesc;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-91256910\\n */\\nHTMLImageElement.prototype.lowSrc;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-47534097\\n */\\nHTMLImageElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-87762984\\n */\\nHTMLImageElement.prototype.src;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35981181\\n */\\nHTMLImageElement.prototype.useMap;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85374897\\n */\\nHTMLImageElement.prototype.vspace;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-13839076\\n */\\nHTMLImageElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-9893177\\n */\\nfunction HTMLObjectElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-16962097\\n */\\nHTMLObjectElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-47783837\\n */\\nHTMLObjectElement.prototype.archive;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-82818419\\n */\\nHTMLObjectElement.prototype.border;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75241146\\n */\\nHTMLObjectElement.prototype.code;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-25709136\\n */\\nHTMLObjectElement.prototype.codeBase;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-19945008\\n */\\nHTMLObjectElement.prototype.codeType;\\n\\n/**\\n * @type {Document}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-38538621\\n */\\nHTMLObjectElement.prototype.contentDocument;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-81766986\\n */\\nHTMLObjectElement.prototype.data;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-942770\\n */\\nHTMLObjectElement.prototype.declare;\\n\\n/**\\n * @type {HTMLFormElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46094773\\n */\\nHTMLObjectElement.prototype.form;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88925838\\n */\\nHTMLObjectElement.prototype.height;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-17085376\\n */\\nHTMLObjectElement.prototype.hspace;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-20110362\\n */\\nHTMLObjectElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-25039673\\n */\\nHTMLObjectElement.prototype.standby;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-27083787\\n */\\nHTMLObjectElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-91665621\\n */\\nHTMLObjectElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6649772\\n */\\nHTMLObjectElement.prototype.useMap;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8682483\\n */\\nHTMLObjectElement.prototype.vspace;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-38538620\\n */\\nHTMLObjectElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-64077273\\n */\\nfunction HTMLParamElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59871447\\n */\\nHTMLParamElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-18179888\\n */\\nHTMLParamElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77971357\\n */\\nHTMLParamElement.prototype.value;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-23931872\\n */\\nHTMLParamElement.prototype.valueType;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-31006348\\n */\\nfunction HTMLAppletElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8049912\\n */\\nHTMLAppletElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58610064\\n */\\nHTMLAppletElement.prototype.alt;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-14476360\\n */\\nHTMLAppletElement.prototype.archive;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-61509645\\n */\\nHTMLAppletElement.prototype.code;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6581160\\n */\\nHTMLAppletElement.prototype.codeBase;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-90184867\\n */\\nHTMLAppletElement.prototype.height;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-1567197\\n */\\nHTMLAppletElement.prototype.hspace;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39843695\\n */\\nHTMLAppletElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-93681523\\n */\\nHTMLAppletElement.prototype.object;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22637173\\n */\\nHTMLAppletElement.prototype.vspace;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-16526327\\n */\\nHTMLAppletElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-94109203\\n */\\nfunction HTMLMapElement() {}\\n\\n/**\\n * @type {HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-71838730\\n */\\nHTMLMapElement.prototype.areas;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-52696514\\n */\\nHTMLMapElement.prototype.name;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-26019118\\n */\\nfunction HTMLAreaElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-57944457\\n */\\nHTMLAreaElement.prototype.accessKey;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-39775416\\n */\\nHTMLAreaElement.prototype.alt;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-66021476\\n */\\nHTMLAreaElement.prototype.coords;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-34672936\\n */\\nHTMLAreaElement.prototype.href;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-61826871\\n */\\nHTMLAreaElement.prototype.noHref;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-85683271\\n */\\nHTMLAreaElement.prototype.shape;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8722121\\n */\\nHTMLAreaElement.prototype.tabIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46054682\\n */\\nHTMLAreaElement.prototype.target;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-81598695\\n */\\nfunction HTMLScriptElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-35305677\\n */\\nHTMLScriptElement.prototype.charset;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-93788534\\n */\\nHTMLScriptElement.prototype.defer;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-56700403\\n */\\nHTMLScriptElement.prototype.event;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-66979266\\n */\\nHTMLScriptElement.prototype.htmlFor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75147231\\n */\\nHTMLScriptElement.prototype.src;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-46872999\\n */\\nHTMLScriptElement.prototype.text;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-30534818\\n */\\nHTMLScriptElement.prototype.type;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-64060425\\n */\\nfunction HTMLTableElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-23180977\\n */\\nHTMLTableElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-83532985\\n */\\nHTMLTableElement.prototype.bgColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-50969400\\n */\\nHTMLTableElement.prototype.border;\\n\\n/**\\n * @type {HTMLTableCaptionElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-14594520\\n */\\nHTMLTableElement.prototype.caption;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-59162158\\n */\\nHTMLTableElement.prototype.cellPadding;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68907883\\n */\\nHTMLTableElement.prototype.cellSpacing;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-64808476\\n */\\nHTMLTableElement.prototype.frame;\\n\\n/**\\n * @type {HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6156016\\n */\\nHTMLTableElement.prototype.rows;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-26347553\\n */\\nHTMLTableElement.prototype.rules;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-44998528\\n */\\nHTMLTableElement.prototype.summary;\\n\\n/**\\n * @type {HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-63206416\\n */\\nHTMLTableElement.prototype.tBodies;\\n\\n/**\\n * @type {HTMLTableSectionElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-64197097\\n */\\nHTMLTableElement.prototype.tFoot;\\n\\n/**\\n * @type {HTMLTab';a.a+='leSectionElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-9530944\\n */\\nHTMLTableElement.prototype.tHead;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-77447361\\n */\\nHTMLTableElement.prototype.width;\\n\\n/**\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96920263\\n */\\nHTMLTableElement.prototype.createCaption = function() {};\\n\\n/**\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8453710\\n */\\nHTMLTableElement.prototype.createTFoot = function() {};\\n\\n/**\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70313345\\n */\\nHTMLTableElement.prototype.createTHead = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22930071\\n */\\nHTMLTableElement.prototype.deleteCaption = function() {};\\n\\n/**\\n * @param {number} index\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-13114938\\n */\\nHTMLTableElement.prototype.deleteRow = function(index) {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78363258\\n */\\nHTMLTableElement.prototype.deleteTFoot = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-38310198\\n */\\nHTMLTableElement.prototype.deleteTHead = function() {};\\n\\n/**\\n * @param {number=} opt_index\\n * @return {HTMLElement}\\n * @see https://www.w3.org/TR/html5/tabular-data.html#htmltableelement\\n */\\nHTMLTableElement.prototype.insertRow = function(opt_index) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-12035137\\n */\\nfunction HTMLTableCaptionElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79875068\\n */\\nHTMLTableCaptionElement.prototype.align;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-84150186\\n */\\nfunction HTMLTableColElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-31128447\\n */\\nHTMLTableColElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-9447412\\n */\\nHTMLTableColElement.prototype.ch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-57779225\\n */\\nHTMLTableColElement.prototype.chOff;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96511335\\n */\\nHTMLTableColElement.prototype.span;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-83291710\\n */\\nHTMLTableColElement.prototype.vAlign;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-25196799\\n */\\nHTMLTableColElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67417573\\n */\\nfunction HTMLTableSectionElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-40530119\\n */\\nHTMLTableSectionElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-83470012\\n */\\nHTMLTableSectionElement.prototype.ch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-53459732\\n */\\nHTMLTableSectionElement.prototype.chOff;\\n\\n/**\\n * @type {HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-52092650\\n */\\nHTMLTableSectionElement.prototype.rows;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-4379116\\n */\\nHTMLTableSectionElement.prototype.vAlign;\\n\\n/**\\n * @param {number} index\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-5625626\\n */\\nHTMLTableSectionElement.prototype.deleteRow = function(index) {};\\n\\n/**\\n * @param {number=} opt_index\\n * @return {HTMLElement}\\n * @see https://www.w3.org/TR/html5/tabular-data.html#htmltablesectionelement\\n */\\nHTMLTableSectionElement.prototype.insertRow = function(opt_index) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-6986576\\n */\\nfunction HTMLTableRowElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-74098257\\n */\\nHTMLTableRowElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-18161327\\n */\\nHTMLTableRowElement.prototype.bgColor;\\n\\n/**\\n * @type {HTMLCollection}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67349879\\n */\\nHTMLTableRowElement.prototype.cells;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-16230502\\n */\\nHTMLTableRowElement.prototype.ch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68207461\\n */\\nHTMLTableRowElement.prototype.chOff;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67347567\\n */\\nHTMLTableRowElement.prototype.rowIndex;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-79105901\\n */\\nHTMLTableRowElement.prototype.sectionRowIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-90000058\\n */\\nHTMLTableRowElement.prototype.vAlign;\\n\\n/**\\n * @param {number} index\\n * @return {undefined}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11738598\\n */\\nHTMLTableRowElement.prototype.deleteCell = function(index) {};\\n\\n/**\\n * @param {number} index\\n * @return {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-68927016\\n */\\nHTMLTableRowElement.prototype.insertCell = function(index) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-82915075\\n */\\nfunction HTMLTableCellElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-74444037\\n */\\nHTMLTableCellElement.prototype.abbr;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-98433879\\n */\\nHTMLTableCellElement.prototype.align;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-76554418\\n */\\nHTMLTableCellElement.prototype.axis;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-88135431\\n */\\nHTMLTableCellElement.prototype.bgColor;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-80748363\\n */\\nHTMLTableCellElement.prototype.cellIndex;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-30914780\\n */\\nHTMLTableCellElement.prototype.ch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-20144310\\n */\\nHTMLTableCellElement.prototype.chOff;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-84645244\\n */\\nHTMLTableCellElement.prototype.colSpan;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-89104817\\n */\\nHTMLTableCellElement.prototype.headers;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-83679212\\n */\\nHTMLTableCellElement.prototype.height;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-62922045\\n */\\nHTMLTableCellElement.prototype.noWrap;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-48237625\\n */\\nHTMLTableCellElement.prototype.rowSpan;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-36139952\\n */\\nHTMLTableCellElement.prototype.scope;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-58284221\\n */\\nHTMLTableCellElement.prototype.vAlign;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-27480795\\n */\\nHTMLTableCellElement.prototype.width;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43829095\\n */\\nfunction HTMLFrameSetElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-98869594\\n */\\nHTMLFrameSetElement.prototype.cols;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-19739247\\n */\\nHTMLFrameSetElement.prototype.rows;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-97790553\\n */\\nfunction HTMLFrameElement() {}\\n\\n/**\\n * @type {Document}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78799536\\n */\\nHTMLFrameElement.prototype.contentDocument;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11858633\\n */\\nHTMLFrameElement.prototype.frameBorder;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-7836998\\n */\\nHTMLFrameElement.prototype.longDesc;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-55569778\\n */\\nHTMLFrameElement.prototype.marginHeight;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-8369969\\n */\\nHTMLFrameElement.prototype.marginWidth;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-91128709\\n */\\nHTMLFrameElement.prototype.name;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-80766578\\n */\\nHTMLFrameElement.prototype.noResize;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-45411424\\n */\\nHTMLFrameElement.prototype.scrolling;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-78799535\\n */\\nHTMLFrameElement.prototype.src;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-50708718\\n */\\nfunction HTMLIFrameElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-11309947\\n */\\nHTMLIFrameElement.prototype.align;\\n\\n/**\\n * @type {Document}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67133006\\n */\\nHTMLIFrameElement.prototype.contentDocument;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-22463410\\n */\\nHTMLIFrameElement.prototype.frameBorder;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-1678118\\n */\\nHTMLIFrameElement.prototype.height;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-70472105\\n */\\nHTMLIFrameElement.prototype.longDesc;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-91371294\\n */\\nHTMLIFrameElement.prototype.marginHeight;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-66486595\\n */\\nHTMLIFrameElement.prototype.marginWidth;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-96819659\\n */\\nHTMLIFrameElement.prototype.name;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-36369822\\n */\\nHTMLIFrameElement.prototype.scrolling;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-43933957\\n */\\nHTMLIFrameElement.prototype.src;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-67133005\\n */\\nHTMLIFrameElement.prototype.width;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF\\n */\\nDOMException.INVALID_STATE_ERR = 11;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF\\n */\\nDOMException.SYNTAX_ERR = 12;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF\\n */\\nDOMException.INVALID_MODIFICATION_ERR = 13;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF\\n */\\nDOMException.NAMESPACE_ERR = 14;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-258A00AF\\n */\\nDOMException.INVALID_ACCESS_ERR = 15;\\n","externs/w3c_dom3.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s DOM Level 3 specification.\\n * This file depends on w3c_dom2.js.\\n * The whole file has been fully type annotated.\\n * Created from\\n * http://www.w3.org/TR/DOM-Level-3-Core/ecma-script-binding.html\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n */\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF\\n */\\nDOMException.prototype.code;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF\\n */\\nDOMException.VALIDATION_ERR = 16;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF\\n */\\nDOMException.TYPE_MISMATCH_ERR = 17;\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList\\n */\\nfunction DOMStringList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-length\\n */\\nDOMStringList.prototype.length;\\n\\n/**\\n * @param {string} str\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-contains\\n * @nosideeffects\\n */\\nDOMStringList.prototype.contains = function(str) {};\\n\\n/**\\n * @param {number} index\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-item\\n * @nosideeffects\\n */\\nDOMStringList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList\\n */\\nfunction NameList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-length\\n */\\nNameList.prototype.length;\\n\\n/**\\n * @param {string} str\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-contains\\n * @nosideeffects\\n */\\nNameList.prototype.contains = function(str) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} name\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-containsNS\\n * @nosideeffects\\n */\\nNameList.prototype.containsNS = function(namespaceURI, name) {};\\n\\n/**\\n * @param {number} index\\n * @r';a.a+="eturn {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getName\\n * @nosideeffects\\n */\\nNameList.prototype.getName = function(index) {};\\n\\n/**\\n * @param {number} index\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getNamespaceURI\\n * @nosideeffects\\n */\\nNameList.prototype.getNamespaceURI = function(index) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList\\n */\\nfunction DOMImplementationList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList-length\\n */\\nDOMImplementationList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {DOMImplementation}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList-item\\n * @nosideeffects\\n */\\nDOMImplementationList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationSource\\n */\\nfunction DOMImplementationSource() {}\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} publicId\\n * @param {DocumentType} doctype\\n * @return {Document}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument\\n * @nosideeffects\\n */\\nDOMImplementation.prototype.createDocument = function(namespaceURI, publicId, doctype) {};\\n\\n/**\\n * @param {string} qualifiedName\\n * @param {string} publicId\\n * @param {string} systemId\\n * @return {DocumentType}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocType\\n * @nosideeffects\\n */\\nDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {};\\n\\n/**\\n * @param {string} features\\n * @return {DOMImplementation}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-getDOMImpl\\n * @nosideeffects\\n */\\nDOMImplementationSource.prototype.getDOMImplementation = function(features) {};\\n\\n/**\\n * @param {string} features\\n * @return {DOMImplementationList}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-getDOMImpls\\n * @nosideeffects\\n */\\nDOMImplementationSource.prototype.getDOMImplementationList = function(features) {};\\n\\n/**\\n * @param {string} feature\\n * @param {string} version\\n * @return {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementation3-getFeature\\n * @nosideeffects\\n */\\nDOMImplementation.prototype.getFeature = function(feature, version) {};\\n\\n/**\\n * @param {Node} externalNode\\n * @return {Node}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-adoptNode\\n */\\nDocument.prototype.adoptNode = function(externalNode) {};\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-documentURI\\n */\\nDocument.prototype.documentURI;\\n\\n/**\\n * @type {DOMConfiguration}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-domConfig\\n */\\nDocument.prototype.domConfig;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-inputEncoding\\n */\\nDocument.prototype.inputEncoding;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-strictErrorChecking\\n */\\nDocument.prototype.strictErrorChecking;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-encoding\\n */\\nDocument.prototype.xmlEncoding;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-standalone\\n */\\nDocument.prototype.xmlStandalone;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-version\\n */\\nDocument.prototype.xmlVersion;\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-normalizeDocument\\n */\\nDocument.prototype.normalizeDocument = function() {};\\n\\n/**\\n * @param {Node} n\\n * @param {?string} namespaceURI\\n * @param {string} qualifiedName\\n * @return {Node}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-renameNode\\n */\\nDocument.prototype.renameNode = function(n, namespaceURI, qualifiedName) {};\\n\\n/**\\n * @type {?string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-baseURI\\n */\\nNode.prototype.baseURI;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSLocalN\\n */\\nNode.prototype.localName;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSname\\n */\\nNode.prototype.namespaceURI;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix\\n */\\nNode.prototype.prefix;\\n\\n/**\\n * @type {string}\\n * @implicitCast\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent\\n */\\nNode.prototype.textContent;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_DISCONNECTED\\n */\\nNode.DOCUMENT_POSITION_DISCONNECTED = 0x01;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_PRECEDING\\n */\\nNode.DOCUMENT_POSITION_PRECEDING = 0x02;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_FOLLOWING\\n */\\nNode.DOCUMENT_POSITION_FOLLOWING = 0x04;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINS\\n */\\nNode.DOCUMENT_POSITION_CONTAINS = 0x08;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINED_BY\\n */\\nNode.DOCUMENT_POSITION_CONTAINED_BY = 0x10;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC\\n */\\nNode.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;\\n\\n/**\\n * @param {Node} other\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition\\n * @nosideeffects\\n */\\nNode.prototype.compareDocumentPosition = function(other) {};\\n\\n/**\\n * @param {string} feature\\n * @param {string} version\\n * @return {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-getFeature\\n * @nosideeffects\\n */\\nNode.prototype.getFeature = function(feature, version) {};\\n\\n/**\\n * @param {string} key\\n * @return {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-getUserData\\n * @nosideeffects\\n */\\nNode.prototype.getUserData = function(key) {};\\n\\n/**\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeHasAttrs\\n * @nosideeffects\\n */\\nNode.prototype.hasAttributes = function() {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace\\n * @nosideeffects\\n */\\nNode.prototype.isDefaultNamespace = function(namespaceURI) {};\\n\\n/**\\n * @param {Node} arg\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isEqualNode\\n * @nosideeffects\\n */\\nNode.prototype.isEqualNode = function(arg) {};\\n\\n/**\\n * @param {Node} other\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isSameNode\\n * @nosideeffects\\n */\\nNode.prototype.isSameNode = function(other) {};\\n\\n/**\\n * @param {string} feature\\n * @param {string} version\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-Node-supports\\n * @nosideeffects\\n */\\nNode.prototype.isSupported = function(feature, version) {};\\n\\n/**\\n * @param {string} prefix\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI\\n * @nosideeffects\\n */\\nNode.prototype.lookupNamespaceURI = function(prefix) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\\n * @nosideeffects\\n */\\nNode.prototype.lookupPrefix = function(namespaceURI) {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-normalize\\n */\\nNode.prototype.normalize = function() {};\\n\\n/**\\n * @param {Object} key\\n * @param {Object} data\\n * @param {UserDataHandler} handler\\n * @return {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-setUserData'\\n */\\nNode.prototype.setUserData = function(key, data, handler) {};\\n\\n/**\\n * @param {string} query\\n * @return {?Element}\\n * @see http://www.w3.org/TR/selectors-api/#queryselector\\n * @nosideeffects\\n */\\nNode.prototype.querySelector = function(query) {};\\n\\n/**\\n * @param {string} query\\n * @return {!NodeList}\\n * @see http://www.w3.org/TR/selectors-api/#queryselectorall\\n * @nosideeffects\\n */\\nNode.prototype.querySelectorAll = function(query) {};\\n\\n/**\\n * @type {Element}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-ownerElement\\n */\\nAttr.prototype.ownerElement;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-isId\\n */\\nAttr.prototype.isId;\\n\\n/**\\n * @type {TypeInfo}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-schemaTypeInfo\\n */\\nAttr.prototype.schemaTypeInfo;\\n\\n/**\\n * @type {TypeInfo}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Element-schemaTypeInfo\\n */\\nElement.prototype.schemaTypeInfo;\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @return {Attr}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElGetAtNodeNS\\n * @nosideeffects\\n */\\nElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElGetAttrNS\\n * @nosideeffects\\n */\\nElement.prototype.getAttributeNS = function(namespaceURI, localName) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @return {!NodeList}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-A6C90942\\n * @nosideeffects\\n */\\nElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {};\\n\\n/**\\n * @param {string} name\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElHasAttr\\n * @nosideeffects\\n */\\nElement.prototype.hasAttribute = function(name) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElHasAttrNS\\n * @nosideeffects\\n */\\nElement.prototype.hasAttributeNS = function(namespaceURI, localName) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElRemAtNS\\n */\\nElement.prototype.removeAttributeNS = function(namespaceURI, localName) {};\\n\\n/**\\n * @param {Attr} newAttr\\n * @return {Attr}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetAtNodeNS\\n */\\nElement.prototype.setAttributeNodeNS = function(newAttr) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} qualifiedName\\n * @param {string|number|boolean} value Values are converted to strings with\\n * ToString, so we accept number and boolean since both convert easily to\\n * strings.\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetAttrNS\\n */\\nElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {};\\n\\n/**\\n * @param {string} name\\n * @param {boolean} isId\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttr\\n */\\nElement.prototype.setIdAttribute = function(name, isId) {};\\n\\n/**\\n * @param {Attr} idAttr\\n * @param {boolean} isId\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNode\\n */\\nElement.prototype.setIdAttributeNode = function(idAttr, isId) {};\\n\\n/**\\n * @param {?string} namespaceURI\\n * @param {string} localName\\n * @param {boolean} isId\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNS\\n */\\nElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {};\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-wholeText\\n */\\nText.prototype.wholeText;\\n\\n/**\\n * @param {string} newText\\n * @return {Text}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-replaceWholeText\\n */\\nText.prototype.replaceWholeText = function(newText) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo\\n */\\nfunction TypeInfo() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_EXTENSION\\n */\\nTypeInfo.prototype.DERIVATION_EXTENSION;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_LIST\\n */\\nTypeInfo.prototype.DERIVATION_LIST;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_RESTRICTION\\n */\\nTypeInfo.prototype.DERIVATION_RESTRICTION;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_UNION\\n */\\nTypeInfo.prototype.DERIVATION_UNION;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeName\\n */\\nTypeInfo.prototype.typeName;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeNamespace\\n */\\nTypeInfo.prototype.typeNamespace;\\n\\n/**\\n * @param {string} typeNamespaceArg\\n * @param {string} typeNameArg\\n * @param {number} derivationMethod\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom\\n * @nosideeffects\\n */\\nTypeInfo.prototype.isDerivedFrom = function(typeNamespaceArg, typeNameArg, derivationMethod) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler\\n */\\nfunction UserDataHandler() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-CLONED\\n */\\nUserDataHandler.prototype.NODE_CLONED = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-IMPORTED\\n */\\nUserDataHandler.prototype.NODE_IMPORTED = 2;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-DELETED\\n */\\nUserDataHandler.prototype.NODE_DELETED = 3;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-RENAMED\\n */\\nUserDataHandler.prototype.NODE_RENAMED = 4;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-ADOPTED\\n */\\nUserDataHandler.prototype.NODE_ADOPTED = 5;\\n\\n/**\\n * @param {number} operation\\n * @param {string} key\\n * @param {*=} opt_data\\n * @param {?Node=} opt_src\\n * @param {?Node=} opt_dst\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-handleUserDataEvent\\n */\\nUserDataHandler.prototype.handle = function(operation, key, opt_data,\\n opt_src, opt_dst) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMError\\n */\\nfunction DOMError() {}\\n\\n/**\\n * @type {DOMLocator}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-location\\n */\\nDOMError.prototype.location;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-message\\n */\\nDOMError.prototype.message;\\n\\n/**\\n * @type {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-relatedData\\n */\\nDOMError.prototype.relatedData;\\n\\n/**\\n * @type {Object}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-relatedException\\n */\\nDOMError.prototype.relatedException;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-warning\\n */\\nDOMError.SEVERITY_WARNING = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-error\\n */\\nDOMError.SEVERITY_ERROR = 2;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core";a.a+='.html#ERROR-DOMError-severity-fatal-error\\n */\\nDOMError.SEVERITY_FATAL_ERROR = 3;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity\\n */\\nDOMError.prototype.severity;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-type\\n */\\nDOMError.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/dom/#domerror\\n */\\nDOMError.prototype.name;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMErrorHandler\\n */\\nfunction DOMErrorHandler() {}\\n\\n/**\\n * @param {DOMError} error\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ERRORS-DOMErrorHandler-handleError\\n */\\nDOMErrorHandler.prototype.handleError = function(error) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Interfaces-DOMLocator\\n */\\nfunction DOMLocator() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-byteOffset\\n */\\nDOMLocator.prototype.byteOffset;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-column-number\\n */\\nDOMLocator.prototype.columnNumber;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-line-number\\n */\\nDOMLocator.prototype.lineNumber;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-node\\n */\\nDOMLocator.prototype.relatedNode;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-uri\\n */\\nDOMLocator.prototype.uri;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-utf16Offset\\n */\\nDOMLocator.prototype.utf16Offset;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration\\n */\\nfunction DOMConfiguration() {}\\n\\n/**\\n * @type {DOMStringList}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-parameterNames\\n */\\nDOMConfiguration.prototype.parameterNames;\\n\\n/**\\n * @param {string} name\\n * @return {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-canSetParameter\\n * @nosideeffects\\n */\\nDOMConfiguration.prototype.canSetParameter = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @return {*}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-getParameter\\n * @nosideeffects\\n */\\nDOMConfiguration.prototype.getParameter = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @param {*} value\\n * @return {*}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-property\\n */\\nDOMConfiguration.prototype.setParameter = function(name, value) {};\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-internalSubset\\n */\\nDocumentType.prototype.internalSubset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-publicId\\n */\\nDocumentType.prototype.publicId;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-systemId\\n */\\nDocumentType.prototype.systemId;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-inputEncoding\\n */\\nEntity.prototype.inputEncoding;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-encoding\\n */\\nEntity.prototype.xmlEncoding;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-version\\n */\\nEntity.prototype.xmlVersion;\\n","externs/w3c_dom4.js":"/*\\n * Copyright 2016 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s DOM4 specification. This file depends on\\n * w3c_dom3.js. The whole file has been fully type annotated. Created from\\n * https://www.w3.org/TR/domcore/.\\n *\\n * @externs\\n * @author zhoumotongxue008@gmail.com (Michael Zhou)\\n */\\n\\n/**\\n * @typedef {?(DocumentType|Element|CharacterData)}\\n * @see https://www.w3.org/TR/domcore/#interface-childnode\\n */\\nvar ChildNode;\\n\\n/**\\n * @return {undefined}\\n * @see https://www.w3.org/TR/domcore/#dom-childnode-remove\\n */\\nDocumentType.prototype.remove = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see https://www.w3.org/TR/domcore/#dom-childnode-remove\\n */\\nElement.prototype.remove = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see https://www.w3.org/TR/domcore/#dom-childnode-remove\\n */\\nCharacterData.prototype.remove = function() {};\\n\\n/**\\n * @param {...(!Node|string)} nodes\\n * @return {undefined}\\n * @see https://dom.spec.whatwg.org/#dom-childnode-replacewith\\n */\\nDocumentType.prototype.replaceWith = function(nodes) {};\\n\\n/**\\n * @param {...(!Node|string)} nodes\\n * @return {undefined}\\n * @see https://dom.spec.whatwg.org/#dom-childnode-replacewith\\n */\\nElement.prototype.replaceWith = function(nodes) {};\\n\\n/**\\n * @param {...(!Node|string)} nodes\\n * @return {undefined}\\n * @see https://dom.spec.whatwg.org/#dom-childnode-replacewith\\n */\\nCharacterData.prototype.replaceWith = function(nodes) {};\\n\\n/**\\n * @return {!Array}\\n * @see https://dom.spec.whatwg.org/#dom-element-getattributenames\\n */\\nElement.prototype.getAttributeNames = function() {};\\n","externs/gecko_dom.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over\\n * W3C\'s DOM specification by Gecko. This file depends on\\n * w3c_dom2.js.\\n *\\n * When a non-standard extension appears in both Gecko and IE, we put\\n * it in gecko_dom.js\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n// TODO: Almost all of it has not been annotated with types.\\n\\n// Gecko DOM;\\n\\n/**\\n * Mozilla only???\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLSpanElement() {}\\n\\n/**\\n * @see https://developer.mozilla.org/en/Components_object\\n */\\nWindow.prototype.Components;\\n\\n/**\\n * @type {Window}\\n * @see https://developer.mozilla.org/en/DOM/window.content\\n */\\nWindow.prototype.content;\\n\\n/**\\n * @type {boolean}\\n * @see https://developer.mozilla.org/en/DOM/window.closed\\n */\\nWindow.prototype.closed;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.controllers */\\nWindow.prototype.controllers;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.crypto */\\nWindow.prototype.crypto;\\n\\n/**\\n * Gets/sets the status bar text for the given window.\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/window.defaultStatus\\n */\\nWindow.prototype.defaultStatus;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.dialogArguments */\\nWindow.prototype.dialogArguments;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.directories */\\nWindow.prototype.directories;\\n\\n/**\\n * @type {HTMLObjectElement|HTMLIFrameElement|null}\\n * @see https://developer.mozilla.org/en/DOM/window.frameElement\\n */\\nWindow.prototype.frameElement;\\n\\n/**\\n * Allows lookup of frames by index or by name.\\n * @type {?Object}\\n * @see https://developer.mozilla.org/en/DOM/window.frames\\n */\\nWindow.prototype.frames;\\n\\n/**\\n * @type {boolean}\\n * @see https://developer.mozilla.org/en/DOM/window.fullScreen\\n */\\nWindow.prototype.fullScreen;\\n\\n/**\\n * @return {!Promise}\\n * @see http://www.w3.org/TR/battery-status/\\n */\\nNavigator.prototype.getBattery = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/Storage#globalStorage\\n */\\nWindow.prototype.globalStorage;\\n\\n/**\\n * @type {!History}\\n * @suppress {duplicate}\\n * @see https://developer.mozilla.org/en/DOM/window.history\\n */\\nvar history;\\n\\n/**\\n * Returns the number of frames (either frame or iframe elements) in the\\n * window.\\n *\\n * @type {number}\\n * @see https://developer.mozilla.org/en/DOM/window.length\\n */\\nWindow.prototype.length;\\n\\n/**\\n * Location has an exception in the DeclaredGlobalExternsOnWindow pass\\n * so we have to manually include it:\\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/DeclaredGlobalExternsOnWindow.java#L116\\n *\\n * @type {!Location}\\n * @implicitCast\\n * @see https://developer.mozilla.org/en/DOM/window.location\\n */\\nWindow.prototype.location;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.locationbar\\n */\\nWindow.prototype.locationbar;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.menubar\\n */\\nWindow.prototype.menubar;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/window.name\\n */\\nWindow.prototype.name;\\n\\n/**\\n * @type {Navigator}\\n * @see https://developer.mozilla.org/en/DOM/window.navigator\\n */\\nWindow.prototype.navigator;\\n\\n/**\\n * @type {?Window}\\n * @see https://developer.mozilla.org/en/DOM/window.opener\\n */\\nWindow.prototype.opener;\\n\\n/**\\n * @type {!Window}\\n * @see https://developer.mozilla.org/en/DOM/window.parent\\n */\\nWindow.prototype.parent;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.personalbar */\\nWindow.prototype.personalbar;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.pkcs11 */\\nWindow.prototype.pkcs11;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window */\\nWindow.prototype.returnValue;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.scrollbars */\\nWindow.prototype.scrollbars;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.scrollMaxX\\n */\\nWindow.prototype.scrollMaxX;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.scrollMaxY\\n */\\nWindow.prototype.scrollMaxY;\\n\\n/**\\n * @type {!Window}\\n * @see https://developer.mozilla.org/en/DOM/window.self\\n */\\nWindow.prototype.self;\\n\\n/** @see https://developer.mozilla.org/en/DOM/Storage#sessionStorage */\\nWindow.prototype.sessionStorage;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.sidebar */\\nWindow.prototype.sidebar;\\n\\n/**\\n * @type {?string}\\n * @see https://developer.mozilla.org/en/DOM/window.status\\n */\\nWindow.prototype.status;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.statusbar */\\nWindow.prototype.statusbar;\\n\\n/** @see https://developer.mozilla.org/en/DOM/window.toolbar */\\nWindow.prototype.toolbar;\\n\\n/**\\n * @type {!Window}\\n * @see https://developer.mozilla.org/en/DOM/window.self\\n */\\nWindow.prototype.top;\\n\\n/**\\n * @type {!Window}\\n * @see https://developer.mozilla.org/en/DOM/window.self\\n */\\nWindow.prototype.window;\\n\\n/**\\n * @param {*} message\\n * @see https://developer.mozilla.org/en/DOM/window.alert\\n * @return {undefined}\\n */\\nWindow.prototype.alert = function(message) {};\\n\\n/**\\n * Decodes a string of data which has been encoded using base-64 encoding.\\n *\\n * @param {string} encodedData\\n * @return {string}\\n * @see https://developer.mozilla.org/en/DOM/window.atob\\n * @nosideeffects\\n */\\nfunction atob(encodedData) {}\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.back\\n * @return {undefined}\\n */\\nWindow.prototype.back = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.blur\\n * @return {undefined}\\n */\\nWindow.prototype.blur = function() {};\\n\\n/**\\n * @param {string} stringToEncode\\n * @return {string}\\n * @see https://developer.mozilla.org/en/DOM/window.btoa\\n * @nosideeffects\\n */\\nfunction btoa(stringToEncode) {}\\n\\n/** @deprecated */\\nWindow.prototype.captureEvents;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.close\\n * @return {undefined}\\n */\\nWindow.prototype.close = function() {};\\n\\n/**@see https://developer.mozilla.org/en/DOM/window.find */\\nWindow.prototype.find;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.focus\\n * @return {undefined}\\n */\\nWindow.prototype.focus = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.forward\\n * @return {undefined}\\n */\\nWindow.prototype.forward = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.getAttention\\n * @return {undefined}\\n */\\nWindow.prototype.getAttention = function() {};\\n\\n/**\\n * @return {Selection}\\n * @see https://developer.mozilla.org/en/DOM/window.getSelection\\n * @nosideeffects\\n */\\nWindow.prototype.getSelection = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/window.home\\n * @return {undefined}\\n */\\nWindow.prototype.home = function() {};\\n\\nWindow.prototype.openDialog;\\nWindow.prototype.releaseEvents;\\nWindow.prototype.scrollByLines;\\nWindow.prototype.scrollByPages;\\n\\n/**\\n * @param {string} uri\\n * @param {?=} opt_arguments\\n * @param {string=} opt_options\\n * @see https://developer.mozilla.org/en/DOM/window.showModalDialog\\n */\\nWindow.prototype.showModalDialog;\\n\\nWindow.prototype.sizeToContent;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536769(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.stop = function() {};\\n\\nWindow.prototype.updateCommands;\\n\\n// properties of Document\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.alinkColor\\n * @type {string}\\n */\\nDocument.prototype.alinkColor;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.anchors\\n * @type {HTMLCollection}\\n */\\nDocument.prototype.anchors;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.applets\\n * @type {HTMLCollection}\\n */\\nDocument.prototype.applets;\\n/** @type {boolean} */ Document.prototype.async;\\n/** @type {string?} */ Document.prototype.baseURI;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.bgColor\\n * @type {string}\\n */\\nDocument.prototype.bgColor;\\n\\n/** @type {HTMLBodyElement} */ Document.prototype.body;\\nDocument.prototype.characterSet;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.compatMode\\n * @type {string}\\n */\\nDocument.prototype.compatMode;\\n\\nDocument.prototype.contentType;\\n/** @type {string} */ Document.prototype.cookie;\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/defaultView\\n * @type {?Window}\\n */\\nDocument.prototype.defaultView;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.designMode\\n * @type {string}\\n */\\nDocument.prototype.designMode;\\n\\nDocument.prototype.documentURIObject;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.domain\\n * @type {string}\\n */\\nDocument.prototype.domain;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.embeds\\n * @type {HTMLCollection}\\n */\\nDocument.prototype.embeds;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.fgColor\\n * @type {string}\\n */\\nDocument.prototype.fgColor;\\n\\n/** @type {Element} */ Document.prototype.firstChild;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.forms\\n * @type {HTMLCollection}\\n */\\nDocument.prototype.forms;\\n\\n/** @type {number} */\\nDocument.prototype.height;\\n\\n/** @type {HTMLCollection} */\\nDocument.prototype.images;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/document.lastModified\\n */\\nDocument.prototype.lastModified;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/document.linkColor\\n */\\nDocument.prototype.linkColor;\\n\\n/**\\n * @see https://developer.mozilla.org/en/D';a.a+='OM/document.links\\n * @type {HTMLCollection<(!HTMLAreaElement|!HTMLAnchorElement)>}\\n */\\nDocument.prototype.links;\\n\\n/**\\n * @type {!Location}\\n * @implicitCast\\n */\\nDocument.prototype.location;\\n\\nDocument.prototype.namespaceURI;\\nDocument.prototype.nodePrincipal;\\nDocument.prototype.plugins;\\nDocument.prototype.popupNode;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/document.referrer\\n */\\nDocument.prototype.referrer;\\n\\n/**\\n * @type {StyleSheetList}\\n * @see https://developer.mozilla.org/en/DOM/document.styleSheets\\n */\\nDocument.prototype.styleSheets;\\n\\n/** @type {?string} */ Document.prototype.title;\\nDocument.prototype.tooltipNode;\\n/** @type {string} */ Document.prototype.URL;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/DOM/document.vlinkColor\\n */\\nDocument.prototype.vlinkColor;\\n\\n/** @type {number} */ Document.prototype.width;\\n\\n// Methods of Document\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.clear\\n * @return {undefined}\\n */\\nDocument.prototype.clear = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.close\\n */\\nDocument.prototype.close;\\n\\n/**\\n * @param {string} type\\n * @return {Event}\\n */\\nDocument.prototype.createEvent = function(type) {};\\nDocument.prototype.createNSResolver;\\n/** @return {Range} */ Document.prototype.createRange = function() {};\\nDocument.prototype.createTreeWalker;\\n\\nDocument.prototype.evaluate;\\n\\n/**\\n * @param {string} commandName\\n * @param {?boolean=} opt_showUi\\n * @param {*=} opt_value\\n * @see https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commands\\n */\\nDocument.prototype.execCommand;\\n\\n/**\\n * @param {string} name\\n * @return {!NodeList}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en/DOM/document.getElementsByClassName\\n */\\nDocument.prototype.getElementsByClassName = function(name) {};\\n\\n/**\\n * @param {string} uri\\n * @return {undefined}\\n */\\nDocument.prototype.load = function(uri) {};\\nDocument.prototype.loadOverlay;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.open\\n */\\nDocument.prototype.open;\\n\\n/**\\n * @see https://developer.mozilla.org/en/Midas\\n * @see http://msdn.microsoft.com/en-us/library/ms536676(VS.85).aspx\\n */\\nDocument.prototype.queryCommandEnabled;\\n\\n/**\\n * @see https://developer.mozilla.org/en/Midas\\n * @see http://msdn.microsoft.com/en-us/library/ms536678(VS.85).aspx\\n */\\nDocument.prototype.queryCommandIndeterm;\\n\\n/**\\n * @see https://developer.mozilla.org/en/Midas\\n * @see http://msdn.microsoft.com/en-us/library/ms536679(VS.85).aspx\\n */\\nDocument.prototype.queryCommandState;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.queryCommandSupported\\n * @see http://msdn.microsoft.com/en-us/library/ms536681(VS.85).aspx\\n * @param {string} command\\n * @return {?} Implementation-specific.\\n */\\nDocument.prototype.queryCommandSupported;\\n\\n/**\\n * @see https://developer.mozilla.org/en/Midas\\n * @see http://msdn.microsoft.com/en-us/library/ms536683(VS.85).aspx\\n */\\nDocument.prototype.queryCommandValue;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.write\\n * @param {string} text\\n * @return {undefined}\\n */\\nDocument.prototype.write = function(text) {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/document.writeln\\n * @param {string} text\\n * @return {undefined}\\n */\\nDocument.prototype.writeln = function(text) {};\\n\\nDocument.prototype.ononline;\\nDocument.prototype.onoffline;\\n\\n// XUL\\n/**\\n * @see http://developer.mozilla.org/en/DOM/document.getBoxObjectFor\\n * @return {BoxObject}\\n * @nosideeffects\\n */\\nDocument.prototype.getBoxObjectFor = function(element) {};\\n\\n// From:\\n// http://lxr.mozilla.org/mozilla1.8/source/dom/public/idl/range/nsIDOMNSRange.idl\\n\\n/**\\n * @param {string} tag\\n * @return {DocumentFragment}\\n */\\nRange.prototype.createContextualFragment;\\n\\n/**\\n * @param {Node} parent\\n * @param {number} offset\\n * @return {boolean}\\n * @nosideeffects\\n */\\nRange.prototype.isPointInRange;\\n\\n/**\\n * @param {Node} parent\\n * @param {number} offset\\n * @return {number}\\n * @nosideeffects\\n */\\nRange.prototype.comparePoint;\\n\\n/**\\n * @param {Node} n\\n * @return {boolean}\\n * @nosideeffects\\n */\\nRange.prototype.intersectsNode;\\n\\n/**\\n * @param {Node} n\\n * @return {number}\\n * @nosideeffects\\n */\\nRange.prototype.compareNode;\\n\\n\\n/** @constructor */\\nfunction Selection() {}\\n\\n/**\\n * @type {Node}\\n * @see https://developer.mozilla.org/en/DOM/Selection/anchorNode\\n */\\nSelection.prototype.anchorNode;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/en/DOM/Selection/anchorOffset\\n */\\nSelection.prototype.anchorOffset;\\n\\n/**\\n * @type {Node}\\n * @see https://developer.mozilla.org/en/DOM/Selection/focusNode\\n */\\nSelection.prototype.focusNode;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/en/DOM/Selection/focusOffset\\n */\\nSelection.prototype.focusOffset;\\n\\n/**\\n * @type {boolean}\\n * @see https://developer.mozilla.org/en/DOM/Selection/isCollapsed\\n */\\nSelection.prototype.isCollapsed;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/en/DOM/Selection/rangeCount\\n */\\nSelection.prototype.rangeCount;\\n\\n/**\\n * @param {Range} range\\n * @return {undefined}\\n * @see https://developer.mozilla.org/en/DOM/Selection/addRange\\n */\\nSelection.prototype.addRange = function(range) {};\\n\\n/**\\n * @param {number} index\\n * @return {Range}\\n * @see https://developer.mozilla.org/en/DOM/Selection/getRangeAt\\n * @nosideeffects\\n */\\nSelection.prototype.getRangeAt = function(index) {};\\n\\n/**\\n * @param {Node} node\\n * @param {number} index\\n * @return {undefined}\\n * @see https://developer.mozilla.org/en/DOM/Selection/collapse\\n */\\nSelection.prototype.collapse = function(node, index) {};\\n\\n/**\\n * @return {undefined}\\n * @see https://developer.mozilla.org/en/DOM/Selection/collapseToEnd\\n */\\nSelection.prototype.collapseToEnd = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see https://developer.mozilla.org/en/DOM/Selection/collapseToStart\\n */\\nSelection.prototype.collapseToStart = function() {};\\n\\n/**\\n * @param {Node} node\\n * @param {boolean} partlyContained\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en/DOM/Selection/containsNode\\n * @nosideeffects\\n */\\nSelection.prototype.containsNode = function(node, partlyContained) {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/Selection/deleteFromDocument\\n * @return {undefined}\\n */\\nSelection.prototype.deleteFromDocument = function() {};\\n\\n/**\\n * @param {Node} parentNode\\n * @param {number} offset\\n * @see https://developer.mozilla.org/en/DOM/Selection/extend\\n * @return {undefined}\\n */\\nSelection.prototype.extend = function(parentNode, offset) {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/Selection/removeAllRanges\\n * @return {undefined}\\n */\\nSelection.prototype.removeAllRanges = function() {};\\n\\n/**\\n * @param {Range} range\\n * @see https://developer.mozilla.org/en/DOM/Selection/removeRange\\n * @return {undefined}\\n */\\nSelection.prototype.removeRange = function(range) {};\\n\\n/**\\n * @param {Node} parentNode\\n * @see https://developer.mozilla.org/en/DOM/Selection/selectAllChildren\\n */\\nSelection.prototype.selectAllChildren;\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/Selection/selectionLanguageChange\\n */\\nSelection.prototype.selectionLanguageChange;\\n\\n/**\\n * @type {!NodeList}\\n * @see https://developer.mozilla.org/en/DOM/element.children\\n */\\nElement.prototype.children;\\n\\n/**\\n * Firebug sets this property on elements it is inserting into the DOM.\\n * @type {boolean}\\n */\\nElement.prototype.firebugIgnore;\\n\\n/**\\n * Note: According to the spec, id is actually defined on HTMLElement and\\n * SVGElement, rather than Element. Deliberately ignore this so that saying\\n * Element.id is allowed.\\n * @type {string}\\n * @implicitCast\\n */\\nElement.prototype.id;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Parsing/#widl-Element-innerHTML\\n * @implicitCast\\n */\\nElement.prototype.innerHTML;\\n\\n/**\\n * Note: According to the spec, name is defined on specific types of\\n * HTMLElements, rather than on Node, Element, or HTMLElement directly.\\n * Ignore this.\\n * @type {string}\\n */\\nElement.prototype.name;\\n\\nElement.prototype.nodePrincipal;\\n\\n/**\\n * @type {!CSSStyleDeclaration}\\n * This belongs on HTMLElement rather than Element, but that\\n * breaks a lot.\\n * TODO(rdcronin): Remove this declaration once the breakage is fixed.\\n */\\nElement.prototype.style;\\n\\n/**\\n * @override\\n * @return {!Element}\\n */\\nElement.prototype.cloneNode = function(deep) {};\\n\\n/** @return {undefined} */\\nElement.prototype.blur = function() {};\\n\\n/** @return {undefined} */\\nElement.prototype.click = function() {};\\n\\n/** @return {undefined} */\\nElement.prototype.focus = function() {};\\n\\n/** @type {number} */\\nHTMLInputElement.prototype.selectionStart;\\n\\n/** @type {number} */\\nHTMLInputElement.prototype.selectionEnd;\\n\\n/**\\n * @param {number} selectionStart\\n * @param {number} selectionEnd\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-textarea/input-setselectionrange\\n * @return {undefined}\\n */\\nHTMLInputElement.prototype.setSelectionRange =\\n function(selectionStart, selectionEnd) {};\\n\\n/** @type {number} */\\nHTMLTextAreaElement.prototype.selectionStart;\\n\\n/** @type {number} */\\nHTMLTextAreaElement.prototype.selectionEnd;\\n\\n/**\\n * @param {number} selectionStart\\n * @param {number} selectionEnd\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-textarea/input-setselectionrange\\n * @return {undefined}\\n */\\nHTMLTextAreaElement.prototype.setSelectionRange =\\n function(selectionStart, selectionEnd) {};\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.buildID\\n */\\nNavigator.prototype.buildID;\\n\\n/**\\n * @type {!Array|undefined}\\n * @see https://developer.mozilla.org/en/Navigator.languages\\n */\\nNavigator.prototype.languages;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.oscpu\\n */\\nNavigator.prototype.oscpu;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.productSub\\n */\\nNavigator.prototype.productSub;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.securityPolicy\\n */\\nNavigator.prototype.securityPolicy;\\n\\n/**\\n * @param {string} url\\n * @param {ArrayBufferView|Blob|string|FormData=} opt_data\\n * @return {boolean}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon\\n */\\nNavigator.prototype.sendBeacon = function(url, opt_data) {};\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.vendor\\n */\\nNavigator.prototype.vendor;\\n\\n/**\\n * @type {string}\\n * @see https://developer.mozilla.org/en/Navigator.vendorSub\\n */\\nNavigator.prototype.vendorSub;\\n\\n\\n/** @constructor */\\nfunction BoxObject() {}\\n\\n/** @type {Element} */\\nBoxObject.prototype.element;\\n\\n/** @type {number} */\\nBoxObject.prototype.screenX;\\n\\n/** @type {number} */\\nBoxObject.prototype.screenY;\\n\\n/** @type {number} */\\nBoxObject.prototype.x;\\n\\n/** @type {number} */\\nBoxObject.prototype.y;\\n\\n/** @type {number} */\\nBoxObject.prototype.width;\\n\\n\\n/**\\n * @param {Element} element\\n * @param {?string=} pseudoElt\\n * @return {?CSSStyleDeclaration}\\n * @nosideeffects\\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n */\\nfunction getComputedStyle(element, pseudoElt) {}\\n","externs/ie_dom.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over the\\n * W3C\'s DOM specification by IE in JScript. This file depends on\\n * w3c_dom2.js. The whole file has NOT been fully type annotated.\\n *\\n * When a non-standard extension appears in both Gecko and IE, we put\\n * it in gecko_dom.js\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n */\\n\\n// TODO(nicksantos): Rewrite all the DOM interfaces as interfaces, instead\\n// of kludging them as an inheritance hierarchy.\\n\\n/**\\n * @constructor\\n * @extends {Document}\\n * @see http://msdn.microsoft.com/en-us/library/ms757878(VS.85).aspx\\n */\\nfunction XMLDOMDocument() {}\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms761398(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.async;\\n\\n/**\\n * @type {!Function}\\n * @see http://msdn.microsoft.com/en-us/library/ms762647(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.ondataavailable;\\n\\n/**\\n * @type {!Function}\\n * @see http://msdn.microsoft.com/en-us/library/ms764640(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.onreadystatechange;\\n\\n/**\\n * @type {!Function}\\n * @see http://msdn.microsoft.com/en-us/library/ms753795(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.ontransformnode;\\n\\n/**\\n * @type {Object}\\n * @see http://msdn.microsoft.com/en-us/library/ms756041(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.parseError;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms761353(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.preserveWhiteSpace;\\n\\n/**\\n * @type {number}\\n * @see http://msdn.microsoft.com/en-us/library/ms753702(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.readyState;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms762283(VS.85).aspx\\n * @type {boolean}\\n */\\nXMLDOMDocument.prototype.resolveExternals;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms760290(v=vs.85).aspx\\n * @param {string} name\\n * @param {*} value\\n * @return {undefined}\\n */\\nXMLDOMDocument.prototype.setProperty = function(name, value) {};\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms767669(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.url;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms762791(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.validateOnParse;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms763830(VS.85).aspx\\n * @return {undefined}\\n */\\nXMLDOMDocument.prototype.abort = function() {};\\n\\n/**\\n * @param {*} type\\n * @param {string} name\\n * @param {string} namespaceURI\\n * @return {Node}\\n * @see http://msdn.microsoft.com/en-us/library/ms757901(VS.85).aspx\\n * @nosideeffects\\n */\\nXMLDOMDocument.prototype.createNode = function(type, name, namespaceURI) {};\\n\\n/**\\n * @param {string} xmlSource\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/ms762722(VS.85).aspx\\n * @override\\n */\\nXMLDOMDocument.prototype.load = function(xmlSource) {};\\n\\n/**\\n * @param {string} xmlString\\n * @return {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms754585(VS.85).aspx\\n * @override\\n */\\nXMLDOMDocument.prototype.loadXML = function(xmlString) {};\\n\\n/**\\n * @param {string} id\\n * @return {Node}\\n * @see http://msdn.microsoft.com/en-us/library/ms766397(VS.85).aspx\\n */\\nXMLDOMDocument.prototype.nodeFromID = function(id) {};\\n\\n//==============================================================================\\n// XMLNode methods and properties\\n// In a real DOM hierarchy, XMLDOMDocument inherits from XMLNode and Document.\\n// Since we can\'t express that in our type system, we put XMLNode properties\\n// on Node.\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms767570(VS.85).aspx\\n */\\nNode.prototype.baseName;\\n\\n/**\\n * @type {?string}\\n * @see http://msdn.microsoft.com/en-us/library/ms762763(VS.85).aspx\\n */\\nNode.prototype.dataType;\\n\\n/**\\n * @type {Node}\\n * @see http://msdn.microsoft.com/en-us/library/ms764733(VS.85).aspx\\n */\\nNode.prototype.definition;\\n\\n/**\\n * IE5 used document instead of ownerDocument.\\n * Old versions of WebKit used document instead of contentDocument.\\n * @type {Document}';a.a+="\\n */\\nNode.prototype.document;\\n\\n\\n/**\\n * Inserts the given HTML text into the element at the location.\\n * @param {string} sWhere Where to insert the HTML text, one of 'beforeBegin',\\n * 'afterBegin', 'beforeEnd', 'afterEnd'.\\n * @param {string} sText HTML text to insert.\\n * @see http://msdn.microsoft.com/en-us/library/ms536452(VS.85).aspx\\n * @return {undefined}\\n */\\nNode.prototype.insertAdjacentHTML = function(sWhere, sText) {};\\n\\n\\n/**\\n * @type {*}\\n * @see http://msdn.microsoft.com/en-us/library/ms762308(VS.85).aspx\\n */\\nNode.prototype.nodeTypedValue;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms757895(VS.85).aspx\\n */\\nNode.prototype.nodeTypeString;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms762237(VS.85).aspx\\n */\\nNode.prototype.parsed;\\n\\n/**\\n * @type {Element}\\n * @see http://msdn.microsoft.com/en-us/library/ms534327(VS.85).aspx\\n */\\nNode.prototype.parentElement;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms753816(VS.85).aspx\\n */\\nNode.prototype.specified;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms762687(VS.85).aspx\\n */\\nNode.prototype.text;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms755989(VS.85).aspx\\n */\\nNode.prototype.xml;\\n\\n/**\\n * @param {string} expression An XPath expression.\\n * @return {!NodeList}\\n * @see http://msdn.microsoft.com/en-us/library/ms754523(VS.85).aspx\\n * @nosideeffects\\n */\\nNode.prototype.selectNodes = function(expression) {};\\n\\n/**\\n * @param {string} expression An XPath expression.\\n * @return {Node}\\n * @see http://msdn.microsoft.com/en-us/library/ms757846(VS.85).aspx\\n * @nosideeffects\\n */\\nNode.prototype.selectSingleNode = function(expression) {};\\n\\n/**\\n * @param {Node} stylesheet XSLT stylesheet.\\n * @return {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms761399(VS.85).aspx\\n * @nosideeffects\\n */\\nNode.prototype.transformNode = function(stylesheet) {};\\n\\n/**\\n * @param {Node} stylesheet XSLT stylesheet.\\n * @param {Object} outputObject\\n * @see http://msdn.microsoft.com/en-us/library/ms766561(VS.85).aspx\\n * @return {Object}\\n */\\nNode.prototype.transformNodeToObject =\\n function(stylesheet, outputObject) {};\\n\\n//==============================================================================\\n// Node methods\\n\\n/**\\n * @param {boolean=} opt_bRemoveChildren Whether to remove the entire sub-tree.\\n * Defaults to false.\\n * @return {Node} The object that was removed.\\n * @see http://msdn.microsoft.com/en-us/library/ms536708(VS.85).aspx\\n */\\nNode.prototype.removeNode = function(opt_bRemoveChildren) {};\\n\\n/**\\n * @constructor\\n */\\nfunction ClipboardData() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx\\n * @param {string=} opt_type Type of clipboard data to clear. 'Text' or\\n * 'URL' or 'File' or 'HTML' or 'Image'.\\n * @return {undefined}\\n */\\nClipboardData.prototype.clearData = function(opt_type) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx\\n * @param {string} type Type of clipboard data to set ('Text' or 'URL').\\n * @param {string} data Data to set\\n * @return {boolean} Whether the data were set correctly.\\n */\\nClipboardData.prototype.setData = function(type, data) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx\\n * @param {string} type Type of clipboard data to get ('Text' or 'URL').\\n * @return {string} The current data\\n */\\nClipboardData.prototype.getData = function(type) { };\\n\\n/**\\n * @type {!Window}\\n * @see https://developer.mozilla.org/en/DOM/window\\n */\\nvar window;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535220(VS.85).aspx\\n * @type {ClipboardData}\\n */\\nWindow.prototype.clipboardData;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533724(VS.85).aspx\\n */\\nWindow.prototype.dialogHeight;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533725(VS.85).aspx\\n */\\nWindow.prototype.dialogLeft;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533726(VS.85).aspx\\n */\\nWindow.prototype.dialogTop;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533727(VS.85).aspx\\n */\\nWindow.prototype.dialogWidth;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535863(VS.85).aspx\\n */\\nWindow.prototype.event;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/cc197012(VS.85).aspx\\n */\\nWindow.prototype.maxConnectionsPer1_0Server;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/cc197013(VS.85).aspx\\n */\\nWindow.prototype.maxConnectionsPerServer;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534198(VS.85).aspx\\n */\\nWindow.prototype.offscreenBuffering;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534389(VS.85).aspx\\n * @type {number|undefined}\\n */\\nWindow.prototype.screenLeft;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534389(VS.85).aspx\\n * @type {number|undefined}\\n */\\nWindow.prototype.screenTop;\\n\\n// Functions\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/ms536343(VS.85).aspx\\n */\\nWindow.prototype.attachEvent;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536392(VS.85).aspx\\n */\\nWindow.prototype.createPopup;\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/ms536411(VS.85).aspx\\n */\\nWindow.prototype.detachEvent;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536420(VS.85).aspx\\n */\\nWindow.prototype.execScript;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536425(VS.85).aspx\\n */\\nWindow.prototype.focus;\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @see http://msdn.microsoft.com/en-us/library/ms536618(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.moveBy = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @see http://msdn.microsoft.com/en-us/library/ms536626(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.moveTo = function(x, y) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536638(VS.85).aspx\\n */\\nWindow.prototype.navigate;\\n\\n/**\\n * @param {*=} opt_url\\n * @param {string=} opt_windowName\\n * @param {string=} opt_windowFeatures\\n * @param {boolean=} opt_replace\\n * @return {Window}\\n * @see http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx\\n */\\nWindow.prototype.open = function(opt_url, opt_windowName, opt_windowFeatures,\\n opt_replace) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536672(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.print = function() {};\\n\\n/**\\n * @param {number} width\\n * @param {number} height\\n * @see http://msdn.microsoft.com/en-us/library/ms536722(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.resizeBy = function(width, height) {};\\n\\n/**\\n * @param {number} width\\n * @param {number} height\\n * @see http://msdn.microsoft.com/en-us/library/ms536723(VS.85).aspx\\n * @return {undefined}\\n */\\nWindow.prototype.resizeTo = function(width, height) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536738(VS.85).aspx\\n */\\nWindow.prototype.setActive;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536758(VS.85).aspx\\n */\\nWindow.prototype.showHelp;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536761(VS.85).aspx\\n */\\nWindow.prototype.showModelessDialog;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535246%28v=vs.85%29.aspx\\n * @const {!Object}\\n */\\nWindow.prototype.external;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx\\n * @param {number|string} delta The number of entries to go back, or\\n * the URL to which to go back. (URL form is supported only in IE)\\n * @return {undefined}\\n */\\nHistory.prototype.go = function(delta) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx\\n * @param {number=} opt_distance The number of entries to go back\\n * (Mozilla doesn't support distance -- use #go instead)\\n * @return {undefined}\\n */\\nHistory.prototype.back = function(opt_distance) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx\\n * @type {number}\\n */\\nHistory.prototype.length;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535864(VS.85).aspx\\n * @return {undefined}\\n */\\nHistory.prototype.forward = function() {};\\n\\n/**\\n * @type {boolean}\\n * @implicitCast\\n * @see http://msdn.microsoft.com/en-us/library/ie/ms533072(v=vs.85).aspx\\n */\\nHTMLFrameElement.prototype.allowTransparency;\\n\\n/**\\n * @type {Window}\\n * @see http://msdn.microsoft.com/en-us/library/ms533692(VS.85).aspx\\n */\\nHTMLFrameElement.prototype.contentWindow;\\n\\n/**\\n * @type {boolean}\\n * @implicitCast\\n * @see http://msdn.microsoft.com/en-us/library/ie/ms533072(v=vs.85).aspx\\n */\\nHTMLIFrameElement.prototype.allowTransparency;\\n\\n/**\\n * @type {Window}\\n * @see http://msdn.microsoft.com/en-us/library/ms533692(VS.85).aspx\\n */\\nHTMLIFrameElement.prototype.contentWindow;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536385(VS.85).aspx\\n */\\nHTMLBodyElement.prototype.createControlRange;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx\\n */\\nHTMLScriptElement.prototype.readyState;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx\\n */\\nHTMLIFrameElement.prototype.readyState;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx\\n */\\nHTMLImageElement.prototype.readyState;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx\\n */\\nHTMLObjectElement.prototype.readyState;\\n\\n\\n/**\\n * @constructor\\n */\\nfunction ControlRange() {}\\n\\nControlRange.prototype.add;\\nControlRange.prototype.addElement;\\nControlRange.prototype.execCommand;\\nControlRange.prototype.item;\\nControlRange.prototype.queryCommandEnabled;\\nControlRange.prototype.queryCommandIndeterm;\\nControlRange.prototype.queryCommandState;\\nControlRange.prototype.queryCommandSupported;\\nControlRange.prototype.queryCommandValue;\\nControlRange.prototype.remove;\\nControlRange.prototype.scrollIntoView;\\nControlRange.prototype.select;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/ms535872.aspx\\n */\\nfunction TextRange() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533538(VS.85).aspx\\n */\\nTextRange.prototype.boundingHeight;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533539(VS.85).aspx\\n */\\nTextRange.prototype.boundingLeft;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533540(VS.85).aspx\\n */\\nTextRange.prototype.boundingTop;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533541(VS.85).aspx\\n */\\nTextRange.prototype.boundingWidth;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533874(VS.85).aspx\\n */\\nTextRange.prototype.htmlText;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534200(VS.85).aspx\\n */\\nTextRange.prototype.offsetLeft;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534303(VS.85).aspx\\n */\\nTextRange.prototype.offsetTop;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534676(VS.85).aspx\\n */\\nTextRange.prototype.text;\\n\\n/**\\n * @param {boolean=} opt_toStart\\n * @see http://msdn.microsoft.com/en-us/library/ms536371(VS.85).aspx\\n */\\nTextRange.prototype.collapse;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536373(VS.85).aspx\\n */\\nTextRange.prototype.compareEndPoints;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536416(VS.85).aspx\\n */\\nTextRange.prototype.duplicate;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536419(VS.85).aspx\\n */\\nTextRange.prototype.execCommand;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536421(VS.85).aspx\\n */\\nTextRange.prototype.expand;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536422(VS.85).aspx\\n */\\nTextRange.prototype.findText;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536432(VS.85).aspx\\n */\\nTextRange.prototype.getBookmark;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536433(VS.85).aspx\\n */\\nTextRange.prototype.getBoundingClientRect;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536435(VS.85).aspx\\n */\\nTextRange.prototype.getClientRects;\\n\\n/**\\n * @param {TextRange|ControlRange} range\\n * @return {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms536450(VS.85).aspx\\n */\\nTextRange.prototype.inRange;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536458(VS.85).aspx\\n */\\nTextRange.prototype.isEqual;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536616(VS.85).aspx\\n */\\nTextRange.prototype.move;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536620(VS.85).aspx\\n */\\nTextRange.prototype.moveEnd;\\n\\n/**\\n * @param {string} unit\\n * @param {number=} opt_count\\n * @see http://msdn.microsoft.com/en-us/library/ms536623(VS.85).aspx\\n */\\nTextRange.prototype.moveStart;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536628(VS.85).aspx\\n */\\nTextRange.prototype.moveToBookmark;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536630(VS.85).aspx\\n */\\nTextRange.prototype.moveToElementText;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536632(VS.85).aspx\\n */\\nTextRange.prototype.moveToPoint;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536654(VS.85).aspx\\n * @return {?Element}\\n */\\nTextRange.prototype.parentElement;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536656(VS.85).aspx\\n */\\nTextRange.prototype.pasteHTML;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536676(VS.85).aspx\\n */\\nTextRange.prototype.queryCommandEnabled;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536678(VS.85).aspx\\n */\\nTextRange.prototype.queryCommandIndeterm;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536679(VS.85).aspx\\n */\\nTextRange.prototype.queryCommandState;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536681(VS.85).aspx\\n */\\nTextRange.prototype.queryCommandSupported;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536683(VS.85).aspx\\n */\\nTextRange.prototype.queryCommandValue;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536730(VS.85).aspx\\n */\\nTextRange.prototype.scrollIntoView;\\n\\n/**\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/ms536735(VS.85).aspx\\n */\\nTextRange.prototype.select = function() {};\\n\\n/**\\n * @param {string} how\\n * @param {TextRange|ControlRange} sourceRange\\n * @see http://msdn.microsoft.com/en-us/library/ms536745(VS.85).aspx\\n */\\nTextRange.prototype.setEndPoint;\\n\\n/**\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/ms536418(VS.85).aspx\\n */\\nSelection.prototype.clear = function() {};\\n\\n/**\\n * @return {TextRange|ControlRange}\\n * @see http://msdn.microsoft.com/en-us/library/ms536394(VS.85).aspx\\n */\\nSelection.prototype.createRange = function() {};\\n\\n/**\\n * @return {Array}\\n * @see http://msdn.microsoft.com/en-us/library/ms536396(VS.85).aspx\\n */\\nSelection.prototype.createRangeCollection = function() {};\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/ms537447(VS.85).aspx\\n */\\nfunction controlRange() {}\\n\\n\\nDocument.prototype.loadXML;\\n\\n\\n// http://msdn.microsoft.com/en-us/library/ms531073(VS.85).aspx\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533065(VS.85).aspx\\n */\\nDocument.prototype.activeElement;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533553(VS.85).aspx\\n */\\nDocument.prototype.charset;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533693(VS.85).aspx\\n */\\nDocument.prototype.cookie;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533714(VS.85).aspx\\n */\\nDocument.prototype.defaultCharset;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533731(VS.85).aspx\\n */\\nDocument.prototype.dir;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/cc196988(VS.85).aspx\\n */\\nDocument.prototype.documentMode;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533747(VS.85).aspx\\n */\\nDocument.prot";a.a+='otype.expando;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533750(VS.85).aspx\\n */\\nDocument.prototype.fileCreatedDate;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533751(VS.85).aspx\\n */\\nDocument.prototype.fileModifiedDate;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533752(VS.85).aspx\\n */\\nDocument.prototype.fileSize;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534331(VS.85).aspx\\n * @type {?Window}\\n */\\nDocument.prototype.parentWindow;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534353(VS.85).aspx\\n */\\nDocument.prototype.protocol;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534359(VS.85).aspx\\n */\\nHTMLDocument.prototype.readyState;\\n\\n/**\\n * @type {Selection}\\n * @see http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx\\n */\\nDocument.prototype.selection;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534704(VS.85).aspx\\n */\\nDocument.prototype.uniqueID;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534709(VS.85).aspx\\n */\\nDocument.prototype.URLUnencoded;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535155(VS.85).aspx\\n */\\nDocument.prototype.XMLDocument;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535163(VS.85).aspx\\n */\\nDocument.prototype.XSLDocument;\\n\\n// functions\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/ms536343(VS.85).aspx\\n */\\nDocument.prototype.attachEvent;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536390(VS.85).aspx\\n */\\nDocument.prototype.createEventObject;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx\\n */\\nDocument.prototype.createStyleSheet;\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/ms536411(VS.85).aspx\\n */\\nDocument.prototype.detachEvent;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536425(VS.85).aspx\\n */\\nDocument.prototype.focus;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536447(VS.85).aspx\\n * @return {boolean}\\n */\\nDocument.prototype.hasFocus = function() {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536614(VS.85).aspx\\n */\\nDocument.prototype.mergeAttributes;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536685(VS.85).aspx\\n */\\nDocument.prototype.recalc;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536689(VS.85).aspx\\n */\\nDocument.prototype.releaseCapture;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536738(VS.85).aspx\\n */\\nDocument.prototype.setActive;\\n\\n\\n// collections\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537434(VS.85).aspx\\n */\\nDocument.prototype.all;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537445(VS.85).aspx\\n */\\nDocument.prototype.childNodes;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537459(VS.85).aspx\\n */\\nDocument.prototype.frames;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537470(VS.85).aspx\\n */\\nDocument.prototype.namespaces;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537487(VS.85).aspx\\n * @type {!HTMLCollection}\\n */\\nDocument.prototype.scripts;\\n\\n/**\\n * @param {string} sUrl\\n * @return {number}\\n * @see http://msdn.microsoft.com/en-us/library/ms535922(VS.85).aspx\\n */\\nElement.prototype.addBehavior = function(sUrl) {};\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/mm536343(v=vs.85).aspx\\n */\\nElement.prototype.attachEvent;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms533546(VS.85).aspx\\n */\\nElement.prototype.canHaveChildren;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms533559(v=vs.85).aspx\\n */\\nElement.prototype.classid;\\n\\n/**\\n * @param {number} iCoordX Integer that specifies the client window coordinate\\n * of x.\\n * @param {number} iCoordY Integer that specifies the client window coordinate\\n * of y.\\n * @return {string} The component of an element located at the specified\\n * coordinates.\\n * @see http://msdn.microsoft.com/en-us/library/ms536375(VS.85).aspx\\n * @nosideeffects\\n */\\nElement.prototype.componentFromPoint = function(iCoordX, iCoordY) {};\\n\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms533690(VS.85).aspx\\n */\\nElement.prototype.contentEditable;\\n\\n/**\\n * @return {TextRange}\\n * @see http://msdn.microsoft.com/en-us/library/ms536401(VS.85).aspx\\n */\\nElement.prototype.createTextRange;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms535231(VS.85).aspx\\n * @type {?CSSStyleDeclaration}\\n */\\nElement.prototype.currentStyle;\\n\\n/**\\n * @param {string} event\\n * @param {Function} handler\\n * @see http://msdn.microsoft.com/en-us/library/ie/ms536411(v=vs.85).aspx\\n */\\nElement.prototype.detachEvent;\\n\\n/**\\n * @param {string=} opt_action\\n * @see http://msdn.microsoft.com/en-us/library/ms536414%28VS.85%29.aspx\\n * @return {undefined}\\n */\\nElement.prototype.doScroll = function(opt_action) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536423(VS.85).aspx\\n */\\nElement.prototype.fireEvent;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms533783(VS.85).aspx\\n */\\nElement.prototype.hideFocus;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533899.aspx\\n */\\nElement.prototype.innerText;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537838(VS.85).aspx\\n */\\nElement.prototype.isContentEditable;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms531395(v=vs.85).aspx\\n * NOTE: Left untyped to avoid conflict with subclasses.\\n */\\nElement.prototype.load;\\n\\n/**\\n * @param {number} pointerId Id of the pointer that is assign to the element.\\n * @see http://msdn.microsoft.com/en-us/library/ie/hh771882(v=vs.85).aspx\\n * @return {undefined}\\n */\\nElement.prototype.msSetPointerCapture = function(pointerId) {};\\n\\n/**\\n * @param {number} pointerId\\n * @see http://msdn.microsoft.com/en-us/library/ie/hh771880.aspx\\n * @return {undefined}\\n */\\nElement.prototype.msReleasePointerCapture = function(pointerId) {};\\n\\n/**\\n * @type {?function(Event)}\\n * @see http://msdn.microsoft.com/en-us/library/ms536903(v=vs.85).aspx\\n */\\nElement.prototype.onbeforedeactivate;\\n\\n/**\\n * @type {?function(Event)}\\n * @see http://msdn.microsoft.com/en-us/library/ms536945(VS.85).aspx\\n */\\nElement.prototype.onmouseenter;\\n\\n/**\\n * @type {?function(Event)}\\n * @see http://msdn.microsoft.com/en-us/library/ms536946(VS.85).aspx\\n */\\nElement.prototype.onmouseleave;\\n\\n/**\\n * @type {?function(Event)}\\n * @see http://msdn.microsoft.com/en-us/library/ms536969(VS.85).aspx\\n */\\nElement.prototype.onselectstart;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/aa752326(VS.85).aspx\\n */\\nElement.prototype.outerHTML;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536689(VS.85).aspx\\n * @return {undefined}\\n */\\nElement.prototype.releaseCapture = function() {};\\n\\n/**\\n * @param {number} iID\\n * @return {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms536700(VS.85).aspx\\n */\\nElement.prototype.removeBehavior = function(iID) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/aa703996(VS.85).aspx\\n */\\nElement.prototype.runtimeStyle;\\n\\n/**\\n * @param {string} sStoreName The arbitrary name assigned to a persistent object\\n * in a UserData store.\\n * @see http://msdn.microsoft.com/en-us/library/ms531403(v=vs.85).aspx\\n * @return {undefined}\\n */\\nElement.prototype.save = function(sStoreName) {};\\n\\n/**\\n * @param {boolean=} opt_bContainerCapture Events originating in a container are\\n * captured by the container. Defaults to true.\\n * @see http://msdn.microsoft.com/en-us/library/ms536742(VS.85).aspx\\n * @return {undefined}\\n */\\nElement.prototype.setCapture = function(opt_bContainerCapture) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534635(VS.85).aspx\\n */\\nElement.prototype.sourceIndex;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms537840.aspx\\n */\\nElement.prototype.unselectable;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/aa752462(v=vs.85).aspx\\n */\\nfunction HTMLFiltersCollection() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/aa752463(v=vs.85).aspx\\n * @type {number}\\n */\\nHTMLFiltersCollection.prototype.length;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms537452(v=vs.85).aspx\\n * @type {HTMLFiltersCollection}\\n */\\nElement.prototype.filters;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/ms532853(v=vs.85).aspx\\n */\\nfunction HTMLFilter() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms532954(v=vs.85).aspx\\n * @return {undefined}\\n */\\nHTMLFilter.prototype.apply = function() {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLFilter}\\n * @see http://msdn.microsoft.com/en-us/library/ms532967(v=vs.85).aspx\\n */\\nfunction AlphaFilter() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms532910(v=vs.85).aspx\\n * @type {number}\\n */\\nAlphaFilter.prototype.Opacity;\\n\\n/**\\n * @constructor\\n * @extends {HTMLFilter}\\n * @see http://msdn.microsoft.com/en-us/library/ms532969(v=vs.85).aspx\\n */\\nfunction AlphaImageLoaderFilter() {}\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms532920(v=vs.85).aspx\\n * @type {string}\\n */\\nAlphaImageLoaderFilter.prototype.sizingMethod;\\n\\n/**\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/ms535866(VS.85).aspx\\n */\\nfunction Location() {}\\n\\n/**\\n * @see http://trac.webkit.org/changeset/113945\\n * @type {DOMStringList}\\n */\\nLocation.prototype.ancestorOrigins;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533775(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.hash;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533784(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.host;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533785(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.hostname;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms533867(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.href;\\n\\n/**\\n * @see https://docs.google.com/document/view?id=1r_VTFKApVOaNIkocrg0z-t7lZgzisTuGTXkdzAk4gLU&hl=en\\n * @type {string}\\n */\\nLocation.prototype.origin;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534332(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.pathname;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534342(VS.85).aspx\\n */\\nLocation.prototype.port;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534353(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.protocol;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms534620(VS.85).aspx\\n * @type {string}\\n */\\nLocation.prototype.search;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ms536342(VS.85).aspx\\n * @param {string} url\\n * @return {undefined}\\n */\\nLocation.prototype.assign = function(url) {};\\n\\n/**\\n * @param {boolean=} opt_forceReload If true, reloads the page from\\n * the server. Defaults to false.\\n * @see http://msdn.microsoft.com/en-us/library/ms536691(VS.85).aspx\\n * @return {undefined}\\n */\\nLocation.prototype.reload = function(opt_forceReload) {};\\n\\n/**\\n * @param {string} url\\n * @see http://msdn.microsoft.com/en-us/library/ms536712(VS.85).aspx\\n * @return {undefined}\\n */\\nLocation.prototype.replace = function(url) {};\\n\\n\\n// For IE, returns an object representing key-value pairs for all the global\\n// variables prefixed with str, e.g. test*\\n\\n/** @param {*=} opt_str\\n */\\nfunction RuntimeObject(opt_str) {}\\n\\n\\n/**\\n * @type {StyleSheet}\\n * @see http://msdn.microsoft.com/en-us/library/dd347030(VS.85).aspx\\n */\\nHTMLStyleElement.prototype.styleSheet;\\n\\n\\n/**\\n * IE implements Cross Origin Resource Sharing (cross-domain XMLHttpRequests)\\n * via the XDomainRequest object.\\n *\\n * @constructor\\n * @see http://msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx\\n * @see http://www.w3.org/TR/cors/\\n */\\nfunction XDomainRequest() {}\\n\\n/**\\n * Aborts the request.\\n * @see http://msdn.microsoft.com/en-us/library/cc288129(v=vs.85).aspx\\n * @return {undefined}\\n */\\nXDomainRequest.prototype.abort = function() {};\\n\\n/**\\n * Sets the method and URL for the request.\\n * @param {string} bstrMethod Either \\"GET\\" or \\"POST\\"\\n * @param {string} bstrUrl The target URL\\n * @see http://msdn.microsoft.com/en-us/library/cc288168(v=vs.85).aspx\\n * @return {undefined}\\n */\\nXDomainRequest.prototype.open = function(bstrMethod, bstrUrl) {};\\n\\n/**\\n * Sends the request.\\n * @param {string=} varBody The POST body to send to the server. If omitted,\\n * the behavior is identical to sending an empty string.\\n * @see http://msdn.microsoft.com/en-us/library/cc288207(v=vs.85).aspx\\n * @return {undefined}\\n */\\nXDomainRequest.prototype.send = function(varBody) {};\\n\\n/**\\n * Called if the request could not be completed. Note that error information is\\n * not available.\\n * @see http://msdn.microsoft.com/en-us/library/ms536930%28v=VS.85%29.aspx\\n * @type {?function()}\\n */\\nXDomainRequest.prototype.onerror;\\n\\n/**\\n * Called when the response has finished.\\n * @see http://msdn.microsoft.com/en-us/library/ms536942%28v=VS.85%29.aspx\\n * @type {?function()}\\n */\\nXDomainRequest.prototype.onload;\\n\\n/**\\n * Called every time part of the response has been received.\\n * @see http://msdn.microsoft.com/en-us/library/cc197058%28v=VS.85%29.aspx\\n * @type {?function()}\\n */\\nXDomainRequest.prototype.onprogress;\\n\\n/**\\n * Called if the timeout period has elapsed.\\n * @see http://msdn.microsoft.com/en-us/library/cc197061%28v=VS.85%29.aspx\\n * @type {?function()}\\n */\\nXDomainRequest.prototype.ontimeout;\\n\\n/**\\n * The current response body.\\n * @see http://msdn.microsoft.com/en-us/library/cc287956%28v=VS.85%29.aspx\\n * @type {string}\\n */\\nXDomainRequest.prototype.responseText;\\n\\n/**\\n * The timeout (in milliseconds) for the request.\\n * @type {number}\\n */\\nXDomainRequest.prototype.timeout;\\n\\n/**\\n * The Content-Type of the response, or an empty string.\\n * @type {string}\\n */\\nXDomainRequest.prototype.contentType;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms533542(v=vs.85).aspx\\n */\\nNavigator.prototype.browserLanguage;\\n\\n/**\\n * @type {number}\\n * @see https://msdn.microsoft.com/en-us/library/ie/hh772144(v=vs.85).aspx\\n */\\nNavigator.prototype.msMaxTouchPoints;\\n\\n/**\\n * @type {boolean}\\n * @see http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx\\n */\\nNavigator.prototype.msPointerEnabled;\\n\\n/**\\n * @param {(!File|!Blob)} blob\\n * @param {string=} opt_defaultName\\n * @return {boolean}\\n * @see https://msdn.microsoft.com/en-us/library/hh772331(v=vs.85).aspx\\n */\\nNavigator.prototype.msSaveBlob = function(blob, opt_defaultName) {};\\n\\n/**\\n * @param {(!File|!Blob)} blob\\n * @param {string=} opt_defaultName\\n * @return {boolean}\\n * @see https://msdn.microsoft.com/en-us/library/hh772332(v=vs.85).aspx\\n */\\nNavigator.prototype.msSaveOrOpenBlob = function(blob, opt_defaultName) {};\\n\\n/**\\n * @type {number}\\n * @see http://msdn.microsoft.com/en-us/library/ms533721(v=vs.85).aspx\\n */\\nScreen.prototype.deviceXDPI;\\n\\n/**\\n * @type {number}\\n * @see http://msdn.microsoft.com/en-us/library/ms534128%28v=vs.85%29.aspx\\n */\\nScreen.prototype.logicalXDPI;\\n\\n/**\\n * @type {number}\\n * @see http://msdn.microsoft.com/en-us/library/ms534130%28v=vs.85%29.aspx\\n */\\nScreen.prototype.logicalYDPI;\\n","externs/webkit_dom.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Defini';a.a+='tions for all the extensions over W3C\'s DOM\\n * specification by WebKit. This file depends on w3c_dom2.js.\\n * All the provided definitions has been type annotated\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n\\n/**\\n * @param {boolean=} opt_center\\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=403510\\n * @return {undefined}\\n */\\nElement.prototype.scrollIntoViewIfNeeded = function(opt_center) {};\\n\\n/**\\n * @constructor\\n * @see https://cs.chromium.org/search/?q=%22interface+MemoryInfo%22+file:idl+file:WebKit+package:chromium&type=cs\\n */\\nfunction MemoryInfo() {};\\n\\n/** @type {number} */\\nMemoryInfo.prototype.totalJSHeapSize;\\n\\n/** @type {number} */\\nMemoryInfo.prototype.usedJSHeapSize;\\n\\n/** @type {number} */\\nMemoryInfo.prototype.jsHeapSizeLimit;\\n\\n/**\\n * @constructor\\n * @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfileNode.idl\\n */\\nfunction ScriptProfileNode() {};\\n\\n/** @type {string} */\\nScriptProfileNode.prototype.functionName;\\n\\n/** @type {string} */\\nScriptProfileNode.prototype.url;\\n\\n/** @type {number} */\\nScriptProfileNode.prototype.lineNumber;\\n\\n/** @type {number} */\\nScriptProfileNode.prototype.totalTime;\\n\\n/** @type {number} */\\nScriptProfileNode.prototype.selfTime;\\n\\n/** @type {number} */\\nScriptProfileNode.prototype.numberOfCalls;\\n\\n/** @type {Array} */\\nScriptProfileNode.prototype.children;\\n\\n/** @type {boolean} */\\nScriptProfileNode.prototype.visible;\\n\\n/** @type {number} */\\nScriptProfileNode.prototype.callUID;\\n\\n/**\\n * @constructor\\n * @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfile.idl\\n */\\nfunction ScriptProfile() {};\\n\\n/** @type {string} */\\nScriptProfile.prototype.title;\\n\\n/** @type {number} */\\nScriptProfile.prototype.uid;\\n\\n/** @type {ScriptProfileNode} */\\nScriptProfile.prototype.head;\\n\\n/**\\n * @constructor\\n * @see https://console.spec.whatwg.org/\\n */\\nfunction Console() {};\\n\\n/**\\n * @param {*} condition\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.assert = function(condition, var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.error = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.info = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.log = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.warn = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.debug = function(var_args) {};\\n\\n/**\\n * @param {*} value\\n * @return {undefined}\\n */\\nConsole.prototype.dir = function(value) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.dirxml = function(var_args) {};\\n\\n/**\\n * @param {!Object} data\\n * @param {*=} opt_columns\\n * @return {undefined}\\n */\\nConsole.prototype.table = function(data, opt_columns) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.trace = function(var_args) {};\\n\\n/**\\n * @param {*} value\\n * @return {undefined}\\n */\\nConsole.prototype.count = function(value) {};\\n\\n/**\\n * @param {*} value\\n * @return {undefined}\\n */\\nConsole.prototype.markTimeline = function(value) {};\\n\\n/**\\n * @param {string=} opt_title\\n * @return {undefined}\\n */\\nConsole.prototype.profile = function(opt_title) {};\\n\\n/** @type {Array} */\\nConsole.prototype.profiles;\\n\\n/**\\n * @param {string=} opt_title\\n * @return {undefined}\\n */\\nConsole.prototype.profileEnd = function(opt_title) {};\\n\\n/**\\n * @param {string} name\\n * @return {undefined}\\n */\\nConsole.prototype.time = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @return {undefined}\\n */\\nConsole.prototype.timeEnd = function(name) {};\\n\\n/**\\n * @param {*} value\\n * @return {undefined}\\n */\\nConsole.prototype.timeStamp = function(value) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.group = function(var_args) {};\\n\\n/**\\n * @param {...*} var_args\\n * @return {undefined}\\n */\\nConsole.prototype.groupCollapsed = function(var_args) {};\\n\\nConsole.prototype.groupEnd = function() {};\\n\\nConsole.prototype.clear = function() {};\\n\\n/** @type {MemoryInfo} */\\nConsole.prototype.memory;\\n\\n/** @type {!Console} */\\nWindow.prototype.console;\\n\\n/**\\n * @type {!Console}\\n * @suppress {duplicate}\\n */\\nvar console;\\n\\n/**\\n * @type {number}\\n * @see http://developer.android.com/reference/android/webkit/WebView.html\\n */\\nWindow.prototype.devicePixelRatio;\\n\\n/** @type {Node} */\\nSelection.prototype.baseNode;\\n\\n/** @type {number} */\\nSelection.prototype.baseOffset;\\n\\n/** @type {Node} */\\nSelection.prototype.extentNode;\\n\\n/** @type {number} */\\nSelection.prototype.extentOffset;\\n\\n/** @type {string} */\\nSelection.prototype.type;\\n\\n/**\\n * @return {undefined}\\n */\\nSelection.prototype.empty = function() {};\\n\\n/**\\n * @param {Node} baseNode\\n * @param {number} baseOffset\\n * @param {Node} extentNode\\n * @param {number} extentOffset\\n * @return {undefined}\\n */\\nSelection.prototype.setBaseAndExtent =\\n function(baseNode, baseOffset, extentNode, extentOffset) {};\\n\\n/**\\n * @param {string} alter\\n * @param {string} direction\\n * @param {string} granularity\\n * @return {undefined}\\n */\\nSelection.prototype.modify = function(alter, direction, granularity) {};\\n\\n/**\\n * @param {Element} element\\n * @param {string} pseudoElement\\n * @param {boolean=} opt_authorOnly\\n * @return {CSSRuleList}\\n * @nosideeffects\\n */\\nViewCSS.prototype.getMatchedCSSRules =\\n function(element, pseudoElement, opt_authorOnly) {};\\n\\n/**\\n * @param {string} contextId\\n * @param {string} name\\n * @param {number} width\\n * @param {number} height\\n * @nosideeffects\\n * @return {undefined}\\n */\\nDocument.prototype.getCSSCanvasContext =\\n function(contextId, name, width, height) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {?Range}\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint\\n */\\nDocument.prototype.caretRangeFromPoint = function(x, y) {};\\n","externs/w3c_css.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s CSS specification\\n * The whole file has been fully type annotated.\\n * http://www.w3.org/TR/DOM-Level-2-Style/css.html\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n *\\n * TODO(nicksantos): When there are no more occurrences of w3c_range.js and\\n * gecko_dom.js being included directly in BUILD files, bug dbeam to split the\\n * bottom part of this file into a separate externs.\\n */\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet\\n */\\nfunction StyleSheet() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-type\\n */\\nStyleSheet.prototype.type;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-disabled\\n */\\nStyleSheet.prototype.disabled;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-owner\\n */\\nStyleSheet.prototype.ownerNode;\\n\\n/**\\n * @type {StyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-parentStyleSheet\\n */\\nStyleSheet.prototype.parentStyleSheet;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-href\\n */\\nStyleSheet.prototype.href;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-title\\n */\\nStyleSheet.prototype.title;\\n\\n/**\\n * @type {MediaList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-media\\n */\\nStyleSheet.prototype.media;\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheetList\\n */\\nfunction StyleSheetList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheetList-length\\n */\\nStyleSheetList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {StyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheetList-item\\n */\\nStyleSheetList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-MediaList\\n */\\nfunction MediaList() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-MediaList-mediaText\\n */\\nMediaList.prototype.mediaText;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-MediaList-length\\n */\\nMediaList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-MediaList-item\\n */\\nMediaList.prototype.item = function(index) {};\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-LinkStyle\\n */\\nfunction LinkStyle() {}\\n\\n/**\\n * @type {StyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-LinkStyle-sheet\\n */\\nLinkStyle.prototype.sheet;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-DocumentStyle\\n */\\nfunction DocumentStyle() {}\\n\\n/**\\n * @type {StyleSheetList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet-DocumentStyle-styleSheets\\n */\\nDocumentStyle.prototype.styleSheets;\\n\\n/**\\n * @constructor\\n * @extends {StyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet\\n */\\nfunction CSSStyleSheet() {}\\n\\n/**\\n * @type {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-ownerRule\\n */\\nCSSStyleSheet.prototype.ownerRule;\\n\\n/**\\n * @type {CSSRuleList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-cssRules\\n */\\nCSSStyleSheet.prototype.cssRules;\\n\\n/**\\n * @param {string} rule\\n * @param {number} index\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule\\n */\\nCSSStyleSheet.prototype.insertRule = function(rule, index) {};\\n\\n/**\\n * @param {number} index\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule\\n * @return {undefined}\\n */\\nCSSStyleSheet.prototype.deleteRule = function(index) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRuleList\\n */\\nfunction CSSRuleList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRuleList-length\\n */\\nCSSRuleList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRuleList-item\\n */\\nCSSRuleList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule\\n */\\nfunction CSSRule() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-cssText\\n */\\nCSSRule.prototype.cssText;\\n\\n/**\\n * @type {CSSStyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-sheet\\n */\\nCSSRule.prototype.parentStyleSheet;\\n\\n/**\\n * @type {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-parentRule\\n */\\nCSSRule.prototype.parentRule;\\n\\n/**\\n * @type {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule\\n */\\nCSSRule.prototype.style;\\n\\n/**\\n * Indicates that the rule is a {@see CSSUnknownRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.UNKNOWN_RULE = 0;\\n\\n/**\\n * Indicates that the rule is a {@see CSSStyleRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.STYLE_RULE = 1;\\n\\n/**\\n * Indicates that the rule is a {@see CSSCharsetRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.CHARSET_RULE = 2;\\n\\n/**\\n * Indicates that the rule is a {@see CSSImportRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.IMPORT_RULE = 3;\\n\\n/**\\n * Indicates that the rule is a {@see CSSMediaRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.MEDIA_RULE = 4;\\n\\n/**\\n * Indicates that the rule is a {@see CSSFontFaceRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.FONT_FACE_RULE = 5;\\n\\n/**\\n * Indicates that the rule is a {@see CSSPageRule}.\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule-ruleType\\n */\\nCSSRule.PAGE_RULE = 6;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule\\n */\\nfunction CSSStyleRule() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule-selectorText\\n */\\nCSSStyleRule.prototype.selectorText;\\n\\n/**\\n * @type {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule-style\\n */\\nCSSStyleRule.prototype.style;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule\\n */\\nfunction CSSMediaRule() {}\\n\\n/**\\n * @type {MediaList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule-mediaTypes\\n */\\nCSSMediaRule.prototype.media;\\n\\n/**\\n * @type {CSSRuleList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule-cssRules\\n */\\nCSSMediaRule.prototype.cssRules;\\n\\n/**\\n * @param {string} rule\\n * @param {number} index\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule-insertRule\\n */\\nCSSMediaRule.prototype.insertRule = function(rule, index) {};\\n\\n/**\\n * @param {number} index\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule-deleteRule\\n * @return {undefined}\\n */\\nCSSMediaRule.prototype.deleteRule = function(index) {};\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSFontFaceRule\\n */\\nfunction CSSFontFaceRule() {}\\n\\n/**\\n * @type {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSFontFaceRule-style\\n */\\nCSSFontFaceRule.prototype.style;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPageRule\\n */\\nfunction CSSPageRule() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPageRule-name\\n */\\nCSSPageRule.prototype.selectorText;\\n\\n/**\\n * @type {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPageRule-style\\n */\\nCSSPageRule.prototype.style;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule\\n */\\nfunction CSSImp';a.a+='ortRule() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule-href\\n */\\nCSSImportRule.prototype.href;\\n\\n/**\\n * @type {MediaList}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule-media\\n */\\nCSSImportRule.prototype.media;\\n\\n/**\\n * @type {CSSStyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule-styleSheet\\n */\\nCSSImportRule.prototype.styleSheet;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSCharsetRule\\n */\\nfunction CSSCharsetRule() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSCharsetRule-encoding\\n */\\nCSSCharsetRule.prototype.encoding;\\n\\n/**\\n * @constructor\\n * @extends {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSUnknownRule\\n */\\nfunction CSSUnknownRule() {}\\n\\n/**\\n * @constructor\\n * @extends {CSSProperties}\\n * @implements {IObject<(string|number), string>}\\n * @implements {IArrayLike}\\n * @implements {Iterable}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration\\n */\\nfunction CSSStyleDeclaration() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-cssText\\n */\\nCSSStyleDeclaration.prototype.cssText;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-length\\n */\\nCSSStyleDeclaration.prototype.length;\\n\\n/**\\n * @type {CSSRule}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-parentRule\\n */\\nCSSStyleDeclaration.prototype.parentRule;\\n\\n/**\\n * @param {string} propertyName\\n * @return {CSSValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyCSSValue\\n */\\nCSSStyleDeclaration.prototype.getPropertyCSSValue = function(propertyName) {};\\n\\n/**\\n * @param {string} propertyName\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyPriority\\n */\\nCSSStyleDeclaration.prototype.getPropertyPriority = function(propertyName) {};\\n\\n/**\\n * @param {string} propertyName\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue\\n */\\nCSSStyleDeclaration.prototype.getPropertyValue = function(propertyName) {};\\n\\n/**\\n * @param {number} index\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item\\n */\\nCSSStyleDeclaration.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} propertyName\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty\\n */\\nCSSStyleDeclaration.prototype.removeProperty = function(propertyName) {};\\n\\n/**\\n * @param {string} propertyName\\n * @param {string} value\\n * @param {string=} opt_priority\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty\\n */\\nCSSStyleDeclaration.prototype.setProperty = function(propertyName, value, opt_priority) {};\\n\\n// IE-specific\\n\\n/**\\n * @param {string} name\\n * @param {number=} opt_flags\\n * @return {string|number|boolean|null}\\n * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx\\n */\\nCSSStyleDeclaration.prototype.getAttribute = function(name, opt_flags) {};\\n\\n/**\\n * @param {string} name\\n * @return {string|number|boolean|null}\\n * @see http://msdn.microsoft.com/en-us/library/aa358797(VS.85).aspx\\n */\\nCSSStyleDeclaration.prototype.getExpression = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @param {number=} opt_flags\\n * @return {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/ms536696(VS.85).aspx\\n */\\nCSSStyleDeclaration.prototype.removeAttribute =\\n function(name, opt_flags) {};\\n\\n/**\\n * @param {string} name\\n * @return {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/aa358798(VS.85).aspx\\n */\\nCSSStyleDeclaration.prototype.removeExpression = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @param {*} value\\n * @param {number=} opt_flags\\n * @see http://msdn.microsoft.com/en-us/library/ms536739(VS.85).aspx\\n * @return {undefined}\\n */\\nCSSStyleDeclaration.prototype.setAttribute = function(name, value, opt_flags) {};\\n\\n/**\\n * @param {string} name\\n * @param {string} expr\\n * @param {string=} opt_language\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/ms531196(VS.85).aspx\\n */\\nCSSStyleDeclaration.prototype.setExpression =\\n function(name, expr, opt_language) {};\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue\\n */\\nfunction CSSValue() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-cssText\\n */\\nCSSValue.prototype.cssText;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-cssValueType\\n */\\nCSSValue.prototype.cssValueType;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types\\n */\\nCSSValue.CSS_INHERIT = 0;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types\\n */\\nCSSValue.CSS_PRIMITIVE_VALUE = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types\\n */\\nCSSValue.CSS_VALUE_LIST = 2;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue-types\\n */\\nCSSValue.CSS_CUSTOM = 3;\\n\\n/**\\n * @constructor\\n * @extends {CSSValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nfunction CSSPrimitiveValue() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.prototype.primitiveType;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_UNKNOWN = 0;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_NUMBER = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_PERCENTAGE = 2;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_EMS = 3;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_EXS = 4;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_PX = 5;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_CM = 6;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_MM = 7;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_IN = 8;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_PT = 9;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_PC = 10;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_DEG = 11;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_RAD = 12;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_GRAD = 13;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_MS = 14;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_S = 15;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_HZ = 16;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_KHZ = 17;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_DIMENSION = 18;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_STRING = 19;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_URI = 20;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_IDENT = 21;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_ATTR = 22;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_COUNTER = 23;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_RECT = 24;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue\\n */\\nCSSPrimitiveValue.CSS_RGBCOLOR = 25;\\n\\n/**\\n * @return {Counter}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-getCounterValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR}\\n */\\nCSSPrimitiveValue.prototype.getCounterValue = function() {};\\n\\n/**\\n * @param {number} unitType\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-getFloatValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR}\\n */\\nCSSPrimitiveValue.prototype.getFloatValue = function(unitType) {};\\n\\n/**\\n * @return {RGBColor}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-getRGBColorValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR}\\n */\\nCSSPrimitiveValue.prototype.getRGBColorValue = function() {};\\n\\n/**\\n * @return {Rect}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-getRectValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR}\\n */\\nCSSPrimitiveValue.prototype.getRectValue = function() {};\\n\\n/**\\n * @return {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-getStringValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR}\\n */\\nCSSPrimitiveValue.prototype.getStringValue = function() {};\\n\\n/**\\n * @param {number} unitType\\n * @param {number} floatValue\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-setFloatValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR},\\n * {@see DomException.NO_MODIFICATION_ALLOWED_ERR}\\n */\\nCSSPrimitiveValue.prototype.setFloatValue = function(unitType, floatValue) {};\\n\\n/**\\n * @param {number} stringType\\n * @param {string} stringValue\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-setStringValue\\n * @throws DOMException {@see DomException.INVALID_ACCESS_ERR},\\n * {@see DomException.NO_MODIFICATION_ALLOWED_ERR}\\n */\\nCSSPrimitiveValue.prototype.setStringValue = function(stringType, stringValue) {};\\n\\n/**\\n * @constructor\\n * @extends {CSSValue}\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValueList\\n */\\nfunction CSSValueList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValueList-length\\n */\\nCSSValueList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {CSSValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValueList-item\\n */\\nCSSValueList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor\\n */\\nfunction RGBColor() {}\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor-red\\n */\\nRGBColor.prototype.red;\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor-green\\n */\\nRGBColor.prototype.green;\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor-blue\\n */\\nRGBColor.prototype.blue;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect\\n */\\nfunction Rect() {}\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect-top\\n */\\nRect.prototype.top;\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect-right\\n */\\nRect.prototype.right;\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect-bottom\\n */\\nRect.prototype.bottom;\\n\\n/**\\n * @type {CSSPrimitiveValue}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Rect-left\\n */\\nRect.prototype.left;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Counter\\n */\\nfunction Counter() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Counter-identifier\\n */\\nCounter.prototype.identifier;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Counter-listStyle\\n */\\nCounter.prototype.listStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-Counter-separator\\n */\\nCounter.prototype.separator;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ViewCSS\\n */\\nfunction ViewCSS() {}\\n\\n/**\\n * @param {Element} elt\\n * @param {?string=} opt_pseudoElt This argument is required according to the\\n * CSS2 specification, but optional in all major browsers. See the note at\\n * https://developer.mozilla.org/en-US/docs/Web/API/Window.getComputedStyle\\n * @return {?CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSview-getComputedStyle\\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n */\\nViewCSS.prototype.getComputedStyle = function(elt, opt_pseudoElt) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-DocumentCSS\\n */\\nfunction DocumentCSS() {}\\n\\n/**\\n * @param {Element} elt\\n * @param {string} pseudoElt\\n * @return {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-DocumentCSS-getOverrideStyle\\n */\\nDocumentCSS.prototype.getOverrideStyle = function(elt, pseudoElt) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-DOMImplementationCSS\\n */\\nfunction DOMImplementationCSS() {}\\n\\n/**\\n * @param {string} title\\n * @param {string} media\\n * @return {CSSStyleSheet}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-DOMImplementationCSS-createCSSStyleSheet\\n * @throws DOMException {@see DomException.SYNTAX_ERR}\\n */\\nDOMImplementationCSS.prototype.createCSSStyleSheet = function(title, media) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle\\n */\\nfunction ElementCSSInlineStyle() {}\\n\\n/**\\n * @type {CSSStyleDeclaration}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle-style\\n */\\nElementCSSInlineStyle.prototype.style;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties\\n */\\nfunction CSSProperties() {}\\n\\n// CSS 2 properties\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-azimuth\\n */\\nCSSProperties.prototype.azimuth;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-background\\n */\\nCSSProperties.prototype';a.a+=".background;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-backgroundAttachment\\n */\\nCSSProperties.prototype.backgroundAttachment;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-backgroundColor\\n */\\nCSSProperties.prototype.backgroundColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-backgroundImage\\n */\\nCSSProperties.prototype.backgroundImage;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-backgroundPosition\\n */\\nCSSProperties.prototype.backgroundPosition;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-backgroundRepeat\\n */\\nCSSProperties.prototype.backgroundRepeat;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-background/#the-background-size\\n */\\nCSSProperties.prototype.backgroundSize;\\n\\n/**\\n * @implicitCast\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-border\\n */\\nCSSProperties.prototype.border;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderCollapse\\n */\\nCSSProperties.prototype.borderCollapse;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderColor\\n */\\nCSSProperties.prototype.borderColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderSpacing\\n */\\nCSSProperties.prototype.borderSpacing;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSPrimitiveValue-borderStyle\\n */\\nCSSProperties.prototype.borderStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderTop\\n */\\nCSSProperties.prototype.borderTop;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderRight\\n */\\nCSSProperties.prototype.borderRight;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderBottom\\n */\\nCSSProperties.prototype.borderBottom;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderLeft\\n */\\nCSSProperties.prototype.borderLeft;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderTopColor\\n */\\nCSSProperties.prototype.borderTopColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderRightColor\\n */\\nCSSProperties.prototype.borderRightColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderBottomColor\\n */\\nCSSProperties.prototype.borderBottomColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderLeftColor\\n */\\nCSSProperties.prototype.borderLeftColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderTopStyle\\n */\\nCSSProperties.prototype.borderTopStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderRightStyle\\n */\\nCSSProperties.prototype.borderRightStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderBottomStyle\\n */\\nCSSProperties.prototype.borderBottomStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderLeftStyle\\n */\\nCSSProperties.prototype.borderLeftStyle;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderTopWidth\\n */\\nCSSProperties.prototype.borderTopWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderRightWidth\\n */\\nCSSProperties.prototype.borderRightWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderBottomWidth\\n */\\nCSSProperties.prototype.borderBottomWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderLeftWidth\\n */\\nCSSProperties.prototype.borderLeftWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-borderWidth\\n */\\nCSSProperties.prototype.borderWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-radius\\n */\\nCSSProperties.prototype.borderRadius;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-radius\\n */\\nCSSProperties.prototype.borderBottomLeftRadius;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-radius\\n */\\nCSSProperties.prototype.borderBottomRightRadius;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-radius\\n */\\nCSSProperties.prototype.borderTopLeftRadius;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-radius\\n */\\nCSSProperties.prototype.borderTopRightRadius;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image-source\\n */\\nCSSProperties.prototype.borderImageSource;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image-slice\\n */\\nCSSProperties.prototype.borderImageSlice;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image-width\\n */\\nCSSProperties.prototype.borderImageWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image-outset\\n */\\nCSSProperties.prototype.borderImageOutset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image-repeat\\n */\\nCSSProperties.prototype.borderImageRepeat;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-background/#the-border-image\\n */\\nCSSProperties.prototype.borderImage;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/1998/REC-CSS2-19980512/visuren.html#propdef-bottom\\n */\\nCSSProperties.prototype.bottom;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-captionSide\\n */\\nCSSProperties.prototype.captionSide;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-clear\\n */\\nCSSProperties.prototype.clear;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-clip\\n */\\nCSSProperties.prototype.clip;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-color\\n */\\nCSSProperties.prototype.color;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-content\\n */\\nCSSProperties.prototype.content;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-counterIncrement\\n */\\nCSSProperties.prototype.counterIncrement;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-counterReset\\n */\\nCSSProperties.prototype.counterReset;\\n\\n/**\\n * This is not an official part of the W3C spec. In practice, this is a settable\\n * property that works cross-browser. It is used in goog.dom.setProperties() and\\n * needs to be extern'd so the --disambiguate_properties JS compiler pass works.\\n * @type {string}\\n */\\nCSSProperties.prototype.cssText;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-cue\\n */\\nCSSProperties.prototype.cue;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-cueAfter\\n */\\nCSSProperties.prototype.cueAfter;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-cueBefore\\n */\\nCSSProperties.prototype.cueBefore;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-cursor\\n */\\nCSSProperties.prototype.cursor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-direction\\n */\\nCSSProperties.prototype.direction;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-display\\n */\\nCSSProperties.prototype.display;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-elevation\\n */\\nCSSProperties.prototype.elevation;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-emptyCells\\n */\\nCSSProperties.prototype.emptyCells;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-cssFloat\\n */\\nCSSProperties.prototype.cssFloat;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-font\\n */\\nCSSProperties.prototype.font;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontFamily\\n */\\nCSSProperties.prototype.fontFamily;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontSize\\n */\\nCSSProperties.prototype.fontSize;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontSizeAdjust\\n */\\nCSSProperties.prototype.fontSizeAdjust;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontStretch\\n */\\nCSSProperties.prototype.fontStretch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontStyle\\n */\\nCSSProperties.prototype.fontStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontVariant\\n */\\nCSSProperties.prototype.fontVariant;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-fontWeight\\n */\\nCSSProperties.prototype.fontWeight;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-height\\n */\\nCSSProperties.prototype.height;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/1998/REC-CSS2-19980512/visuren.html#propdef-left\\n */\\nCSSProperties.prototype.left;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-letterSpacing\\n */\\nCSSProperties.prototype.letterSpacing;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-lineHeight\\n */\\nCSSProperties.prototype.lineHeight;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-listStyle\\n */\\nCSSProperties.prototype.listStyle;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-listStyleImage\\n */\\nCSSProperties.prototype.listStyleImage;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-listStylePosition\\n */\\nCSSProperties.prototype.listStylePosition;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-listStyleType\\n */\\nCSSProperties.prototype.listStyleType;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-margin\\n */\\nCSSProperties.prototype.margin;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-marginTop\\n */\\nCSSProperties.prototype.marginTop;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-marginRight\\n */\\nCSSProperties.prototype.marginRight;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-marginBottom\\n */\\nCSSProperties.prototype.marginBottom;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-marginLeft\\n */\\nCSSProperties.prototype.marginLeft;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-markerOffset\\n */\\nCSSProperties.prototype.markerOffset;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-marks\\n */\\nCSSProperties.prototype.marks;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-maxHeight\\n */\\nCSSProperties.prototype.maxHeight;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-maxWidth\\n */\\nCSSProperties.prototype.maxWidth;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-minHeight\\n */\\nCSSProperties.prototype.minHeight;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-minWidth\\n */\\nCSSProperties.prototype.minWidth;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-orphans\\n */\\nCSSProperties.prototype.orphans;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-outline\\n */\\nCSSProperties.prototype.outline;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-outlineColor\\n */\\nCSSProperties.prototype.outlineColor;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-outlineStyle\\n */\\nCSSProperties.prototype.outlineStyle;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-outlineWidth\\n */\\nCSSProperties.prototype.outlineWidth;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-overflow\\n */\\nCSSProperties.prototype.overflow;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-padding\\n */\\nCSSProperties.prototype.padding;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-paddingTop\\n */\\nCSSProperties.prototype.paddingTop;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-paddingRight\\n */\\nCSSProperties.prototype.paddingRight;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-paddingBottom\\n */\\nCSSProperties.prototype.paddingBottom;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-paddingLeft\\n */\\nCSSProperties.prototype.paddingLeft;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-page\\n */\\nCSSProperties.prototype.page;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pageBreakAfter\\n */\\nCSSProperties.prototype.pageBreakAfter;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pageBreakBefore\\n */\\nCSSProperties.prototype.pageBreakBefore;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pageBreakInside\\n */\\nCSSProperties.prototype.pageBreakInside;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pause\\n */\\nCSSProperties.prototype.pause;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pauseAfter\\n */\\nCSSProperties.prototype.pauseAfter;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pauseBefore\\n */\\nCSSProperties.prototype.pauseBefore;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pitch\\n */\\nCSSProperties.prototype.pitch;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-pitchRange\\n */\\nCSS";a.a+='Properties.prototype.pitchRange;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-playDuring\\n */\\nCSSProperties.prototype.playDuring;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-position\\n */\\nCSSProperties.prototype.position;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-quotes\\n */\\nCSSProperties.prototype.quotes;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-ui/#resize\\n */\\nCSSProperties.prototype.resize;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-richness\\n */\\nCSSProperties.prototype.richness;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/1998/REC-CSS2-19980512/visuren.html#propdef-right\\n */\\nCSSProperties.prototype.right;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-size\\n */\\nCSSProperties.prototype.size;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-speak\\n */\\nCSSProperties.prototype.speak;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-speakHeader\\n */\\nCSSProperties.prototype.speakHeader;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-speakNumeral\\n */\\nCSSProperties.prototype.speakNumeral;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-speakPunctuation\\n */\\nCSSProperties.prototype.speakPunctuation;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-speechRate\\n */\\nCSSProperties.prototype.speechRate;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-stress\\n */\\nCSSProperties.prototype.stress;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-tableLayout\\n */\\nCSSProperties.prototype.tableLayout;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-textAlign\\n */\\nCSSProperties.prototype.textAlign;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-textDecoration\\n */\\nCSSProperties.prototype.textDecoration;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-textIndent\\n */\\nCSSProperties.prototype.textIndent;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-textShadow\\n */\\nCSSProperties.prototype.textShadow;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-textTransform\\n */\\nCSSProperties.prototype.textTransform;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/1998/REC-CSS2-19980512/visuren.html#propdef-top\\n */\\nCSSProperties.prototype.top;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-unicodeBidi\\n */\\nCSSProperties.prototype.unicodeBidi;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-verticalAlign\\n */\\nCSSProperties.prototype.verticalAlign;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-visibility\\n */\\nCSSProperties.prototype.visibility;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-voiceFamily\\n */\\nCSSProperties.prototype.voiceFamily;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-volume\\n */\\nCSSProperties.prototype.volume;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-whiteSpace\\n */\\nCSSProperties.prototype.whiteSpace;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-widows\\n */\\nCSSProperties.prototype.widows;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-width\\n */\\nCSSProperties.prototype.width;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-wordSpacing\\n */\\nCSSProperties.prototype.wordSpacing;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-wordWrap\\n */\\nCSSProperties.prototype.wordWrap;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSProperties-zIndex\\n */\\nCSSProperties.prototype.zIndex;\\n\\n// CSS 3 properties\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-background/#box-shadow\\n */\\nCSSProperties.prototype.boxShadow;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-ui/#box-sizing\\n */\\nCSSProperties.prototype.boxSizing;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-color/#transparency\\n */\\nCSSProperties.prototype.opacity;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-ui/#text-overflow\\n */\\nCSSProperties.prototype.textOverflow;\\n\\n// CSS 3 transforms\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#backface-visibility-property\\n */\\nCSSProperties.prototype.backfaceVisibility;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#perspective\\n */\\nCSSProperties.prototype.perspective;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#perspective-origin\\n */\\nCSSProperties.prototype.perspectiveOrigin;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#effects\\n */\\nCSSProperties.prototype.transform;\\n\\n/**\\n * @type {string|number}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#transform-origin\\n */\\nCSSProperties.prototype.transformOrigin;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-2d-transforms/#transform-style\\n */\\nCSSProperties.prototype.transformStyle;\\n\\n// CSS 3 transitions\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-transitions/#transition\\n */\\nCSSProperties.prototype.transition;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-transitions/#transition-delay\\n */\\nCSSProperties.prototype.transitionDelay;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-transitions/#transition-duration\\n */\\nCSSProperties.prototype.transitionDuration;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-transitions/#transition-property-property\\n */\\nCSSProperties.prototype.transitionProperty;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css3-transitions/#transition-timing-function\\n */\\nCSSProperties.prototype.transitionTimingFunction;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty\\n */\\nCSSProperties.prototype.pointerEvents;\\n\\n\\n// CSS Flexbox 1\\n\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#align-content-property\\n */\\nCSSProperties.prototype.alignContent;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#align-items-property\\n */\\nCSSProperties.prototype.alignItems;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#align-items-property\\n */\\nCSSProperties.prototype.alignSelf;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-property\\n */\\nCSSProperties.prototype.flex;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-basis-property\\n */\\nCSSProperties.prototype.flexBasis;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-direction-property\\n */\\nCSSProperties.prototype.flexDirection;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-flow-property\\n */\\nCSSProperties.prototype.flexFlow;\\n\\n/**\\n * @type {number}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-grow-property\\n */\\nCSSProperties.prototype.flexGrow;\\n\\n/**\\n * @type {number}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-shrink-property\\n */\\nCSSProperties.prototype.flexShrink;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#flex-wrap-property\\n */\\nCSSProperties.prototype.flexWrap;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/css-flexbox-1/#justify-content-property\\n */\\nCSSProperties.prototype.justifyContent;\\n\\n/**\\n * @type {number}\\n * @see https://www.w3.org/TR/css-flexbox-1/#order-property\\n */\\nCSSProperties.prototype.order;\\n\\n// Externs for CSS Will Change Module Level 1\\n// http://www.w3.org/TR/css-will-change/\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/css-will-change-1/#will-change\\n */\\nCSSProperties.prototype.willChange;\\n\\n\\n/**\\n * TODO(dbeam): Put this in separate file named w3c_cssom.js.\\n * Externs for the CSSOM View Module.\\n * @see http://www.w3.org/TR/cssom-view/\\n */\\n\\n// http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface\\n\\n/**\\n * @param {string} media_query_list\\n * @return {MediaQueryList}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-matchmedia\\n */\\nWindow.prototype.matchMedia = function(media_query_list) {};\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-innerwidth\\n */\\nWindow.prototype.innerWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-innerheight\\n */\\nWindow.prototype.innerHeight;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-scrollx\\n */\\nWindow.prototype.scrollX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-pagexoffset\\n */\\nWindow.prototype.pageXOffset;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-scrolly\\n */\\nWindow.prototype.scrollY;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset\\n */\\nWindow.prototype.pageYOffset;\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-scroll\\n * @return {undefined}\\n */\\nWindow.prototype.scroll = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-scrollto\\n * @return {undefined}\\n */\\nWindow.prototype.scrollTo = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-scrollby\\n * @return {undefined}\\n */\\nWindow.prototype.scrollBy = function(x, y) {};\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-screenx\\n */\\nWindow.prototype.screenX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-screeny\\n */\\nWindow.prototype.screenY;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-outerwidth\\n */\\nWindow.prototype.outerWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-window-outerheight\\n */\\nWindow.prototype.outerHeight;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/cssom-view/#mediaquerylist\\n */\\nfunction MediaQueryList() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mediaquerylist-media\\n */\\nMediaQueryList.prototype.media;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mediaquerylist-matches\\n */\\nMediaQueryList.prototype.matches;\\n\\n/**\\n * @param {MediaQueryListListener} listener\\n * @see http://www.w3.org/TR/cssom-view/#dom-mediaquerylist-addlistener\\n * @return {undefined}\\n */\\nMediaQueryList.prototype.addListener = function(listener) {};\\n\\n/**\\n * @param {MediaQueryListListener} listener\\n * @see http://www.w3.org/TR/cssom-view/#dom-mediaquerylist-removelistener\\n * @return {undefined}\\n */\\nMediaQueryList.prototype.removeListener = function(listener) {};\\n\\n/**\\n * @typedef {(function(!MediaQueryList) : void)}\\n * @see http://www.w3.org/TR/cssom-view/#mediaquerylistlistener\\n */\\nvar MediaQueryListListener;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/cssom-view/#screen\\n */\\nfunction Screen() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-availwidth\\n */\\nScreen.prototype.availWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-availheight\\n */\\nScreen.prototype.availHeight;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-width\\n */\\nScreen.prototype.width;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-height\\n */\\nScreen.prototype.height;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-colordepth\\n */\\nScreen.prototype.colorDepth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-screen-pixeldepth\\n */\\nScreen.prototype.pixelDepth;\\n\\n\\n// http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {?Element}\\n * @see http://www.w3.org/TR/cssom-view/#dom-document-elementfrompoint\\n */\\nDocument.prototype.elementFromPoint = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {CaretPosition}\\n * @see http://www.w3.org/TR/cssom-view/#dom-document-caretpositionfrompoint\\n */\\nDocument.prototype.caretPositionFromPoint = function(x, y) {};\\n\\n/**\\n * @type {Element}\\n * @see http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement\\n */\\nDocument.prototype.scrollingElement;\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/cssom-view/#caretposition\\n */\\nfunction CaretPosition() {}\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/cssom-view/#dom-caretposition-offsetnode\\n */\\nCaretPosition.prototype.offsetNode;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-caretposition-offset\\n */\\nCaretPosition.prototype.offset;\\n\\n\\n// http://www.w3.org/TR/cssom-view/#extensions-to-the-element-interface\\n\\n/**\\n * @return {!ClientRectList}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-getclientrects\\n */\\nElement.prototype.getClientRects = function() {};\\n\\n/**\\n * @return {!ClientRect}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect\\n */\\nElement.prototype.getBoundingClientRect = function() {};\\n\\n/**\\n * @param {(boolean|{behavior: string, block: string})=} opt_top\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-scrollintoview\\n * @return {undefined}\\n */\\nElement.prototype.scrollIntoView = function(opt_top) {};\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-scrolltop\\n */\\nElement.prototype.scrollTop;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-scrollleft\\n */\\nElement.prototype.scrollLeft;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-scrollwidth\\n */\\nElement.prototype.scrollWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-scrollheight\\n */\\nElement.prototype.scrollHeight;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-clienttop\\n */\\nElement.prototype.clientTop;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-clientleft\\n */\\nElement.prototype.clientLeft;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-clientwidth\\n */\\nElement.prototype.clientWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-element-clientheight\\n */\\nElement.prototype.clientHeight;\\n\\n// http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface\\n\\n/**\\n * @type {Element}\\n * @see http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetparent\\n */\\nHTMLElement.prototype.offsetParent;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsettop\\n */\\nHTMLElement.prototype.offsetTop;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetleft\\n */\\nHTMLElement.prototype.offsetLeft;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetwidth\\n */\\nHTMLElement.prototype.offsetWidth;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetheight\\n */\\nHTMLElement.prototype.offsetHeight;\\n\\n\\n// http://www.w3.org/TR/cssom-view/';a.a+='#extensions-to-the-range-interface\\n\\n/**\\n * @return {!ClientRectList}\\n * @see http://www.w3.org/TR/cssom-view/#dom-range-getclientrects\\n */\\nRange.prototype.getClientRects = function() {};\\n\\n/**\\n * @return {!ClientRect}\\n * @see http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect\\n */\\nRange.prototype.getBoundingClientRect = function() {};\\n\\n\\n// http://www.w3.org/TR/cssom-view/#extensions-to-the-mouseevent-interface\\n\\n// MouseEvent: screen{X,Y} and client{X,Y} are in DOM Level 2/3 Event as well,\\n// so it seems like a specification issue. I\'ve emailed www-style@w3.org in\\n// hopes of resolving the conflict, but in the mean time they can live here\\n// (http://lists.w3.org/Archives/Public/www-style/2012May/0039.html).\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-screenx\\n */\\n//MouseEvent.prototype.screenX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-screeny\\n */\\n//MouseEvent.prototype.screenY;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-pagex\\n */\\nMouseEvent.prototype.pageX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-pagey\\n */\\nMouseEvent.prototype.pageY;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-clientx\\n */\\n//MouseEvent.prototype.clientX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-clienty\\n */\\n//MouseEvent.prototype.clientY;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-x\\n */\\nMouseEvent.prototype.x;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-y\\n */\\nMouseEvent.prototype.y;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-offsetx\\n */\\nMouseEvent.prototype.offsetX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-mouseevent-offsety\\n */\\nMouseEvent.prototype.offsetY;\\n\\n\\n// http://www.w3.org/TR/cssom-view/#rectangles\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/cssom-view/#the-clientrectlist-interface\\n * @implements {IArrayLike}\\n */\\nfunction ClientRectList() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrectlist-length\\n */\\nClientRectList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {ClientRect}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrectlist-item\\n */\\nClientRectList.prototype.item = function(index) {};\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/cssom-view/#the-clientrect-interface\\n */\\nfunction ClientRect() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-top\\n */\\nClientRect.prototype.top;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-right\\n */\\nClientRect.prototype.right;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-bottom\\n */\\nClientRect.prototype.bottom;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-left\\n */\\nClientRect.prototype.left;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-width\\n */\\nClientRect.prototype.width;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/cssom-view/#dom-clientrect-height\\n */\\nClientRect.prototype.height;\\n\\n/**\\n * @constructor\\n * http://www.w3.org/TR/css3-conditional/#CSS-interface\\n */\\nfunction CSSInterface() {}\\n\\n/**\\n * @param {string} ident\\n * @return {string}\\n * @see http://www.w3.org/TR/cssom/#the-css.escape()-method\\n * @throws DOMException {@see DOMException.INVALID_CHARACTER_ERR}\\n */\\nCSSInterface.prototype.escape = function(ident) {};\\n\\n/**\\n * @param {string} property\\n * @param {string=} opt_value\\n * @return {boolean}\\n */\\nCSSInterface.prototype.supports = function(property, opt_value) {};\\n\\n/**\\n * TODO(nicksantos): This suppress tag probably isn\'t needed, and\\n * should be removed.\\n * @suppress {duplicate}\\n * @type {CSSInterface}\\n */\\nvar CSS;\\n\\n/** @type {CSSInterface} */\\nWindow.prototype.CSS;\\n\\n// http://dev.w3.org/csswg/css-font-loading/\\n\\n/**\\n * Set of possible string values: \'error\', \'loaded\', \'loading\', \'unloaded\'.\\n * @typedef {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#enumdef-fontfaceloadstatus\\n */\\nvar FontFaceLoadStatus;\\n\\n/**\\n * @typedef {{\\n * style: (string|undefined),\\n * weight: (string|undefined),\\n * stretch: (string|undefined),\\n * unicodeRange: (string|undefined),\\n * variant: (string|undefined),\\n * featureSettings: (string|undefined)\\n * }}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dictdef-fontfacedescriptors\\n */\\nvar FontFaceDescriptors;\\n\\n/**\\n * @constructor\\n * @param {string} fontFamily\\n * @param {(string|ArrayBuffer|ArrayBufferView)} source\\n * @param {!FontFaceDescriptors=} opt_descriptors\\n * @see http://dev.w3.org/csswg/css-font-loading/#font-face-constructor\\n */\\nfunction FontFace(fontFamily, source, opt_descriptors) {}\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-family\\n */\\nFontFace.prototype.family;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-style\\n */\\nFontFace.prototype.style;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-weight\\n */\\nFontFace.prototype.weight;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-stretch\\n */\\nFontFace.prototype.stretch;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-unicoderange\\n */\\nFontFace.prototype.unicodeRange;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-variant\\n */\\nFontFace.prototype.variant;\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-featuresettings\\n */\\nFontFace.prototype.featureSettings;\\n\\n/**\\n * @type {FontFaceLoadStatus}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontface-status\\n */\\nFontFace.prototype.status;\\n\\n/**\\n * @return {!Promise}\\n * @see http://dev.w3.org/csswg/css-font-loading/#font-face-load\\n */\\nFontFace.prototype.load = function() {};\\n\\n/**\\n * Set of possible string values: \'loaded\', \'loading\'.\\n * @typedef {string}\\n * @see http://dev.w3.org/csswg/css-font-loading/#enumdef-fontfacesetloadstatus\\n */\\nvar FontFaceSetLoadStatus;\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n * @see http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-interface\\n */\\nfunction FontFaceSet() {}\\n\\n// Event handlers\\n// http://dev.w3.org/csswg/css-font-loading/#FontFaceSet-events\\n\\n/** @type {?function (Event)} */ FontFaceSet.prototype.onloading;\\n/** @type {?function (Event)} */ FontFaceSet.prototype.onloadingdone;\\n/** @type {?function (Event)} */ FontFaceSet.prototype.onloadingerror;\\n\\n/**\\n * @param {!FontFace} value\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-add\\n * @return {undefined}\\n */\\nFontFaceSet.prototype.add = function(value) {};\\n\\n/**\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-clear\\n * @return {undefined}\\n */\\nFontFaceSet.prototype.clear = function() {};\\n\\n/**\\n * @param {!FontFace} value\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-delete\\n * @return {undefined}\\n */\\nFontFaceSet.prototype.delete = function(value) {};\\n\\n/**\\n * @param {!FontFace} font\\n * @return {boolean}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-has\\n */\\nFontFaceSet.prototype.has = function(font) {};\\n\\n/**\\n * @param {function(!FontFace, number, !FontFaceSet)} cb\\n * @param {Object|undefined=} opt_selfObj\\n * see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-foreach\\n * @return {undefined}\\n */\\nFontFaceSet.prototype.forEach = function(cb, opt_selfObj) {};\\n\\n/**\\n * @param {string} font\\n * @param {string=} opt_text\\n * @return {!Promise>}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-load\\n */\\nFontFaceSet.prototype.load = function(font, opt_text) {};\\n\\n/**\\n * @param {string} font\\n * @param {string=} opt_text\\n * @return {boolean}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-check\\n */\\nFontFaceSet.prototype.check = function(font, opt_text) {};\\n\\n/**\\n * @type {!Promise}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-ready\\n */\\nFontFaceSet.prototype.ready;\\n\\n/**\\n * @type {FontFaceSetLoadStatus}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset-status\\n */\\nFontFaceSet.prototype.status;\\n","externs/gecko_css.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for Gecko\'s custom CSS properties. Copied from:\\n * http://mxr.mozilla.org/mozilla2.0/source/dom/interfaces/css/nsIDOMCSS2Properties.idl\\n *\\n * @externs\\n * @author nicksantos@google.com (Nick Santos)\\n */\\n\\n\\n/** @type {string} */ CSSProperties.prototype.MozAppearance;\\n/** @type {string} */ CSSProperties.prototype.MozBackfaceVisibility;\\n/** @type {string} */ CSSProperties.prototype.MozBackgroundClip;\\n/** @type {string} */ CSSProperties.prototype.MozBackgroundInlinePolicy;\\n/** @type {string} */ CSSProperties.prototype.MozBackgroundOrigin;\\n/** @type {string} */ CSSProperties.prototype.MozBinding;\\n/** @type {string} */ CSSProperties.prototype.MozBorderBottomColors;\\n/** @type {string} */ CSSProperties.prototype.MozBorderEnd;\\n/** @type {string} */ CSSProperties.prototype.MozBorderEndColor;\\n/** @type {string} */ CSSProperties.prototype.MozBorderEndStyle;\\n/** @type {string} */ CSSProperties.prototype.MozBorderEndWidth;\\n/** @type {string} */ CSSProperties.prototype.MozBorderImage;\\n/** @type {string} */ CSSProperties.prototype.MozBorderLeftColors;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRadius;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopleft;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopright;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomleft;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomright;\\n/** @type {string} */ CSSProperties.prototype.MozBorderRightColors;\\n/** @type {string} */ CSSProperties.prototype.MozBorderStart;\\n/** @type {string} */ CSSProperties.prototype.MozBorderStartColor;\\n/** @type {string} */ CSSProperties.prototype.MozBorderStartStyle;\\n/** @type {string} */ CSSProperties.prototype.MozBorderStartWidth;\\n/** @type {string} */ CSSProperties.prototype.MozBorderTopColors;\\n/** @type {string} */ CSSProperties.prototype.MozBoxAlign;\\n/** @type {string} */ CSSProperties.prototype.MozBoxDirection;\\n/** @type {string} */ CSSProperties.prototype.MozBoxFlex;\\n/** @type {string} */ CSSProperties.prototype.MozBoxOrdinalGroup;\\n/** @type {string} */ CSSProperties.prototype.MozBoxOrient;\\n/** @type {string} */ CSSProperties.prototype.MozBoxPack;\\n/** @type {string} */ CSSProperties.prototype.MozBoxSizing;\\n/** @type {string} */ CSSProperties.prototype.MozBoxShadow;\\n/** @type {string} */ CSSProperties.prototype.MozColumnCount;\\n/** @type {string} */ CSSProperties.prototype.MozColumnGap;\\n/** @type {string} */ CSSProperties.prototype.MozColumnRule;\\n/** @type {string} */ CSSProperties.prototype.MozColumnRuleColor;\\n/** @type {string} */ CSSProperties.prototype.MozColumnRuleStyle;\\n/** @type {string} */ CSSProperties.prototype.MozColumnRuleWidth;\\n/** @type {string} */ CSSProperties.prototype.MozColumnWidth;\\n/** @type {string} */ CSSProperties.prototype.MozFloatEdge;\\n/** @type {string} */ CSSProperties.prototype.MozFontFeatureSettings;\\n/** @type {string} */ CSSProperties.prototype.MozFontLanguageOverride;\\n/** @type {string} */ CSSProperties.prototype.MozForceBrokenImageIcon;\\n/** @type {string} */ CSSProperties.prototype.MozImageRegion;\\n/** @type {string} */ CSSProperties.prototype.MozMarginEnd;\\n/** @type {string} */ CSSProperties.prototype.MozMarginStart;\\n/** @type {number|string} */ CSSProperties.prototype.MozOpacity;\\n/** @type {string} */ CSSProperties.prototype.MozOutline;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineColor;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineOffset;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineRadius;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomleft;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomright;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopleft;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopright;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineStyle;\\n/** @type {string} */ CSSProperties.prototype.MozOutlineWidth;\\n/** @type {string} */ CSSProperties.prototype.MozPaddingEnd;\\n/** @type {string} */ CSSProperties.prototype.MozPaddingStart;\\n/** @type {string} */ CSSProperties.prototype.MozPerspective;\\n/** @type {string} */ CSSProperties.prototype.MozStackSizing;\\n/** @type {string} */ CSSProperties.prototype.MozTabSize;\\n/** @type {string} */ CSSProperties.prototype.MozTransform;\\n/** @type {string} */ CSSProperties.prototype.MozTransformOrigin;\\n/** @type {string} */ CSSProperties.prototype.MozTransition;\\n/** @type {string} */ CSSProperties.prototype.MozTransitionDelay;\\n/** @type {string} */ CSSProperties.prototype.MozTransitionDuration;\\n/** @type {string} */ CSSProperties.prototype.MozTransitionProperty;\\n/** @type {string} */ CSSProperties.prototype.MozTransitionTimingFunction;\\n/** @type {string} */ CSSProperties.prototype.MozUserFocus;\\n/** @type {string} */ CSSProperties.prototype.MozUserInput;\\n/** @type {string} */ CSSProperties.prototype.MozUserModify;\\n/** @type {string} */ CSSProperties.prototype.MozUserSelect;\\n/** @type {string} */ CSSProperties.prototype.MozWindowShadow;\\n\\n\\n// These are non-standard Gecko CSSOM properties on Window.prototype.screen.\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.screen.availTop\\n */\\nScreen.prototype.availTop;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.screen.availLeft\\n */\\nScreen.prototype.availLeft;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.screen.left\\n */\\nScreen.prototype.left;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/window.screen.top\\n */\\nScreen.prototype.top;\\n","externs/ie_css.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for IE\'s custom CSS properties, as defined here:\\n * http://msdn.microsoft.com/en-us/library/aa768661(VS.85).aspx\\n *\\n * This page is also useful for the IDL definitions:\\n * http://source.winehq.org/source/include/mshtml.idl\\n *\\n * @externs\\n * @author nicksantos@google.com\\n */\\n\\n/** @type {Element} */\\nStyleSheet.prototype.owningElement;\\n\\n/** @type {boolean} */\\nStyleSheet.prototype.readOnly;\\n\\n/** @type {StyleSheetList} */\\nStyleSheet.prototype.imports;\\n\\n/** @type {string} */\\nStyleSheet.prototype.id;\\n\\n/**\\n * @param {string} bstrURL\\n * @param {number} lIndex\\n * @return {number}\\n */\\nStyleSheet.prototype.addImport;\\n\\n/**\\n * @param {string';a.a+='} bstrSelector\\n * @param {string} bstrStyle\\n * @param {number=} opt_iIndex\\n * @return {number}\\n * @see http://msdn.microsoft.com/en-us/library/aa358796%28v=vs.85%29.aspx\\n */\\nStyleSheet.prototype.addRule;\\n\\n/**\\n * @param {number} lIndex\\n */\\nStyleSheet.prototype.removeImport;\\n\\n/**\\n * @param {number} lIndex\\n */\\nStyleSheet.prototype.removeRule;\\n\\n/** @type {string} */\\nStyleSheet.prototype.cssText;\\n\\n/** @type {CSSRuleList} */\\nStyleSheet.prototype.rules;\\n\\n// StyleSheet methods\\n\\n/**\\n * @param {string} propName\\n * @return {string}\\n * @see http://msdn.microsoft.com/en-us/library/aa358797(VS.85).aspx\\n */\\nStyleSheet.prototype.getExpression;\\n\\n/**\\n * @param {string} name\\n * @param {string} expression\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/ms531196(VS.85).aspx\\n */\\nStyleSheet.prototype.setExpression;\\n\\n/**\\n * @param {string} expression\\n * @return {undefined}\\n * @see http://msdn.microsoft.com/en-us/library/aa358798(VS.85).aspx\\n */\\nStyleSheet.prototype.removeExpression;\\n\\n// IE-only CSS style names.\\n\\n/** @type {string} */ CSSProperties.prototype.backgroundPositionX;\\n\\n/** @type {string} */ CSSProperties.prototype.backgroundPositionY;\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ie/ms531081(v=vs.85).aspx\\n * NOTE: Left untyped to avoid conflict with caller.\\n */\\nCSSProperties.prototype.behavior;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms533883.aspx\\n */\\nCSSProperties.prototype.imeMode;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms534176(VS.85).aspx\\n */\\nCSSProperties.prototype.msInterpolationMode;\\n\\n/** @type {string} */ CSSProperties.prototype.overflowX;\\n\\n/** @type {string} */ CSSProperties.prototype.overflowY;\\n\\n/** @type {number} */ CSSProperties.prototype.pixelWidth;\\n\\n/** @type {number} */ CSSProperties.prototype.pixelHeight;\\n\\n/** @type {number} */ CSSProperties.prototype.pixelLeft;\\n\\n/** @type {number} */ CSSProperties.prototype.pixelTop;\\n\\n/** @type {string} */ CSSProperties.prototype.styleFloat;\\n\\n/**\\n * @type {string|number}\\n * @see http://msdn.microsoft.com/en-us/library/ms535169(VS.85).aspx\\n */\\nCSSProperties.prototype.zoom;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/ms535153(VS.85).aspx\\n */\\nCSSProperties.prototype.writingMode;\\n\\n/**\\n * IE-specific extensions.\\n * @see http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx\\n */\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsAccelerator;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsBackgroundPositionX;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsBackgroundPositionY;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsBehavior;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsBlockProgression;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsFilter;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsImeMode;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLayoutGrid;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLayoutGridChar;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLayoutGridLine;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLayoutGridMode;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLayoutGridType;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLineBreak;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsLineGridMode;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsInterpolationMode;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsOverflowX;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsOverflowY;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbar3dlightColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarArrowColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarBaseColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarDarkshadowColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarFaceColor;\\n\\nCSSProperties.prototype.MsScrollbarHighlightColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarShadowColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsScrollbarTrackColor;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextAlignLast;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextAutospace;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextJustify;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextKashidaSpace;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextOverflow;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsTextUnderlinePosition;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsWordBreak;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsWordWrap;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsWritingMode;\\n\\n/** @type {string} */\\nCSSProperties.prototype.MsZoom;\\n\\n// See: http://msdn.microsoft.com/en-us/library/windows/apps/Hh702466.aspx\\n\\n/** @type {string} */\\nCSSProperties.prototype.msContentZooming;\\n\\n/** @type {string} */\\nCSSProperties.prototype.msTouchAction;\\n\\n/** @type {string} */\\nCSSProperties.prototype.msTransform;\\n\\n/** @type {string} */\\nCSSProperties.prototype.msTransition;\\n","externs/webkit_css.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for WebKit\'s custom CSS properties. Copied from:\\n * {@link\\n * http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSPropertyNames.in}\\n *\\n * If you make changes to this file, notice that every property appears\\n * twice: once as an uppercase name and once as a lowercase name.\\n * WebKit allows both. The uppercase version is preferred.\\n *\\n * @externs\\n * @author nicksantos@google.com (Nick Santos)\\n * @author mastepien@google.com (Marek Stepien)\\n */\\n\\n/** @type {string} */ CSSProperties.prototype.WebkitAlignContent;\\n/** @type {string} */ CSSProperties.prototype.WebkitAlignItems;\\n/** @type {string} */ CSSProperties.prototype.WebkitAlignSelf;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimation;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationDelay;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationDirection;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationDuration;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationFillMode;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationIterationCount;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationName;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationPlayState;\\n/** @type {string} */ CSSProperties.prototype.WebkitAnimationTimingFunction;\\n/** @type {string} */ CSSProperties.prototype.WebkitAppearance;\\n/** @type {string} */ CSSProperties.prototype.WebkitAppRegion;\\n/** @type {string} */ CSSProperties.prototype.WebkitAspectRatio;\\n/** @type {string} */ CSSProperties.prototype.WebkitBackfaceVisibility;\\n/** @type {string} */ CSSProperties.prototype.WebkitBackgroundClip;\\n/** @type {string} */ CSSProperties.prototype.WebkitBackgroundComposite;\\n/** @type {string} */ CSSProperties.prototype.WebkitBackgroundOrigin;\\n/** @type {string} */ CSSProperties.prototype.WebkitBackgroundSize;\\n/** @type {string} */ CSSProperties.prototype.WebkitBinding;\\n/** @type {string} */ CSSProperties.prototype.WebkitBlendMode;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBottomLeftRadius;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderBottomRightRadius;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderEnd;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderEndColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderEndStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderEndWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderFit;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderHorizontalSpacing;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderImage;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderRadius;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderStart;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderStartColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderStartStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderStartWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderTopLeftRadius;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderTopRightRadius;\\n/** @type {string} */ CSSProperties.prototype.WebkitBorderVerticalSpacing;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxAlign;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxDecorationBreak;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxDirection;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxFlex;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxFlexGroup;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxLines;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxOrdinalGroup;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxOrient;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxPack;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxReflect;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxShadow;\\n/** @type {string} */ CSSProperties.prototype.WebkitBoxSizing;\\n/** @type {string} */ CSSProperties.prototype.WebkitColorCorrection;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnAxis;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakInside;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnCount;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnGap;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnProgression;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnRule;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumns;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnSpan;\\n/** @type {string} */ CSSProperties.prototype.WebkitColumnWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitDashboardRegion;\\n/** @type {string} */ CSSProperties.prototype.WebkitFilter;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlex;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexBasis;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexDirection;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexFlow;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexGrow;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexShrink;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlexWrap;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlowFrom;\\n/** @type {string} */ CSSProperties.prototype.WebkitFlowInto;\\n/** @type {string} */ CSSProperties.prototype.WebkitFontSizeDelta;\\n/** @type {string} */ CSSProperties.prototype.WebkitFontSmoothing;\\n/** @type {string} */ CSSProperties.prototype.WebkitGridColumn;\\n/** @type {string} */ CSSProperties.prototype.WebkitGridColumns;\\n/** @type {string} */ CSSProperties.prototype.WebkitGridRow;\\n/** @type {string} */ CSSProperties.prototype.WebkitGridRows;\\n/** @type {string} */ CSSProperties.prototype.WebkitHighlight;\\n/** @type {string} */ CSSProperties.prototype.WebkitHyphenateCharacter;\\n/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitLines;\\n/** @type {string} */ CSSProperties.prototype.WebkitHyphens;\\n/** @type {string} */ CSSProperties.prototype.WebkitJustifyContent;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineAlign;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineBoxContain;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineBreak;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineClamp;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineGrid;\\n/** @type {string} */ CSSProperties.prototype.WebkitLineSnap;\\n/** @type {string} */ CSSProperties.prototype.WebkitLocale;\\n/** @type {string} */ CSSProperties.prototype.WebkitLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.WebkitLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginAfterCollapse;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginBeforeCollapse;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginBottomCollapse;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginCollapse;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginEnd;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginStart;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarginTopCollapse;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarquee;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarqueeDirection;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarqueeIncrement;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarqueeRepetition;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarqueeSpeed;\\n/** @type {string} */ CSSProperties.prototype.WebkitMarqueeStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitMask;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskAttachment;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImage;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageOutset;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageRepeat;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageSlice;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageSource;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskClip;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskComposite;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskImage;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskOrigin;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskPosition;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskPositionX;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskPositionY;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeat;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeatX;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeatY;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaskSize;\\n/** @type {string} */\\nCSSProperties.prototype.WebkitMatchNearestMailBlockquoteColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaxLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.WebkitMaxLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitMinLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.WebkitMinLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitNbspMode;\\n/** @type {string} *';a.a+='/ CSSProperties.prototype.WebkitOrder;\\n/** @type {string} */ CSSProperties.prototype.WebkitOverflowScrolling;\\n/** @type {string} */ CSSProperties.prototype.WebkitPaddingAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitPaddingBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitPaddingEnd;\\n/** @type {string} */ CSSProperties.prototype.WebkitPaddingStart;\\n/** @type {string} */ CSSProperties.prototype.WebkitPerspective;\\n/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOrigin;\\n/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOriginX;\\n/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOriginY;\\n/** @type {string} */ CSSProperties.prototype.WebkitPrintColorAdjust;\\n/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakAfter;\\n/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakBefore;\\n/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakInside;\\n/** @type {string} */ CSSProperties.prototype.WebkitRegionOverflow;\\n/** @type {string} */ CSSProperties.prototype.WebkitRtlOrdering;\\n/** @type {string} */ CSSProperties.prototype.WebkitRubyPosition;\\n/** @type {string} */ CSSProperties.prototype.WebkitShapeInside;\\n/** @type {string} */ CSSProperties.prototype.WebkitShapeMargin;\\n/** @type {string} */ CSSProperties.prototype.WebkitShapeOutside;\\n/** @type {string} */ CSSProperties.prototype.WebkitShapePadding;\\n/** @type {string} */ CSSProperties.prototype.WebkitTapHighlightColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextAlignLast;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextCombine;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationLine;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationsInEffect;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasis;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisPosition;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextFillColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextOrientation;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextSecurity;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextSizeAdjust;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextStroke;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextStrokeColor;\\n/** @type {string} */ CSSProperties.prototype.WebkitTextStrokeWidth;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransform;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransformOrigin;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginX;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginY;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginZ;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransformStyle;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransition;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransitionDelay;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransitionDuration;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransitionProperty;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransitionRepeatCount;\\n/** @type {string} */ CSSProperties.prototype.WebkitTransitionTimingFunction;\\n/** @type {string} */ CSSProperties.prototype.WebkitUserDrag;\\n/** @type {string} */ CSSProperties.prototype.WebkitUserModify;\\n/** @type {string} */ CSSProperties.prototype.WebkitUserSelect;\\n/** @type {string} */ CSSProperties.prototype.WebkitWrap;\\n/** @type {string} */ CSSProperties.prototype.WebkitWrapFlow;\\n/** @type {string} */ CSSProperties.prototype.WebkitWrapThrough;\\n/** @type {string} */ CSSProperties.prototype.WebkitWritingMode;\\n\\n// WebKit also adds bindings for the lowercase versions of these properties.\\n// The uppercase version is preferred.\\n\\n/** @type {string} */ CSSProperties.prototype.webkitAlignContent;\\n/** @type {string} */ CSSProperties.prototype.webkitAlignItems;\\n/** @type {string} */ CSSProperties.prototype.webkitAlignSelf;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimation;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationDelay;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationDirection;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationDuration;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationFillMode;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationIterationCount;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationName;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationPlayState;\\n/** @type {string} */ CSSProperties.prototype.webkitAnimationTimingFunction;\\n/** @type {string} */ CSSProperties.prototype.webkitAppearance;\\n/** @type {string} */ CSSProperties.prototype.webkitAppRegion;\\n/** @type {string} */ CSSProperties.prototype.webkitAspectRatio;\\n/** @type {string} */ CSSProperties.prototype.webkitBackfaceVisibility;\\n/** @type {string} */ CSSProperties.prototype.webkitBackgroundClip;\\n/** @type {string} */ CSSProperties.prototype.webkitBackgroundComposite;\\n/** @type {string} */ CSSProperties.prototype.webkitBackgroundOrigin;\\n/** @type {string} */ CSSProperties.prototype.webkitBackgroundSize;\\n/** @type {string} */ CSSProperties.prototype.webkitBinding;\\n/** @type {string} */ CSSProperties.prototype.webkitBlendMode;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderAfterColor;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderAfterStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderAfterWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeColor;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBottomLeftRadius;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderBottomRightRadius;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderEnd;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderEndColor;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderEndStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderEndWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderFit;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderHorizontalSpacing;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderImage;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderRadius;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderStart;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderStartColor;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderStartStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderStartWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderTopLeftRadius;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderTopRightRadius;\\n/** @type {string} */ CSSProperties.prototype.webkitBorderVerticalSpacing;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxAlign;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxDecorationBreak;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxDirection;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxFlex;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxFlexGroup;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxLines;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxOrdinalGroup;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxOrient;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxPack;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxReflect;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxShadow;\\n/** @type {string} */ CSSProperties.prototype.webkitBoxSizing;\\n/** @type {string} */ CSSProperties.prototype.webkitColorCorrection;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnAxis;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnBreakAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnBreakBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnBreakInside;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnCount;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnGap;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnProgression;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnRule;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnRuleColor;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnRuleStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnRuleWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitColumns;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnSpan;\\n/** @type {string} */ CSSProperties.prototype.webkitColumnWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitDashboardRegion;\\n/** @type {string} */ CSSProperties.prototype.webkitFilter;\\n/** @type {string} */ CSSProperties.prototype.webkitFlex;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexBasis;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexDirection;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexFlow;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexGrow;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexShrink;\\n/** @type {string} */ CSSProperties.prototype.webkitFlexWrap;\\n/** @type {string} */ CSSProperties.prototype.webkitFlowFrom;\\n/** @type {string} */ CSSProperties.prototype.webkitFlowInto;\\n/** @type {string} */ CSSProperties.prototype.webkitFontSizeDelta;\\n/** @type {string} */ CSSProperties.prototype.webkitFontSmoothing;\\n/** @type {string} */ CSSProperties.prototype.webkitGridColumn;\\n/** @type {string} */ CSSProperties.prototype.webkitGridColumns;\\n/** @type {string} */ CSSProperties.prototype.webkitGridRow;\\n/** @type {string} */ CSSProperties.prototype.webkitGridRows;\\n/** @type {string} */ CSSProperties.prototype.webkitHighlight;\\n/** @type {string} */ CSSProperties.prototype.webkitHyphenateCharacter;\\n/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitLines;\\n/** @type {string} */ CSSProperties.prototype.webkitHyphens;\\n/** @type {string} */ CSSProperties.prototype.webkitJustifyContent;\\n/** @type {string} */ CSSProperties.prototype.webkitLineAlign;\\n/** @type {string} */ CSSProperties.prototype.webkitLineBoxContain;\\n/** @type {string} */ CSSProperties.prototype.webkitLineBreak;\\n/** @type {string} */ CSSProperties.prototype.webkitLineClamp;\\n/** @type {string} */ CSSProperties.prototype.webkitLineGrid;\\n/** @type {string} */ CSSProperties.prototype.webkitLineSnap;\\n/** @type {string} */ CSSProperties.prototype.webkitLocale;\\n/** @type {string} */ CSSProperties.prototype.webkitLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.webkitLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginAfterCollapse;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginBeforeCollapse;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginBottomCollapse;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginCollapse;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginEnd;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginStart;\\n/** @type {string} */ CSSProperties.prototype.webkitMarginTopCollapse;\\n/** @type {string} */ CSSProperties.prototype.webkitMarquee;\\n/** @type {string} */ CSSProperties.prototype.webkitMarqueeDirection;\\n/** @type {string} */ CSSProperties.prototype.webkitMarqueeIncrement;\\n/** @type {string} */ CSSProperties.prototype.webkitMarqueeRepetition;\\n/** @type {string} */ CSSProperties.prototype.webkitMarqueeSpeed;\\n/** @type {string} */ CSSProperties.prototype.webkitMarqueeStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitMask;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskAttachment;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImage;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageOutset;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageRepeat;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageSlice;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageSource;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskClip;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskComposite;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskImage;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskOrigin;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskPosition;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskPositionX;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskPositionY;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskRepeat;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskRepeatX;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskRepeatY;\\n/** @type {string} */ CSSProperties.prototype.webkitMaskSize;\\n/** @type {string} */\\nCSSProperties.prototype.webkitMatchNearestMailBlockquoteColor;\\n/** @type {string} */ CSSProperties.prototype.webkitMaxLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.webkitMaxLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitMinLogicalHeight;\\n/** @type {string} */ CSSProperties.prototype.webkitMinLogicalWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitNbspMode;\\n/** @type {string} */ CSSProperties.prototype.webkitOrder;\\n/** @type {string} */ CSSProperties.prototype.webkitOverflowScrolling;\\n/** @type {string} */ CSSProperties.prototype.webkitPaddingAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitPaddingBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitPaddingEnd;\\n/** @type {string} */ CSSProperties.prototype.webkitPaddingStart;\\n/** @type {string} */ CSSProperties.prototype.webkitPerspective;\\n/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOrigin;\\n/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOriginX;\\n/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOriginY;\\n/** @type {string} */ CSSProperties.prototype.webkitPrintColorAdjust;\\n/** @type {string} */ CSSProperties.prototype.webkitRegionBreakAfter;\\n/** @type {string} */ CSSProperties.prototype.webkitRegionBreakBefore;\\n/** @type {string} */ CSSProperties.prototype.webkitRegionBreakInside;\\n/** @type {string} */ CSSProperties.prototype.webkitRegionOverflow;\\n/** @type {string} */ CSSProperties.prototype.webkitRtlOrdering;\\n/** @type {string} */ CSSProperties.prototype.webkitRubyPosition;\\n/** @type {string} */ CSSProperties.prototype.webkitShapeInside;\\n/** @type {string} */ CSSProperties.prototype.webkitShapeMargin;\\n/** @type {string} */ CSSProperties.prototype.webkitShapeOutside;\\n/** @type {string} */ CSSProperties.prototype.webkitShapePadding;\\n/** @type {string} */ CSSProperties.prototype.webkitTapHighlightColor;\\n/** @type {string} */ CSSProperties.prototype.webkitTextAlignLast;\\n/** @type {string} */ CSSProperties.prototype.webkitTextCombine;\\n/** @type {string} */ CSSProperties.prototype.webkitTextDecorationLine;\\n/** @type {string} */ CSSProperties.prototype.webkitTextDecorationsInEffect;\\n/** @type {string} */ CSSProperties.prototype.webkitTextDecorationStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitTextEmphasis;\\n/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisColor;\\n/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisPosition;\\n/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitTextFillColor;\\n/** @type {string} */ CSSProperties.prototype.webkitTextOrientation;\\n/** @type {string} */ CSSProperties.prototype.w';a.a+='ebkitTextSecurity;\\n/** @type {string} */ CSSProperties.prototype.webkitTextSizeAdjust;\\n/** @type {string} */ CSSProperties.prototype.webkitTextStroke;\\n/** @type {string} */ CSSProperties.prototype.webkitTextStrokeColor;\\n/** @type {string} */ CSSProperties.prototype.webkitTextStrokeWidth;\\n/** @type {string} */ CSSProperties.prototype.webkitTransform;\\n/** @type {string} */ CSSProperties.prototype.webkitTransformOrigin;\\n/** @type {string} */ CSSProperties.prototype.webkitTransformOriginX;\\n/** @type {string} */ CSSProperties.prototype.webkitTransformOriginY;\\n/** @type {string} */ CSSProperties.prototype.webkitTransformOriginZ;\\n/** @type {string} */ CSSProperties.prototype.webkitTransformStyle;\\n/** @type {string} */ CSSProperties.prototype.webkitTransition;\\n/** @type {string} */ CSSProperties.prototype.webkitTransitionDelay;\\n/** @type {string} */ CSSProperties.prototype.webkitTransitionDuration;\\n/** @type {string} */ CSSProperties.prototype.webkitTransitionProperty;\\n/** @type {string} */ CSSProperties.prototype.webkitTransitionRepeatCount;\\n/** @type {string} */ CSSProperties.prototype.webkitTransitionTimingFunction;\\n/** @type {string} */ CSSProperties.prototype.webkitUserDrag;\\n/** @type {string} */ CSSProperties.prototype.webkitUserModify;\\n/** @type {string} */ CSSProperties.prototype.webkitUserSelect;\\n/** @type {string} */ CSSProperties.prototype.webkitWrap;\\n/** @type {string} */ CSSProperties.prototype.webkitWrapFlow;\\n/** @type {string} */ CSSProperties.prototype.webkitWrapThrough;\\n/** @type {string} */ CSSProperties.prototype.webkitWritingMode;\\n\\n/**\\n * @constructor\\n * @param {number} x\\n * @param {number} y\\n */\\nfunction WebKitPoint(x, y) {}\\n\\n/** @type {number} */\\nWebKitPoint.prototype.x;\\n\\n/** @type {number} */\\nWebKitPoint.prototype.y;\\n","externs/google.js":"/*\\n * Copyright 2010 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Declaration of the type level google namespace.\\n * @externs\\n * @author nicksantos@google.com (Nick Santos)\\n */\\n\\n/**\\n * Suppresses the compiler warning when multiple externs files declare the\\n * google namespace.\\n * @suppress {duplicate}\\n * @noalias\\n */\\n// TODO(nicksantos): Consolidate to one google namespace declaration.\\nvar google = {};\\n","externs/deprecated.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview JavaScript Built-Ins that are not part of any specifications\\n * but are still needed in some project\'s build.\\n * @externs\\n */\\n\\nvar opera = {};\\n\\nopera.postError;\\n\\n/** @nosideeffects */\\nopera.version = function() {};\\n\\n/** @constructor */\\nfunction XSLTProcessor() {}\\n\\n/**\\n * @constructor\\n * @extends {HTMLOptionElement}\\n * @param {*=} opt_text\\n * @param {*=} opt_value\\n * @param {*=} opt_defaultSelected\\n * @param {*=} opt_selected\\n */\\nfunction Option(opt_text, opt_value, opt_defaultSelected, opt_selected) {}\\n\\n\\n// The \\"methods\\" object is a place to hang arbitrary external\\n// properties. It is a throwback to pre-typed days, and should\\n// not be used for any new definitions; it exists only to bridge\\n// the gap between the old way and the new way.\\nvar methods = {};\\n","externs/fileapi.js":"/*\\n * Copyright 2010 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for objects in the File API, File Writer API, and\\n * File System API. Details of the API are at:\\n * http://www.w3.org/TR/FileAPI/\\n * http://www.w3.org/TR/file-writer-api/\\n * http://www.w3.org/TR/file-system-api/\\n *\\n * @externs\\n * @author dbk@google.com (David Barrett-Kahn)\\n * @author mpd@google.com (Michael Davidson)\\n */\\n\\n\\n/**\\n * @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob\\n * @param {Array=} opt_blobParts\\n * @param {Object=} opt_options\\n * @constructor\\n * @nosideeffects\\n */\\nfunction Blob(opt_blobParts, opt_options) {}\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-size\\n * @type {number}\\n */\\nBlob.prototype.size;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-type\\n * @type {string}\\n */\\nBlob.prototype.type;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-slice\\n * @param {number=} start\\n * @param {number=} length\\n * @param {string=} opt_contentType\\n * @return {!Blob}\\n * @nosideeffects\\n */\\nBlob.prototype.slice = function(start, length, opt_contentType) {};\\n\\n/**\\n * This replaces Blob.slice in Chrome since WebKit revision 84005.\\n * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html\\n * @param {number=} start\\n * @param {number=} end\\n * @param {string=} opt_contentType\\n * @return {!Blob}\\n * @nosideeffects\\n */\\nBlob.prototype.webkitSlice = function(start, end, opt_contentType) {};\\n\\n/**\\n * This replaces Blob.slice in Firefox.\\n * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html\\n * @param {number=} start\\n * @param {number=} end\\n * @param {string=} opt_contentType\\n * @return {!Blob}\\n * @nosideeffects\\n */\\nBlob.prototype.mozSlice = function(start, end, opt_contentType) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface\\n * @constructor\\n */\\nfunction BlobBuilder() {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2\\n * @param {string|Blob|ArrayBuffer} data\\n * @param {string=} endings\\n * @return {undefined}\\n */\\nBlobBuilder.prototype.append = function(data, endings) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob\\n * @param {string=} contentType\\n * @return {!Blob}\\n */\\nBlobBuilder.prototype.getBlob = function(contentType) {};\\n\\n/**\\n * This has replaced BlobBuilder in Chrome since WebKit revision 84008.\\n * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html\\n * @constructor\\n */\\nfunction WebKitBlobBuilder() {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2\\n * @param {string|Blob|ArrayBuffer} data\\n * @param {string=} endings\\n * @return {undefined}\\n */\\nWebKitBlobBuilder.prototype.append = function(data, endings) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob\\n * @param {string=} contentType\\n * @return {!Blob}\\n */\\nWebKitBlobBuilder.prototype.getBlob = function(contentType) {};\\n\\n\\n/**\\n * @record\\n * @see https://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-dictionary\\n */\\nfunction FileSystemFlags() {};\\n\\n/** @type {(undefined|boolean)} */\\nFileSystemFlags.prototype.create;\\n\\n/** @type {(undefined|boolean)} */\\nFileSystemFlags.prototype.exclusive;\\n\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#the-directoryentry-interface\\n * @constructor\\n * @extends {Entry}\\n */\\nfunction DirectoryEntry() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-createReader\\n * @return {!DirectoryReader}\\n */\\nDirectoryEntry.prototype.createReader = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getFile\\n * @param {string} path\\n * @param {!FileSystemFlags=} options\\n * @param {function(!FileEntry)=} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nDirectoryEntry.prototype.getFile = function(path, options, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getDirectory\\n * @param {string} path\\n * @param {!FileSystemFlags=} options\\n * @param {function(!DirectoryEntry)=} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nDirectoryEntry.prototype.getDirectory = function(path, options, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-removeRecursively\\n * @param {function()} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nDirectoryEntry.prototype.removeRecursively = function(successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#the-directoryreader-interface\\n * @constructor\\n */\\nfunction DirectoryReader() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryReader-readEntries\\n * @param {function(!Array)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nDirectoryReader.prototype.readEntries = function(successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#the-entry-interface\\n * @constructor\\n */\\nfunction Entry() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-isFile\\n * @type {boolean}\\n */\\nEntry.prototype.isFile;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-isDirectory\\n * @type {boolean}\\n */\\nEntry.prototype.isDirectory;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-name\\n * @type {string}\\n */\\nEntry.prototype.name;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-fullPath\\n * @type {string}\\n */\\nEntry.prototype.fullPath;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-filesystem\\n * @type {!FileSystem}\\n */\\nEntry.prototype.filesystem;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-moveTo\\n * @param {!DirectoryEntry} parent\\n * @param {string=} newName\\n * @param {function(!Entry)=} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nEntry.prototype.moveTo = function(parent, newName, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-copyTo\\n * @param {!DirectoryEntry} parent\\n * @param {string=} newName\\n * @param {function(!Entry)=} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nEntry.prototype.copyTo = function(parent, newName, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-toURL\\n * @param {string=} mimeType\\n * @return {string}\\n */\\nEntry.prototype.toURL = function(mimeType) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-remove\\n * @param {function()} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nEntry.prototype.remove = function(successCallback, errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-getMetadata\\n * @param {function(!Metadata)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nEntry.prototype.getMetadata = function(successCallback, errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Entry-getParent\\n * @param {function(!Entry)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nEntry.prototype.getParent = function(successCallback, errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-file\\n * @param {!Array=} opt_contents\\n * @param {string=} opt_name\\n * @param {{type: (string|undefined), lastModified: (number|undefined)}=}\\n * opt_properties\\n * @constructor\\n * @extends {Blob}\\n */\\nfunction File(opt_contents, opt_name, opt_properties) {}\\n\\n/**\\n * Chrome uses this instead of name.\\n * @deprecated Use name instead.\\n * @type {string}\\n */\\nFile.prototype.fileName;\\n\\n/**\\n * Chrome uses this instead of size.\\n * @deprecated Use size instead.\\n * @type {string}\\n */\\nFile.prototype.fileSize;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-name\\n * @type {string}\\n */\\nFile.prototype.name;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate\\n * @type {Date}\\n */\\nFile.prototype.lastModifiedDate;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-lastModified\\n * @type {number}\\n */\\nFile.prototype.lastModified;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#the-fileentry-interface\\n * @constructor\\n * @extends {Entry}\\n */\\nfunction FileEntry() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-createWriter\\n * @param {function(!FileWriter)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nFileEntry.prototype.createWriter = function(successCallback, errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-file\\n * @param {function(!File)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nFileEntry.prototype.file = function(successCallback, errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#FileErrorInterface\\n * @constructor\\n * @extends {DOMError}\\n */\\nfunction FileError() {}\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-NOT_FOUND_ERR\\n * @type {number}\\n */\\nFileError.prototype.NOT_FOUND_ERR = 1;\\n\\n/** @type {number} */\\nFileError.NOT_FOUND_ERR = 1;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-SECURITY_ERR\\n * @type {number}\\n */\\nFileError.prototype.SECURITY_ERR = 2;\\n\\n/** @type {number} */\\nFileError.SECURITY_ERR = 2;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-ABORT_ERR\\n * @type {number}\\n */\\nFileError.prototype.ABORT_ERR = 3;\\n\\n/** @type {number} */\\nFileError.ABORT_ERR = 3;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-NOT_READABLE_ERR\\n * @type {number}\\n */\\nFileError.prototype.NOT_READABLE_ERR = 4;\\n\\n/** @type {number} */\\nFileError.NOT_READABLE_ERR = 4;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-ENCODING_ERR\\n * @type {number}\\n */\\nFileError.prototype.ENCODING_ERR = 5;\\n\\n/** @type {number} */\\nFileError.ENCODING_ERR = 5;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileError-NO_MODIFICATION_ALLOWED_ERR\\n * @type {number}\\n */\\nFileError.prototype.NO_MODIFICATION_ALLOWED_ERR = 6;\\n\\n/** @type {number} */\\nFileError.NO_MODIFICATION_ALLOWED_ERR = 6;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileException-INVALID_STATE_ERR\\n * @type {number}\\n */\\nFileError.prototype.INVALID_STATE_ERR = 7;\\n\\n/** @type {number} */\\nFileError.INVALID_STATE_ERR = 7;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileException-SYNTAX_ERR\\n * @type {number}\\n */\\nFileError.prototype.SYNTAX_ERR = 8;\\n\\n/** @type {number} */\\nFileError.SYNTAX_ERR = 8;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileError-INVALID_MODIFICATION_ERR\\n * @type {number}\\n */\\nFileError.prototype.INVALID_MODIFICATION_ERR = ';a.a+='9;\\n\\n/** @type {number} */\\nFileError.INVALID_MODIFICATION_ERR = 9;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileError-QUOTA_EXCEEDED_ERR\\n * @type {number}\\n */\\nFileError.prototype.QUOTA_EXCEEDED_ERR = 10;\\n\\n/** @type {number} */\\nFileError.QUOTA_EXCEEDED_ERR = 10;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileException-TYPE_MISMATCH_ERR\\n * @type {number}\\n */\\nFileError.prototype.TYPE_MISMATCH_ERR = 11;\\n\\n/** @type {number} */\\nFileError.TYPE_MISMATCH_ERR = 11;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileException-PATH_EXISTS_ERR\\n * @type {number}\\n */\\nFileError.prototype.PATH_EXISTS_ERR = 12;\\n\\n/** @type {number} */\\nFileError.PATH_EXISTS_ERR = 12;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-code-exception\\n * @type {number}\\n * @deprecated Use the \'name\' or \'message\' attributes of DOMError rather than\\n * \'code\'\\n */\\nFileError.prototype.code;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-filereader\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction FileReader() {}\\n\\n/** @override */\\nFileReader.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/** @override */\\nFileReader.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nFileReader.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer\\n * @param {!Blob} blob\\n * @return {undefined}\\n */\\nFileReader.prototype.readAsArrayBuffer = function(blob) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringAsync\\n * @param {!Blob} blob\\n * @return {undefined}\\n */\\nFileReader.prototype.readAsBinaryString = function(blob) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-readAsText\\n * @param {!Blob} blob\\n * @param {string=} encoding\\n * @return {undefined}\\n */\\nFileReader.prototype.readAsText = function(blob, encoding) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURL\\n * @param {!Blob} blob\\n * @return {undefined}\\n */\\nFileReader.prototype.readAsDataURL = function(blob) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-abort\\n * @return {undefined}\\n */\\nFileReader.prototype.abort = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-empty\\n * @type {number}\\n */\\nFileReader.prototype.EMPTY = 0;\\n\\n/** @type {number} */\\nFileReader.EMPTY = 0;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-loading\\n * @type {number}\\n */\\nFileReader.prototype.LOADING = 1;\\n\\n/** @type {number} */\\nFileReader.LOADING = 1;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-done\\n * @type {number}\\n */\\nFileReader.prototype.DONE = 2;\\n\\n/** @type {number} */\\nFileReader.DONE = 2;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-readystate\\n * @type {number}\\n */\\nFileReader.prototype.readyState;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-result\\n * @type {string|Blob|ArrayBuffer}\\n */\\nFileReader.prototype.result;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-error\\n * @type {FileError}\\n */\\nFileReader.prototype.error;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onloadstart\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onloadstart;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onprogress\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onprogress;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onload\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onload;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onabort\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onabort;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onerror\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onerror;\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-onloadend\\n * @type {?function(!ProgressEvent)}\\n */\\nFileReader.prototype.onloadend;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#idl-def-FileSaver\\n * @constructor\\n */\\nfunction FileSaver() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-abort\\n * @return {undefined}\\n */\\nFileSaver.prototype.abort = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-INIT\\n * @type {number}\\n */\\nFileSaver.prototype.INIT = 0;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-WRITING\\n * @type {number}\\n */\\nFileSaver.prototype.WRITING = 1;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-DONE\\n * @type {number}\\n */\\nFileSaver.prototype.DONE = 2;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-readyState\\n * @type {number}\\n */\\nFileSaver.prototype.readyState;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-error\\n * @type {FileError}\\n */\\nFileSaver.prototype.error;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwritestart\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onwritestart;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onprogress\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onprogress;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwrite\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onwrite;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onabort\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onabort;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onerror\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onerror;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwriteend\\n * @type {?function(!ProgressEvent)}\\n */\\nFileSaver.prototype.onwriteend;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#the-filesystem-interface\\n * @constructor\\n */\\nfunction FileSystem() {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-name\\n * @type {string}\\n */\\nFileSystem.prototype.name;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-root\\n * @type {!DirectoryEntry}\\n */\\nFileSystem.prototype.root;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#idl-def-FileWriter\\n * @constructor\\n * @extends {FileSaver}\\n */\\nfunction FileWriter() {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-position\\n * @type {number}\\n */\\nFileWriter.prototype.position;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-length\\n * @type {number}\\n */\\nFileWriter.prototype.length;\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-write\\n * @param {!Blob} blob\\n * @return {undefined}\\n */\\nFileWriter.prototype.write = function(blob) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-seek\\n * @param {number} offset\\n * @return {undefined}\\n */\\nFileWriter.prototype.seek = function(offset) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-truncate\\n * @param {number} size\\n * @return {undefined}\\n */\\nFileWriter.prototype.truncate = function(size) {};\\n\\n/**\\n * LocalFileSystem interface, implemented by Window and WorkerGlobalScope.\\n * @see http://www.w3.org/TR/file-system-api/#idl-def-LocalFileSystem\\n * @constructor\\n */\\nfunction LocalFileSystem() {}\\n\\n/**\\n * Metadata interface.\\n * @see http://www.w3.org/TR/file-system-api/#idl-def-Metadata\\n * @constructor\\n */\\nfunction Metadata() {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Metadata-modificationTime\\n * @type {!Date}\\n */\\nMetadata.prototype.modificationTime;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-Metadata-size\\n * @type {number}\\n */\\nMetadata.prototype.size;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-TEMPORARY\\n * @type {number}\\n*/\\nWindow.prototype.TEMPORARY = 0;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-PERSISTENT\\n * @type {number}\\n*/\\nWindow.prototype.PERSISTENT = 1;\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem\\n * @param {number} type\\n * @param {number} size\\n * @param {function(!FileSystem)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nfunction requestFileSystem(type, size, successCallback, errorCallback) {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem\\n * @param {number} type\\n * @param {number} size\\n * @param {function(!FileSystem)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nWindow.prototype.requestFileSystem = function(type, size, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI\\n * @param {string} uri\\n * @param {function(!Entry)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nfunction resolveLocalFileSystemURI(uri, successCallback, errorCallback) {}\\n\\n/**\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI\\n * @param {string} uri\\n * @param {function(!Entry)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nWindow.prototype.resolveLocalFileSystemURI = function(uri, successCallback,\\n errorCallback) {}\\n\\n/**\\n * This has replaced requestFileSystem in Chrome since WebKit revision 84224.\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem\\n * @param {number} type\\n * @param {number} size\\n * @param {function(!FileSystem)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nfunction webkitRequestFileSystem(type, size, successCallback, errorCallback) {}\\n\\n/**\\n * This has replaced requestFileSystem in Chrome since WebKit revision 84224.\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem\\n * @param {number} type\\n * @param {number} size\\n * @param {function(!FileSystem)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nWindow.prototype.webkitRequestFileSystem = function(type, size, successCallback,\\n errorCallback) {};\\n\\n/**\\n * This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision\\n * 84224.\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI\\n * @param {string} uri\\n * @param {function(!Entry)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nfunction webkitResolveLocalFileSystemURI(uri, successCallback, errorCallback) {}\\n\\n/**\\n * This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision\\n * 84224.\\n * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI\\n * @param {string} uri\\n * @param {function(!Entry)} successCallback\\n * @param {function(!FileError)=} errorCallback\\n * @return {undefined}\\n */\\nWindow.prototype.webkitResolveLocalFileSystemURI = function(uri, successCallback,\\n errorCallback) {}\\n\\n// WindowBlobURIMethods interface, implemented by Window and WorkerGlobalScope.\\n// There are three APIs for this: the old specced API, the new specced API, and\\n// the webkit-prefixed API.\\n// @see http://www.w3.org/TR/FileAPI/#creating-revoking\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL\\n * @param {!Object} obj\\n * @return {string}\\n */\\nfunction createObjectURL(obj) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL\\n * @param {!Object} obj\\n * @return {string}\\n */\\nWindow.prototype.createObjectURL = function(obj) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL\\n * @param {string} url\\n * @return {undefined}\\n */\\nfunction revokeObjectURL(url) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL\\n * @param {string} url\\n * @return {undefined}\\n */\\nWindow.prototype.revokeObjectURL = function(url) {};\\n\\n/**\\n * This has been replaced by URL in Chrome since WebKit revision 75739.\\n * @constructor\\n * @param {string} urlString\\n * @param {string=} opt_base\\n */\\nfunction webkitURL(urlString, opt_base) {}\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL\\n * @param {!Object} obj\\n * @return {string}\\n */\\nwebkitURL.createObjectURL = function(obj) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL\\n * @param {string} url\\n * @return {undefined}\\n */\\nwebkitURL.revokeObjectURL = function(url) {};\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage\\n * @constructor\\n */\\nfunction StorageInfo() {}\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage\\n * @type {number}\\n * */\\nStorageInfo.prototype.TEMPORARY = 0;\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage\\n * @type {number}\\n */\\nStorageInfo.prototype.PERSISTENT = 1;\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage#requestQuota\\n * @param {number} type\\n * @param {number} size\\n * @param {function(number)} successCallback\\n * @param {function(!DOMException)=} errorCallback\\n * @return {undefined}\\n */\\nStorageInfo.prototype.requestQuota = function(type, size, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage#queryUsageAndQuota\\n * @param {number} type\\n * @param {function(number, number)} successCallback\\n * @param {function(!DOMException)=} errorCallback\\n * @return {undefined}\\n */\\nStorageInfo.prototype.queryUsageAndQuota = function(type, successCallback,\\n errorCallback) {};\\n\\n/**\\n * @see https://developers.google.com/chrome/whitepapers/storage\\n * @type {!StorageInfo}\\n */\\nWindow.prototype.webkitStorageInfo;\\n\\n/**\\n * @see https://dvcs.w3.org/hg/quota/raw-file/tip/Overview.html#storagequota-interface.\\n * @constructor\\n */\\nfunction StorageQuota() {}\\n\\n/**\\n * @param {number} size\\n * @param {function(number)=} opt_successCallback\\n * @param {function(!DOMException)=} opt_errorCallback\\n * @return {undefined}\\n */\\nStorageQuota.prototype.requestQuota = function(size, opt_successCallback,\\n opt_errorCallback) {};\\n\\n/**\\n * @param {function(number, number)} successCallback\\n * @param {function(!DOMException)=} opt_errorCallback\\n * @return {undefined}\\n */\\nStorageQuota.prototype.queryUsageAndQuota = function(successCallback,\\n opt_errorCallback) {};\\n\\n\\n/**\\n * @type {!StorageQuota}\\n * @see https://developer.chrome.com/apps/offline_storage\\n */\\nNavigator.prototype.webkitPersistentStorage;\\n\\n/**\\n * @type {!StorageQuota}\\n * @see https://developer.chrome.com/apps/offline_storage\\n */\\nNavigator.prototype.webkitTemporaryStorage;\\n","externs/flash.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for all the Flash Object JavaScript methods. This\\n * file depends on w3c_dom2.js.\\n * Created from\\n * http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html\\n *\\n * @externs\\n * @author ajp@google.com (Andy Perelson)\\n */\\n\\n\\n// Standard Methods.\\n\\n/**\\n * Call a Flash function exported by ExternalInterface.\\n * @param {string} xmlString The XML string passed to Flash. The outer element\\n * should be {@code }. A sample invocation string:\\n * {@code \\n * test<\/string><\/invoke>}\\n * @return {string} The serialized return value from Flash that you can eval.\\n */\\nHTMLObjectElement.prototype.CallFunction = function(xmlString) {};\\n\\n/**\\n * Returns the value of the Flash variable specified by varName or null if the\\n * variable does not exist.\\n * @param {string} varName The variab';a.a+='le name.\\n * @return {string?} The variable value.\\n */\\nHTMLObjectElement.prototype.GetVariable = function(varName) {};\\n\\n/**\\n * Activates the frame number specified by {@code frameNumber} in the current\\n * movie.\\n * @param {number} frameNumber A non-negative integer frame number.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.GotoFrame = function(frameNumber) {};\\n\\n/**\\n * @return {boolean} Whether the movie is currently playing.\\n */\\nHTMLObjectElement.prototype.IsPlaying = function() {};\\n\\n/**\\n * Loads the movie identified by {@code url} to the layer specified by {@code\\n * layerNumber}.\\n * @param {number} layerNumber The layer number.\\n * @param {string} url The movie URL.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.LoadMovie = function(layerNumber, url) {};\\n\\n/**\\n * Pans a zoomed-in movie to the coordinates specified by x and y. Use mode to\\n * specify whether the values for x and y are pixels or a percent of the window.\\n * When mode is 0, the coordinates are pixels; when mode is 1, the coordinates\\n * are percent of the window.\\n * @param {number} x The x-coordinate.\\n * @param {number} y The y-coordinate.\\n * @param {number} mode The mode.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.Pan = function(x, y, mode) {};\\n\\n/**\\n * @return {number} The percent of the Flash Player movie that has streamed\\n * into the browser so far; Possible values are from 0 to 100.\\n */\\nHTMLObjectElement.prototype.PercentLoaded = function() {};\\n\\n/**\\n * Starts playing the movie.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.Play = function() {};\\n\\n/**\\n * Goes to the first frame.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.Rewind = function() {};\\n\\n/**\\n * Sets the value of the flash variable.\\n * @param {string} variableName The variable name.\\n * @param {string} value The value.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.SetVariable = function(variableName, value) {};\\n\\n/**\\n * Zooms in on a rectangular area of the movie. The units of the coordinates\\n * are in twips (1440 units per inch).\\n * @param {number} left The left coordinate.\\n * @param {number} top The top coordinate.\\n * @param {number} right The right coordinate.\\n * @param {number} bottom The bottom coordinate.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.SetZoomRect = function(left, top, right, bottom) {};\\n\\n/**\\n * Stops playing the movie.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.StopPlay = function() {};\\n\\n/**\\n * @return {number} The total number of frames in the movie.\\n */\\nHTMLObjectElement.prototype.TotalFrames = function() {};\\n\\n/**\\n * Zooms the view by a relative scale factor.\\n * @param {number} percent The percentage scale factor, should be an integer.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.Zoom = function(percent) {};\\n\\n\\n// TellTarget Methods.\\n\\n/**\\n * Executes the action in the timeline specified by {@code target} in the\\n * specified frame.\\n * @param {string} target The timeline.\\n * @param {number} frameNumber The frame number.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TCallFrame = function(target, frameNumber) {};\\n\\n/**\\n * Executes the action in the timeline specified by {@code target} in the\\n * specified frame.\\n * @param {string} target The timeline.\\n * @param {string} label The frame label.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TCallLabel = function(target, label) {};\\n\\n/**\\n * Returns the number of the current frame for the specified timeline.\\n * @param {string} target The timeline.\\n * @return {number} The number of the current frame.\\n */\\nHTMLObjectElement.prototype.TCurentFrame = function(target) {};\\n\\n/**\\n * Returns the label of the current frame for the specified timeline.\\n * @param {string} target The timeline.\\n * @return {string} The label of the current frame, empty string if no\\n * current frame.\\n */\\nHTMLObjectElement.prototype.TCurrentLabel = function(target) {};\\n\\n/**\\n * Returns a string indicating the value of the property in the\\n * specified timeline.\\n * @param {string} target The timeline.\\n * @param {number} property The integer corresponding to the desired property.\\n * @return {string} The value of the property.\\n */\\nHTMLObjectElement.prototype.TGetProperty = function(target, property) {};\\n\\n/**\\n * Returns a number indicating the value of the property in the specified\\n * timeline.\\n * @param {string} target The timeline.\\n * @param {number} property The integer corresponding to the desired property.\\n * @return {number} A number indicating the value of the property.\\n */\\nHTMLObjectElement.prototype.TGetPropertyAsNumber = function(target, property) {};\\n\\n/**\\n * Goes to the specified frame number in the specified timeline.\\n * @param {string} target The timeline.\\n * @param {number} frameNumber The frame number.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TGotoFrame = function(target, frameNumber) {};\\n\\n/**\\n * Goes to the specified frame label in the specified timeline.\\n * @param {string} target The timeline.\\n * @param {string} label The framelabel.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TGotoLabel = function(target, label) {};\\n\\n/**\\n * Plays the specified timeline.\\n * @param {number} target The timeline.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TPlay = function(target) {};\\n\\n/**\\n * Sets the value of the property in the specified timeline.\\n * @param {number} target The timeline.\\n * @param {number} property The integer corresponding to the desired property.\\n * @param {string|number} value The value.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TSetProperty = function(target, property, value) {};\\n\\n/**\\n * Stops the specified timeline.\\n * @param {number} target The timeline.\\n * @return {undefined}\\n */\\nHTMLObjectElement.prototype.TStopPlay = function(target) {};\\n","externs/gecko_xml.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for all the extensions over some of the\\n * W3C\'s XML specifications by Gecko. This file depends on\\n * w3c_xml.js. The whole file has been fully type annotated.\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n/**\\n * XMLSerializer can be used to convert DOM subtree or DOM document into text.\\n * XMLSerializer is available to unprivileged scripts.\\n *\\n * XMLSerializer is mainly useful for applications and extensions based on\\n * Mozilla platform. While it\'s available to web pages, it\'s not part of any\\n * standard and level of support in other browsers is unknown.\\n *\\n * @constructor\\n */\\nfunction XMLSerializer() {}\\n\\n/**\\n * Returns the serialized subtree in the form of a string\\n * @param {Node} subtree\\n * @return {string}\\n */\\nXMLSerializer.prototype.serializeToString = function(subtree) {};\\n\\n/**\\n * The subtree rooted by the specified element is serialized to a byte stream\\n * using the character set specified.\\n *\\n * @param {Node} subtree\\n * @return {Object}\\n */\\nXMLSerializer.prototype.serializeToStream = function(subtree) {};\\n\\n/**\\n * DOMParser is mainly useful for applications and extensions based on Mozilla\\n * platform. While it\'s available to web pages, it\'s not part of any standard and\\n * level of support in other browsers is unknown.\\n *\\n * @constructor\\n */\\nfunction DOMParser() {}\\n\\n/**\\n * The string passed in is parsed into a DOM document.\\n *\\n * Example:\\n * var parser = new DOMParser();\\n * var doc = parser.parseFromString(aStr, \\"text/xml\\");\\n *\\n * @param {string} src The UTF16 string to be parsed.\\n * @param {string} type The content type of the string.\\n * @return {Document}\\n */\\nDOMParser.prototype.parseFromString = function(src, type) {};\\n","externs/html5.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for all the extensions over the\\n * W3C\'s DOM3 specification in HTML5. This file depends on\\n * w3c_dom3.js. The whole file has been fully type annotated.\\n *\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/index.html\\n * @see http://dev.w3.org/html5/spec/Overview.html\\n *\\n * This also includes Typed Array definitions from\\n * http://www.khronos.org/registry/typedarray/specs/latest/\\n *\\n * This relies on w3c_event.js being included first.\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n */\\n\\n/** @type {?HTMLSlotElement} */\\nNode.prototype.assignedSlot;\\n\\n/**\\n * Note: In IE, the contains() method only exists on Elements, not Nodes.\\n * Therefore, it is recommended that you use the Conformance framework to\\n * prevent calling this on Nodes which are not Elements.\\n * @see https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect\\n *\\n * @param {Node} n The node to check\\n * @return {boolean} If \'n\' is this Node, or is contained within this Node.\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Node.contains\\n * @nosideeffects\\n */\\nNode.prototype.contains = function(n) {};\\n\\n/** @type {boolean} */\\nNode.prototype.isConnected;\\n\\n/**\\n * @constructor\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#the-canvas-element\\n * @extends {HTMLElement}\\n */\\nfunction HTMLCanvasElement() {}\\n\\n/** @type {number} */\\nHTMLCanvasElement.prototype.width;\\n\\n/** @type {number} */\\nHTMLCanvasElement.prototype.height;\\n\\n/**\\n * @see https://www.w3.org/TR/html5/scripting-1.html#dom-canvas-toblob\\n * @param {function(!Blob)} callback\\n * @param {string=} opt_type\\n * @param {...*} var_args\\n * @throws {Error}\\n */\\nHTMLCanvasElement.prototype.toBlob = function(callback, opt_type, var_args) {};\\n\\n/**\\n * @param {string=} opt_type\\n * @param {...*} var_args\\n * @return {string}\\n * @throws {Error}\\n */\\nHTMLCanvasElement.prototype.toDataURL = function(opt_type, var_args) {};\\n\\n/**\\n * @param {string} contextId\\n * @param {Object=} opt_args\\n * @return {Object}\\n */\\nHTMLCanvasElement.prototype.getContext = function(contextId, opt_args) {};\\n\\n/**\\n * @see https://www.w3.org/TR/mediacapture-fromelement/\\n * @param {number=} opt_framerate\\n * @return {!MediaStream}\\n * @throws {Error}\\n * */\\nHTMLCanvasElement.prototype.captureStream = function(opt_framerate) {};\\n\\n/**\\n * @typedef {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement}\\n */\\nvar CanvasImageSource;\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/2dcontext/#canvaspathmethods\\n */\\nfunction CanvasPathMethods() {}\\n\\n/**\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.closePath = function() {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.moveTo = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.lineTo = function(x, y) {};\\n\\n/**\\n * @param {number} cpx\\n * @param {number} cpy\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {};\\n\\n/**\\n * @param {number} cp1x\\n * @param {number} cp1y\\n * @param {number} cp2x\\n * @param {number} cp2y\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.bezierCurveTo = function(\\n cp1x, cp1y, cp2x, cp2y, x, y) {};\\n\\n/**\\n * @param {number} x1\\n * @param {number} y1\\n * @param {number} x2\\n * @param {number} y2\\n * @param {number} radius\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.arcTo = function(x1, y1, x2, y2, radius) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.rect = function(x, y, w, h) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} radius\\n * @param {number} startAngle\\n * @param {number} endAngle\\n * @param {boolean=} opt_anticlockwise\\n * @return {undefined}\\n */\\nCanvasPathMethods.prototype.arc = function(\\n x, y, radius, startAngle, endAngle, opt_anticlockwise) {};\\n\\n/**\\n * @constructor\\n * @implements {CanvasPathMethods}\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#path2d-objects\\n */\\nfunction Path2D() {}\\n\\n/**\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.closePath = function() {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.moveTo = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.lineTo = function(x, y) {};\\n\\n/**\\n * @param {number} cpx\\n * @param {number} cpy\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {};\\n\\n/**\\n * @param {number} cp1x\\n * @param {number} cp1y\\n * @param {number} cp2x\\n * @param {number} cp2y\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.bezierCurveTo = function(\\n cp1x, cp1y, cp2x, cp2y, x, y) {};\\n\\n/**\\n * @param {number} x1\\n * @param {number} y1\\n * @param {number} x2\\n * @param {number} y2\\n * @param {number} radius\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.rect = function(x, y, w, h) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} radius\\n * @param {number} startAngle\\n * @param {number} endAngle\\n * @param {boolean=} optAnticlockwise\\n * @return {undefined}\\n * @override\\n */\\nPath2D.prototype.arc = function(\\n x, y, radius, startAngle, endAngle, optAnticlockwise) {};\\n\\n/**\\n * @param {Path2D} path\\n * @return {undefined}\\n */\\nPath2D.prototype.addPath = function(path) {};\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/2dcontext/#canvasdrawingstyles\\n */\\nfunction CanvasDrawingStyles() {}\\n\\n/** @type {number} */\\nCanvasDrawingStyles.prototype.lineWidth;\\n\\n/** @type {string} */\\nCanvasDrawingStyles.prototype.lineCap;\\n\\n/** @type {string} */\\nCanvasDrawingStyles.prototype.lineJoin;\\n\\n/** @type {number} */\\nCanvasDrawingStyles.prototype.miterLimit;\\n\\n/**\\n * @param {Array} segments\\n * @return {undefined}\\n */\\nCanvasDrawingStyles.prototype.setLineDash;\\n\\n/**\\n * @return {!Array}\\n */\\nCanvasDrawingStyles.prototype.getLineDash;\\n\\n/** @type {string} */\\nCanvasDrawingStyles.prototype.font;\\n\\n/** @type {string} */\\nCanvasDrawingStyles.prototype.textAlign;\\n\\n/** @type {string} */\\nCanvasDrawingStyles.prototype.textBaseline;\\n\\n/**\\n * @constructor\\n * @implements {CanvasDrawingStyles}\\n * @implements {CanvasPathMethods}\\n * @see http://www.w3.org/TR/2dcontext/#canvasrenderingcontext2d\\n */\\nfunction CanvasRenderingContext2D() {}\\n\\n/** @const {!HTMLCanvasElement} */\\nCanvasRenderingContext2D.prototype.canvas;\\n\\n/**\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.save = function() {};\\n\\n/**\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D';a.a+='.prototype.restore = function() {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.scale = function(x, y) {};\\n\\n/**\\n * @param {number} angle\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.rotate = function(angle) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.translate = function(x, y) {};\\n\\n/**\\n * @param {number} m11\\n * @param {number} m12\\n * @param {number} m21\\n * @param {number} m22\\n * @param {number} dx\\n * @param {number} dy\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.transform = function(\\n m11, m12, m21, m22, dx, dy) {};\\n\\n/**\\n * @param {number} m11\\n * @param {number} m12\\n * @param {number} m21\\n * @param {number} m22\\n * @param {number} dx\\n * @param {number} dy\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.setTransform = function(\\n m11, m12, m21, m22, dx, dy) {};\\n\\n/**\\n * @param {number} x0\\n * @param {number} y0\\n * @param {number} x1\\n * @param {number} y1\\n * @return {!CanvasGradient}\\n * @throws {Error}\\n */\\nCanvasRenderingContext2D.prototype.createLinearGradient = function(\\n x0, y0, x1, y1) {};\\n\\n/**\\n * @param {number} x0\\n * @param {number} y0\\n * @param {number} r0\\n * @param {number} x1\\n * @param {number} y1\\n * @param {number} r1\\n * @return {!CanvasGradient}\\n * @throws {Error}\\n */\\nCanvasRenderingContext2D.prototype.createRadialGradient = function(\\n x0, y0, r0, x1, y1, r1) {};\\n\\n/**\\n * @param {CanvasImageSource} image\\n * @param {string} repetition\\n * @return {?CanvasPattern}\\n * @throws {Error}\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-createpattern\\n */\\nCanvasRenderingContext2D.prototype.createPattern = function(\\n image, repetition) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.clearRect = function(x, y, w, h) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.fillRect = function(x, y, w, h) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.strokeRect = function(x, y, w, h) {};\\n\\n/**\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.beginPath = function() {};\\n\\n/**\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.closePath = function() {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.moveTo = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.lineTo = function(x, y) {};\\n\\n/**\\n * @param {number} cpx\\n * @param {number} cpy\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.quadraticCurveTo = function(\\n cpx, cpy, x, y) {};\\n\\n/**\\n * @param {number} cp1x\\n * @param {number} cp1y\\n * @param {number} cp2x\\n * @param {number} cp2y\\n * @param {number} x\\n * @param {number} y\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.bezierCurveTo = function(\\n cp1x, cp1y, cp2x, cp2y, x, y) {};\\n\\n/**\\n * @param {number} x1\\n * @param {number} y1\\n * @param {number} x2\\n * @param {number} y2\\n * @param {number} radius\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} w\\n * @param {number} h\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.rect = function(x, y, w, h) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} radius\\n * @param {number} startAngle\\n * @param {number} endAngle\\n * @param {boolean=} opt_anticlockwise\\n * @return {undefined}\\n * @override\\n */\\nCanvasRenderingContext2D.prototype.arc = function(\\n x, y, radius, startAngle, endAngle, opt_anticlockwise) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} radiusX\\n * @param {number} radiusY\\n * @param {number} rotation\\n * @param {number} startAngle\\n * @param {number} endAngle\\n * @param {boolean=} opt_anticlockwise\\n * @return {undefined}\\n * @see http://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/ellipse\\n */\\nCanvasRenderingContext2D.prototype.ellipse = function(\\n x, y, radiusX, radiusY, rotation, startAngle, endAngle, opt_anticlockwise) {\\n};\\n\\n/**\\n * @param {Path2D|string=} optFillRuleOrPath\\n * @param {string=} optFillRule\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.fill = function(optFillRuleOrPath, optFillRule) {};\\n\\n/**\\n * @param {Path2D=} optStroke\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.stroke = function(optStroke) {};\\n\\n/**\\n * @param {Element} element\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.drawFocusIfNeeded = function(element) {};\\n\\n/**\\n * @param {Path2D|string=} optFillRuleOrPath\\n * @param {string=} optFillRule\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.clip = function(optFillRuleOrPath, optFillRule) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {boolean}\\n * @nosideeffects\\n * @see http://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInStroke\\n */\\nCanvasRenderingContext2D.prototype.isPointInStroke = function(x, y) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {string=} opt_fillRule\\n * @return {boolean}\\n * @nosideeffects\\n */\\nCanvasRenderingContext2D.prototype.isPointInPath = function(\\n x, y, opt_fillRule) {};\\n\\n/**\\n * @param {string} text\\n * @param {number} x\\n * @param {number} y\\n * @param {number=} opt_maxWidth\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.fillText = function(\\n text, x, y, opt_maxWidth) {};\\n\\n/**\\n * @param {string} text\\n * @param {number} x\\n * @param {number} y\\n * @param {number=} opt_maxWidth\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.strokeText = function(\\n text, x, y, opt_maxWidth) {};\\n\\n/**\\n * @param {string} text\\n * @return {!TextMetrics}\\n * @nosideeffects\\n */\\nCanvasRenderingContext2D.prototype.measureText = function(text) {};\\n\\n/**\\n * @param {CanvasImageSource} image\\n * @param {number} dx Destination x coordinate.\\n * @param {number} dy Destination y coordinate.\\n * @param {number=} opt_dw Destination box width. Defaults to the image width.\\n * @param {number=} opt_dh Destination box height.\\n * Defaults to the image height.\\n * @param {number=} opt_sx Source box x coordinate. Used to select a portion of\\n * the source image to draw. Defaults to 0.\\n * @param {number=} opt_sy Source box y coordinate. Used to select a portion of\\n * the source image to draw. Defaults to 0.\\n * @param {number=} opt_sw Source box width. Used to select a portion of\\n * the source image to draw. Defaults to the full image width.\\n * @param {number=} opt_sh Source box height. Used to select a portion of\\n * the source image to draw. Defaults to the full image height.\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.drawImage = function(\\n image, dx, dy, opt_dw, opt_dh, opt_sx, opt_sy, opt_sw, opt_sh) {};\\n\\n/**\\n * @param {number} sw\\n * @param {number} sh\\n * @return {!ImageData}\\n * @throws {Error}\\n * @nosideeffects\\n */\\nCanvasRenderingContext2D.prototype.createImageData = function(sw, sh) {};\\n\\n/**\\n * @param {number} sx\\n * @param {number} sy\\n * @param {number} sw\\n * @param {number} sh\\n * @return {!ImageData}\\n * @throws {Error}\\n */\\nCanvasRenderingContext2D.prototype.getImageData = function(sx, sy, sw, sh) {};\\n\\n/**\\n * @param {ImageData} imagedata\\n * @param {number} dx\\n * @param {number} dy\\n * @param {number=} opt_dirtyX\\n * @param {number=} opt_dirtyY\\n * @param {number=} opt_dirtyWidth\\n * @param {number=} opt_dirtyHeight\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.putImageData = function(imagedata, dx, dy,\\n opt_dirtyX, opt_dirtyY, opt_dirtyWidth, opt_dirtyHeight) {};\\n\\n/**\\n * Note: WebKit only\\n * @param {number|string=} opt_a\\n * @param {number=} opt_b\\n * @param {number=} opt_c\\n * @param {number=} opt_d\\n * @param {number=} opt_e\\n * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.setFillColor;\\n\\n/**\\n * Note: WebKit only\\n * @param {number|string=} opt_a\\n * @param {number=} opt_b\\n * @param {number=} opt_c\\n * @param {number=} opt_d\\n * @param {number=} opt_e\\n * @see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/WebKitDOMRef/CanvasRenderingContext2D_idl/Classes/CanvasRenderingContext2D/index.html\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.setStrokeColor;\\n\\n/**\\n * @return {!Array}\\n */\\nCanvasRenderingContext2D.prototype.getLineDash;\\n\\n/**\\n * @param {Array} segments\\n * @return {undefined}\\n */\\nCanvasRenderingContext2D.prototype.setLineDash;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.fillColor;\\n\\n/**\\n * @type {string|!CanvasGradient|!CanvasPattern}\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:dom-context-2d-fillstyle\\n * @implicitCast\\n */\\nCanvasRenderingContext2D.prototype.fillStyle;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.font;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.globalAlpha;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.globalCompositeOperation;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.lineWidth;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.lineCap;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.lineJoin;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.miterLimit;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.shadowBlur;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.shadowColor;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.shadowOffsetX;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.shadowOffsetY;\\n\\n/**\\n * @type {string|!CanvasGradient|!CanvasPattern}\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:dom-context-2d-strokestyle\\n * @implicitCast\\n */\\nCanvasRenderingContext2D.prototype.strokeStyle;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.strokeColor;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.textAlign;\\n\\n/** @type {string} */\\nCanvasRenderingContext2D.prototype.textBaseline;\\n\\n/** @type {number} */\\nCanvasRenderingContext2D.prototype.lineDashOffset;\\n\\n/**\\n * @constructor\\n */\\nfunction CanvasGradient() {}\\n\\n/**\\n * @param {number} offset\\n * @param {string} color\\n * @return {undefined}\\n */\\nCanvasGradient.prototype.addColorStop = function(offset, color) {};\\n\\n/**\\n * @constructor\\n */\\nfunction CanvasPattern() {}\\n\\n/**\\n * @constructor\\n */\\nfunction TextMetrics() {}\\n\\n/** @const {number} */\\nTextMetrics.prototype.width;\\n\\n/**\\n * @param {Uint8ClampedArray|number} dataOrWidth In the first form, this is the\\n * array of pixel data. In the second form, this is the image width.\\n * @param {number} widthOrHeight In the first form, this is the image width. In\\n * the second form, this is the image height.\\n * @param {number=} opt_height In the first form, this is the optional image\\n * height. The second form omits this argument.\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#imagedata\\n * @constructor\\n */\\nfunction ImageData(dataOrWidth, widthOrHeight, opt_height) {}\\n\\n/** @const {Uint8ClampedArray} */\\nImageData.prototype.data;\\n\\n/** @const {number} */\\nImageData.prototype.width;\\n\\n/** @const {number} */\\nImageData.prototype.height;\\n\\n/**\\n * @see https://www.w3.org/TR/html51/webappapis.html#webappapis-images\\n * @interface\\n */\\nfunction ImageBitmap() {}\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nImageBitmap.prototype.width;\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nImageBitmap.prototype.height;\\n\\n/**\\n * @constructor\\n */\\nfunction ClientInformation() {}\\n\\n/** @type {boolean} */\\nClientInformation.prototype.onLine;\\n\\n/**\\n * @param {string} protocol\\n * @param {string} uri\\n * @param {string} title\\n * @return {undefined}\\n */\\nClientInformation.prototype.registerProtocolHandler = function(\\n protocol, uri, title) {};\\n\\n/**\\n * @param {string} mimeType\\n * @param {string} uri\\n * @param {string} title\\n * @return {undefined}\\n */\\nClientInformation.prototype.registerContentHandler = function(\\n mimeType, uri, title) {};\\n\\n// HTML5 Database objects\\n/**\\n * @constructor\\n */\\nfunction Database() {}\\n\\n/**\\n * @type {string}\\n */\\nDatabase.prototype.version;\\n\\n/**\\n * @param {function(!SQLTransaction) : void} callback\\n * @param {(function(!SQLError) : void)=} opt_errorCallback\\n * @param {Function=} opt_Callback\\n * @return {undefined}\\n */\\nDatabase.prototype.transaction = function(\\n callback, opt_errorCallback, opt_Callback) {};\\n\\n/**\\n * @param {function(!SQLTransaction) : void} callback\\n * @param {(function(!SQLError) : void)=} opt_errorCallback\\n * @param {Function=} opt_Callback\\n * @return {undefined}\\n */\\nDatabase.prototype.readTransaction = function(\\n callback, opt_errorCallback, opt_Callback) {};\\n\\n/**\\n * @param {string} oldVersion\\n * @param {string} newVersion\\n * @param {function(!SQLTransaction) : void} callback\\n * @param {function(!SQLError) : void} errorCallback\\n * @param {Function} successCallback\\n * @return {undefined}\\n */\\nDatabase.prototype.changeVersion = function(\\n oldVersion, newVersion, callback, errorCallback, successCallback) {};\\n\\n/**\\n * @interface\\n */\\nfunction DatabaseCallback() {}\\n\\n/**\\n * @param {!Database} db\\n * @return {undefined}\\n */\\nDatabaseCallback.prototype.handleEvent = function(db) {};\\n\\n/**\\n * @constructor\\n */\\nfunction SQLError() {}\\n\\n/**\\n * @type {number}\\n */\\nSQLError.prototype.code;\\n\\n/**\\n * @type {string}\\n */\\nSQLError.prototype.message;\\n\\n/**\\n * @constructor\\n */\\nfunction SQLTransaction() {}\\n\\n/**\\n * @param {string} sqlStatement\\n * @param {Array<*>=} opt_queryArgs\\n * @param {SQLStatementCallback=} opt_callback\\n * @param {(function(!SQLTransaction, !SQLError) : (boolean|void))=}\\n * opt_errorCallback\\n * @return {undefined}\\n */\\nSQLTransaction.prototype.executeSql = function(\\n sqlStatement, opt_queryArgs, opt_callback, opt_errorCallback) {};\\n\\n/**\\n * @typedef {(function(!SQLTransaction, !SQLResultSet) : void)}\\n */\\nvar SQLStatementCallback;\\n\\n/**\\n * @constructor\\n */\\nfunction SQLResultSet() {}\\n\\n/**\\n * @type {number}\\n */\\nSQLResultSet.prototype.insertId;\\n\\n/**\\n * @type {number}\\n */\\nSQLResultSet.prototype.rowsAffected;\\n\\n/**\\n * @type {!SQLResultSetRowList}\\n */\\nSQLResultSet.prototype.rows;\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist\\n */\\nfunction SQLResultSetRowList() {}\\n\\n/**\\n * @type {number}\\n */\\nSQLResultSetRowList.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {Object}\\n * @nosideeffects\\n */\\nSQLResultSetRowList.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} name\\n * @param {string} version\\n * @param {string} description\\n * @param {number} size\\n * @param {(DatabaseCallback|function(Database))=} opt_callback\\n * @return {!Database}\\n */\\nfunction openDatabase(name, version, description, size, opt_callback) {}\\n\\n/**\\n * @param {string} name\\n * @param {string} version\\n * @param {string} description\\n * @param {number} size\\n * @param {(DatabaseCallback|function(Database))=} opt_callback\\n * @return {!Database}\\n */\\nWindow.prototype.openDatabase =\\n function(name, version, description, size, opt_callback) {};\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/';a.a+="TR/html5/embedded-content-0.html#dom-img-complete\\n */\\nHTMLImageElement.prototype.complete;\\n\\n/**\\n * @type {number}\\n * @see https://www.w3.org/TR/html5/embedded-content-0.html#dom-img-naturalwidth\\n */\\nHTMLImageElement.prototype.naturalWidth;\\n\\n/**\\n * @type {number}\\n * @see https://www.w3.org/TR/html5/embedded-content-0.html#dom-img-naturalheight\\n */\\nHTMLImageElement.prototype.naturalHeight;\\n\\n/**\\n * @type {string}\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-crossorigin\\n */\\nHTMLImageElement.prototype.crossOrigin;\\n\\n/**\\n * This is a superposition of the Window and Worker postMessage methods.\\n * @param {*} message\\n * @param {(string|!Array)=} opt_targetOriginOrTransfer\\n * @param {(string|!Array|!Array)=}\\n * opt_targetOriginOrPortsOrTransfer\\n * @return {void}\\n */\\nfunction postMessage(message, opt_targetOriginOrTransfer,\\n opt_targetOriginOrPortsOrTransfer) {}\\n\\n/**\\n * The postMessage method (as implemented in Opera).\\n * @param {string} message\\n */\\nDocument.prototype.postMessage = function(message) {};\\n\\n/**\\n * Document head accessor.\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#the-head-element-0\\n * @type {HTMLHeadElement}\\n */\\nDocument.prototype.head;\\n\\n/**\\n * @see https://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/DOMApplicationCache/DOMApplicationCache.html\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction DOMApplicationCache() {}\\n\\n/** @override */\\nDOMApplicationCache.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nDOMApplicationCache.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nDOMApplicationCache.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * The object isn't associated with an application cache. This can occur if the\\n * update process fails and there is no previous cache to revert to, or if there\\n * is no manifest file.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.UNCACHED = 0;\\n\\n/**\\n * The cache is idle.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.IDLE = 1;\\n\\n/**\\n * The update has started but the resources are not downloaded yet - for\\n * example, this can happen when the manifest file is fetched.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.CHECKING = 2;\\n\\n/**\\n * The resources are being downloaded into the cache.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.DOWNLOADING = 3;\\n\\n/**\\n * Resources have finished downloading and the new cache is ready to be used.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.UPDATEREADY = 4;\\n\\n/**\\n * The cache is obsolete.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.OBSOLETE = 5;\\n\\n/**\\n * The current status of the application cache.\\n * @type {number}\\n */\\nDOMApplicationCache.prototype.status;\\n\\n/**\\n * Sent when the update process finishes for the first time; that is, the first\\n * time an application cache is saved.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.oncached;\\n\\n/**\\n * Sent when the cache update process begins.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.onchecking;\\n\\n/**\\n * Sent when the update process begins downloading resources in the manifest\\n * file.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.ondownloading;\\n\\n/**\\n * Sent when an error occurs.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.onerror;\\n\\n/**\\n * Sent when the update process finishes but the manifest file does not change.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.onnoupdate;\\n\\n/**\\n * Sent when each resource in the manifest file begins to download.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.onprogress;\\n\\n/**\\n * Sent when there is an existing application cache, the update process\\n * finishes, and there is a new application cache ready for use.\\n * @type {?function(!Event)}\\n */\\nDOMApplicationCache.prototype.onupdateready;\\n\\n/**\\n * Replaces the active cache with the latest version.\\n * @throws {DOMException}\\n * @return {undefined}\\n */\\nDOMApplicationCache.prototype.swapCache = function() {};\\n\\n/**\\n * Manually triggers the update process.\\n * @throws {DOMException}\\n * @return {undefined}\\n */\\nDOMApplicationCache.prototype.update = function() {};\\n\\n/** @type {DOMApplicationCache} */\\nvar applicationCache;\\n\\n/** @type {DOMApplicationCache} */\\nWindow.prototype.applicationCache;\\n\\n/**\\n * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers\\n * @param {...string} var_args\\n * @return {undefined}\\n */\\nWindow.prototype.importScripts = function(var_args) {};\\n\\n/**\\n * @see https://developer.mozilla.org/En/DOM/Worker/Functions_available_to_workers\\n * @param {...string} var_args\\n * @return {undefined}\\n */\\nfunction importScripts(var_args) {}\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction WebWorker() {}\\n\\n/** @override */\\nWebWorker.prototype.addEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWebWorker.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nWebWorker.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * Stops the worker process\\n * @return {undefined}\\n */\\nWebWorker.prototype.terminate = function() {};\\n\\n/**\\n * Posts a message to the worker thread.\\n * @param {string} message\\n * @return {undefined}\\n */\\nWebWorker.prototype.postMessage = function(message) {};\\n\\n/**\\n * Sent when the worker thread posts a message to its creator.\\n * @type {?function(!MessageEvent<*>)}\\n */\\nWebWorker.prototype.onmessage;\\n\\n/**\\n * Sent when the worker thread encounters an error.\\n * TODO(tbreisacher): Should this change to function(!ErrorEvent)?\\n * @type {?function(!Event)}\\n */\\nWebWorker.prototype.onerror;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction Worker(opt_arg0) {}\\n\\n/** @override */\\nWorker.prototype.addEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWorker.prototype.removeEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWorker.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * Stops the worker process\\n * @return {undefined}\\n */\\nWorker.prototype.terminate = function() {};\\n\\n/**\\n * Posts a message to the worker thread.\\n * @param {*} message\\n * @param {Array=} opt_transfer\\n * @return {undefined}\\n */\\nWorker.prototype.postMessage = function(message, opt_transfer) {};\\n\\n/**\\n * Posts a message to the worker thread.\\n * @param {*} message\\n * @param {Array=} opt_transfer\\n * @return {undefined}\\n */\\nWorker.prototype.webkitPostMessage = function(message, opt_transfer) {};\\n\\n/**\\n * Sent when the worker thread posts a message to its creator.\\n * @type {?function(!MessageEvent<*>)}\\n */\\nWorker.prototype.onmessage;\\n\\n/**\\n * Sent when the worker thread encounters an error.\\n * TODO(tbreisacher): Should this change to function(!ErrorEvent)?\\n * @type {?function(!Event)}\\n */\\nWorker.prototype.onerror;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @param {string} scriptURL The URL of the script to run in the SharedWorker.\\n * @param {string=} opt_name A name that can later be used to obtain a\\n * reference to the same SharedWorker.\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction SharedWorker(scriptURL, opt_name) {}\\n\\n/** @override */\\nSharedWorker.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nSharedWorker.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nSharedWorker.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * @type {!MessagePort}\\n */\\nSharedWorker.prototype.port;\\n\\n/**\\n * Called on network errors for loading the initial script.\\n * TODO(tbreisacher): Should this change to function(!ErrorEvent)?\\n * @type {?function(!Event)}\\n */\\nSharedWorker.prototype.onerror;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @see http://www.w3.org/TR/url-1/#dom-urlutilsreadonly\\n * @interface\\n */\\nfunction WorkerLocation() {}\\n\\n/** @type {string} */\\nWorkerLocation.prototype.href;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.origin;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.protocol;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.host;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.hostname;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.port;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.pathname;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.search;\\n\\n/** @type {string} */\\nWorkerLocation.prototype.hash;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @interface\\n * @extends {EventTarget}\\n */\\nfunction WorkerGlobalScope() {}\\n\\n/** @type {!WorkerGlobalScope} */\\nWorkerGlobalScope.prototype.self;\\n\\n/** @type {!WorkerLocation} */\\nWorkerGlobalScope.prototype.location;\\n\\n/**\\n * Closes the worker represented by this WorkerGlobalScope.\\n * @return {undefined}\\n */\\nWorkerGlobalScope.prototype.close = function() {};\\n\\n/**\\n * Sent when the worker encounters an error.\\n * @type {?function(!Event)}\\n */\\nWorkerGlobalScope.prototype.onerror;\\n\\n/**\\n * Sent when the worker goes offline.\\n * @type {?function(!Event)}\\n */\\nWorkerGlobalScope.prototype.onoffline;\\n\\n/**\\n * Sent when the worker goes online.\\n * @type {?function(!Event)}\\n */\\nWorkerGlobalScope.prototype.ononline;\\n\\n/** @type {!WorkerPerformance} */\\nWorkerGlobalScope.prototype.performance;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @interface\\n * @extends {WorkerGlobalScope}\\n */\\nfunction DedicatedWorkerGlobalScope() {}\\n\\n/**\\n * Posts a message to creator of this worker.\\n * @param {*} message\\n * @param {Array=} opt_transfer\\n * @return {undefined}\\n */\\nDedicatedWorkerGlobalScope.prototype.postMessage =\\n function(message, opt_transfer) {};\\n\\n/**\\n * Posts a message to creator of this worker.\\n * @param {*} message\\n * @param {Array=} opt_transfer\\n * @return {undefined}\\n */\\nDedicatedWorkerGlobalScope.prototype.webkitPostMessage =\\n function(message, opt_transfer) {};\\n\\n/**\\n * Sent when the creator posts a message to this worker.\\n * @type {?function(!MessageEvent<*>)}\\n */\\nDedicatedWorkerGlobalScope.prototype.onmessage;\\n\\n/**\\n * @see http://dev.w3.org/html5/workers/\\n * @interface\\n * @extends {WorkerGlobalScope}\\n */\\nfunction SharedWorkerGlobalScope() {}\\n\\n/** @type {string} */\\nSharedWorkerGlobalScope.prototype.name;\\n\\n/**\\n * Sent when a connection to this worker is opened.\\n * @type {?function(!Event)}\\n */\\nSharedWorkerGlobalScope.prototype.onconnect;\\n\\n/** @type {!Array|undefined} */\\nHTMLElement.observedAttributes;\\n\\n/**\\n * @param {!Document} oldDocument\\n * @param {!Document} newDocument\\n */\\nHTMLElement.prototype.adoptedCallback = function(oldDocument, newDocument) {};\\n\\n/**\\n * @param {!{mode: string}} options\\n * @return {!ShadowRoot}\\n */\\nHTMLElement.prototype.attachShadow = function(options) {};\\n\\n/**\\n * @param {string} attributeName\\n * @param {?string} oldValue\\n * @param {?string} newValue\\n * @param {?string} namespace\\n */\\nHTMLElement.prototype.attributeChangedCallback = function(attributeName, oldValue, newValue, namespace) {};\\n\\n/** @type {function()|undefined} */\\nHTMLElement.prototype.connectedCallback;\\n\\n/** @type {Element} */\\nHTMLElement.prototype.contextMenu;\\n\\n/** @type {function()|undefined} */\\nHTMLElement.prototype.disconnectedCallback;\\n\\n/** @type {boolean} */\\nHTMLElement.prototype.draggable;\\n\\n/**\\n * This is actually a DOMSettableTokenList property. However since that\\n * interface isn't currently defined and no known browsers implement this\\n * feature, just define the property for now.\\n *\\n * @const\\n * @type {Object}\\n */\\nHTMLElement.prototype.dropzone;\\n\\n/**\\n * @see http://www.w3.org/TR/html5/dom.html#dom-getelementsbyclassname\\n * @param {string} classNames\\n * @return {!NodeList}\\n * @nosideeffects\\n */\\nHTMLElement.prototype.getElementsByClassName = function(classNames) {};\\n// NOTE: Document.prototype.getElementsByClassName is in gecko_dom.js\\n\\n/** @type {boolean} */\\nHTMLElement.prototype.hidden;\\n\\n/** @type {boolean} */\\nHTMLElement.prototype.spellcheck;\\n\\n/**\\n * @see https://dom.spec.whatwg.org/#dictdef-getrootnodeoptions\\n * @typedef {{\\n * composed: boolean\\n * }}\\n */\\nvar GetRootNodeOptions;\\n\\n/**\\n * @see https://dom.spec.whatwg.org/#dom-node-getrootnode\\n * @param {GetRootNodeOptions=} opt_options\\n * @return {!Node}\\n */\\nNode.prototype.getRootNode = function(opt_options) {};\\n\\n/**\\n * @see http://www.w3.org/TR/components-intro/\\n * @return {!ShadowRoot}\\n */\\nHTMLElement.prototype.createShadowRoot;\\n\\n/**\\n * @see http://www.w3.org/TR/components-intro/\\n * @return {!ShadowRoot}\\n */\\nHTMLElement.prototype.webkitCreateShadowRoot;\\n\\n/**\\n * @see http://www.w3.org/TR/shadow-dom/\\n * @type {ShadowRoot}\\n */\\nHTMLElement.prototype.shadowRoot;\\n\\n/**\\n * @see http://www.w3.org/TR/shadow-dom/\\n * @return {!NodeList}\\n */\\nHTMLElement.prototype.getDestinationInsertionPoints = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/components-intro/\\n * @type {function()}\\n */\\nHTMLElement.prototype.createdCallback;\\n\\n/**\\n * @see http://w3c.github.io/webcomponents/explainer/#lifecycle-callbacks\\n * @type {function()}\\n */\\nHTMLElement.prototype.attachedCallback;\\n\\n/**\\n * @see http://w3c.github.io/webcomponents/explainer/#lifecycle-callbacks\\n * @type {function()}\\n */\\nHTMLElement.prototype.detachedCallback;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.download;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.hash;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.host;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.hostname;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.pathname;\\n\\n/**\\n * The 'ping' attribute is known to be supported in recent versions (as of\\n * mid-2014) of Chrome, Safari, and Firefox, and is not supported in any\\n * current version of Internet Explorer.\\n *\\n * @type {string}\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#hyperlink-auditing\\n */\\nHTMLAnchorElement.prototype.ping;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.port;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.protocol;\\n\\n/** @type {string} */\\nHTMLAnchorElement.prototype.search;\\n\\n/** @type {string} */\\nHTMLAreaElement.prototype.download;\\n\\n/**\\n * @type {string}\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#hyperlink-auditing\\n */\\nHTMLAreaElement.prototype.ping;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html-markup/iframe.html#iframe.attrs.srcdoc\\n */\\nHTMLIFrameElement.prototype.srcdoc;\\n\\n/**\\n * @type {?string}\\n * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-iframe-element.html#attr-iframe-sandbox\\n */\\nHTMLIFrameElement.prototype.sandbox;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.autocomplete;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.dirname;\\n\\n/** @type {FileList} */\\nHTMLInputElement.prototype.files;\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/TR/html5/forms.html#dom-input-indeterminate\\n */\\nHTMLInputElement.prototype.indeterminate;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.list;\\n\\n/** @implicitCast @type {string} */\\nHTMLInputElement.prototype.max;\\n\\n/** @implicitCast @type {string} */\\nHTMLInputElement.prototype.min;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.pattern;\\n\\n/** @type {boolean} */\\nHTMLInputElement.prototype.multiple;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.placeholder;\\n\\n/** @type {boolean} */\\nHTMLInputElement.prototype.required;\\n\\n/** @implicitCast @type {string} */\\nHTMLInputElement.prototype.step;\\n\\n/** @type {Date} */\\nHTMLInputElement.prototype.valueAsDate;\\n\\n/** @type {number} */\\nHTMLInputElement.prototype.valueAsNumber;\\n\\n/**\\n * Changes the form control's value by the value given in the step attribute\\n * multipli";a.a+="ed by opt_n.\\n * @param {number=} opt_n step multiplier. Defaults to 1.\\n * @return {undefined}\\n */\\nHTMLInputElement.prototype.stepDown = function(opt_n) {};\\n\\n/**\\n * Changes the form control's value by the value given in the step attribute\\n * multiplied by opt_n.\\n * @param {number=} opt_n step multiplier. Defaults to 1.\\n * @return {undefined}\\n */\\nHTMLInputElement.prototype.stepUp = function(opt_n) {};\\n\\n\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement\\n */\\nfunction HTMLMediaElement() {}\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nHTMLMediaElement.HAVE_NOTHING; // = 0\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nHTMLMediaElement.HAVE_METADATA; // = 1\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nHTMLMediaElement.HAVE_CURRENT_DATA; // = 2\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nHTMLMediaElement.HAVE_FUTURE_DATA; // = 3\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nHTMLMediaElement.HAVE_ENOUGH_DATA; // = 4\\n\\n/** @type {MediaError} */\\nHTMLMediaElement.prototype.error;\\n\\n/** @type {string} */\\nHTMLMediaElement.prototype.src;\\n\\n/** @type {string} */\\nHTMLMediaElement.prototype.currentSrc;\\n\\n/** @type {number} */\\nHTMLMediaElement.prototype.networkState;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.autobuffer;\\n\\n/** @type {!TimeRanges} */\\nHTMLMediaElement.prototype.buffered;\\n\\n/** @type {!MediaStream} */\\nHTMLMediaElement.prototype.srcObject;\\n\\n/**\\n * Loads the media element.\\n * @return {undefined}\\n */\\nHTMLMediaElement.prototype.load = function() {};\\n\\n/**\\n * @param {string} type Type of the element in question in question.\\n * @return {string} Whether it can play the type.\\n * @nosideeffects\\n */\\nHTMLMediaElement.prototype.canPlayType = function(type) {};\\n\\n/** Event handlers */\\n\\n/** @type {?function(Event)} */\\nHTMLMediaElement.prototype.onabort;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.oncanplay;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.oncanplaythrough;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.ondurationchange;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onemptied;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onended;\\n\\n/** @type {?function(Event)} */\\nHTMLMediaElement.prototype.onerror;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onloadeddata;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onloadedmetadata;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onloadstart;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onpause;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onplay;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onplaying;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onprogress;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onratechange;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onseeked;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onseeking;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onstalled;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onsuspend;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.ontimeupdate;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onvolumechange;\\n\\n/** @type {?function(!Event)} */\\nHTMLMediaElement.prototype.onwaiting;\\n\\n/** @type {?function(Event)} */\\nHTMLImageElement.prototype.onload;\\n\\n/** @type {?function(Event)} */\\nHTMLImageElement.prototype.onerror;\\n\\n/** @type {number} */\\nHTMLMediaElement.prototype.readyState;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.seeking;\\n\\n/**\\n * The current time, in seconds.\\n * @type {number}\\n */\\nHTMLMediaElement.prototype.currentTime;\\n\\n/**\\n * The absolute timeline offset.\\n * @return {!Date}\\n */\\nHTMLMediaElement.prototype.getStartDate = function() {};\\n\\n/**\\n * The length of the media in seconds.\\n * @type {number}\\n */\\nHTMLMediaElement.prototype.duration;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.paused;\\n\\n/** @type {number} */\\nHTMLMediaElement.prototype.defaultPlaybackRate;\\n\\n/** @type {number} */\\nHTMLMediaElement.prototype.playbackRate;\\n\\n/** @type {TimeRanges} */\\nHTMLMediaElement.prototype.played;\\n\\n/** @type {TimeRanges} */\\nHTMLMediaElement.prototype.seekable;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.ended;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.autoplay;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.loop;\\n\\n/**\\n * Starts playing the media.\\n * @return {?Promise} This is a *nullable* Promise on purpose unlike\\n * the HTML5 spec because supported older browsers (incl. Smart TVs) don't\\n * return a Promise.\\n */\\nHTMLMediaElement.prototype.play = function() {};\\n\\n/**\\n * Pauses the media.\\n * @return {undefined}\\n */\\nHTMLMediaElement.prototype.pause = function() {};\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.controls;\\n\\n/**\\n * The audio volume, from 0.0 (silent) to 1.0 (loudest).\\n * @type {number}\\n */\\nHTMLMediaElement.prototype.volume;\\n\\n/** @type {boolean} */\\nHTMLMediaElement.prototype.muted;\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-addtexttrack\\n * @param {string} kind Kind of the text track.\\n * @param {string=} opt_label Label of the text track.\\n * @param {string=} opt_language Language of the text track.\\n * @return {!TextTrack} TextTrack object added to the media element.\\n */\\nHTMLMediaElement.prototype.addTextTrack =\\n function(kind, opt_label, opt_language) {};\\n\\n/** @type {!TextTrackList} */\\nHTMLMediaElement.prototype.textTracks;\\n\\n/**\\n * The ID of the audio device through which output is being delivered, or an\\n * empty string if using the default device.\\n *\\n * Implemented as a draft spec in Chrome 49+.\\n *\\n * @see https://w3c.github.io/mediacapture-output/#htmlmediaelement-extensions\\n * @type {string}\\n */\\nHTMLMediaElement.prototype.sinkId;\\n\\n/**\\n * Sets the audio device through which output should be delivered.\\n *\\n * Implemented as a draft spec in Chrome 49+.\\n *\\n * @param {string} sinkId The ID of the audio output device, or empty string\\n * for default device.\\n *\\n * @see https://w3c.github.io/mediacapture-output/#htmlmediaelement-extensions\\n * @return {!Promise}\\n */\\nHTMLMediaElement.prototype.setSinkId = function(sinkId) {};\\n\\n\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see https://html.spec.whatwg.org/multipage/dom.html#htmlunknownelement\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#customized-built-in-element-restrictions\\n * @see https://w3c.github.io/webcomponents/spec/custom/#custom-elements-api\\n */\\nfunction HTMLUnknownElement() {}\\n\\n\\n\\n/**\\n * @see http://www.w3.org/TR/shadow-dom/\\n * @return {!NodeList}\\n */\\nText.prototype.getDestinationInsertionPoints = function() {};\\n\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttracklist\\n * @constructor\\n * @implements {IArrayLike}\\n */\\nfunction TextTrackList() {}\\n\\n/** @type {number} */\\nTextTrackList.prototype.length;\\n\\n/**\\n * @param {string} id\\n * @return {TextTrack}\\n */\\nTextTrackList.prototype.getTrackById = function(id) {};\\n\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrack\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction TextTrack() {}\\n\\n/**\\n * @param {TextTrackCue} cue\\n * @return {undefined}\\n */\\nTextTrack.prototype.addCue = function(cue) {};\\n\\n/**\\n * @param {TextTrackCue} cue\\n * @return {undefined}\\n */\\nTextTrack.prototype.removeCue = function(cue) {};\\n\\n/**\\n * @const {TextTrackCueList}\\n */\\nTextTrack.prototype.activeCues;\\n\\n/**\\n * @const {TextTrackCueList}\\n */\\nTextTrack.prototype.cues;\\n\\n/**\\n * @type {string}\\n */\\nTextTrack.prototype.mode;\\n\\n/** @override */\\nTextTrack.prototype.addEventListener = function(\\n type, listener, opt_useCapture) {};\\n\\n/** @override */\\nTextTrack.prototype.dispatchEvent = function(evt) {};\\n\\n/** @override */\\nTextTrack.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcuelist\\n * @constructor\\n * @implements {IArrayLike}\\n */\\nfunction TextTrackCueList() {}\\n\\n/** @const {number} */\\nTextTrackCueList.prototype.length;\\n\\n/**\\n * @param {string} id\\n * @return {TextTrackCue}\\n */\\nTextTrackCueList.prototype.getCueById = function(id) {};\\n\\n\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcue\\n * @constructor\\n * @param {number} startTime\\n * @param {number} endTime\\n * @param {string} text\\n */\\nfunction TextTrackCue(startTime, endTime, text) {}\\n\\n/** @type {string} */\\nTextTrackCue.prototype.id;\\n\\n/** @type {number} */\\nTextTrackCue.prototype.startTime;\\n\\n/** @type {number} */\\nTextTrackCue.prototype.endTime;\\n\\n/** @type {string} */\\nTextTrackCue.prototype.text;\\n\\n\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#vttregion\\n * @constructor\\n */\\nfunction VTTRegion() {}\\n\\n/** @type {string} */\\nVTTRegion.prototype.id;\\n\\n/** @type {number} */\\nVTTRegion.prototype.width;\\n\\n/** @type {number} */\\nVTTRegion.prototype.lines;\\n\\n/** @type {number} */\\nVTTRegion.prototype.regionAnchorX;\\n\\n/** @type {number} */\\nVTTRegion.prototype.regionAnchorY;\\n\\n/** @type {number} */\\nVTTRegion.prototype.viewportAnchorX;\\n\\n/** @type {number} */\\nVTTRegion.prototype.viewportAnchorY;\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#enumdef-scrollsetting\\n * @type {string}\\n */\\nVTTRegion.prototype.scroll;\\n\\n\\n\\n/**\\n * @see http://dev.w3.org/html5/webvtt/#the-vttcue-interface\\n * @constructor\\n * @extends {TextTrackCue}\\n * @param {number} startTime\\n * @param {number} endTime\\n * @param {string} text\\n */\\nfunction VTTCue(startTime, endTime, text) {}\\n\\n/** @type {?VTTRegion} */\\nVTTCue.prototype.region;\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#enumdef-directionsetting\\n * @type {string}\\n */\\nVTTCue.prototype.vertical;\\n\\n/** @type {boolean} */\\nVTTCue.prototype.snapToLines;\\n\\n/** @type {(number|string)} */\\nVTTCue.prototype.line;\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#enumdef-linealignsetting\\n * @type {string}\\n */\\nVTTCue.prototype.lineAlign;\\n\\n/** @type {(number|string)} */\\nVTTCue.prototype.position;\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#enumdef-positionalignsetting\\n * @type {string}\\n */\\nVTTCue.prototype.positionAlign;\\n\\n/** @type {number} */\\nVTTCue.prototype.size;\\n\\n/**\\n * @see https://w3c.github.io/webvtt/#enumdef-alignsetting\\n * @type {string}\\n */\\nVTTCue.prototype.align;\\n\\n/** @type {string} */\\nVTTCue.prototype.text;\\n\\n/** @return {!DocumentFragment} */\\nVTTCue.prototype.getCueAsHTML = function() {};\\n\\n\\n/**\\n * @constructor\\n * @extends {HTMLMediaElement}\\n */\\nfunction HTMLAudioElement() {}\\n\\n/**\\n * @constructor\\n * @extends {HTMLMediaElement}\\n * The webkit-prefixed attributes are defined in\\n * https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLVideoElement.idl\\n */\\nfunction HTMLVideoElement() {}\\n\\n/**\\n * Starts displaying the video in full screen mode.\\n * @return {undefined}\\n */\\nHTMLVideoElement.prototype.webkitEnterFullscreen = function() {};\\n\\n/**\\n * Starts displaying the video in full screen mode.\\n * @return {undefined}\\n */\\nHTMLVideoElement.prototype.webkitEnterFullScreen = function() {};\\n\\n/**\\n * Stops displaying the video in full screen mode.\\n * @return {undefined}\\n */\\nHTMLVideoElement.prototype.webkitExitFullscreen = function() {};\\n\\n/**\\n * Stops displaying the video in full screen mode.\\n * @return {undefined}\\n */\\nHTMLVideoElement.prototype.webkitExitFullScreen = function() {};\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.width;\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.height;\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.videoWidth;\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.videoHeight;\\n\\n/** @type {string} */\\nHTMLVideoElement.prototype.poster;\\n\\n/** @type {boolean} */\\nHTMLVideoElement.prototype.webkitSupportsFullscreen;\\n\\n/** @type {boolean} */\\nHTMLVideoElement.prototype.webkitDisplayingFullscreen;\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.webkitDecodedFrameCount;\\n\\n/** @type {number} */\\nHTMLVideoElement.prototype.webkitDroppedFrameCount;\\n\\n/**\\n * @typedef {{\\n * creationTime: number,\\n * totalVideoFrames: number,\\n * droppedVideoFrames: number,\\n * corruptedVideoFrames: number,\\n * totalFrameDelay: number\\n * }}\\n */\\nvar VideoPlaybackQuality;\\n\\n/**\\n * @see https://w3c.github.io/media-source/#htmlvideoelement-extensions\\n * @return {!VideoPlaybackQuality} Stats about the current playback.\\n */\\nHTMLVideoElement.prototype.getVideoPlaybackQuality = function() {};\\n\\n\\n/**\\n * @constructor\\n * @see https://html.spec.whatwg.org/multipage/media.html#error-codes\\n */\\nfunction MediaError() {}\\n\\n/** @type {number} */\\nMediaError.prototype.code;\\n\\n/** @type {string} */\\nMediaError.prototype.message;\\n\\n/**\\n * The fetching process for the media resource was aborted by the user agent at\\n * the user's request.\\n * @type {number}\\n */\\nMediaError.MEDIA_ERR_ABORTED;\\n\\n/**\\n * A network error of some description caused the user agent to stop fetching\\n * the media resource, after the resource was established to be usable.\\n * @type {number}\\n */\\nMediaError.MEDIA_ERR_NETWORK;\\n\\n/**\\n * An error of some description occurred while decoding the media resource,\\n * after the resource was established to be usable.\\n * @type {number}\\n */\\nMediaError.MEDIA_ERR_DECODE;\\n\\n/**\\n * The media resource indicated by the src attribute was not suitable.\\n * @type {number}\\n */\\nMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED;\\n\\n// HTML5 MessageChannel\\n/**\\n * @see http://dev.w3.org/html5/spec/comms.html#messagechannel\\n * @constructor\\n */\\nfunction MessageChannel() {}\\n\\n/**\\n * Returns the first port.\\n * @type {!MessagePort}\\n */\\nMessageChannel.prototype.port1;\\n\\n/**\\n * Returns the second port.\\n * @type {!MessagePort}\\n */\\nMessageChannel.prototype.port2;\\n\\n// HTML5 MessagePort\\n/**\\n * @see http://dev.w3.org/html5/spec/comms.html#messageport\\n * @constructor\\n * @implements {EventTarget}\\n * @implements {Transferable}\\n */\\nfunction MessagePort() {}\\n\\n/** @override */\\nMessagePort.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/** @override */\\nMessagePort.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nMessagePort.prototype.dispatchEvent = function(evt) {};\\n\\n\\n/**\\n * Posts a message through the channel, optionally with the given\\n * Array of Transferables.\\n * @param {*} message\\n * @param {Array=} opt_transfer\\n * @return {undefined}\\n */\\nMessagePort.prototype.postMessage = function(message, opt_transfer) {\\n};\\n\\n/**\\n * Begins dispatching messages received on the port.\\n * @return {undefined}\\n */\\nMessagePort.prototype.start = function() {};\\n\\n/**\\n * Disconnects the port, so that it is no longer active.\\n * @return {undefined}\\n */\\nMessagePort.prototype.close = function() {};\\n\\n/**\\n * TODO(blickly): Change this to MessageEvent<*> and add casts as needed\\n * @type {?function(!MessageEvent)}\\n */\\nMessagePort.prototype.onmessage;\\n\\n// HTML5 MessageEvent class\\n/**\\n * @typedef {Window|MessagePort|ServiceWorker}\\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageeventsource\\n */\\nvar MessageEventSource;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @template T\\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageeventinit\\n */\\nfunction MessageEventInit() {}\\n\\n/** @type {T|undefined} */\\nMessageEventInit.prototype.data;\\n\\n/** @type {(string|undefined)} */\\nMessageEventInit.prototype.origin;\\n\\n/** @type {(string|undefined)} */\\nMessageEventInit.prototype.lastEventId;\\n\\n/** @type {(?MessageEventSource|undefined)} */\\nMessageEventInit.prototype.source;\\n\\n/** @type {(!Array|undefined)} */\\nMessageEventInit.prototype.ports;\\n\\n\\n/**\\n * @see https://html.spec.w";a.a+="hatwg.org/multipage/comms.html#messageevent\\n * @constructor\\n * @extends {Event}\\n * @param {string} type\\n * @param {MessageEventInit=} opt_eventInitDict\\n * @template T\\n */\\nfunction MessageEvent(type, opt_eventInitDict) {}\\n\\n/**\\n * The data payload of the message.\\n * @type {T}\\n */\\nMessageEvent.prototype.data;\\n\\n/**\\n * The origin of the message, for server-sent events and cross-document\\n * messaging.\\n * @type {string}\\n */\\nMessageEvent.prototype.origin;\\n\\n/**\\n * The last event ID, for server-sent events.\\n * @type {string}\\n */\\nMessageEvent.prototype.lastEventId;\\n\\n/**\\n * The window that dispatched the event.\\n * @type {Window}\\n */\\nMessageEvent.prototype.source;\\n\\n/**\\n * The Array of MessagePorts sent with the message, for cross-document\\n * messaging and channel messaging.\\n * @type {Array}\\n */\\nMessageEvent.prototype.ports;\\n\\n/**\\n * Initializes the event in a manner analogous to the similarly-named methods in\\n * the DOM Events interfaces.\\n * @param {string} typeArg\\n * @param {boolean=} canBubbleArg\\n * @param {boolean=} cancelableArg\\n * @param {T=} dataArg\\n * @param {string=} originArg\\n * @param {string=} lastEventIdArg\\n * @param {?MessageEventSource=} sourceArg\\n * @param {!Array=} portsArg\\n * @return {undefined}\\n */\\nMessageEvent.prototype.initMessageEvent = function(typeArg, canBubbleArg,\\n cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, portsArg) {};\\n\\n/**\\n * Initializes the event in a manner analogous to the similarly-named methods in\\n * the DOM Events interfaces.\\n * @param {string} namespaceURI\\n * @param {string=} typeArg\\n * @param {boolean=} canBubbleArg\\n * @param {boolean=} cancelableArg\\n * @param {T=} dataArg\\n * @param {string=} originArg\\n * @param {string=} lastEventIdArg\\n * @param {?MessageEventSource=} sourceArg\\n * @param {!Array=} portsArg\\n * @return {undefined}\\n */\\nMessageEvent.prototype.initMessageEventNS = function(namespaceURI, typeArg,\\n canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg,\\n portsArg) {};\\n\\n\\n/**\\n * HTML5 BroadcastChannel class.\\n * @param {string} channelName\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\\n * @see https://html.spec.whatwg.org/multipage/comms.html#dom-broadcastchannel\\n * @implements {EventTarget}\\n * @constructor\\n */\\nfunction BroadcastChannel(channelName) {}\\n\\n/**\\n * Sends the message, of any type of object, to each BroadcastChannel object\\n * listening to the same channel.\\n * @param {*} message\\n */\\nBroadcastChannel.prototype.postMessage;\\n\\n/**\\n * Closes the channel object, indicating it won't get any new messages, and\\n * allowing it to be, eventually, garbage collected.\\n * @return {void}\\n */\\nBroadcastChannel.prototype.close;\\n\\n/** @override */\\nBroadcastChannel.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nBroadcastChannel.prototype.dispatchEvent = function(evt) {};\\n\\n/** @override */\\nBroadcastChannel.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/**\\n * An EventHandler property that specifies the function to execute when a\\n * message event is fired on this object.\\n * @type {?function(!MessageEvent<*>)}\\n */\\nBroadcastChannel.prototype.onmessage;\\n\\n/**\\n * The name of the channel.\\n * @type {string}\\n */\\nBroadcastChannel.prototype.name;\\n\\n/**\\n * HTML5 DataTransfer class.\\n *\\n * We say that this extends ClipboardData, because Event.prototype.clipboardData\\n * is a DataTransfer on WebKit but a ClipboardData on IE. The interfaces are so\\n * similar that it's easier to merge them.\\n *\\n * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html\\n * @see http://developers.whatwg.org/dnd.html#datatransferitem\\n * @constructor\\n * @extends {ClipboardData}\\n */\\nfunction DataTransfer() {}\\n\\n/** @type {string} */\\nDataTransfer.prototype.dropEffect;\\n\\n/** @type {string} */\\nDataTransfer.prototype.effectAllowed;\\n\\n/** @type {!Array} */\\nDataTransfer.prototype.types;\\n\\n/** @type {!FileList} */\\nDataTransfer.prototype.files;\\n\\n/**\\n * @param {string=} opt_format Format for which to remove data.\\n * @override\\n * @return {undefined}\\n */\\nDataTransfer.prototype.clearData = function(opt_format) {};\\n\\n/**\\n * @param {string} format Format for which to set data.\\n * @param {string} data Data to add.\\n * @override\\n * @return {boolean}\\n */\\nDataTransfer.prototype.setData = function(format, data) {};\\n\\n/**\\n * @param {string} format Format for which to set data.\\n * @return {string} Data for the given format.\\n * @override\\n */\\nDataTransfer.prototype.getData = function(format) { return ''; };\\n\\n/**\\n * @param {HTMLElement} img The image to use when dragging.\\n * @param {number} x Horizontal position of the cursor.\\n * @param {number} y Vertical position of the cursor.\\n * @return {undefined}\\n */\\nDataTransfer.prototype.setDragImage = function(img, x, y) {};\\n\\n/**\\n * @param {HTMLElement} elem Element to receive drag result events.\\n * @return {undefined}\\n */\\nDataTransfer.prototype.addElement = function(elem) {};\\n\\n/**\\n * Addition for accessing clipboard file data that are part of the proposed\\n * HTML5 spec.\\n * @type {DataTransfer}\\n */\\nMouseEvent.prototype.dataTransfer;\\n\\n/**\\n * @record\\n * @extends {MouseEventInit}\\n * @see https://w3c.github.io/uievents/#idl-wheeleventinit\\n */\\nfunction WheelEventInit() {}\\n\\n/** @type {undefined|number} */\\nWheelEventInit.prototype.deltaX;\\n\\n/** @type {undefined|number} */\\nWheelEventInit.prototype.deltaY;\\n\\n/** @type {undefined|number} */\\nWheelEventInit.prototype.deltaZ;\\n\\n/** @type {undefined|number} */\\nWheelEventInit.prototype.deltaMode;\\n\\n/**\\n * @param {string} type\\n * @param {WheelEventInit=} opt_eventInitDict\\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-WheelEvent\\n * @constructor\\n * @extends {MouseEvent}\\n */\\nfunction WheelEvent(type, opt_eventInitDict) {}\\n\\n/** @type {number} */\\nWheelEvent.DOM_DELTA_PIXEL;\\n\\n/** @type {number} */\\nWheelEvent.DOM_DELTA_LINE;\\n\\n/** @type {number} */\\nWheelEvent.DOM_DELTA_PAGE;\\n\\n/** @const {number} */\\nWheelEvent.prototype.deltaX;\\n\\n/** @const {number} */\\nWheelEvent.prototype.deltaY;\\n\\n/** @const {number} */\\nWheelEvent.prototype.deltaZ;\\n\\n/** @const {number} */\\nWheelEvent.prototype.deltaMode;\\n\\n/**\\n * HTML5 DataTransferItem class.\\n *\\n * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html\\n * @see http://developers.whatwg.org/dnd.html#datatransferitem\\n * @constructor\\n */\\nfunction DataTransferItem() {}\\n\\n/** @type {string} */\\nDataTransferItem.prototype.kind;\\n\\n/** @type {string} */\\nDataTransferItem.prototype.type;\\n\\n/**\\n * @param {function(string)} callback\\n * @return {undefined}\\n */\\nDataTransferItem.prototype.getAsString = function(callback) {};\\n\\n/**\\n * @return {?File} The file corresponding to this item, or null.\\n * @nosideeffects\\n */\\nDataTransferItem.prototype.getAsFile = function() { return null; };\\n\\n/**\\n * @return {?Entry} The Entry corresponding to this item, or null. Note that\\n * despite its name,this method only works in Chrome, and will eventually\\n * be renamed to {@code getAsEntry}.\\n * @nosideeffects\\n */\\nDataTransferItem.prototype.webkitGetAsEntry = function() { return null; };\\n\\n/**\\n * HTML5 DataTransferItemList class. There are some discrepancies in the docs\\n * on the whatwg.org site. When in doubt, these prototypes match what is\\n * implemented as of Chrome 30.\\n *\\n * @see http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html\\n * @see http://developers.whatwg.org/dnd.html#datatransferitem\\n * @constructor\\n * @implements {IArrayLike}\\n */\\nfunction DataTransferItemList() {}\\n\\n/** @type {number} */\\nDataTransferItemList.prototype.length;\\n\\n/**\\n * @param {number} i File to return from the list.\\n * @return {DataTransferItem} The ith DataTransferItem in the list, or null.\\n * @nosideeffects\\n */\\nDataTransferItemList.prototype.item = function(i) { return null; };\\n\\n/**\\n * Adds an item to the list.\\n * @param {string|!File} data Data for the item being added.\\n * @param {string=} opt_type Mime type of the item being added. MUST be present\\n * if the {@code data} parameter is a string.\\n * @return {DataTransferItem}\\n */\\nDataTransferItemList.prototype.add = function(data, opt_type) {};\\n\\n/**\\n * Removes an item from the list.\\n * @param {number} i File to remove from the list.\\n * @return {undefined}\\n */\\nDataTransferItemList.prototype.remove = function(i) {};\\n\\n/**\\n * Removes all items from the list.\\n * @return {undefined}\\n */\\nDataTransferItemList.prototype.clear = function() {};\\n\\n/** @type {!DataTransferItemList} */\\nDataTransfer.prototype.items;\\n\\n/**\\n * @record\\n * @extends {MouseEventInit}\\n * @see http://w3c.github.io/html/editing.html#dictdef-drageventinit\\n */\\nfunction DragEventInit() {}\\n\\n/** @type {undefined|?DataTransfer} */\\nDragEventInit.prototype.dataTransfer;\\n\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dragevent-interface\\n * @constructor\\n * @extends {MouseEvent}\\n * @param {string} type\\n * @param {DragEventInit=} opt_eventInitDict\\n */\\nfunction DragEvent(type, opt_eventInitDict) {}\\n\\n/** @type {DataTransfer} */\\nDragEvent.prototype.dataTransfer;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://www.w3.org/TR/progress-events/#progresseventinit\\n */\\nfunction ProgressEventInit() {}\\n\\n/** @type {undefined|boolean} */\\nProgressEventInit.prototype.lengthComputable;\\n\\n/** @type {undefined|number} */\\nProgressEventInit.prototype.loaded;\\n\\n/** @type {undefined|number} */\\nProgressEventInit.prototype.total;\\n\\n/**\\n * @constructor\\n * @param {string} type\\n * @param {ProgressEventInit=} opt_progressEventInitDict\\n * @extends {Event}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent\\n */\\nfunction ProgressEvent(type, opt_progressEventInitDict) {}\\n\\n/** @type {number} */\\nProgressEvent.prototype.total;\\n\\n/** @type {number} */\\nProgressEvent.prototype.loaded;\\n\\n/** @type {boolean} */\\nProgressEvent.prototype.lengthComputable;\\n\\n\\n/**\\n * @constructor\\n */\\nfunction TimeRanges() {}\\n\\n/** @type {number} */\\nTimeRanges.prototype.length;\\n\\n/**\\n * @param {number} index The index.\\n * @return {number} The start time of the range at index.\\n * @throws {DOMException}\\n */\\nTimeRanges.prototype.start = function(index) { return 0; };\\n\\n/**\\n * @param {number} index The index.\\n * @return {number} The end time of the range at index.\\n * @throws {DOMException}\\n */\\nTimeRanges.prototype.end = function(index) { return 0; };\\n\\n\\n// HTML5 Web Socket class\\n/**\\n * @see http://dev.w3.org/html5/websockets/\\n * @constructor\\n * @param {string} url\\n * @param {string=} opt_protocol\\n * @implements {EventTarget}\\n */\\nfunction WebSocket(url, opt_protocol) {}\\n\\n/**\\n * The connection has not yet been established.\\n * @type {number}\\n */\\nWebSocket.CONNECTING = 0;\\n\\n/**\\n * The WebSocket connection is established and communication is possible.\\n * @type {number}\\n */\\nWebSocket.OPEN = 1;\\n\\n/**\\n * The connection is going through the closing handshake, or the close() method has been invoked.\\n * @type {number}\\n */\\nWebSocket.CLOSING = 2;\\n\\n/**\\n * The connection has been closed or could not be opened.\\n * @type {number}\\n */\\nWebSocket.CLOSED = 3;\\n\\n/** @override */\\nWebSocket.prototype.addEventListener = function(type, listener, opt_options) {};\\n\\n/** @override */\\nWebSocket.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nWebSocket.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * Returns the URL value that was passed to the constructor.\\n * @type {string}\\n */\\nWebSocket.prototype.url;\\n\\n/**\\n * Represents the state of the connection.\\n * @type {number}\\n */\\nWebSocket.prototype.readyState;\\n\\n/**\\n * Returns the number of bytes that have been queued but not yet sent.\\n * @type {number}\\n */\\nWebSocket.prototype.bufferedAmount;\\n\\n/**\\n * An event handler called on open event.\\n * @type {?function(!Event)}\\n */\\nWebSocket.prototype.onopen;\\n\\n/**\\n * An event handler called on message event.\\n * TODO(blickly): Change this to MessageEvent<*> and add casts as needed\\n * @type {?function(!MessageEvent)}\\n */\\nWebSocket.prototype.onmessage;\\n\\n/**\\n * An event handler called on close event.\\n * @type {?function(!Event)}\\n */\\nWebSocket.prototype.onclose;\\n\\n/**\\n * Transmits data using the connection.\\n * @param {string|ArrayBuffer|ArrayBufferView} data\\n * @return {boolean}\\n */\\nWebSocket.prototype.send = function(data) {};\\n\\n/**\\n * Closes the Web Socket connection or connection attempt, if any.\\n * @param {number=} opt_code\\n * @param {string=} opt_reason\\n * @return {undefined}\\n */\\nWebSocket.prototype.close = function(opt_code, opt_reason) {};\\n\\n/**\\n * @type {string} Sets the type of data (blob or arraybuffer) for binary data.\\n */\\nWebSocket.prototype.binaryType;\\n\\n// HTML5 History\\n/**\\n * @constructor\\n */\\nfunction History() {}\\n\\n/**\\n * Pushes a new state into the session history.\\n * @see http://www.w3.org/TR/html5/history.html#the-history-interface\\n * @param {*} data New state.\\n * @param {string} title The title for a new session history entry.\\n * @param {string=} opt_url The URL for a new session history entry.\\n * @return {undefined}\\n */\\nHistory.prototype.pushState = function(data, title, opt_url) {};\\n\\n/**\\n * Replaces the current state in the session history.\\n * @see http://www.w3.org/TR/html5/history.html#the-history-interface\\n * @param {*} data New state.\\n * @param {string} title The title for a session history entry.\\n * @param {string=} opt_url The URL for a new session history entry.\\n * @return {undefined}\\n */\\nHistory.prototype.replaceState = function(data, title, opt_url) {};\\n\\n/**\\n * Pending state object.\\n * @see https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#Reading_the_current_state\\n * @type {*}\\n */\\nHistory.prototype.state;\\n\\n/**\\n * Allows web applications to explicitly set default scroll restoration behavior\\n * on history navigation. This property can be either auto or manual.\\n *\\n * Non-standard. Only supported in Chrome 46+.\\n *\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/History\\n * @see https://majido.github.io/scroll-restoration-proposal/history-based-api.html\\n * @type {string}\\n */\\nHistory.prototype.scrollRestoration;\\n\\n/**\\n * Add history property to Window.\\n *\\n * @type {!History}\\n */\\nWindow.prototype.history;\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/#popstateevent\\n * @constructor\\n * @extends {Event}\\n *\\n * @param {string} type\\n * @param {{state: *}=} opt_eventInitDict\\n */\\nfunction PopStateEvent(type, opt_eventInitDict) {}\\n\\n/**\\n * @type {*}\\n */\\nPopStateEvent.prototype.state;\\n\\n/**\\n * Initializes the event after it has been created with document.createEvent\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {*} stateArg\\n * @return {undefined}\\n */\\nPopStateEvent.prototype.initPopStateEvent = function(typeArg, canBubbleArg,\\n cancelableArg, stateArg) {};\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent\\n * @constructor\\n * @extends {Event}\\n *\\n * @param {string} type\\n * @param {{oldURL: string, newURL: string}=} opt_eventInitDict\\n */\\nfunction HashChangeEvent(type, opt_eventInitDict) {}\\n\\n/** @type {string} */\\nHashChangeEvent.prototype.oldURL;\\n\\n/** @type {string} */\\nHashChangeEvent.prototype.newURL;\\n\\n/**\\n * Initializes the event after it has been created with document.createEvent\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {string} oldURLArg\\n * @param {string} newURLArg\\n * @return {undefined}\\n */\\nHashChangeEvent.prototype.initHashChangeEvent = function(typeArg, canBubbleArg,\\n cancelableArg, oldURLArg, newURLArg) {};\\n\\n/**\\n * @see http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent\\n * @constructor\\n *";a.a+=' @extends {Event}\\n *\\n * @param {string} type\\n * @param {{persisted: boolean}=} opt_eventInitDict\\n */\\nfunction PageTransitionEvent(type, opt_eventInitDict) {}\\n\\n/** @type {boolean} */\\nPageTransitionEvent.prototype.persisted;\\n\\n/**\\n * Initializes the event after it has been created with document.createEvent\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {*} persistedArg\\n * @return {undefined}\\n */\\nPageTransitionEvent.prototype.initPageTransitionEvent = function(typeArg,\\n canBubbleArg, cancelableArg, persistedArg) {};\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n */\\nfunction FileList() {}\\n\\n/** @type {number} */\\nFileList.prototype.length;\\n\\n/**\\n * @param {number} i File to return from the list.\\n * @return {File} The ith file in the list.\\n * @nosideeffects\\n */\\nFileList.prototype.item = function(i) { return null; };\\n\\n/**\\n * @type {boolean}\\n * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#withcredentials\\n */\\nXMLHttpRequest.prototype.withCredentials;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://xhr.spec.whatwg.org/#handler-xhr-onloadstart\\n */\\nXMLHttpRequest.prototype.onloadstart;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onprogress\\n */\\nXMLHttpRequest.prototype.onprogress;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://xhr.spec.whatwg.org/#handler-xhr-onabort\\n */\\nXMLHttpRequest.prototype.onabort;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://xhr.spec.whatwg.org/#handler-xhr-onload\\n */\\nXMLHttpRequest.prototype.onload;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://xhr.spec.whatwg.org/#handler-xhr-ontimeout\\n */\\nXMLHttpRequest.prototype.ontimeout;\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://xhr.spec.whatwg.org/#handler-xhr-onloadend\\n */\\nXMLHttpRequest.prototype.onloadend;\\n\\n/**\\n * @type {XMLHttpRequestUpload}\\n * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-upload-attribute\\n */\\nXMLHttpRequest.prototype.upload;\\n\\n/**\\n * @param {string} mimeType The mime type to override with.\\n * @return {undefined}\\n */\\nXMLHttpRequest.prototype.overrideMimeType = function(mimeType) {};\\n\\n/**\\n * @type {string}\\n * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-responsetype-attribute\\n */\\nXMLHttpRequest.prototype.responseType;\\n\\n/**\\n * @type {?(ArrayBuffer|Blob|Document|Object|string)}\\n * @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-response-attribute\\n */\\nXMLHttpRequest.prototype.response;\\n\\n\\n/**\\n * @type {ArrayBuffer}\\n * Implemented as a draft spec in Firefox 4 as the way to get a requested array\\n * buffer from an XMLHttpRequest.\\n * @see https://developer.mozilla.org/En/Using_XMLHttpRequest#Receiving_binary_data_using_JavaScript_typed_arrays\\n *\\n * This property is not used anymore and should be removed.\\n * @see https://github.com/google/closure-compiler/pull/1389\\n */\\nXMLHttpRequest.prototype.mozResponseArrayBuffer;\\n\\n/**\\n * XMLHttpRequestEventTarget defines events for checking the status of a data\\n * transfer between a client and a server. This should be a common base class\\n * for XMLHttpRequest and XMLHttpRequestUpload.\\n *\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction XMLHttpRequestEventTarget() {}\\n\\n/** @override */\\nXMLHttpRequestEventTarget.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nXMLHttpRequestEventTarget.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nXMLHttpRequestEventTarget.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * An event target to track the status of an upload.\\n *\\n * @constructor\\n * @extends {XMLHttpRequestEventTarget}\\n */\\nfunction XMLHttpRequestUpload() {}\\n\\n/**\\n * @type {?function(!ProgressEvent): void}\\n * @see https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onprogress\\n */\\nXMLHttpRequestUpload.prototype.onprogress;\\n\\n/**\\n * @param {number=} opt_width\\n * @param {number=} opt_height\\n * @constructor\\n * @extends {HTMLImageElement}\\n */\\nfunction Image(opt_width, opt_height) {}\\n\\n\\n/**\\n * Dataset collection.\\n * This is really a DOMStringMap but it behaves close enough to an object to\\n * pass as an object.\\n * @type {!Object}\\n * @const\\n */\\nHTMLElement.prototype.dataset;\\n\\n\\n/**\\n * @constructor\\n * @implements {IArrayLike}\\n * @see https://dom.spec.whatwg.org/#interface-domtokenlist\\n */\\nfunction DOMTokenList() {}\\n\\n/**\\n * Returns the number of CSS classes applied to this Element.\\n * @type {number}\\n */\\nDOMTokenList.prototype.length;\\n\\n/**\\n * @param {number} index The index of the item to return.\\n * @return {string} The CSS class at the specified index.\\n * @nosideeffects\\n */\\nDOMTokenList.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} token The CSS class to check for.\\n * @return {boolean} Whether the CSS class has been applied to the Element.\\n * @nosideeffects\\n */\\nDOMTokenList.prototype.contains = function(token) {};\\n\\n/**\\n * @param {...string} var_args The CSS class(es) to add to this element.\\n * @return {undefined}\\n */\\nDOMTokenList.prototype.add = function(var_args) {};\\n\\n/**\\n * @param {...string} var_args The CSS class(es) to remove from this element.\\n * @return {undefined}\\n */\\nDOMTokenList.prototype.remove = function(var_args) {};\\n\\n/**\\n * @param {string} token The CSS class to toggle from this element.\\n * @param {boolean=} opt_force True to add the class whether it exists\\n * or not. False to remove the class whether it exists or not.\\n * This argument is not supported on IE 10 and below, according to\\n * the MDN page linked below.\\n * @return {boolean} False if the token was removed; True otherwise.\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\\n */\\nDOMTokenList.prototype.toggle = function(token, opt_force) {};\\n\\n/**\\n * @return {string} A stringified representation of CSS classes.\\n * @nosideeffects\\n * @override\\n */\\nDOMTokenList.prototype.toString = function() {};\\n\\n/**\\n * @return {!IteratorIterable} An iterator to go through all values of\\n * the key/value pairs contained in this object.\\n * @nosideeffects\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/values\\n */\\nDOMTokenList.prototype.values = function() {};\\n\\n/**\\n * A better interface to CSS classes than className.\\n * @type {!DOMTokenList}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList\\n * @const\\n */\\nElement.prototype.classList;\\n\\n/**\\n * Constraint Validation API properties and methods\\n * @see http://www.w3.org/TR/2009/WD-html5-20090423/forms.html#the-constraint-validation-api\\n */\\n\\n/** @return {boolean} */\\nHTMLFormElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLFormElement.prototype.reportValidity = function() {};\\n\\n/** @type {boolean} */\\nHTMLFormElement.prototype.noValidate;\\n\\n/** @constructor */\\nfunction ValidityState() {}\\n\\n/** @type {boolean} */\\nValidityState.prototype.badInput;\\n\\n/** @type {boolean} */\\nValidityState.prototype.customError;\\n\\n/** @type {boolean} */\\nValidityState.prototype.patternMismatch;\\n\\n/** @type {boolean} */\\nValidityState.prototype.rangeOverflow;\\n\\n/** @type {boolean} */\\nValidityState.prototype.rangeUnderflow;\\n\\n/** @type {boolean} */\\nValidityState.prototype.stepMismatch;\\n\\n/** @type {boolean} */\\nValidityState.prototype.typeMismatch;\\n\\n/** @type {boolean} */\\nValidityState.prototype.tooLong;\\n\\n/** @type {boolean} */\\nValidityState.prototype.tooShort;\\n\\n/** @type {boolean} */\\nValidityState.prototype.valid;\\n\\n/** @type {boolean} */\\nValidityState.prototype.valueMissing;\\n\\n\\n/** @type {boolean} */\\nHTMLButtonElement.prototype.autofocus;\\n\\n/**\\n * Can return null when hidden.\\n * See https://html.spec.whatwg.org/multipage/forms.html#dom-lfe-labels\\n * @const\\n * @type {?NodeList}\\n */\\nHTMLButtonElement.prototype.labels;\\n\\n/** @type {string} */\\nHTMLButtonElement.prototype.validationMessage;\\n\\n/**\\n * @const\\n * @type {ValidityState}\\n */\\nHTMLButtonElement.prototype.validity;\\n\\n/** @type {boolean} */\\nHTMLButtonElement.prototype.willValidate;\\n\\n/** @return {boolean} */\\nHTMLButtonElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLButtonElement.prototype.reportValidity = function() {};\\n\\n/**\\n * @param {string} message\\n * @return {undefined}\\n */\\nHTMLButtonElement.prototype.setCustomValidity = function(message) {};\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formaction\\n */\\nHTMLButtonElement.prototype.formAction;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formenctype\\n */\\nHTMLButtonElement.prototype.formEnctype;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formmethod\\n */\\nHTMLButtonElement.prototype.formMethod;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formtarget\\n */\\nHTMLButtonElement.prototype.formTarget;\\n\\n/** @type {boolean} */\\nHTMLInputElement.prototype.autofocus;\\n\\n/** @type {boolean} */\\nHTMLInputElement.prototype.formNoValidate;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formaction\\n */\\nHTMLInputElement.prototype.formAction;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formenctype\\n */\\nHTMLInputElement.prototype.formEnctype;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formmethod\\n */\\nHTMLInputElement.prototype.formMethod;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/forms.html#attr-fs-formtarget\\n */\\nHTMLInputElement.prototype.formTarget;\\n\\n/**\\n * Can return null when hidden.\\n * See https://html.spec.whatwg.org/multipage/forms.html#dom-lfe-labels\\n * @const\\n * @type {?NodeList}\\n */\\nHTMLInputElement.prototype.labels;\\n\\n/** @type {string} */\\nHTMLInputElement.prototype.validationMessage;\\n\\n/**\\n * @const\\n * @type {ValidityState}\\n */\\nHTMLInputElement.prototype.validity;\\n\\n/** @type {boolean} */\\nHTMLInputElement.prototype.willValidate;\\n\\n/** @return {boolean} */\\nHTMLInputElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLInputElement.prototype.reportValidity = function() {};\\n\\n/**\\n * @param {string} message\\n * @return {undefined}\\n */\\nHTMLInputElement.prototype.setCustomValidity = function(message) {};\\n\\n/** @type {Element} */\\nHTMLLabelElement.prototype.control;\\n\\n/** @type {boolean} */\\nHTMLSelectElement.prototype.autofocus;\\n\\n/**\\n * Can return null when hidden.\\n * See https://html.spec.whatwg.org/multipage/forms.html#dom-lfe-labels\\n * @const\\n * @type {?NodeList}\\n */\\nHTMLSelectElement.prototype.labels;\\n\\n/** @type {HTMLCollection} */\\nHTMLSelectElement.prototype.selectedOptions;\\n\\n/** @type {string} */\\nHTMLSelectElement.prototype.validationMessage;\\n\\n/**\\n * @const\\n * @type {ValidityState}\\n */\\nHTMLSelectElement.prototype.validity;\\n\\n/** @type {boolean} */\\nHTMLSelectElement.prototype.willValidate;\\n\\n/** @return {boolean} */\\nHTMLSelectElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLSelectElement.prototype.reportValidity = function() {};\\n\\n/**\\n * @param {string} message\\n * @return {undefined}\\n */\\nHTMLSelectElement.prototype.setCustomValidity = function(message) {};\\n\\n/** @type {boolean} */\\nHTMLTextAreaElement.prototype.autofocus;\\n\\n/**\\n * Can return null when hidden.\\n * See https://html.spec.whatwg.org/multipage/forms.html#dom-lfe-labels\\n * @const\\n * @type {?NodeList}\\n */\\nHTMLTextAreaElement.prototype.labels;\\n\\n/** @type {string} */\\nHTMLTextAreaElement.prototype.validationMessage;\\n\\n/**\\n * @const\\n * @type {ValidityState}\\n */\\nHTMLTextAreaElement.prototype.validity;\\n\\n/** @type {boolean} */\\nHTMLTextAreaElement.prototype.willValidate;\\n\\n/** @return {boolean} */\\nHTMLTextAreaElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLTextAreaElement.prototype.reportValidity = function() {};\\n\\n/**\\n * @param {string} message\\n * @return {undefined}\\n */\\nHTMLTextAreaElement.prototype.setCustomValidity = function(message) {};\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n * @see http://www.w3.org/TR/html5/the-embed-element.html#htmlembedelement\\n */\\nfunction HTMLEmbedElement() {}\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-width\\n */\\nHTMLEmbedElement.prototype.width;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/dimension-attributes.html#dom-dim-height\\n */\\nHTMLEmbedElement.prototype.height;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-src\\n */\\nHTMLEmbedElement.prototype.src;\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/html5/the-embed-element.html#dom-embed-type\\n */\\nHTMLEmbedElement.prototype.type;\\n\\n// Fullscreen APIs.\\n\\n/**\\n * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-element-requestfullscreen\\n * @return {undefined}\\n */\\nElement.prototype.requestFullscreen = function() {};\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenenabled\\n */\\nDocument.prototype.fullscreenEnabled;\\n\\n/**\\n * @type {Element}\\n * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-fullscreenelement\\n */\\nDocument.prototype.fullscreenElement;\\n\\n/**\\n * @see http://www.w3.org/TR/2012/WD-fullscreen-20120703/#dom-document-exitfullscreen\\n * @return {undefined}\\n */\\nDocument.prototype.exitFullscreen = function() {};\\n\\n// Externs definitions of browser current implementations.\\n// Firefox 10 implementation.\\nElement.prototype.mozRequestFullScreen = function() {};\\n\\nElement.prototype.mozRequestFullScreenWithKeys = function() {};\\n\\n/** @type {boolean} */\\nDocument.prototype.mozFullScreen;\\n\\nDocument.prototype.mozCancelFullScreen = function() {};\\n\\n/** @type {Element} */\\nDocument.prototype.mozFullScreenElement;\\n\\n/** @type {boolean} */\\nDocument.prototype.mozFullScreenEnabled;\\n\\n// Chrome 21 implementation.\\n/**\\n * The current fullscreen element for the document is set to this element.\\n * Valid only for Webkit browsers.\\n * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired.\\n * Should use ALLOW_KEYBOARD_INPUT constant.\\n * @return {undefined}\\n */\\nElement.prototype.webkitRequestFullScreen = function(opt_allowKeyboardInput) {};\\n\\n/**\\n * The current fullscreen element for the document is set to this element.\\n * Valid only for Webkit browsers.\\n * @param {number=} opt_allowKeyboardInput Whether keyboard input is desired.\\n * Should use ALLOW_KEYBOARD_INPUT constant.\\n * @return {undefined}\\n */\\nElement.prototype.webkitRequestFullscreen = function(opt_allowKeyboardInput) {};\\n\\n/** @type {boolean} */\\nDocument.prototype.webkitIsFullScreen;\\n\\nDocument.prototype.webkitCancelFullScreen = function() {};\\n\\n/** @type {boolean} */\\nDocument.prototype.webkitFullscreenEnabled;\\n\\n/** @type {Element} */\\nDocument.prototype.webkitCurrentFullScreenElement;\\n\\n/** @type {Element} */\\nDocument.prototype.webkitFullscreenElement;\\n\\n/** @type {boolean} */\\nDocument.prototype.webkitFullScreenKeyboardInputAllowed;\\n\\n// IE 11 implementation.\\n// http://msdn.microsoft.com/en-us/library/ie/dn265028(v=vs.85).aspx\\n/** @return {void} */\\nElement.prototype.msRequestFullscreen = function() {};\\n\\n/** @return {void} */\\nElement.prototype.msExitFullscreen = function() {};\\n\\n/** @type {boolean} */\\nDocument.prototype.msFullscreenEnabled;\\n\\n/** @type {Element} */\\nDocument.prototype.msFullscreenElement;\\n\\n/** @type {number} */\\nElement.ALLOW_KEYBOARD_INPUT = 1;\\n\\n/** @type {number} */\\nElement.prototype.ALLOW_KEYBOARD_INPUT = 1;\\n\\n\\n/**\\n * @typedef {{\\n * childList: (boolean|undefined),\\n * attributes: (boolean|undefined),\\n * characterData: (boolean|undefined),\\n * subtree: (boolean|undefined),\\n * attributeOldValue: (boolean|undefined),\\n * characterDataOldValue: (boolean|undefined),\\n * attributeFil';a.a+="ter: (!Array|undefined)\\n * }}\\n */\\nvar MutationObserverInit;\\n\\n\\n/** @constructor */\\nfunction MutationRecord() {}\\n\\n/** @type {string} */\\nMutationRecord.prototype.type;\\n\\n/** @type {Node} */\\nMutationRecord.prototype.target;\\n\\n/** @type {!NodeList} */\\nMutationRecord.prototype.addedNodes;\\n\\n/** @type {!NodeList} */\\nMutationRecord.prototype.removedNodes;\\n\\n/** @type {?Node} */\\nMutationRecord.prototype.previousSibling;\\n\\n/** @type {?Node} */\\nMutationRecord.prototype.nextSibling;\\n\\n/** @type {?string} */\\nMutationRecord.prototype.attributeName;\\n\\n/** @type {?string} */\\nMutationRecord.prototype.attributeNamespace;\\n\\n/** @type {?string} */\\nMutationRecord.prototype.oldValue;\\n\\n\\n/**\\n * @see http://www.w3.org/TR/domcore/#mutation-observers\\n * @param {function(Array, MutationObserver)} callback\\n * @constructor\\n */\\nfunction MutationObserver(callback) {}\\n\\n/**\\n * @param {Node} target\\n * @param {MutationObserverInit=} options\\n * @return {undefined}\\n */\\nMutationObserver.prototype.observe = function(target, options) {};\\n\\nMutationObserver.prototype.disconnect = function() {};\\n\\n/**\\n * @return {!Array}\\n */\\nMutationObserver.prototype.takeRecords = function() {};\\n\\n/**\\n * @type {function(new:MutationObserver, function(Array))}\\n */\\nWindow.prototype.WebKitMutationObserver;\\n\\n/**\\n * @type {function(new:MutationObserver, function(Array))}\\n */\\nWindow.prototype.MozMutationObserver;\\n\\n\\n/**\\n * @see http://www.w3.org/TR/page-visibility/\\n * @type {VisibilityState}\\n */\\nDocument.prototype.visibilityState;\\n\\n/**\\n * @type {string}\\n */\\nDocument.prototype.mozVisibilityState;\\n\\n/**\\n * @type {string}\\n */\\nDocument.prototype.webkitVisibilityState;\\n\\n/**\\n * @type {string}\\n */\\nDocument.prototype.msVisibilityState;\\n\\n/**\\n * @see http://www.w3.org/TR/page-visibility/\\n * @type {boolean}\\n */\\nDocument.prototype.hidden;\\n\\n/**\\n * @type {boolean}\\n */\\nDocument.prototype.mozHidden;\\n\\n/**\\n * @type {boolean}\\n */\\nDocument.prototype.webkitHidden;\\n\\n/**\\n * @type {boolean}\\n */\\nDocument.prototype.msHidden;\\n\\n/**\\n * @see http://www.w3.org/TR/components-intro/\\n * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register\\n * @param {string} type\\n * @param {{extends: (string|undefined), prototype: (Object|undefined)}=} options\\n * @return {!Function} a constructor for the new tag. A generic function is the best we\\n * can do here as it allows the return value to be annotated properly\\n * at the call site.\\n */\\nDocument.prototype.registerElement = function(type, options) {};\\n\\n/**\\n * This method is deprecated and should be removed by the end of 2014.\\n * @see http://www.w3.org/TR/components-intro/\\n * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register\\n * @param {string} type\\n * @param {{extends: (string|undefined), prototype: (Object|undefined)}} options\\n */\\nDocument.prototype.register = function(type, options) {};\\n\\n/**\\n * @type {!FontFaceSet}\\n * @see http://dev.w3.org/csswg/css-font-loading/#dom-fontfacesource-fonts\\n */\\nDocument.prototype.fonts;\\n\\n\\n/**\\n * @type {?HTMLScriptElement}\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript\\n */\\nDocument.prototype.currentScript;\\n\\n/**\\n * Definition of ShadowRoot interface,\\n * @see http://www.w3.org/TR/shadow-dom/#api-shadow-root\\n * @constructor\\n * @extends {DocumentFragment}\\n */\\nfunction ShadowRoot() {}\\n\\n/**\\n * The host element that a ShadowRoot is attached to.\\n * Note: this is not yet W3C standard but is undergoing development.\\n * W3C feature tracking bug:\\n * https://www.w3.org/Bugs/Public/show_bug.cgi?id=22399\\n * Draft specification:\\n * https://dvcs.w3.org/hg/webcomponents/raw-file/6743f1ace623/spec/shadow/index.html#shadow-root-object\\n * @type {!Element}\\n */\\nShadowRoot.prototype.host;\\n\\n/**\\n * @param {string} id id.\\n * @return {HTMLElement}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.getElementById = function(id) {};\\n\\n\\n/**\\n * @param {string} className\\n * @return {!NodeList}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.getElementsByClassName = function(className) {};\\n\\n\\n/**\\n * @param {string} tagName\\n * @return {!NodeList}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.getElementsByTagName = function(tagName) {};\\n\\n\\n/**\\n * @param {string} namespace\\n * @param {string} localName\\n * @return {!NodeList}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.getElementsByTagNameNS = function(namespace, localName) {};\\n\\n\\n/**\\n * @return {Selection}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.getSelection = function() {};\\n\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @return {Element}\\n * @nosideeffects\\n */\\nShadowRoot.prototype.elementFromPoint = function(x, y) {};\\n\\n\\n/**\\n * @type {boolean}\\n */\\nShadowRoot.prototype.applyAuthorStyles;\\n\\n\\n/**\\n * @type {boolean}\\n */\\nShadowRoot.prototype.resetStyleInheritance;\\n\\n\\n/**\\n * @type {Element}\\n */\\nShadowRoot.prototype.activeElement;\\n\\n\\n/**\\n * @type {?ShadowRoot}\\n */\\nShadowRoot.prototype.olderShadowRoot;\\n\\n\\n/**\\n * @type {string}\\n */\\nShadowRoot.prototype.innerHTML;\\n\\n\\n/**\\n * @type {!StyleSheetList}\\n */\\nShadowRoot.prototype.styleSheets;\\n\\n\\n\\n/**\\n * @see http://www.w3.org/TR/shadow-dom/#the-content-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLContentElement() {}\\n\\n/**\\n * @type {!string}\\n */\\nHTMLContentElement.prototype.select;\\n\\n/**\\n * @return {!NodeList}\\n */\\nHTMLContentElement.prototype.getDistributedNodes = function() {};\\n\\n\\n/**\\n * @see http://www.w3.org/TR/shadow-dom/#the-shadow-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLShadowElement() {}\\n\\n/**\\n * @return {!NodeList}\\n */\\nHTMLShadowElement.prototype.getDistributedNodes = function() {};\\n\\n\\n/**\\n * @see http://www.w3.org/TR/html5/webappapis.html#the-errorevent-interface\\n *\\n * @constructor\\n * @extends {Event}\\n *\\n * @param {string} type\\n * @param {ErrorEventInit=} opt_eventInitDict\\n */\\nfunction ErrorEvent(type, opt_eventInitDict) {}\\n\\n/** @const {string} */\\nErrorEvent.prototype.message;\\n\\n/** @const {string} */\\nErrorEvent.prototype.filename;\\n\\n/** @const {number} */\\nErrorEvent.prototype.lineno;\\n\\n/** @const {number} */\\nErrorEvent.prototype.colno;\\n\\n/** @const {*} */\\nErrorEvent.prototype.error;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://www.w3.org/TR/html5/webappapis.html#erroreventinit\\n */\\nfunction ErrorEventInit() {}\\n\\n/** @type {undefined|string} */\\nErrorEventInit.prototype.message;\\n\\n/** @type {undefined|string} */\\nErrorEventInit.prototype.filename;\\n\\n/** @type {undefined|number} */\\nErrorEventInit.prototype.lineno;\\n\\n/** @type {undefined|number} */\\nErrorEventInit.prototype.colno;\\n\\n/** @type {*} */\\nErrorEventInit.prototype.error;\\n\\n\\n/**\\n * @see http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument\\n * @param {string=} opt_title A title to give the new HTML document\\n * @return {!HTMLDocument}\\n */\\nDOMImplementation.prototype.createHTMLDocument = function(opt_title) {};\\n\\n\\n\\n/**\\n * @constructor\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element\\n * @extends {HTMLElement}\\n */\\nfunction HTMLPictureElement() {}\\n\\n/**\\n * @constructor\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element\\n * @extends {HTMLElement}\\n */\\nfunction HTMLSourceElement() {}\\n\\n/** @type {string} */\\nHTMLSourceElement.prototype.media;\\n\\n/** @type {string} */\\nHTMLSourceElement.prototype.sizes;\\n\\n/** @type {string} */\\nHTMLSourceElement.prototype.src;\\n\\n/** @type {string} */\\nHTMLSourceElement.prototype.srcset;\\n\\n/** @type {string} */\\nHTMLSourceElement.prototype.type;\\n\\n/** @type {string} */\\nHTMLImageElement.prototype.sizes;\\n\\n/** @type {string} */\\nHTMLImageElement.prototype.srcset;\\n\\n\\n/**\\n * 4.11 Interactive elements\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html\\n */\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-details-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLDetailsElement() {}\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-details-open\\n * @type {boolean}\\n */\\nHTMLDetailsElement.prototype.open;\\n\\n\\n// As of 2/20/2015, has no special web IDL interface nor global\\n// constructor (i.e. HTMLSummaryElement).\\n\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menu-type\\n * @type {string}\\n */\\nHTMLMenuElement.prototype.type;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menu-label\\n * @type {string}\\n */\\nHTMLMenuElement.prototype.label;\\n\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-menuitem-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLMenuItemElement() {}\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-type\\n * @type {string}\\n */\\nHTMLMenuItemElement.prototype.type;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-label\\n * @type {string}\\n */\\nHTMLMenuItemElement.prototype.label;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-icon\\n * @type {string}\\n */\\nHTMLMenuItemElement.prototype.icon;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-disabled\\n * @type {boolean}\\n */\\nHTMLMenuItemElement.prototype.disabled;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-checked\\n * @type {boolean}\\n */\\nHTMLMenuItemElement.prototype.checked;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-radiogroup\\n * @type {string}\\n */\\nHTMLMenuItemElement.prototype.radiogroup;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-menuitem-default\\n * @type {boolean}\\n */\\nHTMLMenuItemElement.prototype.default;\\n\\n// TODO(dbeam): add HTMLMenuItemElement.prototype.command if it's implemented.\\n\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#relatedevent\\n * @param {string} type\\n * @param {{relatedTarget: (EventTarget|undefined)}=} opt_eventInitDict\\n * @constructor\\n * @extends {Event}\\n */\\nfunction RelatedEvent(type, opt_eventInitDict) {}\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-relatedevent-relatedtarget\\n * @type {EventTarget|undefined}\\n */\\nRelatedEvent.prototype.relatedTarget;\\n\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-dialog-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLDialogElement() {}\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-open\\n * @type {boolean}\\n */\\nHTMLDialogElement.prototype.open;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-returnvalue\\n * @type {string}\\n */\\nHTMLDialogElement.prototype.returnValue;\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-show\\n * @param {(MouseEvent|Element)=} opt_anchor\\n * @return {undefined}\\n */\\nHTMLDialogElement.prototype.show = function(opt_anchor) {};\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-showmodal\\n * @param {(MouseEvent|Element)=} opt_anchor\\n * @return {undefined}\\n */\\nHTMLDialogElement.prototype.showModal = function(opt_anchor) {};\\n\\n/**\\n * @see http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#dom-dialog-close\\n * @param {string=} opt_returnValue\\n * @return {undefined}\\n */\\nHTMLDialogElement.prototype.close = function(opt_returnValue) {};\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#the-template-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLTemplateElement() {}\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#the-template-element\\n * @type {!DocumentFragment}\\n */\\nHTMLTemplateElement.prototype.content;\\n\\n\\n/**\\n * @type {?Document}\\n * @see w3c_dom2.js\\n * @see http://www.w3.org/TR/html-imports/#interface-import\\n */\\nHTMLLinkElement.prototype.import;\\n\\n\\n/**\\n * @return {boolean}\\n * @see https://www.w3.org/TR/html5/forms.html#dom-fieldset-elements\\n */\\nHTMLFieldSetElement.prototype.checkValidity = function() {};\\n\\n/**\\n * @type {HTMLCollection}\\n * @see https://www.w3.org/TR/html5/forms.html#dom-fieldset-elements\\n */\\nHTMLFieldSetElement.prototype.elements;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/forms.html#the-fieldset-element\\n */\\nHTMLFieldSetElement.prototype.name;\\n\\n/**\\n * @param {string} message\\n * @see https://www.w3.org/TR/html5/forms.html#dom-fieldset-elements\\n * @return {undefined}\\n */\\nHTMLFieldSetElement.prototype.setCustomValidity = function(message) {};\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/forms.html#dom-fieldset-type\\n */\\nHTMLFieldSetElement.prototype.type;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/forms.html#the-fieldset-element\\n */\\nHTMLFieldSetElement.prototype.validationMessage;\\n\\n/**\\n * @type {ValidityState}\\n * @see https://www.w3.org/TR/html5/forms.html#the-fieldset-element\\n */\\nHTMLFieldSetElement.prototype.validity;\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/TR/html5/forms.html#the-fieldset-element\\n */\\nHTMLFieldSetElement.prototype.willValidate;\\n\\n/**\\n * @constructor\\n * @extends {NodeList}\\n * @template T\\n * @see https://html.spec.whatwg.org/multipage/infrastructure.html#radionodelist\\n */\\nfunction RadioNodeList() {}\\n\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/forms.html#the-datalist-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLDataListElement() {}\\n\\n\\n/** @type {HTMLCollection} */\\nHTMLDataListElement.prototype.options;\\n\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/forms.html#the-output-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLOutputElement() {}\\n\\n/**\\n * @const {!DOMTokenList}\\n */\\nHTMLOutputElement.prototype.htmlFor;\\n\\n/**\\n * @type {HTMLFormElement}\\n */\\nHTMLOutputElement.prototype.form;\\n\\n/**\\n * @type {string}\\n */\\nHTMLOutputElement.prototype.name;\\n\\n/**\\n * @const {string}\\n */\\nHTMLOutputElement.prototype.type;\\n\\n/**\\n * @type {string}\\n */\\nHTMLOutputElement.prototype.defaultValue;\\n\\n/**\\n * @type {string}\\n */\\nHTMLOutputElement.prototype.value;\\n\\n/**\\n * @const {?NodeList}\\n */\\nHTMLOutputElement.prototype.labels;\\n\\n/** @type {string} */\\nHTMLOutputElement.prototype.validationMessage;\\n\\n/**\\n * @const {ValidityState}\\n */\\nHTMLOutputElement.prototype.validity;\\n\\n/** @type {boolean} */\\nHTMLOutputElement.prototype.willValidate;\\n\\n/** @return {boolean} */\\nHTMLOutputElement.prototype.checkValidity = function() {};\\n\\n/** @return {boolean} */\\nHTMLOutputElement.prototype.reportValidity = function() {};\\n\\n/** @param {string} message */\\nHTMLOutputElement.prototype.setCustomValidity = function(message) {};\\n\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/forms.html#the-progress-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLProgressElement() {}\\n\\n\\n/** @type {number} */\\nHTMLProgressElement.prototype.value;\\n\\n\\n/** @type {number} */\\nHTMLProgressElement.prototype.max;\\n\\n\\n/** @type {number} */\\nHTMLProgressElement.prototype.position;\\n\\n\\n/** @type {?NodeList} */\\nHTMLProgressElement.prototype.labels;\\n\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#the-track-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLTrackElement() {}\\n\\n\\n/** @type {string} */\\nHTMLTrackElement.prototype.kind;\\n\\n\\n/** @type {string} */\\nHTMLTrackElement.prototype.src;\\n\\n\\n/** @type {string} */\\nHTMLTrackElement.prototype.srclang;\\n\\n\\n/** @type {string} */\\nHTM";a.a+='LTrackElement.prototype.label;\\n\\n\\n/** @type {boolean} */\\nHTMLTrackElement.prototype.default;\\n\\n\\n/** @const {number} */\\nHTMLTrackElement.prototype.readyState;\\n\\n\\n/** @const {!TextTrack} */\\nHTMLTrackElement.prototype.track;\\n\\n\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/forms.html#the-meter-element\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLMeterElement() {}\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.value;\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.min;\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.max;\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.low;\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.high;\\n\\n\\n/** @type {number} */\\nHTMLMeterElement.prototype.optimum;\\n\\n\\n/** @type {?NodeList} */\\nHTMLMeterElement.prototype.labels;\\n\\n\\n/**\\n * @constructor\\n * @see https://www.w3.org/TR/html5/webappapis.html#navigator\\n */\\nfunction Navigator() {}\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename\\n */\\nNavigator.prototype.appCodeName;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appname\\n */\\nNavigator.prototype.appName;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appversion\\n */\\nNavigator.prototype.appVersion;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-platform\\n */\\nNavigator.prototype.platform;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-product\\n */\\nNavigator.prototype.product;\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-useragent\\n */\\nNavigator.prototype.userAgent;\\n\\n/**\\n * @return {boolean}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-taintenabled\\n */\\nNavigator.prototype.taintEnabled = function() {};\\n\\n/**\\n * @type {string}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-language\\n */\\nNavigator.prototype.language;\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/TR/html5/browsers.html#navigatoronline\\n */\\nNavigator.prototype.onLine;\\n\\n/**\\n * @type {boolean}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-cookieenabled\\n */\\nNavigator.prototype.cookieEnabled;\\n\\n/**\\n * @param {string} scheme\\n * @param {string} url\\n * @param {string} title\\n * @return {undefined}\\n */\\nNavigator.prototype.registerProtocolHandler = function(scheme, url, title) {}\\n\\n/**\\n * @param {string} mimeType\\n * @param {string} url\\n * @param {string} title\\n * @return {undefined}\\n */\\nNavigator.prototype.registerContentHandler = function(mimeType, url, title) {}\\n\\n/**\\n * @param {string} scheme\\n * @param {string} url\\n * @return {undefined}\\n */\\nNavigator.prototype.unregisterProtocolHandler = function(scheme, url) {}\\n\\n/**\\n * @param {string} mimeType\\n * @param {string} url\\n * @return {undefined}\\n */\\nNavigator.prototype.unregisterContentHandler = function(mimeType, url) {}\\n\\n/**\\n * @type {!MimeTypeArray}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-mimetypes\\n */\\nNavigator.prototype.mimeTypes;\\n\\n/**\\n * @type {!PluginArray}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-plugins\\n */\\nNavigator.prototype.plugins;\\n\\n/**\\n * @return {boolean}\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-navigator-javaenabled\\n * @nosideeffects\\n */\\nNavigator.prototype.javaEnabled = function() {};\\n\\n\\n/**\\n * @constructor\\n * @implements {IObject<(string|number),!Plugin>}\\n * @implements {IArrayLike}\\n * @see https://www.w3.org/TR/html5/webappapis.html#pluginarray\\n */\\nfunction PluginArray() {}\\n\\n/** @type {number} */\\nPluginArray.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {Plugin}\\n */\\nPluginArray.prototype.item = function(index) {};\\n\\n/**\\n * @param {string} name\\n * @return {Plugin}\\n */\\nPluginArray.prototype.namedItem = function(name) {};\\n\\n/**\\n * @param {boolean=} reloadDocuments\\n * @return {undefined}\\n */\\nPluginArray.prototype.refresh = function(reloadDocuments) {};\\n\\n/**\\n * @constructor\\n * @implements {IObject<(string|number),!MimeType>}\\n * @implements {IArrayLike}\\n * @see https://www.w3.org/TR/html5/webappapis.html#mimetypearray\\n */\\nfunction MimeTypeArray() {}\\n\\n/**\\n * @param {number} index\\n * @return {MimeType}\\n */\\nMimeTypeArray.prototype.item = function(index) {};\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/en/DOM/window.navigator.mimeTypes\\n */\\nMimeTypeArray.prototype.length;\\n\\n/**\\n * @param {string} name\\n * @return {MimeType}\\n */\\nMimeTypeArray.prototype.namedItem = function(name) {};\\n\\n/**\\n * @constructor\\n * @see https://www.w3.org/TR/html5/webappapis.html#mimetype\\n */\\nfunction MimeType() {}\\n\\n/** @type {string} */\\nMimeType.prototype.description;\\n\\n/** @type {Plugin} */\\nMimeType.prototype.enabledPlugin;\\n\\n/** @type {string} */\\nMimeType.prototype.suffixes;\\n\\n/** @type {string} */\\nMimeType.prototype.type;\\n\\n/**\\n * @constructor\\n * @see https://www.w3.org/TR/html5/webappapis.html#dom-plugin\\n */\\nfunction Plugin() {}\\n\\n/** @type {string} */\\nPlugin.prototype.description;\\n\\n/** @type {string} */\\nPlugin.prototype.filename;\\n\\n/** @type {number} */\\nPlugin.prototype.length;\\n\\n/** @type {string} */\\nPlugin.prototype.name;\\n\\n/**\\n * @see https://html.spec.whatwg.org/multipage/scripting.html#custom-elements\\n * @constructor\\n */\\nfunction CustomElementRegistry() {}\\n\\n/**\\n * @param {string} tagName\\n * @param {!function(new:HTMLElement)} klass\\n * @param {{extends: string}=} options\\n */\\nCustomElementRegistry.prototype.define = function (tagName, klass, options) {};\\n\\n/**\\n * @param {string} tagName\\n * @return {?function(new:HTMLElement)}\\n */\\nCustomElementRegistry.prototype.get = function(tagName) {};\\n\\n/**\\n * @param {string} tagName\\n * @return {Promise}\\n */\\nCustomElementRegistry.prototype.whenDefined = function(tagName) {};\\n\\n/** @type {!CustomElementRegistry} */\\nvar customElements;\\n\\n/**\\n * @constructor\\n * @extends {HTMLElement}\\n */\\nfunction HTMLSlotElement() {}\\n\\n/**\\n * @param {!{flatten: boolean}=} options\\n * @return {!Array}\\n */\\nHTMLSlotElement.prototype.assignedNodes = function(options) {};\\n\\n/** @type {boolean} */\\nEvent.prototype.composed;\\n\\n/**\\n * @return {!Array}\\n */\\nEvent.prototype.composedPath = function() {};\\n\\n/**\\n * @constructor\\n * @param {{\\n * firesTouchEvents: (string|undefined),\\n * pointerMovementScrolls: (string|undefined)\\n * }=} opt_options\\n */\\nfunction InputDeviceCapabilities(opt_options){}\\n\\n/** @type {boolean} */\\nInputDeviceCapabilities.prototype.firesTouchEvents;\\n\\n/** @type {boolean} */\\nInputDeviceCapabilities.prototype.pointerMovementScrolls;\\n\\n/** @type {?InputDeviceCapabilities} */\\nMouseEvent.prototype.sourceCapabilities;\\n","externs/ie_vml.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for IE\'s vector markup language, or VML.\\n *\\n * @externs\\n * @author robbyw@google.com (Robby Walker)\\n */\\n\\n\\n/**\\n * @type {Object|string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263836(VS.85).aspx\\n */\\nElement.prototype.coordorigin;\\n\\n/**\\n * @type {Object|string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263837(VS.85).aspx\\n */\\nElement.prototype.coordsize;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263839(VS.85).aspx\\n */\\nElement.prototype.fillcolor;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/bb263840(VS.85).aspx\\n */\\nElement.prototype.filled;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263871(VS.85).aspx\\n */\\nElement.prototype.path;\\n\\n/**\\n * @type {number|string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263877(VS.85).aspx\\n */\\nElement.prototype.rotation;\\n\\n/**\\n * @type {string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263881(VS.85).aspx\\n */\\nElement.prototype.strokecolor;\\n\\n/**\\n * @type {boolean}\\n * @see http://msdn.microsoft.com/en-us/library/bb263882(VS.85).aspx\\n */\\nElement.prototype.stroked;\\n\\n/**\\n * @type {number|string}\\n * @see http://msdn.microsoft.com/en-us/library/bb263883(VS.85).aspx\\n */\\nElement.prototype.strokeweight;\\n","externs/intersection_observer.js":"/*\\n * Copyright 2016 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Externs for Intersection Observer objects.\\n * @see https://wicg.github.io/IntersectionObserver/\\n * @externs\\n * @author robadurbin@google.com (Rob Durbin)\\n */\\n\\n// TODO(robadurbin): Once the Intersection Observer spec is adopted by W3C, add\\n// a w3c_ prefix to this file\'s name.\\n\\n\\n/**\\n * These contain the information provided from a change event.\\n * @see https://wicg.github.io/IntersectionObserver/#intersection-observer-entry\\n * @record\\n */\\nfunction IntersectionObserverEntry() {}\\n\\n/**\\n * The time the change was observed.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-time\\n * @type {number}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.time;\\n\\n/**\\n * The root intersection rectangle, if target belongs to the same unit of\\n * related similar-origin browsing contexts as the intersection root, null\\n * otherwise.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-rootbounds\\n * @type {{top: number, right: number, bottom: number, left: number,\\n * height: number, width: number}}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.rootBounds;\\n\\n/**\\n * The rectangle describing the element being observed.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-boundingclientrect\\n * @type {!{top: number, right: number, bottom: number, left: number,\\n * height: number, width: number}}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.boundingClientRect;\\n\\n/**\\n * The rectangle describing the intersection between the observed element and\\n * the viewport.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-intersectionrect\\n * @type {!{top: number, right: number, bottom: number, left: number,\\n * height: number, width: number}}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.intersectionRect;\\n\\n/**\\n * Ratio of intersectionRect area to boundingClientRect area.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-intersectionratio\\n * @type {!number}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.intersectionRatio;\\n\\n/**\\n * The Element whose intersection with the intersection root changed.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-target\\n * @type {!Element}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.target;\\n\\n/**\\n * Whether or not the target is intersecting with the root.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserverentry-isintersecting\\n * @type {boolean}\\n * @const\\n */\\nIntersectionObserverEntry.prototype.isIntersecting;\\n\\n/**\\n * Callback for the IntersectionObserver.\\n * @see https://wicg.github.io/IntersectionObserver/#intersection-observer-callback\\n * @typedef {function(!Array,!IntersectionObserver)}\\n */\\nvar IntersectionObserverCallback;\\n\\n/**\\n * Options for the IntersectionObserver.\\n * @see https://wicg.github.io/IntersectionObserver/#intersection-observer-init\\n * @typedef {{\\n * threshold: (!Array|number|undefined),\\n * root: (!Element|undefined),\\n * rootMargin: (string|undefined)\\n * }}\\n */\\nvar IntersectionObserverInit;\\n\\n/**\\n * This is the constructor for Intersection Observer objects.\\n * @see https://wicg.github.io/IntersectionObserver/#intersection-observer-interface\\n * @param {!IntersectionObserverCallback} handler The callback for the observer.\\n * @param {!IntersectionObserverInit=} opt_options The object defining the\\n * thresholds, etc.\\n * @constructor\\n */\\nfunction IntersectionObserver(handler, opt_options) {};\\n\\n/**\\n * The root Element to use for intersection, or null if the observer uses the\\n * implicit root.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-root\\n * @type {?Element}\\n * @const\\n */\\nIntersectionObserver.prototype.root;\\n\\n/**\\n * Offsets applied to the intersection root\u2019s bounding box, effectively growing\\n * or shrinking the box that is used to calculate intersections.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-rootmargin\\n * @type {!string}\\n * @const\\n */\\nIntersectionObserver.prototype.rootMargin;\\n\\n/**\\n * A list of thresholds, sorted in increasing numeric order, where each\\n * threshold is a ratio of intersection area to bounding box area of an observed\\n * target.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-thresholds\\n * @type {!Array.}\\n * @const\\n */\\nIntersectionObserver.prototype.thresholds;\\n\\n/**\\n * This is used to set which element to observe.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-observe\\n * @param {!Element} element The element to observe.\\n * @return {undefined}\\n */\\nIntersectionObserver.prototype.observe = function(element) {};\\n\\n/**\\n * This is used to stop observing a given element.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-unobserve\\n * @param {!Element} element The elmenent to stop observing.\\n * @return {undefined}\\n */\\nIntersectionObserver.prototype.unobserve = function(element) {};\\n\\n/**\\n * Disconnect.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-disconnect\\n */\\nIntersectionObserver.prototype.disconnect = function() {};\\n\\n/**\\n * Take records.\\n * @see https://wicg.github.io/IntersectionObserver/#dom-intersectionobserver-takerecords\\n * @return {!Array.}\\n */\\nIntersectionObserver.prototype.takeRecords = function() {};\\n","externs/iphone.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for all iPhone extensions. Created from:\\n * http://developer.apple.com/library/safari/navigation/\\n *\\n * @externs\\n * @author agrieve@google.com (Andrew Grieve)\\n */\\n\\n\\n/**\\n * @type {number}\\n */\\nTouch.prototype.webkitForce;\\n\\n/**\\n * @type {number}\\n */\\nTouch.prototype.webkitRadiusX;\\n\\n/**\\n * @type {number}\\n */\\nTouch.prototype.webkitRadiusY;\\n\\n/**\\n * The distance between';a.a+=' two fingers since the start of an event as a multiplier\\n * of the initial distance. The initial value is 1.0. If less than 1.0, the\\n * gesture is pinch close (to zoom out). If greater than 1.0, the gesture is\\n * pinch open (to zoom in).\\n * @type {number}\\n */\\nTouchEvent.prototype.scale;\\n\\n/**\\n * The delta rotation since the start of an event, in degrees, where clockwise\\n * is positive and counter-clockwise is negative. The initial value is 0.0.\\n * @type {number}\\n */\\nTouchEvent.prototype.rotation;\\n\\n/**\\n * Initializes a newly created TouchEvent object.\\n * @param {string} type\\n * @param {boolean} canBubble\\n * @param {boolean} cancelable\\n * @param {Window} view\\n * @param {number} detail\\n * @param {number} screenX\\n * @param {number} screenY\\n * @param {number} clientX\\n * @param {number} clientY\\n * @param {boolean} ctrlKey\\n * @param {boolean} altKey\\n * @param {boolean} shiftKey\\n * @param {boolean} metaKey\\n * @param {TouchList} touches\\n * @param {TouchList} targetTouches\\n * @param {TouchList} changedTouches\\n * @param {number} scale\\n * @param {number} rotation\\n * @return {undefined}\\n */\\nTouchEvent.prototype.initTouchEvent = function(type, canBubble, cancelable,\\n view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,\\n metaKey, touches, targetTouches, changedTouches, scale, rotation) {};\\n\\n/**\\n * The GestureEvent class encapsulates information about a multi-touch gesture.\\n *\\n * GestureEvent objects are high-level events that encapsulate the low-level\\n * TouchEvent objects. Both GestureEvent and TouchEvent events are sent during\\n * a multi-touch sequence. Gesture events contain scaling and rotation\\n * information allowing gestures to be combined, if supported by the platform.\\n * If not supported, one gesture ends before another starts. Listen for\\n * GestureEvent events if you want to respond to gestures only, not process\\n * the low-level TouchEvent objects.\\n *\\n * @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html\\n * @extends {UIEvent}\\n * @constructor\\n */\\nfunction GestureEvent() {}\\n\\n/**\\n * The distance between two fingers since the start of an event as a multiplier\\n * of the initial distance. The initial value is 1.0. If less than 1.0, the\\n * gesture is pinch close (to zoom out). If greater than 1.0, the gesture is\\n * pinch open (to zoom in).\\n * @type {number}\\n */\\nGestureEvent.prototype.scale;\\n\\n/**\\n * The delta rotation since the start of an event, in degrees, where clockwise\\n * is positive and counter-clockwise is negative. The initial value is 0.0.\\n * @type {number}\\n */\\nGestureEvent.prototype.rotation;\\n\\n/**\\n * The target of this gesture.\\n * @type {EventTarget}\\n */\\nGestureEvent.prototype.target;\\n\\n/**\\n * Initializes a newly created GestureEvent object.\\n * @param {string} type\\n * @param {boolean} canBubble\\n * @param {boolean} cancelable\\n * @param {Window} view\\n * @param {number} detail\\n * @param {number} screenX\\n * @param {number} screenY\\n * @param {number} clientX\\n * @param {number} clientY\\n * @param {boolean} ctrlKey\\n * @param {boolean} altKey\\n * @param {boolean} shiftKey\\n * @param {boolean} metaKey\\n * @param {EventTarget} target\\n * @param {number} scale\\n * @param {number} rotation\\n * @return {undefined}\\n */\\nGestureEvent.prototype.initGestureEvent = function(type, canBubble, cancelable,\\n view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,\\n metaKey, target, scale, rotation) {};\\n\\n\\n/**\\n * Specifies the JavaScript method to invoke when a gesture is started by\\n * two or more fingers touching the surface.\\n * @type {?function(!GestureEvent)}\\n */\\nElement.prototype.ongesturestart;\\n\\n/**\\n * Specifies the JavaScript method to invoke when fingers are moved during a\\n * gesture.\\n * @type {?function(!GestureEvent)}\\n */\\nElement.prototype.ongesturechange;\\n\\n/**\\n * Specifies the JavaScript method to invoke when a gesture ends (when there are\\n * 0 or 1 fingers touching the surface).\\n * @type {?function(!GestureEvent)}\\n */\\nElement.prototype.ongestureend;\\n\\n/**\\n * Specifies the JavaScript method to invoke when the browser device\'s\\n * orientation changes, i.e.the device is rotated.\\n * @type {?function(!Event)}\\n * @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\\n */\\nWindow.prototype.onorientationchange;\\n\\n/**\\n * Returns the orientation of the browser\'s device, one of [-90, 0, 90, 180].\\n * @type {number}\\n * @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\\n */\\nWindow.prototype.orientation;\\n\\n/**\\n * @implicitCast\\n * @type {boolean}\\n */\\nHTMLInputElement.prototype.autocorrect;\\n\\n/**\\n * @implicitCast\\n * @type {boolean}\\n */\\nHTMLInputElement.prototype.autocapitalize;\\n\\n/**\\n * @implicitCast\\n * @type {boolean}\\n */\\nHTMLTextAreaElement.prototype.autocorrect;\\n\\n/**\\n * @implicitCast\\n * @type {boolean}\\n */\\nHTMLTextAreaElement.prototype.autocapitalize;\\n","externs/mediasource.js":"/*\\n * Copyright 2012 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for the Media Source Extensions. Note that the\\n * properties available here are the union of several versions of the spec.\\n * @see http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html\\n *\\n * @externs\\n * @author mattward@google.com (Matt Ward)\\n */\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction MediaSource() {}\\n\\n/** @override */\\nMediaSource.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/** @override */\\nMediaSource.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nMediaSource.prototype.dispatchEvent = function(evt) {};\\n\\n/** @type {Array} */\\nMediaSource.prototype.sourceBuffers;\\n\\n/** @type {Array} */\\nMediaSource.prototype.activeSourceBuffers;\\n\\n/** @type {number} */\\nMediaSource.prototype.duration;\\n\\n/**\\n * @param {string} type\\n * @return {SourceBuffer}\\n */\\nMediaSource.prototype.addSourceBuffer = function(type) {};\\n\\n/**\\n * @param {SourceBuffer} sourceBuffer\\n * @return {undefined}\\n */\\nMediaSource.prototype.removeSourceBuffer = function(sourceBuffer) {};\\n\\n/**\\n * Updates the live seekable range.\\n * @param {number} start\\n * @param {number} end\\n */\\nMediaSource.prototype.setLiveSeekableRange = function(start, end) {};\\n\\n/**\\n * Clears the live seekable range.\\n * @return {void}\\n */\\nMediaSource.prototype.clearLiveSeekableRange = function() {};\\n\\n/** @type {string} */\\nMediaSource.prototype.readyState;\\n\\n/**\\n * @param {string=} opt_error\\n * @return {undefined}\\n */\\nMediaSource.prototype.endOfStream = function(opt_error) {};\\n\\n/**\\n * @param {string} type\\n * @return {boolean}\\n */\\nMediaSource.isTypeSupported = function(type) {};\\n\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction SourceBuffer() {}\\n\\n/** @override */\\nSourceBuffer.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nSourceBuffer.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nSourceBuffer.prototype.dispatchEvent = function(evt) {};\\n\\n/** @type {string} */\\nSourceBuffer.prototype.appendMode;\\n\\n/** @type {boolean} */\\nSourceBuffer.prototype.updating;\\n\\n/** @type {TimeRanges} */\\nSourceBuffer.prototype.buffered;\\n\\n/** @type {number} */\\nSourceBuffer.prototype.timestampOffset;\\n\\n/** @type {number} */\\nSourceBuffer.prototype.appendWindowStart;\\n\\n/** @type {number} */\\nSourceBuffer.prototype.appendWindowEnd;\\n\\n/**\\n * @param {Uint8Array} data\\n * @return {undefined}\\n */\\nSourceBuffer.prototype.append = function(data) {};\\n\\n/**\\n * @param {ArrayBuffer|ArrayBufferView} data\\n * @return {undefined}\\n */\\nSourceBuffer.prototype.appendBuffer = function(data) {};\\n\\n/**\\n * Abort the current segment append sequence.\\n * @return {undefined}\\n */\\nSourceBuffer.prototype.abort = function() {};\\n\\n/**\\n * @param {number} start\\n * @param {number} end\\n * @return {undefined}\\n */\\nSourceBuffer.prototype.remove = function(start, end) {};\\n","externs/page_visibility.js":"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Externs for Page Visibility.\\n *\\n * @see http://www.w3.org/TR/page-visibility\\n * @externs\\n */\\n\\n/**\\n * Set of possible values: \'hidden\', \'visible\', \'prerender\', \'unloaded\'.\\n * @typedef {string}\\n * @see http://www.w3.org/TR/page-visibility/#VisibilityState\\n */\\nvar VisibilityState;\\n","externs/url.js":"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for URL and URLSearchParams from the spec at\\n * https://url.spec.whatwg.org.\\n *\\n * @externs\\n * @author rdcronin@google.com (Devlin Cronin)\\n */\\n\\n/**\\n * @constructor\\n * @implements {Iterable>}\\n * @param {(string|!URLSearchParams)=} init\\n */\\nfunction URLSearchParams(init) {}\\n\\n/**\\n * @param {string} name\\n * @param {string} value\\n * @return {undefined}\\n */\\nURLSearchParams.prototype.append = function(name, value) {};\\n\\n/**\\n * @param {string} name\\n * @return {undefined}\\n */\\nURLSearchParams.prototype.delete = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @return {?string}\\n */\\nURLSearchParams.prototype.get = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @return {!Array}\\n */\\nURLSearchParams.prototype.getAll = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @return {boolean}\\n */\\nURLSearchParams.prototype.has = function(name) {};\\n\\n/**\\n * @param {string} name\\n * @param {string} value\\n * @return {undefined}\\n */\\nURLSearchParams.prototype.set = function(name, value) {};\\n\\n/**\\n * @see https://url.spec.whatwg.org\\n * @constructor\\n * @param {string} url\\n * @param {(string|!URL)=} base\\n */\\nfunction URL(url, base) {}\\n\\n/** @type {string} */\\nURL.prototype.href;\\n\\n/**\\n * @const\\n * @type {string}\\n */\\nURL.prototype.origin;\\n\\n/** @type {string} */\\nURL.prototype.protocol;\\n\\n/** @type {string} */\\nURL.prototype.username;\\n\\n/** @type {string} */\\nURL.prototype.password;\\n\\n/** @type {string} */\\nURL.prototype.host;\\n\\n/** @type {string} */\\nURL.prototype.hostname;\\n\\n/** @type {string} */\\nURL.prototype.port;\\n\\n/** @type {string} */\\nURL.prototype.pathname;\\n\\n/** @type {string} */\\nURL.prototype.search;\\n\\n/**\\n * @const\\n * @type {!URLSearchParams}\\n */\\nURL.prototype.searchParams;\\n\\n/** @type {string} */\\nURL.prototype.hash;\\n\\n/**\\n * @param {string} domain\\n * @return {string}\\n */\\nURL.domainToASCII = function(domain) {};\\n\\n/**\\n * @param {string} domain\\n * @return {string}\\n */\\nURL.domainToUnicode = function(domain) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL\\n * @param {!File|!Blob|!MediaSource|!MediaStream} obj\\n * @return {string}\\n */\\nURL.createObjectURL = function(obj) {};\\n\\n/**\\n * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL\\n * @param {string} url\\n * @return {undefined}\\n */\\nURL.revokeObjectURL = function(url) {};\\n","externs/v8.js":"/*\\n * Copyright 2013 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview This file describes the externs API for V8-specific objects.\\n * @externs\\n */\\n\\n\\n\\n/**\\n * Stack frame elements in V8.\\n * @constructor\\n */\\nfunction CallSite() {}\\n\\n\\n/**\\n * Returns the value of this.\\n * @return {Object|undefined}\\n */\\nCallSite.prototype.getThis = function() {};\\n\\n\\n/**\\n * Returns the type of this as a string. This is the name of the function stored\\n * in the constructor field of this, if available, otherwise the object\'s\\n * [[Class]] internal property.\\n * @return {string|undefined}\\n */\\nCallSite.prototype.getTypeName = function() {};\\n\\n\\n/**\\n * Returns the current function.\\n * @return {!Function|undefined}\\n */\\nCallSite.prototype.getFunction = function() {};\\n\\n\\n/**\\n * Returns the name of the current function, typically its name property. If a\\n * name property is not available an attempt will be made to try to infer a name\\n * from the function\'s context.\\n * @return {string|undefined}\\n */\\nCallSite.prototype.getFunctionName = function() {};\\n\\n\\n/**\\n * Returns the name of the property of this or one of its prototypes that holds\\n * the current function.\\n * @return {string|undefined}\\n */\\nCallSite.prototype.getMethodName = function() {};\\n\\n\\n/**\\n * If this function was defined in a script returns the name of the script\\n * @return {string|undefined}\\n */\\nCallSite.prototype.getFileName = function() {};\\n\\n\\n/**\\n * If this function was defined in a script returns the current line number.\\n * @return {number|undefined}\\n */\\nCallSite.prototype.getLineNumber = function() {};\\n\\n\\n/**\\n * If this function was defined in a script returns the current column number.\\n * @return {number|undefined}\\n */\\nCallSite.prototype.getColumnNumber = function() {};\\n\\n\\n/**\\n * If this function was created using a call to eval, returns a CallSite object\\n * representing the location where eval was called\\n * @return {CallSite|undefined}\\n */\\nCallSite.prototype.getEvalOrigin = function() {};\\n\\n\\n/**\\n * Is this a toplevel invocation, that is, is this the global object?\\n * @return {boolean}\\n */\\nCallSite.prototype.isToplevel = function() {};\\n\\n\\n/**\\n * Does this call take place in code defined by a call to eval?\\n * @return {boolean}\\n */\\nCallSite.prototype.isEval = function() {};\\n\\n\\n/**\\n * Is this call in native V8 code?\\n * @return {boolean}\\n */\\nCallSite.prototype.isNative = function() {};\\n\\n\\n/**\\n * Is this a constructor call?\\n * @return {boolean}\\n */\\nCallSite.prototype.isConstructor = function() {};\\n","externs/webstorage.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy o';a.a+='f the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for W3C\'s WebStorage specification.\\n * This file depends on html5.js.\\n * @externs\\n * @author jeffbailey@google.com (Jeff Bailey)\\n */\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-storage-interface\\n */\\nfunction Storage() {}\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nStorage.prototype.length;\\n\\n/**\\n * @param {number} index\\n * @return {?string}\\n */\\nStorage.prototype.key = function(index) {};\\n\\n/**\\n * @param {string} key\\n * @return {?string}\\n */\\nStorage.prototype.getItem = function(key) {};\\n\\n/**\\n * @param {string} key\\n * @param {string} data\\n * @return {void}\\n */\\nStorage.prototype.setItem = function(key, data) {};\\n\\n/**\\n * @param {string} key\\n * @return {void}\\n */\\nStorage.prototype.removeItem = function(key) {};\\n\\n/**\\n * @return {void}\\n */\\nStorage.prototype.clear = function() {};\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-sessionstorage-attribute\\n */\\nfunction WindowSessionStorage() {}\\n\\n/**\\n * @type {Storage}\\n */\\nWindowSessionStorage.prototype.sessionStorage;\\n\\n/**\\n * Window implements WindowSessionStorage\\n *\\n * @type {Storage}\\n */\\nWindow.prototype.sessionStorage;\\n\\n/**\\n * @interface\\n * @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-localstorage-attribute\\n */\\nfunction WindowLocalStorage() {}\\n\\n/**\\n * @type {Storage}\\n */\\nWindowLocalStorage.prototype.localStorage;\\n\\n/**\\n * Window implements WindowLocalStorage\\n *\\n * @type {Storage}\\n */\\nWindow.prototype.localStorage;\\n\\n/**\\n * This is the storage event interface.\\n * @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-storage-event\\n * @extends {Event}\\n * @constructor\\n */\\nfunction StorageEvent() {}\\n\\n/**\\n * @type {string}\\n */\\nStorageEvent.prototype.key;\\n\\n/**\\n * @type {?string}\\n */\\nStorageEvent.prototype.oldValue;\\n\\n/**\\n * @type {?string}\\n */\\nStorageEvent.prototype.newValue;\\n\\n/**\\n * @type {string}\\n */\\nStorageEvent.prototype.url;\\n\\n/**\\n * @type {?Storage}\\n */\\nStorageEvent.prototype.storageArea;\\n\\n/**\\n * @param {string} typeArg\\n * @param {boolean} canBubbleArg\\n * @param {boolean} cancelableArg\\n * @param {string} keyArg\\n * @param {?string} oldValueArg\\n * @param {?string} newValueArg\\n * @param {string} urlArg\\n * @param {?Storage} storageAreaArg\\n * @return {void}\\n */\\nStorageEvent.prototype.initStorageEvent = function(typeArg, canBubbleArg,\\n cancelableArg, keyArg,\\n oldValueArg, newValueArg,\\n urlArg, storageAreaArg) {};\\n\\n","externs/whatwg_encoding.js":"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for WHATWG\'s Encoding specification\\n * https://encoding.spec.whatwg.org\\n * @externs\\n */\\n\\n/**\\n * @constructor\\n * @param {string=} encoding\\n * @param {Object=} options\\n */\\nfunction TextDecoder(encoding, options) {}\\n\\n/** @type {string} **/ TextDecoder.prototype.encoding;\\n/** @type {boolean} **/ TextDecoder.prototype.fatal;\\n/** @type {boolean} **/ TextDecoder.prototype.ignoreBOM;\\n\\n/**\\n * @param {!BufferSource=} input\\n * @param {?Object=} options\\n * @return {!string}\\n * @see https://encoding.spec.whatwg.org/#textdecoder\\n */\\nTextDecoder.prototype.decode = function decode(input, options) {};\\n\\n/**\\n * @constructor\\n * @param {string=} utfLabel\\n */\\nfunction TextEncoder(utfLabel) {}\\n\\n/** @type {string} **/ TextEncoder.prototype.encoding;\\n\\n/**\\n * @param {string=} input\\n * @return {!Uint8Array}\\n */\\nTextEncoder.prototype.encode = function(input) {};\\n","externs/w3c_anim_timing.js":"/*\\n * Copyright 2011 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Definitions for timing control for script base animations. The\\n * whole file has been fully type annotated.\\n *\\n * @see http://www.w3.org/TR/animation-timing/\\n * @see http://webstuff.nfshost.com/anim-timing/Overview.html\\n * @externs\\n * @author bcornell@google.com (Brian Cornell)\\n */\\n\\n/**\\n * @param {function(number): undefined} callback\\n * @param {Element=} opt_element In early versions of this API, the callback\\n * was invoked only if the element was visible.\\n * @return {number}\\n */\\nfunction requestAnimationFrame(callback, opt_element) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction cancelRequestAnimationFrame(handle) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction cancelAnimationFrame(handle) {};\\n\\n/**\\n * @param {function(number)} callback\\n * @param {Element=} opt_element\\n * @return {number}\\n */\\nfunction webkitRequestAnimationFrame(callback, opt_element) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction webkitCancelRequestAnimationFrame(handle) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction webkitCancelAnimationFrame(handle) {};\\n\\n/**\\n * @param {?function(number)} callback It\'s legitimate to pass a null\\n * callback and listen on the MozBeforePaint event instead.\\n * @param {Element=} opt_element\\n * @return {number}\\n */\\nfunction mozRequestAnimationFrame(callback, opt_element) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction mozCancelRequestAnimationFrame(handle) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction mozCancelAnimationFrame(handle) {};\\n\\n/**\\n * @param {function(number)} callback\\n * @param {Element=} opt_element\\n * @return {number}\\n */\\nfunction msRequestAnimationFrame(callback, opt_element) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction msCancelRequestAnimationFrame(handle) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction msCancelAnimationFrame(handle) {};\\n\\n/**\\n * @param {function(number)} callback\\n * @param {Element=} opt_element\\n * @return {number}\\n */\\nfunction oRequestAnimationFrame(callback, opt_element) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction oCancelRequestAnimationFrame(handle) {};\\n\\n/**\\n * @param {number} handle\\n * @return {undefined}\\n */\\nfunction oCancelAnimationFrame(handle) {};\\n","externs/w3c_audio.js":"/*\\n * Copyright 2012 The Closure Compiler Authors.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for the API related to audio.\\n * Definitions for the Web Audio API.\\n * This file is based on the W3C Working Draft 08 December 2015.\\n * @see http://www.w3.org/TR/webaudio/\\n *\\n * @externs\\n */\\n\\n/**\\n * @constructor\\n */\\nfunction BaseAudioContext() {}\\n\\n/** @type {!AudioDestinationNode} */\\nBaseAudioContext.prototype.destination;\\n\\n/** @type {number} */\\nBaseAudioContext.prototype.sampleRate;\\n\\n/** @type {number} */\\nBaseAudioContext.prototype.currentTime;\\n\\n/** @type {!AudioListener} */\\nBaseAudioContext.prototype.listener;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#BaseAudioContext for valid values\\n */\\nBaseAudioContext.prototype.state;\\n\\n/**\\n * @param {number} numberOfChannels\\n * @param {number} length\\n * @param {number} sampleRate\\n * @return {!AudioBuffer}\\n */\\nBaseAudioContext.prototype.createBuffer =\\n function(numberOfChannels, length, sampleRate) {};\\n\\n/**\\n * @param {!ArrayBuffer} audioData\\n * @param {function(!AudioBuffer)=} successCallback\\n * @param {function(?)=} errorCallback\\n * @return {!Promise}\\n */\\nBaseAudioContext.prototype.decodeAudioData =\\n function(audioData, successCallback, errorCallback) {};\\n\\n/**\\n * @return {!AudioBufferSourceNode}\\n */\\nBaseAudioContext.prototype.createBufferSource = function() {};\\n\\n/**\\n * @deprecated Use createAudioWorker instead\\n * @param {number=} bufferSize\\n * @param {number=} numberOfInputChannels_opt\\n * @param {number=} numberOfOutputChannels_opt\\n * @return {!ScriptProcessorNode}\\n */\\nBaseAudioContext.prototype.createScriptProcessor = function(bufferSize,\\n numberOfInputChannels_opt, numberOfOutputChannels_opt) {};\\n\\n/**\\n * @return {!AnalyserNode}\\n */\\nBaseAudioContext.prototype.createAnalyser = function() {};\\n\\n/**\\n * @return {!GainNode}\\n */\\nBaseAudioContext.prototype.createGain = function() {};\\n\\n/**\\n * @param {number=} maxDelayTime\\n * @return {!DelayNode}\\n */\\nBaseAudioContext.prototype.createDelay = function(maxDelayTime) {};\\n\\n/**\\n * @return {!BiquadFilterNode}\\n */\\nBaseAudioContext.prototype.createBiquadFilter = function() {};\\n\\n/**\\n * @return {!WaveShaperNode}\\n */\\nBaseAudioContext.prototype.createWaveShaper = function() {};\\n\\n/**\\n * @deprecated Use BaseAudioContext#createSpatialPanner or BaseAudioContext#createStereoPanner\\n * @return {!PannerNode}\\n */\\nBaseAudioContext.prototype.createPanner = function() {};\\n\\n/**\\n * @return {!StereoPannerNode}\\n */\\nBaseAudioContext.prototype.createStereoPanner = function() {};\\n\\n/**\\n * @return {!ConvolverNode}\\n */\\nBaseAudioContext.prototype.createConvolver = function() {};\\n\\n/**\\n * @param {number=} numberOfOutputs\\n * @return {!ChannelSplitterNode}\\n */\\nBaseAudioContext.prototype.createChannelSplitter = function(numberOfOutputs) {};\\n\\n/**\\n * @param {number=} numberOfInputs\\n * @return {!ChannelMergerNode}\\n */\\nBaseAudioContext.prototype.createChannelMerger = function(numberOfInputs) {};\\n\\n/**\\n * @return {!DynamicsCompressorNode}\\n */\\nBaseAudioContext.prototype.createDynamicsCompressor = function() {};\\n\\n/**\\n * @return {!OscillatorNode}\\n */\\nBaseAudioContext.prototype.createOscillator = function() {};\\n\\n/**\\n * @param {!Float32Array} real\\n * @param {!Float32Array} imag\\n * @return {!PeriodicWave}\\n */\\nBaseAudioContext.prototype.createPeriodicWave = function(real, imag) {};\\n\\n/**\\n * @return {!Promise}\\n */\\nBaseAudioContext.prototype.resume = function() {};\\n\\n/**\\n * @return {!Promise}\\n */\\nBaseAudioContext.prototype.suspend = function() {};\\n\\n/**\\n * @return {!Promise}\\n */\\nBaseAudioContext.prototype.close = function() {};\\n\\n/** @type {?function(!Event)} */\\nBaseAudioContext.prototype.onstatechange;\\n\\n/**\\n * @param {string} scriptURL\\n * @return {!Promise}\\n */\\nBaseAudioContext.prototype.createAudioWorker = function(scriptURL) {};\\n\\n/**\\n * @param {!IArrayLike} feedforward\\n * @param {!IArrayLike} feedback\\n * @return {!IIRFilterNode}\\n */\\nBaseAudioContext.prototype.createIIRFilter = function(feedforward, feedback) {};\\n\\n/**\\n * @return {!SpatialPannerNode}\\n */\\nBaseAudioContext.prototype.createSpatialPanner = function() {};\\n\\n/**\\n * @record\\n * @see https://webaudio.github.io/web-audio-api/#idl-def-AudioContextOptions\\n */\\nfunction AudioContextOptions() {};\\n\\n/** @type {(undefined|string|number)} */\\nAudioContextOptions.prototype.latencyHint;\\n\\n/** @type {(undefined|number)} */\\nAudioContextOptions.prototype.sampleRate;\\n\\n/**\\n * Includes the non-standard contextOptions optional options parameter\\n * implemented by Chrome and Firefox.\\n * @param {!AudioContextOptions=} contextOptions\\n * @constructor\\n * @extends {BaseAudioContext}\\n */\\nfunction AudioContext(contextOptions) {}\\n\\n/**\\n * @param {!HTMLMediaElement} mediaElement\\n * @return {!MediaElementAudioSourceNode}\\n */\\nAudioContext.prototype.createMediaElementSource = function(mediaElement) {};\\n\\n/**\\n * @return {!MediaStreamAudioDestinationNode}\\n */\\nAudioContext.prototype.createMediaStreamDestination = function() {};\\n\\n/**\\n * @param {!MediaStream} mediaStream\\n * @return {!MediaStreamAudioSourceNode}\\n */\\nAudioContext.prototype.createMediaStreamSource = function(mediaStream) {};\\n\\n/**\\n * @deprecated Use createScriptProcessor instead.\\n * @param {number} bufferSize\\n * @param {number} numberOfInputs\\n * @param {number} numberOfOuputs\\n * @return {!ScriptProcessorNode}\\n */\\nAudioContext.prototype.createJavaScriptNode = function(bufferSize,\\n numberOfInputs, numberOfOuputs) {};\\n\\n/**\\n * @deprecated Use createGain instead.\\n * @return {!GainNode}\\n */\\nAudioContext.prototype.createGainNode = function() {};\\n\\n/**\\n * @deprecated Use createDelay instead.\\n * @param {number=} maxDelayTime\\n * @return {!DelayNode}\\n */\\nAudioContext.prototype.createDelayNode = function(maxDelayTime) {};\\n\\n/**\\n * @param {number} numberOfChannels\\n * @param {number} length\\n * @param {number} sampleRate\\n * @constructor\\n * @extends {BaseAudioContext}\\n */\\nfunction OfflineAudioContext(numberOfChannels, length, sampleRate) {}\\n\\n/**\\n * @return {!Promise}\\n */\\nOfflineAudioContext.prototype.startRendering = function() {};\\n\\n/** @type {function(!OfflineAudioCompletionEvent)} */\\nOfflineAudioContext.prototype.oncomplete;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction OfflineAudioCompletionEvent() {}\\n\\n/** @type {AudioBuffer} */\\nOfflineAudioCompletionEvent.prototype.renderedBuffer;\\n\\n/**\\n * @constructor\\n */\\nfunction AudioNode() {}\\n/**\\n * @param {!AudioNode|!AudioParam} destination\\n * @param {number=} output\\n * @param {number=} input\\n * @return {AudioNode|void}\\n */\\nAudioNode.prototype.connect = function(destination, output, input) {};\\n\\n/**\\n * @param {!AudioNode|!AudioParam|number=} destination\\n * @param {number=} output\\n * @param {number=} input\\n */\\nAudioNode.prototype.disconnect = function(destination, output, input) {};\\n\\n/** @type {!AudioContext} */\\nAudioNode.prototype.context;\\n\\n/** @type {number} */\\nAudioNode.prototype.numberOfInputs;\\n\\n/** @type {number} */\\nAudioNode.prototype.numberOfOutputs;\\n\\n/** @type {number} */\\nAudioNode.prototype.channelCount;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-audionode-interface for valid values\\n */\\nAudioNode.prototype.channelCountMode;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-audionode-interface for valid values\\n */\\nAudioNode.prototype.channelInterpretation;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction AudioSourceNode() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction AudioDestinationNode() {}\\n\\n/**\\n * @deprecated Use AudioDestinationNode#maxChannelCount\\n * @type {number}\\n */\\nAudioDestinationNode.prototype.numberOfChannels;\\n\\n/** @type {number} */\\nAudioDestinationNode.prototype.maxChannelCount;\\n\\n/**\\';a.a+='n * @constructor\\n */\\nfunction AudioParam() {}\\n\\n/** @type {number} */\\nAudioParam.prototype.value;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioParam.prototype.maxValue;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioParam.prototype.minValue;\\n\\n/** @type {number} */\\nAudioParam.prototype.defaultValue;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioParam.prototype.units;\\n\\n/**\\n * @param {number} value\\n * @param {number} startTime\\n * @return {!AudioParam}\\n * @throws {!TypeError} if startTime is negative or not a finite number\\n */\\nAudioParam.prototype.setValueAtTime = function(value, startTime) {};\\n\\n/**\\n * @param {number} value\\n * @param {number} endTime\\n * @return {!AudioParam}\\n * @throws {!TypeError} if endTime is negative or not a finite number\\n */\\nAudioParam.prototype.linearRampToValueAtTime = function(value, endTime) {};\\n\\n/**\\n * @param {number} value\\n * @param {number} endTime\\n * @return {!AudioParam}\\n * @throws {!TypeError} if endTime is negative or not a finite number\\n */\\nAudioParam.prototype.exponentialRampToValueAtTime = function(value, endTime) {};\\n\\n/**\\n * @param {number} target\\n * @param {number} startTime\\n * @param {number} timeConstant\\n * @return {!AudioParam}\\n * @throws {!TypeError} if startTime is negative or not a finite number, or\\n * timeConstant is not strictly positive\\n */\\nAudioParam.prototype.setTargetAtTime = function(target, startTime,\\n timeConstant) {};\\n\\n/**\\n * @deprecated Use setTargetAtTime instead.\\n * @param {number} target\\n * @param {number} startTime\\n * @param {number} timeConstant\\n * @return {!AudioParam}\\n */\\nAudioParam.prototype.setTargetValueAtTime = function(target, startTime,\\n timeConstant) {};\\n\\n/**\\n * @param {!Float32Array} values\\n * @param {number} startTime\\n * @param {number} duration\\n * @return {!AudioParam}\\n * @throws {!TypeError} if startTime is negative or not a finite number\\n */\\nAudioParam.prototype.setValueCurveAtTime = function(values, startTime,\\n duration) {};\\n\\n/**\\n * @param {number} startTime\\n * @return {!AudioParam}\\n * @throws {!TypeError} if startTime is negative or not a finite number\\n */\\nAudioParam.prototype.cancelScheduledValues = function(startTime) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioParam}\\n */\\nfunction AudioGain() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction GainNode() {}\\n\\n/** @type {!AudioParam} */\\nGainNode.prototype.gain;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction DelayNode() {}\\n\\n/** @type {!AudioParam} */\\nDelayNode.prototype.delayTime;\\n\\n/**\\n * @constructor\\n */\\nfunction AudioBuffer() {}\\n\\n/**\\n * @deprecated\\n * @type {!AudioGain}\\n */\\nAudioBuffer.prototype.gain;\\n\\n/** @type {number} */\\nAudioBuffer.prototype.sampleRate;\\n\\n/** @type {number} */\\nAudioBuffer.prototype.length;\\n\\n/** @type {number} */\\nAudioBuffer.prototype.duration;\\n\\n/** @type {number} */\\nAudioBuffer.prototype.numberOfChannels;\\n\\n/**\\n * @param {number} channel\\n * @return {!Float32Array}\\n */\\nAudioBuffer.prototype.getChannelData = function(channel) {};\\n\\n/**\\n * @param {!Float32Array} destination\\n * @param {number} channelNumber\\n * @param {number=} startInChannel\\n */\\nAudioBuffer.prototype.copyFromChannel = function(destination,\\n channelNumber, startInChannel) {};\\n\\n/**\\n * @param {!Float32Array} source\\n * @param {number} channelNumber\\n * @param {number=} startInChannel\\n */\\nAudioBuffer.prototype.copyToChannel = function(source, channelNumber,\\n startInChannel) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction AudioBufferSourceNode() {}\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioBufferSourceNode.prototype.UNSCHEDULED_STATE;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioBufferSourceNode.prototype.SCHEDULED_STATE;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioBufferSourceNode.prototype.PLAYING_STATE;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioBufferSourceNode.prototype.FINISHED_STATE;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioBufferSourceNode.prototype.playbackState;\\n\\n/** @type {AudioBuffer} */\\nAudioBufferSourceNode.prototype.buffer;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioBufferSourceNode.prototype.gain;\\n\\n/** @type {!AudioParam} */\\nAudioBufferSourceNode.prototype.playbackRate;\\n\\n/** @type {boolean} */\\nAudioBufferSourceNode.prototype.loop;\\n\\n/** @type {number} */\\nAudioBufferSourceNode.prototype.loopStart;\\n\\n/** @type {number} */\\nAudioBufferSourceNode.prototype.loopEnd;\\n\\n/** @type {?function(!Event)} */\\nAudioBufferSourceNode.prototype.onended;\\n\\n/** @type {!AudioParam} */\\nAudioBufferSourceNode.prototype.detune;\\n\\n/**\\n * @param {number=} when\\n * @param {number=} opt_offset\\n * @param {number=} opt_duration\\n * @throws {!TypeError} if any parameter is negative\\n */\\nAudioBufferSourceNode.prototype.start = function(when, opt_offset,\\n opt_duration) {};\\n\\n/**\\n * @param {number=} when\\n * @throws {!TypeError} if when is negative\\n */\\nAudioBufferSourceNode.prototype.stop = function(when) {};\\n\\n/**\\n * @deprecated Use AudioBufferSourceNode#start\\n * @param {number} when\\n * @return {undefined}\\n */\\nAudioBufferSourceNode.prototype.noteOn = function(when) {};\\n\\n/**\\n * @param {number=} when\\n * @param {number=} opt_offset\\n * @param {number=} opt_duration\\n * @deprecated Use AudioBufferSourceNode#start\\n */\\nAudioBufferSourceNode.prototype.noteGrainOn = function(when, opt_offset,\\n opt_duration) {};\\n\\n/**\\n * @param {number} when\\n * @deprecated Use AudioBufferSourceNode#stop\\n */\\nAudioBufferSourceNode.prototype.noteOff = function(when) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction MediaElementAudioSourceNode() {}\\n\\n/**\\n * @constructor\\n */\\nfunction AudioWorker() {}\\n\\n/** @type {?function(!Event)} */\\nAudioWorker.prototype.onloaded;\\n\\n/** @type {?function(!Event)} */\\nAudioWorker.prototype.onmessage;\\n\\n/** @type {!Array} */\\nAudioWorker.prototype.parameters;\\n\\n/**\\n * @param {string} name\\n * @param {number} defaultValue\\n * @return {!AudioParam}\\n */\\nAudioWorker.prototype.addParameter = function(name, defaultValue) {};\\n\\n/**\\n * @param {number} numberOfInputs\\n * @param {number} numberOfOutputs\\n * @return {!AudioWorkerNode}\\n */\\nAudioWorker.prototype.createNode = function(numberOfInputs, numberOfOutputs) {};\\n\\n/**\\n * @param {*} message\\n * @param {!Array=} transfer\\n */\\nAudioWorker.prototype.postMessage = function(message, transfer) {};\\n\\n/**\\n * @param {string} name\\n */\\nAudioWorker.prototype.removeParameter = function(name) {};\\n\\n/**\\n */\\nAudioWorker.prototype.terminate = function() {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction AudioWorkerNode() {}\\n\\n/** @type {?function(!Event)} */\\nAudioWorkerNode.prototype.onmessage;\\n\\n/**\\n * @param {*} message\\n * @param {!Array=} transfer\\n */\\nAudioWorkerNode.prototype.postMessage = function(message, transfer) {};\\n\\n/**\\n * @constructor\\n */\\nfunction AudioWorkerParamDescriptor() {}\\n\\n/** @type {number} */\\nAudioWorkerParamDescriptor.prototype.defaultValue;\\n\\n/** @type {string} */\\nAudioWorkerParamDescriptor.prototype.name;\\n\\n/**\\n * @constructor\\n */\\nfunction AudioWorkerGlobalScope() {}\\n\\n/** @type {?function(!Event)} */\\nAudioWorkerGlobalScope.prototype.onaudioprocess;\\n\\n/** @type {?function(!Event)} */\\nAudioWorkerGlobalScope.prototype.onnodecreate;\\n\\n/** @type {!Array} */\\nAudioWorkerGlobalScope.prototype.parameters;\\n\\n/** @type {number} */\\nAudioWorkerGlobalScope.prototype.sampleRate;\\n\\n/**\\n * @param {string} name\\n * @param {number} defaultValue\\n * @return {!AudioParam}\\n */\\nAudioWorkerGlobalScope.prototype.addParameter = function(name, defaultValue) {};\\n\\n/**\\n * @param {string} name\\n */\\nAudioWorkerGlobalScope.prototype.removeParameter = function(name) {};\\n\\n/**\\n * @constructor\\n */\\nfunction AudioWorkerNodeProcessor() {}\\n\\n/** @type {?function(!Event)} */\\nAudioWorkerNodeProcessor.prototype.onmessage;\\n\\n/**\\n * @param {*} message\\n * @param {!Array=} transfer\\n */\\nAudioWorkerNodeProcessor.prototype.postMessage = function(message, transfer) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n * @deprecated Use AudioWorkerNode\\n */\\nfunction JavaScriptAudioNode() {}\\n\\n/**\\n * @type {EventListener|(function(!AudioProcessingEvent):(boolean|undefined))}\\n * @deprecated Use AudioWorkerNode\\n */\\nJavaScriptAudioNode.prototype.onaudioprocess;\\n\\n/**\\n * @type {number}\\n * @deprecated Use AudioWorkerNode\\n */\\nJavaScriptAudioNode.prototype.bufferSize;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n * @deprecated Use AudioWorkerNode\\n */\\nfunction ScriptProcessorNode() {}\\n\\n/**\\n * @type {EventListener|(function(!AudioProcessingEvent):(boolean|undefined))}\\n * @deprecated Use AudioWorkerNode\\n */\\nScriptProcessorNode.prototype.onaudioprocess;\\n\\n/**\\n * @type {number}\\n * @deprecated Use AudioWorkerNode\\n */\\nScriptProcessorNode.prototype.bufferSize;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction AudioWorkerNodeCreationEvent() {}\\n\\n/** @type {!Array} */\\nAudioWorkerNodeCreationEvent.prototype.inputs;\\n\\n/** @type {!AudioWorkerNodeProcessor} */\\nAudioWorkerNodeCreationEvent.prototype.node;\\n\\n/** @type {!Array} */\\nAudioWorkerNodeCreationEvent.prototype.outputs;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n */\\nfunction AudioProcessEvent() {}\\n\\n/** @type {!Float32Array} */\\nAudioProcessEvent.prototype.inputs;\\n\\n/** @type {!AudioWorkerNodeProcessor} */\\nAudioProcessEvent.prototype.node;\\n\\n/** @type {!Float32Array} */\\nAudioProcessEvent.prototype.outputs;\\n\\n/** @type {!Object} */\\nAudioProcessEvent.prototype.parameters;\\n\\n/** @type {number} */\\nAudioProcessEvent.prototype.playbackTime;\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @deprecated Use AudioProcessEvent\\n */\\nfunction AudioProcessingEvent() {}\\n\\n/**\\n * @type {!ScriptProcessorNode}\\n * @deprecated Use AudioProcessEvent\\n */\\nAudioProcessingEvent.prototype.node;\\n\\n/**\\n * @type {number}\\n * @deprecated Use AudioProcessEvent\\n */\\nAudioProcessingEvent.prototype.playbackTime;\\n\\n/**\\n * @type {!AudioBuffer}\\n * @deprecated Use AudioProcessEvent\\n */\\nAudioProcessingEvent.prototype.inputBuffer;\\n\\n/**\\n * @type {!AudioBuffer}\\n * @deprecated Use AudioProcessEvent\\n */\\nAudioProcessingEvent.prototype.outputBuffer;\\n\\n/**\\n * @deprecated\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction AudioPannerNode() {}\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.EQUALPOWER;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.HRTF;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.SOUNDFIELD;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.LINEAR_DISTANCE;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.INVERSE_DISTANCE;\\n\\n/**\\n * @deprecated\\n * @const {number}\\n */\\nAudioPannerNode.prototype.EXPONENTIAL_DISTANCE;\\n\\n/**\\n * @deprecated\\n * @type {number|string}\\n */\\nAudioPannerNode.prototype.panningModel;\\n\\n/**\\n * @deprecated\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @return {undefined}\\n */\\nAudioPannerNode.prototype.setPosition = function(x, y, z) {};\\n\\n/**\\n * @deprecated\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @return {undefined}\\n */\\nAudioPannerNode.prototype.setOrientation = function(x, y, z) {};\\n\\n/**\\n * @deprecated\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @return {undefined}\\n */\\nAudioPannerNode.prototype.setVelocity = function(x, y, z) {};\\n\\n/**\\n * @deprecated\\n * @type {number|string}\\n */\\nAudioPannerNode.prototype.distanceModel;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.refDistance;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.maxDistance;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.rolloffFactor;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.coneInnerAngle;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.coneOuterAngle;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nAudioPannerNode.prototype.coneOuterGain;\\n\\n/**\\n * @deprecated\\n * @type {!AudioGain}\\n */\\nAudioPannerNode.prototype.coneGain;\\n\\n/**\\n * @deprecated\\n * @type {!AudioGain}\\n */\\nAudioPannerNode.prototype.distanceGain;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction PannerNode() {}\\n\\n/** @type {number} */\\nPannerNode.prototype.coneInnerAngle;\\n\\n/** @type {number} */\\nPannerNode.prototype.coneOuterAngle;\\n\\n/** @type {number} */\\nPannerNode.prototype.coneOuterGain;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-pannernode-interface for valid values\\n */\\nPannerNode.prototype.distanceModel;\\n\\n/** @type {number} */\\nPannerNode.prototype.maxDistance;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-pannernode-interface for valid values\\n */\\nPannerNode.prototype.panningModel;\\n\\n/** @type {number} */\\nPannerNode.prototype.refDistance;\\n\\n/** @type {number} */\\nPannerNode.prototype.rolloffFactor;\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n */\\nPannerNode.prototype.setOrientation = function(x, y, z) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n */\\nPannerNode.prototype.setPosition = function(x, y, z) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n */\\nPannerNode.prototype.setVelocity = function(x, y, z) {};\\n\\n/**\\n * @constructor\\n * @deprecated Use SpatialListener\\n */\\nfunction AudioListener() {}\\n\\n/**\\n * @type {number}\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.gain;\\n\\n/**\\n * @type {number}\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.dopplerFactor;\\n\\n/**\\n * @type {number}\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.speedOfSound;\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.setPosition = function(x, y, z) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @param {number} xUp\\n * @param {number} yUp\\n * @param {number} zUp\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.setOrientation = function(x, y, z, xUp, yUp, zUp) {};\\n\\n/**\\n * @param {number} x\\n * @param {number} y\\n * @param {number} z\\n * @deprecated Use SpatialListener\\n */\\nAudioListener.prototype.setVelocity = function(x, y, z) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction SpatialPannerNode() {}\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.coneInnerAngle;\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.coneOuterAngle;\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.coneOuterGain;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-pannernode-interface for valid values\\n */\\nSpatialPannerNode.prototype.distanceModel;\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.maxDistance;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.orientationX;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.orientationY;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.orientationZ;\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-pannernode-interface for valid values\\n */\\nSpatialPannerNode.prototype.panningModel;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.positionX;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.positionY;\\n\\n/** @type {!AudioParam} */\\nSpatialPannerNode.prototype.positionZ;\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.refDistance;\\n\\n/** @type {number} */\\nSpatialPannerNode.prototype.rolloffFactor;\\n\\n/**\\n * @constructor\\n */\\nfunction SpatialListener() {}\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.forwardX;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.forwardY;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.forwardZ;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.positionX;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.positionY;\\n\\n/** @type {!AudioParam} */\\nSpat';a.a+='ialListener.prototype.positionZ;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.upX;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.upY;\\n\\n/** @type {!AudioParam} */\\nSpatialListener.prototype.upZ;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n * @see http://webaudio.github.io/web-audio-api/#the-stereopannernode-interface\\n */\\nfunction StereoPannerNode() {}\\n\\n/** @type {!AudioParam} */\\nStereoPannerNode.prototype.pan;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction ConvolverNode() {}\\n\\n/** @type {?AudioBuffer} */\\nConvolverNode.prototype.buffer;\\n\\n/** @type {boolean} */\\nConvolverNode.prototype.normalize;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nvar AnalyserNode = function() {};\\n\\n/**\\n * @param {!Float32Array} array\\n */\\nAnalyserNode.prototype.getFloatFrequencyData = function(array) {};\\n\\n/**\\n * @param {!Uint8Array} array\\n */\\nAnalyserNode.prototype.getByteFrequencyData = function(array) {};\\n\\n/**\\n * @param {!Uint8Array} array\\n */\\nAnalyserNode.prototype.getByteTimeDomainData = function(array) {};\\n\\n/**\\n * @param {!Float32Array} array\\n */\\nAnalyserNode.prototype.getFloatTimeDomainData = function(array) {};\\n\\n/** @type {number} */\\nAnalyserNode.prototype.fftSize;\\n\\n/** @type {number} */\\nAnalyserNode.prototype.frequencyBinCount;\\n\\n/** @type {number} */\\nAnalyserNode.prototype.minDecibels;\\n\\n/** @type {number} */\\nAnalyserNode.prototype.maxDecibels;\\n\\n/** @type {number} */\\nAnalyserNode.prototype.smoothingTimeConstant;\\n\\n/**\\n * @constructor\\n * @extends {AnalyserNode}\\n * @deprecated Use AnalyserNode\\n *\\n * This constructor has been added for backwards compatibility.\\n */\\nvar RealtimeAnalyserNode = function() {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction ChannelSplitterNode() {}\\n\\n/**\\n * @constructor\\n * @extends {ChannelSplitterNode}\\n * @deprecated Use ChannelSplitterNode\\n *\\n * This constructor has been added for backwards compatibility.\\n */\\nfunction AudioChannelSplitter() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction ChannelMergerNode() {}\\n\\n/**\\n * @constructor\\n * @extends {ChannelMergerNode}\\n * @deprecated Use ChannelMergerNode\\n *\\n * This constructor has been added for backwards compatibility.\\n */\\nfunction AudioChannelMerger() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction DynamicsCompressorNode() {}\\n\\n/** @type {!AudioParam} */\\nDynamicsCompressorNode.prototype.threshold;\\n\\n/** @type {!AudioParam} */\\nDynamicsCompressorNode.prototype.knee;\\n\\n/** @type {!AudioParam} */\\nDynamicsCompressorNode.prototype.ratio;\\n\\n/** @type {number} */\\nDynamicsCompressorNode.prototype.reduction;\\n\\n/** @type {!AudioParam} */\\nDynamicsCompressorNode.prototype.attack;\\n\\n/** @type {!AudioParam} */\\nDynamicsCompressorNode.prototype.release;\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction BiquadFilterNode() {}\\n\\n/**\\n * A read-able and write-able string that specifies the type of the filter.\\n * See http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface\\n * for valid values.\\n * @type {string}\\n */\\nBiquadFilterNode.prototype.type;\\n\\n/** @type {!AudioParam} */\\nBiquadFilterNode.prototype.frequency;\\n\\n/** @type {!AudioParam} */\\nBiquadFilterNode.prototype.detune;\\n\\n/** @type {!AudioParam} */\\nBiquadFilterNode.prototype.Q;\\n\\n/** @type {!AudioParam} */\\nBiquadFilterNode.prototype.gain;\\n/**\\n * @param {Float32Array} frequencyHz\\n * @param {Float32Array} magResponse\\n * @param {Float32Array} phaseResponse\\n * @return {undefined}\\n */\\nBiquadFilterNode.prototype.getFrequencyResponse = function(\\n frequencyHz, magResponse, phaseResponse) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction IIRFilterNode() {}\\n\\n/**\\n * @param {!Float32Array} frequencyHz\\n * @param {!Float32Array} magResponse\\n * @param {!Float32Array} phaseResponse\\n * @return {undefined}\\n */\\nIIRFilterNode.prototype.getFrequencyResponse = function(\\n frequencyHz, magResponse, phaseResponse) {};\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction WaveShaperNode() {}\\n\\n/** @type {Float32Array} */\\nWaveShaperNode.prototype.curve;\\n\\n/** @type {string} */\\nWaveShaperNode.prototype.oversample;\\n\\n/**\\n * @deprecated\\n * @constructor\\n */\\nfunction WaveTable() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction OscillatorNode() {}\\n\\n/**\\n * @type {string}\\n * See https://www.w3.org/TR/webaudio/#the-oscillatornode-interface for valid values\\n */\\nOscillatorNode.prototype.type;\\n\\n/**\\n * @deprecated\\n * @type {number}\\n */\\nOscillatorNode.prototype.playbackState;\\n\\n/** @type {!AudioParam} */\\nOscillatorNode.prototype.frequency;\\n\\n/** @type {!AudioParam} */\\nOscillatorNode.prototype.detune;\\n\\n/**\\n * @param {number=} when\\n */\\nOscillatorNode.prototype.start = function(when) {};\\n\\n/**\\n * @param {number=} when\\n */\\nOscillatorNode.prototype.stop = function(when) {};\\n\\n/**\\n * @deprecated\\n * @param {!WaveTable} waveTable\\n */\\nOscillatorNode.prototype.setWaveTable = function(waveTable) {};\\n\\n/**\\n * @param {!PeriodicWave} periodicWave\\n */\\nOscillatorNode.prototype.setPeriodicWave = function(periodicWave) {};\\n\\n/** @type {?function(!Event)} */\\nOscillatorNode.prototype.onended;\\n\\n/**\\n * @constructor\\n */\\nfunction PeriodicWave() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction MediaStreamAudioSourceNode() {}\\n\\n/**\\n * @constructor\\n * @extends {AudioNode}\\n */\\nfunction MediaStreamAudioDestinationNode() {}\\n\\n/** @type {!MediaStream} */\\nMediaStreamAudioDestinationNode.prototype.stream;\\n\\n/**\\n * Definitions for the Web Audio API with webkit prefix.\\n */\\n\\n/**\\n * @constructor\\n * @extends {AudioContext}\\n */\\nfunction webkitAudioContext() {}\\n\\n/**\\n * @param {number} numberOfChannels\\n * @param {number} length\\n * @param {number} sampleRate\\n * @constructor\\n * @extends {OfflineAudioContext}\\n */\\nfunction webkitOfflineAudioContext(numberOfChannels, length, sampleRate) {}\\n\\n/**\\n * @constructor\\n * @extends {AudioPannerNode}\\n */\\nfunction webkitAudioPannerNode() {}\\n\\n/**\\n * @constructor\\n * @extends {PannerNode}\\n */\\nfunction webkitPannerNode() {}\\n\\n/**\\n * Definitions for the Audio API as implemented in Firefox.\\n * Please note that this document describes a non-standard experimental API.\\n * This API is considered deprecated.\\n * @see https://developer.mozilla.org/en/DOM/HTMLAudioElement\\n */\\n\\n/**\\n * @param {string=} src\\n * @constructor\\n * @extends {HTMLAudioElement}\\n */\\nfunction Audio(src) {}\\n\\n/**\\n * @param {number} channels\\n * @param {number} rate\\n */\\nAudio.prototype.mozSetup = function(channels, rate) {};\\n\\n/**\\n * @param {Array|Float32Array} buffer\\n */\\nAudio.prototype.mozWriteAudio = function(buffer) {};\\n\\n/**\\n * @return {number}\\n */\\nAudio.prototype.mozCurrentSampleOffset = function() {};\\n","externs/w3c_batterystatus.js":"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Battery Status API.\\n * The whole file has been fully type annotated. Created from\\n * http://www.w3.org/TR/2014/CR-battery-status-20141209/\\n *\\n * @externs\\n */\\n\\n\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n */\\nfunction BatteryManager() {}\\n\\n\\n/**\\n * @type {boolean}\\n */\\nBatteryManager.prototype.charging;\\n\\n\\n/**\\n * @type {number}\\n */\\nBatteryManager.prototype.chargingTime;\\n\\n\\n/**\\n * @type {number}\\n */\\nBatteryManager.prototype.dischargingTime;\\n\\n\\n/**\\n * @type {number}\\n */\\nBatteryManager.prototype.level;\\n\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nBatteryManager.prototype.onchargingchange;\\n\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nBatteryManager.prototype.onchargingtimechange;\\n\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nBatteryManager.prototype.ondischargingtimechange;\\n\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nBatteryManager.prototype.onlevelchange;\\n","externs/w3c_css3d.js":"/*\\n * Copyright 2010 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s CSS 3D Transforms specification.\\n * The whole file has been fully type annotated. Created from\\n * https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html\\n *\\n * @externs\\n * @author rjfioravanti@google.com (Ryan Fioravanti)\\n */\\n\\n/**\\n * @constructor\\n * @param {string=} opt_matrix\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#the-cssmatrix-interface\\n */\\nfunction CSSMatrix(opt_matrix) {}\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m11;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m12;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m13;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m14;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m21;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m22;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m23;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m24;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m31;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m32;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m33;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m34;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m41;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m42;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m43;\\n\\n/**\\n * @type {number}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#three-dimensional-attributes\\n */\\nCSSMatrix.prototype.m44;\\n\\n/**\\n * @param {string} string\\n * @return {void}\\n */\\nCSSMatrix.prototype.setMatrixValue = function(string) {};\\n\\n/**\\n * @param {!CSSMatrix} secondMatrix\\n * @return {!CSSMatrix}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-multiply-CSSMatrix-CSSMatrix-other\\n */\\nCSSMatrix.prototype.multiply = function(secondMatrix) {};\\n\\n/**\\n * @return {CSSMatrix} Returns void if the matrix is non-invertable.\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-inverse-CSSMatrix\\n */\\nCSSMatrix.prototype.inverse = function() {};\\n\\n/**\\n * @param {number=} opt_x Defaults to 0.\\n * @param {number=} opt_y Defaults to 0.\\n * @param {number=} opt_z Defaults to 0.\\n * @return {!CSSMatrix}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-translate-CSSMatrix-unrestricted-double-tx-unrestricted-double-ty-unrestricted-double-tz\\n */\\nCSSMatrix.prototype.translate = function(opt_x, opt_y, opt_z) {};\\n\\n/**\\n * @param {number=} opt_scaleX Defaults to 1.\\n * @param {number=} opt_scaleY Defaults to scaleX.\\n * @param {number=} opt_scaleZ Defaults to 1.\\n * @return {!CSSMatrix}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-scale-CSSMatrix-unrestricted-double-scale-unrestricted-double-originX-unrestricted-double-originY\\n */\\nCSSMatrix.prototype.scale = function(opt_scaleX, opt_scaleY, opt_scaleZ) {};\\n\\n/**\\n * @param {number=} opt_rotX Defaults to 0.\\n * @param {number=} opt_rotY Defaults to 0.\\n * @param {number=} opt_rotZ Defaults to rotX if rotY is not defined, else 0.\\n * @return {!CSSMatrix}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-rotate-CSSMatrix-unrestricted-double-angle-unrestricted-double-originX-unrestricted-double-originY\\n */\\nCSSMatrix.prototype.rotate = function(opt_rotX, opt_rotY, opt_rotZ) {};\\n\\n/**\\n * @param {number=} opt_x Defaults to 0.\\n * @param {number=} opt_y Defaults to 0.\\n * @param {number=} opt_z Defaults to 0.\\n * @param {number=} opt_angle Defaults to 0.\\n * @return {!CSSMatrix}\\n * @see https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html#widl-CSSMatrix-rotateAxisAngle-CSSMatrix-unrestricted-double-x-unrestricted-double-y-unrestricted-double-z-unrestricted-double-angle\\n */\\nCSSMatrix.prototype.rotateAxisAngle =\\n function(opt_x, opt_y, opt_z, opt_angle) {};\\n\\n/**\\n * @constructor\\n * @param {string=} opt_matrix\\n * @extends {CSSMatrix}\\n * @see http://developer.apple.com/safari/library/documentation/AudioVideo/Reference/WebKitCSSMatrixClassReference/WebKitCSSMatrix/WebKitCSSMatrix.html#//apple_ref/javascript/instm/WebKitCSSMatrix/setMatrixValue\\n */\\nfunction WebKitCSSMatrix(opt_matrix) {}\\n\\n/**\\n * @constructor\\n * @param {string=} opt_matrix\\n * @extends {CSSMatrix}\\n * @see http://msdn.microsoft.com/en-us/library/windows/apps/hh453593.aspx\\n */\\nfunction MSCSSMatrix(opt_matrix) {}\\n","externs/w3c_elementtraversal.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for DOM Element Traversal interface.\\n * This file depends on w3c_dom1.js.\\n * The whole file has been fully type annotated.\\n * Created from:\\n * http://www.w3.org/TR/ElementTraversal/#ecmascript-bindings\\n *\\n * @externs\\n * @author arv@google.com (Erik Arvidsson)\\n */\\n\\n/**\\n * @typedef {?(Document|DocumentFragment|Element)}\\n * @see https://dom.spec.whatwg.org/#parentnode\\n */\\nvar ParentNode;\\n\\n/**\\n * @typedef {?(Element|CharacterData)}\\n * @see https://dom.spec.whatwg.org/#nondocumenttypechildnode\\n */\\nvar NonDocumentTypeChildNode;\\n\\n/**\\n * @type {Element}\\n * @see https://developer.mozilla.org/En/DOM/Element.firstElementChild\\n */\\nElement.prot';a.a+='otype.firstElementChild;\\n\\n/**\\n * @type {Element}\\n * @see https://developer.mozilla.org/En/DOM/Element.lastElementChild\\n */\\nElement.prototype.lastElementChild;\\n\\n/**\\n * @type {Element}\\n * @see https://developer.mozilla.org/En/DOM/Element.previousElementSibling\\n */\\nElement.prototype.previousElementSibling;\\n\\n/**\\n * @type {Element}\\n * @see https://developer.mozilla.org/En/DOM/Element.nextElementSibling\\n */\\nElement.prototype.nextElementSibling;\\n\\n/**\\n * @type {number}\\n * @see https://developer.mozilla.org/En/DOM/Element.childElementCount\\n */\\nElement.prototype.childElementCount;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-firstelementchild\\n */\\nDocument.prototype.firstElementChild;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-lastelementchild\\n */\\nDocument.prototype.lastElementChild;\\n\\n/**\\n * @type {number}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-childelementcount\\n */\\nDocument.prototype.childElementCount;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-firstelementchild\\n */\\nDocumentFragment.prototype.firstElementChild;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-lastelementchild\\n */\\nDocumentFragment.prototype.lastElementChild;\\n\\n/**\\n * @type {number}\\n * @see https://dom.spec.whatwg.org/#dom-parentnode-childelementcount\\n */\\nDocumentFragment.prototype.childElementCount;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-nondocumenttypechildnode-previouselementsibling\\n */\\nCharacterData.prototype.previousElementSibling;\\n\\n/**\\n * @type {?Element}\\n * @see https://dom.spec.whatwg.org/#dom-nondocumenttypechildnode-nextelementsibling\\n */\\nCharacterData.prototype.nextElementSibling;\\n","externs/w3c_gamepad.js":"/*\\n * Copyright 2013 The Closure Compiler Authors.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Gamepad specification.\\n * @see http://www.w3.org/TR/gamepad/\\n * @externs\\n */\\n\\n/**\\n * @return {!Array.}\\n */\\nnavigator.getGamepads = function() {};\\n\\n/**\\n * @return {!Array.}\\n */\\nnavigator.webkitGetGamepads = function() {};\\n\\n\\n/**\\n * @interface\\n */\\nvar Gamepad = function() {};\\n\\n/**\\n * @type {string}\\n */\\nGamepad.prototype.id; // read-only\\n\\n/**\\n * @type {number}\\n */\\nGamepad.prototype.index; // read-only\\n\\n/**\\n * @type {boolean}\\n */\\nGamepad.prototype.connected; // read-only\\n\\n/**\\n * @type {number}\\n */\\nGamepad.prototype.timestamp; // read-only\\n\\n/**\\n * @type {string}\\n */\\nGamepad.prototype.mapping; // read-only\\n\\n/**\\n * @type {!Array.}\\n */\\nGamepad.prototype.axes; // read-only\\n\\n/**\\n * Note: The W3C spec changed, this property now returns an array of\\n * GamepadButton objects.\\n *\\n * @type {(!Array.|!Array.)}\\n */\\nGamepad.prototype.buttons;\\n\\n\\n/**\\n * @interface\\n */\\nvar GamepadButton = function() {};\\n\\n/**\\n * @type {boolean}\\n */\\nGamepadButton.prototype.pressed; // read-only\\n\\n/**\\n * @type {number}\\n */\\nGamepadButton.prototype.value; // read-only\\n","externs/w3c_geolocation.js":"/*\\n * Copyright 2009 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Geolocation specification\\n * http://www.w3.org/TR/geolocation-API/\\n * @externs\\n * @author ngd@google.com (Neil Dunn)\\n */\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/geolocation-API/#geolocation\\n */\\nfunction Geolocation() {}\\n\\n/**\\n * @param {function(!GeolocationPosition)} successCallback\\n * @param {(function(!GeolocationPositionError)|null)=} opt_errorCallback\\n * @param {GeolocationPositionOptions=} opt_options\\n * @return {undefined}\\n */\\nGeolocation.prototype.getCurrentPosition = function(successCallback,\\n opt_errorCallback,\\n opt_options) {};\\n\\n/**\\n * @param {function(!GeolocationPosition)} successCallback\\n * @param {(function(!GeolocationPositionError)|null)=} opt_errorCallback\\n * @param {GeolocationPositionOptions=} opt_options\\n * @return {number}\\n */\\nGeolocation.prototype.watchPosition = function(successCallback,\\n opt_errorCallback,\\n opt_options) {};\\n\\n/**\\n * @param {number} watchId\\n * @return {undefined}\\n */\\nGeolocation.prototype.clearWatch = function(watchId) {};\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/geolocation-API/#coordinates\\n */\\nfunction GeolocationCoordinates() {}\\n/** @type {number} */\\nGeolocationCoordinates.prototype.latitude;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.longitude;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.accuracy;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.altitude;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.altitudeAccuracy;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.heading;\\n/** @type {number} */\\nGeolocationCoordinates.prototype.speed;\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/geolocation-API/#position\\n */\\nfunction GeolocationPosition() {}\\n/** @type {GeolocationCoordinates} */\\nGeolocationPosition.prototype.coords;\\n/** @type {number} */\\nGeolocationPosition.prototype.timestamp;\\n\\n\\n/**\\n * @record\\n * @see http://www.w3.org/TR/geolocation-API/#position-options\\n */\\nfunction GeolocationPositionOptions() {}\\n/** @type {boolean|undefined} */\\nGeolocationPositionOptions.prototype.enableHighAccuracy;\\n/** @type {number|undefined} */\\nGeolocationPositionOptions.prototype.maximumAge;\\n/** @type {number|undefined} */\\nGeolocationPositionOptions.prototype.timeout;\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/geolocation-API/#position-error\\n */\\nfunction GeolocationPositionError() {}\\n/** @type {number} */\\nGeolocationPositionError.prototype.code;\\n/** @type {string} */\\nGeolocationPositionError.prototype.message;\\n/** @type {number} */\\nGeolocationPositionError.prototype.UNKNOWN_ERROR;\\n/** @type {number} */\\nGeolocationPositionError.prototype.PERMISSION_DENIED;\\n/** @type {number} */\\nGeolocationPositionError.prototype.POSITION_UNAVAILABLE;\\n/** @type {number} */\\nGeolocationPositionError.prototype.TIMEOUT;\\n\\n/** @type {Geolocation} */\\nNavigator.prototype.geolocation;\\n","externs/w3c_indexeddb.js":"/*\\n * Copyright 2011 The Closure Compiler Authors.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s IndexedDB API and IndexedDB API 2.0.\\n * In Chrome all the IndexedDB classes are prefixed with \'webkit\'.\\n * In order to access constants and static methods of these classes they must\\n * be duplicated with the prefix here.\\n * @see http://www.w3.org/TR/2015/REC-IndexedDB-20150108/\\n * @see https://www.w3.org/TR/2017/WD-IndexedDB-2-20170313/\\n *\\n * @externs\\n * @author guido.tapia@picnet.com.au (Guido Tapia)\\n * @author vobruba.martin@gmail.com (Martin Vobruba)\\n */\\n\\n/** @type {!IDBFactory} */\\nvar indexedDB;\\n\\n/** @type {!IDBFactory|undefined} */\\nWindow.prototype.moz_indexedDB;\\n\\n/** @type {!IDBFactory|undefined} */\\nWindow.prototype.mozIndexedDB;\\n\\n/** @type {!IDBFactory|undefined} */\\nWindow.prototype.webkitIndexedDB;\\n\\n/** @type {!IDBFactory|undefined} */\\nWindow.prototype.msIndexedDB;\\n\\n\\n\\n/**\\n * Possible values: \'readonly\', \'readwrite\', \'versionchange\'\\n *\\n * @typedef {string}\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBTransactionMode\\n */\\nvar IDBTransactionMode;\\n\\n\\n/**\\n * Possible values: \'pending\', \'done\'\\n *\\n * @typedef {string}\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBRequestReadyState\\n */\\nvar IDBRequestReadyState;\\n\\n\\n/**\\n * Possible values: \'next\', \'nextunique\', \'prev\', \'prevunique\'\\n *\\n * @typedef {string}\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBCursorDirection\\n */\\nvar IDBCursorDirection;\\n\\n\\n/**\\n * @record\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBIndexParameters\\n */\\nfunction IDBIndexParameters(){};\\n\\n/** @type {(undefined|boolean)} */\\nIDBIndexParameters.prototype.unique;\\n\\n/** @type {(undefined|boolean)} */\\nIDBIndexParameters.prototype.multiEntry;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEventInit\\n */\\nfunction IDBVersionChangeEventInit(){};\\n\\n/** @type {(undefined|number)} */\\nIDBVersionChangeEventInit.prototype.oldVersion;\\n\\n/** @type {(undefined|number|null)} */\\nIDBVersionChangeEventInit.prototype.newVersion;\\n\\n\\n\\n/**\\n * @record\\n * @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStoreParameters\\n */\\nfunction IDBObjectStoreParameters() {};\\n\\n/** @type {(undefined|string|!Array|null)} */\\nIDBObjectStoreParameters.prototype.keyPath;\\n\\n/** @type {(undefined|boolean)} */\\nIDBObjectStoreParameters.prototype.autoIncrement;\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBFactory\\n */\\nfunction IDBFactory() {}\\n\\n/**\\n * @param {string} name The name of the database to open.\\n * @param {number=} opt_version The version at which to open the database.\\n * @return {!IDBOpenDBRequest} The IDBRequest object.\\n */\\nIDBFactory.prototype.open = function(name, opt_version) {};\\n\\n/**\\n * @param {string} name The name of the database to delete.\\n * @return {!IDBOpenDBRequest} The IDBRequest object.\\n */\\nIDBFactory.prototype.deleteDatabase = function(name) {};\\n\\n/**\\n * @param {*} first\\n * @param {*} second\\n * @return {number}\\n */\\nIDBFactory.prototype.cmp = function(first, second) {};\\n\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest\\n * @see https://www.w3.org/TR/IndexedDB-2/#request-api\\n */\\nfunction IDBRequest() {}\\n\\n/** @override */\\nIDBRequest.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/** @override */\\nIDBRequest.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nIDBRequest.prototype.dispatchEvent = function(evt) {};\\n\\n\\n/**\\n * @constructor\\n * @extends {IDBRequest}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest\\n * @see https://www.w3.org/TR/IndexedDB-2/#request-api\\n */\\nfunction webkitIDBRequest() {}\\n\\n/**\\n * @type {!IDBRequestReadyState}\\n */\\nIDBRequest.prototype.readyState; // readonly\\n\\n/**\\n * @type {function(!Event)}\\n */\\nIDBRequest.prototype.onsuccess = function(e) {};\\n\\n/**\\n * @type {function(!Event)}\\n */\\nIDBRequest.prototype.onerror = function(e) {};\\n\\n/** @type {*} */\\nIDBRequest.prototype.result; // readonly\\n\\n/**\\n * @type {number}\\n * @deprecated Use \\"error\\"\\n */\\nIDBRequest.prototype.errorCode; // readonly\\n\\n\\n/** @type {?DOMError|?DOMException} */\\nIDBRequest.prototype.error; // readonly\\n\\n/** @type {?IDBObjectStore|?IDBIndex|?IDBCursor} */\\nIDBRequest.prototype.source; // readonly\\n\\n/** @type {?IDBTransaction} */\\nIDBRequest.prototype.transaction; // readonly\\n\\n\\n/**\\n * @constructor\\n * @extends {IDBRequest}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBOpenDBRequest\\n */\\nfunction IDBOpenDBRequest() {}\\n\\n/**\\n * @type {function(!IDBVersionChangeEvent)}\\n */\\nIDBOpenDBRequest.prototype.onblocked = function(e) {};\\n\\n/**\\n * @type {function(!IDBVersionChangeEvent)}\\n */\\nIDBOpenDBRequest.prototype.onupgradeneeded = function(e) {};\\n\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabase\\n * @see https://www.w3.org/TR/IndexedDB-2/#database-interface\\n */\\nfunction IDBDatabase() {}\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nIDBDatabase.prototype.name;\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nIDBDatabase.prototype.version;\\n\\n/**\\n * @type {!DOMStringList}\\n * @const\\n */\\nIDBDatabase.prototype.objectStoreNames;\\n\\n/**\\n * @param {string} name The name of the object store.\\n * @param {!IDBObjectStoreParameters=} opt_parameters Parameters to be passed\\n * creating the object store.\\n * @return {!IDBObjectStore} The created/open object store.\\n */\\nIDBDatabase.prototype.createObjectStore =\\n function(name, opt_parameters) {};\\n\\n/**\\n * @param {string} name The name of the object store to remove.\\n * @return {undefined}\\n */\\nIDBDatabase.prototype.deleteObjectStore = function(name) {};\\n\\n/**\\n * @param {(string|!Array|!DOMStringList)} storeNames The stores to open\\n * in this transaction.\\n * @param {!IDBTransactionMode=} mode The mode for opening the object stores.\\n * @return {!IDBTransaction} The IDBRequest object.\\n */\\nIDBDatabase.prototype.transaction = function(storeNames, mode) {};\\n\\n/**\\n * Closes the database connection.\\n * @return {undefined}\\n */\\nIDBDatabase.prototype.close = function() {};\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBDatabase.prototype.onabort;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBDatabase.prototype.onclose;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBDatabase.prototype.onerror;\\n\\n/**\\n * @type {?function(!IDBVersionChangeEvent)}\\n */\\nIDBDatabase.prototype.onversionchange;\\n\\n/** @override */\\nIDBDatabase.prototype.addEventListener = function(type, listener, opt_options) {\\n};\\n\\n/** @override */\\nIDBDatabase.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nIDBDatabase.prototype.dispatchEvent = function(evt) {};\\n\\n\\n/**\\n * Typedef for valid key types according to the w3 specification. Note that this\\n * is slightly wider than what is actually allowed, as all Array elements must\\n * have a valid key type.\\n * @see http://www.w3.org/TR/IndexedDB/#key-construct\\n * @see https://www.w3.org/TR/IndexedDB-2/#key-construct\\n * @typedef {number|string|!Date|!Array|!BufferSource}\\n */\\nvar IDBKeyType;\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStore\\n * @see https://www.w3.org/TR/IndexedDB-2/#object-store-interface\\n */\\nfunction IDBObjectStore() {}\\n\\n/**\\n * @type {string}\\n */\\nIDBObjectStore.prototype.name;\\n\\n/**\\n * @type {*}\\n */\\nIDBObjectStore.prototype.keyPath;\\n\\n/**\\n * @type {!DOMStringList}\\n */\\nIDBObjectStore.prototype.indexNames;\\n\\n/** @type {!IDBTransaction} */\\nIDBObjectStore.prototype.transaction;\\n\\n/** @type {boolean} */\\nIDBObjectStore.prototype.autoIncrement;\\n\\n/**\\n * @param {*} value The value to put into the object store.\\n * @param {!IDBKeyType=} key The key of this value.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBObjectStore.prototype.put = function(value, key) {};\\n\\n/**\\n * @param {*} value The value to add into the object store.\\n * @param {!IDBKeyType=} key The key of this value.\\n * @return {!IDBRequest} The IDBRequest objec';a.a+='t.\\n */\\nIDBObjectStore.prototype.add = function(value, key) {};\\n\\n/**\\n * @param {!IDBKeyType|!IDBKeyRange} key The key of this value.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBObjectStore.prototype.delete = function(key) {};\\n\\n/**\\n * @param {!IDBKeyType|!IDBKeyRange} key The key of the document to retrieve.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBObjectStore.prototype.get = function(key) {};\\n\\n/**\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBObjectStore.prototype.clear = function() {};\\n\\n/**\\n * @param {?IDBKeyRange=} range The range of the cursor.\\n * Nullable because IE <11 has problems with undefined.\\n * @param {!IDBCursorDirection=} direction The direction of cursor enumeration.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBObjectStore.prototype.openCursor = function(range, direction) {};\\n\\n/**\\n * @param {string} name The name of the index.\\n * @param {string|!Array} keyPath The path to the index key.\\n * @param {!IDBIndexParameters=} opt_paramters Optional parameters\\n * for the created index.\\n * @return {!IDBIndex} The IDBIndex object.\\n */\\nIDBObjectStore.prototype.createIndex = function(name, keyPath, opt_paramters) {};\\n\\n/**\\n * @param {string} name The name of the index to retrieve.\\n * @return {!IDBIndex} The IDBIndex object.\\n */\\nIDBObjectStore.prototype.index = function(name) {};\\n\\n/**\\n * @param {string} indexName The name of the index to remove.\\n * @return {undefined}\\n */\\nIDBObjectStore.prototype.deleteIndex = function(indexName) {};\\n\\n/**\\n * @param {(!IDBKeyType|IDBKeyRange)=} key The key of this value.\\n * @return {!IDBRequest} The IDBRequest object.\\n * @see http://www.w3.org/TR/IndexedDB/#widl-IDBObjectStore-count\\n */\\nIDBObjectStore.prototype.count = function(key) {};\\n\\n/**\\n * @param {(!IDBKeyType|IDBKeyRange)=} query\\n * @return {!IDBRequest} The IDBRequest object.\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getkey\\n */\\nIDBObjectStore.prototype.getKey = function(query) {};\\n\\n/**\\n * @param {(!IDBKeyType|IDBKeyRange)=} query\\n * @param {number=} count\\n * @return {!IDBRequest} The IDBRequest object.\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getall\\n */\\nIDBObjectStore.prototype.getAll = function(query, count) {};\\n\\n/**\\n * @param {(!IDBKeyType|IDBKeyRange)=} query\\n * @param {number=} count\\n * @return {!IDBRequest} The IDBRequest object.\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getallkeys\\n */\\nIDBObjectStore.prototype.getAllKeys = function(query, count) {};\\n\\n/**\\n * @param {(!IDBKeyType|IDBKeyRange)=} query\\n * @param {!IDBCursorDirection=} direction\\n * @return {!IDBRequest} The IDBRequest object.\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-openkeycursor\\n */\\nIDBObjectStore.prototype.openKeyCursor = function(query, direction) {};\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBIndex\\n * @see https://www.w3.org/TR/IndexedDB-2/#index-interface\\n */\\nfunction IDBIndex() {}\\n\\n/**\\n * @type {string}\\n */\\nIDBIndex.prototype.name;\\n\\n/**\\n * @type {!IDBObjectStore}\\n * @const\\n */\\nIDBIndex.prototype.objectStore;\\n\\n/**\\n * @type {*}\\n * @const\\n */\\nIDBIndex.prototype.keyPath;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nIDBIndex.prototype.multiEntry;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nIDBIndex.prototype.unique;\\n\\n/**\\n * @param {(!IDBKeyType|?IDBKeyRange)=} range The range of the cursor.\\n * Nullable because IE <11 has problems with undefined.\\n * @param {!IDBCursorDirection=} direction The direction of cursor enumeration.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBIndex.prototype.openCursor = function(range, direction) {};\\n\\n/**\\n * @param {(!IDBKeyType|?IDBKeyRange)=} range The range of the cursor.\\n * Nullable because IE <11 has problems with undefined.\\n * @param {!IDBCursorDirection=} direction The direction of cursor enumeration.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBIndex.prototype.openKeyCursor = function(range, direction) {};\\n\\n/**\\n * @param {!IDBKeyType|!IDBKeyRange} key The id of the object to retrieve.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBIndex.prototype.get = function(key) {};\\n\\n/**\\n * @param {!IDBKeyType|!IDBKeyRange} key The id of the object to retrieve.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBIndex.prototype.getKey = function(key) {};\\n\\n/**\\n * @param {(!IDBKeyType|!IDBKeyRange)=} query\\n * @param {number=} count\\n * @return {!IDBRequest}\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getall\\n */\\nIDBIndex.prototype.getAll = function(query, count) {};\\n\\n/**\\n * @param {(!IDBKeyType|!IDBKeyRange)=} query\\n * @param {number=} count\\n * @return {!IDBRequest}\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getallkeys\\n */\\nIDBIndex.prototype.getAllKeys = function(query, count) {};\\n\\n/**\\n * @param {(!IDBKeyType|!IDBKeyRange)=} opt_key\\n * @return {!IDBRequest}\\n */\\nIDBIndex.prototype.count = function(opt_key) {};\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor\\n * @see https://www.w3.org/TR/IndexedDB-2/#cursor-interface\\n */\\nfunction IDBCursor() {}\\n\\n/**\\n * @constructor\\n * @extends {IDBCursor}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor\\n * @see https://www.w3.org/TR/IndexedDB-2/#cursor-interface\\n */\\nfunction webkitIDBCursor() {}\\n\\n/**\\n * @type {(!IDBObjectStore|!IDBIndex)}\\n * @const\\n */\\nIDBCursor.prototype.source;\\n\\n/**\\n * @type {!IDBCursorDirection}\\n * @const\\n */\\nIDBCursor.prototype.direction;\\n\\n/**\\n * @type {!IDBKeyType}\\n * @const\\n */\\nIDBCursor.prototype.key;\\n\\n/**\\n * @type {!IDBKeyType}\\n * @const\\n */\\nIDBCursor.prototype.primaryKey;\\n\\n/**\\n * @param {*} value The new value for the current object in the cursor.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBCursor.prototype.update = function(value) {};\\n\\n/**\\n * Note: Must be quoted to avoid parse error.\\n * @param {!IDBKeyType=} key Continue enumerating the cursor from the specified\\n * key (or next).\\n * @return {undefined}\\n */\\nIDBCursor.prototype.continue = function(key) {};\\n\\n/**\\n * @param {!IDBKeyType} key\\n * @param {!IDBKeyType} primaryKey\\n * @return {undefined}\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbcursor-continueprimarykey\\n */\\nIDBCursor.prototype.continuePrimaryKey = function(key, primaryKey) {};\\n\\n/**\\n * @param {number} count Number of times to iterate the cursor.\\n * @return {undefined}\\n */\\nIDBCursor.prototype.advance = function(count) {};\\n\\n/**\\n * Note: Must be quoted to avoid parse error.\\n * @return {!IDBRequest} The IDBRequest object.\\n */\\nIDBCursor.prototype.delete = function() {};\\n\\n\\n/**\\n * @constructor\\n * @extends {IDBCursor}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursorWithValue\\n */\\nfunction IDBCursorWithValue() {}\\n\\n/** @type {*} */\\nIDBCursorWithValue.prototype.value; // readonly\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction\\n * @see https://www.w3.org/TR/IndexedDB-2/#transaction\\n */\\nfunction IDBTransaction() {}\\n\\n/**\\n * @constructor\\n * @extends {IDBTransaction}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction\\n * @see https://www.w3.org/TR/IndexedDB-2/#transaction\\n */\\nfunction webkitIDBTransaction() {}\\n\\n/**\\n * @type {!DOMStringList}\\n * @const\\n */\\nIDBTransaction.prototype.objectStoreNames;\\n\\n/**\\n * @type {!IDBTransactionMode}\\n * @const\\n */\\nIDBTransaction.prototype.mode;\\n\\n/**\\n * @type {!IDBDatabase}\\n * @const\\n */\\nIDBTransaction.prototype.db;\\n\\n/**\\n * @type {!DOMError|!DOMException}\\n */\\nIDBTransaction.prototype.error;\\n\\n/**\\n * @param {string} name The name of the object store to retrieve.\\n * @return {!IDBObjectStore} The object store.\\n */\\nIDBTransaction.prototype.objectStore = function(name) {};\\n\\n/**\\n * Aborts the transaction.\\n * @return {undefined}\\n */\\nIDBTransaction.prototype.abort = function() {};\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBTransaction.prototype.onabort;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBTransaction.prototype.oncomplete;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nIDBTransaction.prototype.onerror;\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange\\n * @see https://www.w3.org/TR/IndexedDB-2/#keyrange\\n */\\nfunction IDBKeyRange() {}\\n\\n/**\\n * @constructor\\n * @extends {IDBKeyRange}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange\\n * @see https://www.w3.org/TR/IndexedDB-2/#keyrange\\n */\\nfunction webkitIDBKeyRange() {}\\n\\n/**\\n * @type {*}\\n * @const\\n */\\nIDBKeyRange.prototype.lower;\\n\\n/**\\n * @type {*}\\n * @const\\n */\\nIDBKeyRange.prototype.upper;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nIDBKeyRange.prototype.lowerOpen;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nIDBKeyRange.prototype.upperOpen;\\n\\n/**\\n * @param {!IDBKeyType} value The single key value of this range.\\n * @return {!IDBKeyRange} The key range.\\n */\\nIDBKeyRange.only = function(value) {};\\n\\n/**\\n * @param {!IDBKeyType} bound Creates a lower bound key range.\\n * @param {boolean=} open Open the key range.\\n * @return {!IDBKeyRange} The key range.\\n */\\nIDBKeyRange.lowerBound = function(bound, open) {};\\n\\n/**\\n * @param {!IDBKeyType} bound Creates an upper bound key range.\\n * @param {boolean=} open Open the key range.\\n * @return {!IDBKeyRange} The key range.\\n */\\nIDBKeyRange.upperBound = function(bound, open) {};\\n\\n/**\\n * @param {!IDBKeyType} left The left bound value.\\n * @param {!IDBKeyType} right The right bound value.\\n * @param {boolean=} openLeft Whether the left bound value should be excluded.\\n * @param {boolean=} openRight Whether the right bound value should be excluded.\\n * @return {!IDBKeyRange} The key range.\\n */\\nIDBKeyRange.bound = function(left, right, openLeft, openRight) {};\\n\\n/**\\n * @param {!IDBKeyType} key\\n * @return {boolean}\\n * @see https://www.w3.org/TR/IndexedDB-2/#dom-idbkeyrange-includes\\n */\\nIDBKeyRange.prototype.includes = function(key) {};\\n\\n\\n/**\\n * @param {string} type\\n * @param {!IDBVersionChangeEventInit=} opt_eventInit\\n * @constructor\\n * @extends {Event}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent\\n */\\nfunction IDBVersionChangeEvent(type, opt_eventInit) {}\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nIDBVersionChangeEvent.prototype.oldVersion;\\n\\n/**\\n * @type {?number}\\n * @const\\n */\\nIDBVersionChangeEvent.prototype.newVersion;\\n\\n\\n/**\\n * @param {string} type\\n * @param {!IDBVersionChangeEventInit=} opt_eventInit\\n * @constructor\\n * @extends {IDBVersionChangeEvent}\\n * @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent\\n */\\nfunction webkitIDBVersionChangeEvent(type, opt_eventInit) {}\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nwebkitIDBVersionChangeEvent.prototype.version;\\n","externs/w3c_midi.js":"/*\\n * Copyright 2014 The Closure Compiler Authors.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview W3C Web MIDI specification.\\n * @see http://www.w3.org/TR/webmidi/\\n *\\n * @externs\\n */\\n\\n\\n/**\\n * @param {!MIDIOptions=} opt_options\\n * @return {!Promise.}\\n */\\nnavigator.requestMIDIAccess = function(opt_options) {};\\n\\n\\n/**\\n * @typedef {{\\n * sysex: boolean\\n * }}\\n */\\nvar MIDIOptions;\\n\\n\\n\\n/**\\n * @interface\\n */\\nvar MIDIInputMap = function() {};\\n\\n\\n/**\\n * @const {number}\\n */\\nMIDIInputMap.prototype.size;\\n\\n\\n/**\\n * @param {function(string)} iterator\\n */\\nMIDIInputMap.prototype.keys = function(iterator) {};\\n\\n\\n/**\\n * @param {function(!Array.<*>)} iterator\\n */\\nMIDIInputMap.prototype.entries = function(iterator) {};\\n\\n\\n/**\\n * @param {function(!MIDIInput)} iterator\\n */\\nMIDIInputMap.prototype.values = function(iterator) {};\\n\\n\\n/**\\n * @param {string} key\\n * @return {!MIDIInput}\\n */\\nMIDIInputMap.prototype.get = function(key) {};\\n\\n\\n/**\\n * @param {string} key\\n * @return {boolean}\\n */\\nMIDIInputMap.prototype.has = function(key) {};\\n\\n\\n\\n/**\\n * @interface\\n */\\nvar MIDIOutputMap = function() {};\\n\\n\\n/**\\n * @const {number}\\n */\\nMIDIOutputMap.prototype.size;\\n\\n\\n/**\\n * @param {function(string)} iterator\\n */\\nMIDIOutputMap.prototype.keys = function(iterator) {};\\n\\n\\n/**\\n * @param {function(!Array.<*>)} iterator\\n */\\nMIDIOutputMap.prototype.entries = function(iterator) {};\\n\\n\\n/**\\n * @param {function(!MIDIOutput)} iterator\\n */\\nMIDIOutputMap.prototype.values = function(iterator) {};\\n\\n\\n/**\\n * @param {string} key\\n * @return {!MIDIOutput}\\n */\\nMIDIOutputMap.prototype.get = function(key) {};\\n\\n\\n/**\\n * @param {string} key\\n * @return {boolean}\\n */\\nMIDIOutputMap.prototype.has = function(key) {};\\n\\n\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n */\\nvar MIDIAccess = function() {};\\n\\n\\n/**\\n * @const {!MIDIInputMap}\\n */\\nMIDIAccess.prototype.inputs;\\n\\n\\n/**\\n * @const {!MIDIOutputMap}\\n */\\nMIDIAccess.prototype.outputs;\\n\\n\\n/**\\n * @const {function(!MIDIConnectionEvent)}\\n */\\nMIDIAccess.prototype.onconnect;\\n\\n\\n/**\\n * @type {function(!MIDIConnectionEvent)}\\n */\\nMIDIAccess.prototype.ondisconnect;\\n\\n\\n/**\\n * @const {boolean}\\n */\\nMIDIAccess.prototype.sysexEnabled;\\n\\n\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n */\\nvar MIDIPort = function() {};\\n\\n\\n/**\\n * @const {string}\\n */\\nMIDIPort.prototype.id;\\n\\n\\n/**\\n * @const {string}\\n */\\nMIDIPort.prototype.manufacturer;\\n\\n\\n/**\\n * @const {string}\\n */\\nMIDIPort.prototype.name;\\n\\n\\n/**\\n * @const {string}\\n */\\nMIDIPort.prototype.type;\\n\\n\\n/**\\n * @const {string}\\n */\\nMIDIPort.prototype.version;\\n\\n\\n/**\\n * @type {function(!MIDIConnectionEvent)}\\n */\\nMIDIPort.prototype.ondisconnect;\\n\\n\\n\\n/**\\n * @interface\\n * @extends {MIDIPort}\\n */\\nvar MIDIInput = function() {};\\n\\n\\n/**\\n * @type {function(!MIDIMessageEvent)}\\n */\\nMIDIInput.prototype.onmidimessage;\\n\\n\\n\\n/**\\n * @interface\\n * @extends {MIDIPort}\\n */\\nvar MIDIOutput = function() {};\\n\\n\\n/**\\n * @param {!Uint8Array} data\\n * @param {number=} opt_timestamp\\n */\\nMIDIOutput.prototype.send = function(data, opt_timestamp) {};\\n\\n\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @param {string} type\\n * @param {!MIDIMessageEventInit=} opt_init\\n */\\nvar MIDIMessageEvent = function(type, opt_init) {};\\n\\n\\n/**\\n * @const {number}\\n */\\nMIDIMessageEvent.prototype.receivedTime;\\n\\n\\n/**\\n * @const {!Uint8Array}\\n */\\nMIDIMessageEvent.prototype.data;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://www.w3.org/TR/webmidi/#midimessageeventinit-interface\\n */\\nfunction MIDIMessageEventInit() {}\\n\\n/** @type {undefined|number} */\\nMIDIMessageEventInit.prototype.receivedTime;\\n\\n/** @type {undefined|!Uint8Array} */\\nMIDIMessageEventInit.prototype.data;\\n\\n\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @param {string} type\\n * @param {!MIDIConnectionEventInit=} opt_init\\n */\\nvar MIDIConnectionEvent = function(type, opt_init) {};\\n\\n\\n/**\\n * @const {MIDIPort}\\n */\\nMIDIConnectionEvent.prototype.port;\\n\\n\\n/**\\n * @record\\n * @extends {EventInit}\\n * @see https://www.w3.org/TR/webmidi/#idl-def-MIDIConnectionEventInit\\n */\\nfunction MIDIConnectionEventInit() {}\\n\\n/** @type {undefined|!MIDIPort} */\\nMIDIConnectionEventInit.prototype.port;\\n","externs/w3c_navigation_timing.js":"/*\\n * Copyright 2011 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific langu';a.a+="age governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C's Navigation Timing specification.\\n *\\n * Created from\\n * @see http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html\\n * @see http://w3c-test.org/webperf/specs/ResourceTiming\\n * @see http://www.w3.org/TR/performance-timeline\\n * @see http://www.w3.org/TR/user-timing/\\n *\\n * @externs\\n * @author rky@google.com (Ren\xE9 Kyllingstad)\\n */\\n\\n/** @constructor */\\nfunction PerformanceTiming() {}\\n/** @type {number} */ PerformanceTiming.prototype.navigationStart;\\n/** @type {number} */ PerformanceTiming.prototype.unloadEventStart;\\n/** @type {number} */ PerformanceTiming.prototype.unloadEventEnd;\\n/** @type {number} */ PerformanceTiming.prototype.redirectStart;\\n/** @type {number} */ PerformanceTiming.prototype.redirectEnd;\\n/** @type {number} */ PerformanceTiming.prototype.fetchStart;\\n/** @type {number} */ PerformanceTiming.prototype.domainLookupStart;\\n/** @type {number} */ PerformanceTiming.prototype.domainLookupEnd;\\n/** @type {number} */ PerformanceTiming.prototype.connectStart;\\n/** @type {number} */ PerformanceTiming.prototype.connectEnd;\\n/** @type {number} */ PerformanceTiming.prototype.secureConnectionStart;\\n/** @type {number} */ PerformanceTiming.prototype.requestStart;\\n/** @type {number} */ PerformanceTiming.prototype.responseStart;\\n/** @type {number} */ PerformanceTiming.prototype.responseEnd;\\n/** @type {number} */ PerformanceTiming.prototype.domLoading;\\n/** @type {number} */ PerformanceTiming.prototype.domInteractive;\\n/** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventStart;\\n/** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventEnd;\\n/** @type {number} */ PerformanceTiming.prototype.domComplete;\\n/** @type {number} */ PerformanceTiming.prototype.loadEventStart;\\n/** @type {number} */ PerformanceTiming.prototype.loadEventEnd;\\n\\n/** @constructor */\\nfunction PerformanceEntry() {}\\n/** @type {string} */ PerformanceEntry.prototype.name;\\n/** @type {string} */ PerformanceEntry.prototype.entryType;\\n/** @type {number} */ PerformanceEntry.prototype.startTime;\\n/** @type {number} */ PerformanceEntry.prototype.duration;\\n\\n/**\\n * https://www.w3.org/TR/resource-timing-2/#performanceresourcetiming\\n * @constructor\\n * @extends {PerformanceEntry}\\n */\\nfunction PerformanceResourceTiming() {}\\n/** @type {number} */ PerformanceResourceTiming.prototype.redirectStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.redirectEnd;\\n/** @type {number} */ PerformanceResourceTiming.prototype.fetchStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.domainLookupStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.domainLookupEnd;\\n/** @type {number} */ PerformanceResourceTiming.prototype.connectStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.connectEnd;\\n/** @type {number} */\\nPerformanceResourceTiming.prototype.secureConnectionStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.requestStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.responseStart;\\n/** @type {number} */ PerformanceResourceTiming.prototype.responseEnd;\\n/** @type {string} */ PerformanceResourceTiming.prototype.initiatorType;\\n/** @type {number|undefined} */\\nPerformanceResourceTiming.prototype.transferSize;\\n/** @type {number|undefined} */\\nPerformanceResourceTiming.prototype.encodedBodySize;\\n/** @type {number|undefined} */\\nPerformanceResourceTiming.prototype.decodedBodySize;\\n/** @type {number|undefined} */\\nPerformanceResourceTiming.prototype.workerStart;\\n/** @type {string} */ PerformanceResourceTiming.prototype.nextHopProtocol;\\n\\n/**\\n * Possible values are 'navigate', 'reload', 'back_forward', and 'prerender'.\\n * See https://w3c.github.io/navigation-timing/#sec-performance-navigation-types\\n * @typedef {string}\\n */\\nvar NavigationType;\\n\\n/**\\n * https://w3c.github.io/navigation-timing/#sec-PerformanceNavigationTiming\\n * @constructor\\n * @extends {PerformanceResourceTiming}\\n */\\nfunction PerformanceNavigationTiming() {}\\n/** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventStart;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.unloadEventEnd;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.domInteractive;\\n/** @type {number} */ PerformanceNavigationTiming.prototype\\n .domContentLoadedEventStart;\\n/** @type {number} */ PerformanceNavigationTiming.prototype\\n .domContentLoadedEventEnd;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.domComplete;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.loadEventStart;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.loadEventEnd;\\n/** @type {NavigationType} */ PerformanceNavigationTiming.prototype.type;\\n/** @type {number} */ PerformanceNavigationTiming.prototype.redirectCount;\\n\\n/** @constructor */\\nfunction PerformanceNavigation() {}\\n/** @type {number} */ PerformanceNavigation.prototype.TYPE_NAVIGATE = 0;\\n/** @type {number} */ PerformanceNavigation.prototype.TYPE_RELOAD = 1;\\n/** @type {number} */ PerformanceNavigation.prototype.TYPE_BACK_FORWARD = 2;\\n/** @type {number} */ PerformanceNavigation.prototype.TYPE_RESERVED = 255;\\n/** @type {number} */ PerformanceNavigation.prototype.type;\\n/** @type {number} */ PerformanceNavigation.prototype.redirectCount;\\n\\n/** @constructor */\\nfunction Performance() {}\\n/** @type {PerformanceTiming} */ Performance.prototype.timing;\\n/** @type {PerformanceNavigation} */ Performance.prototype.navigation;\\n\\n/**\\n * Clears the buffer used to store the current list of\\n * PerformanceResourceTiming resources.\\n * @return {undefined}\\n */\\nPerformance.prototype.clearResourceTimings = function() {};\\n\\n/**\\n * Clear out the buffer of performance timing events for webkit browsers.\\n * @return {undefined}\\n */\\nPerformance.prototype.webkitClearResourceTimings = function() {};\\n\\n/**\\n * Set the maximum number of PerformanceResourceTiming resources that may be\\n * stored in the buffer.\\n * @param {number} maxSize\\n * @return {undefined}\\n */\\nPerformance.prototype.setResourceTimingBufferSize = function(maxSize) {};\\n\\n/**\\n * @return {!Array} A copy of the PerformanceEntry list,\\n * in chronological order with respect to startTime.\\n * @nosideeffects\\n */\\nPerformance.prototype.getEntries = function() {};\\n\\n/**\\n * @param {string} entryType Only return {@code PerformanceEntry}s with this\\n * entryType.\\n * @return {!Array} A copy of the PerformanceEntry list,\\n * in chronological order with respect to startTime.\\n * @nosideeffects\\n */\\nPerformance.prototype.getEntriesByType = function(entryType) {};\\n\\n/**\\n * @param {string} name Only return {@code PerformanceEntry}s with this name.\\n * @param {string=} opt_entryType Only return {@code PerformanceEntry}s with\\n * this entryType.\\n * @return {!Array} PerformanceEntry list in chronological\\n * order with respect to startTime.\\n * @nosideeffects\\n */\\nPerformance.prototype.getEntriesByName = function(name, opt_entryType) {};\\n\\n// Nonstandard. Only available in Blink.\\n// Returns more granular results with the --enable-memory-info flag.\\n/** @type {MemoryInfo} */ Performance.prototype.memory;\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n */\\nPerformance.prototype.now = function() {};\\n\\n/**\\n * @return {number}\\n * @nosideeffects\\n */\\nPerformance.prototype.webkitNow = function() {};\\n\\n/**\\n * @param {string} markName\\n * @return {undefined}\\n */\\nPerformance.prototype.mark = function(markName) {};\\n\\n/**\\n * @param {string=} opt_markName\\n * @return {undefined}\\n */\\nPerformance.prototype.clearMarks = function(opt_markName) {};\\n\\n/**\\n * @param {string} measureName\\n * @param {string=} opt_startMark\\n * @param {string=} opt_endMark\\n * @return {undefined}\\n */\\nPerformance.prototype.measure = function(\\n measureName, opt_startMark, opt_endMark) {};\\n\\n/**\\n * @param {string=} opt_measureName\\n * @return {undefined}\\n */\\nPerformance.prototype.clearMeasures = function(opt_measureName) {};\\n\\n/** @type {Performance} */\\nWindow.prototype.performance;\\n\\n/**\\n * @type {!Performance}\\n * @suppress {duplicate}\\n */\\nvar performance;\\n\\n/**\\n * @constructor\\n * @extends {Performance}\\n */\\nfunction WorkerPerformance() {}\\n\\n/**\\n * @typedef {function(!PerformanceObserverEntryList, !PerformanceObserver): void}\\n */\\nvar PerformanceObserverCallback;\\n\\n/**\\n * See:\\n * https://w3c.github.io/performance-timeline/#the-performanceobserver-interface\\n * @constructor\\n * @param {!PerformanceObserverCallback} callback\\n */\\nfunction PerformanceObserver(callback) {}\\n\\n/**\\n * @param {!PerformanceObserverInit} options\\n */\\nPerformanceObserver.prototype.observe = function(options) {};\\n\\n/** @return {void} */\\nPerformanceObserver.prototype.disconnect = function() {};\\n\\n/**\\n * @record\\n */\\nfunction PerformanceObserverInit() {}\\n\\n/** @type {undefined|!Array} */\\nPerformanceObserverInit.prototype.entryTypes;\\n/** @type {undefined|boolean} */\\nPerformanceObserverInit.prototype.buffered;\\n\\n/**\\n * @constructor\\n */\\nfunction PerformanceObserverEntryList() {}\\n\\n/** @return {!Array} */\\nPerformanceObserverEntryList.prototype.getEntries = function() {};\\n/**\\n * @param {string} type\\n * @return {!Array}\\n */\\nPerformanceObserverEntryList.prototype.getEntriesByName = function(type) {};\\n/**\\n * @param {string} name\\n * @param {string=} opt_type\\n * @return {!Array}\\n */\\nPerformanceObserverEntryList.prototype.getEntriesByType = function(\\n name, opt_type) {};\\n\",\"externs/w3c_netinfo.js\":\"/*\\n * Copyright 2017 The Closure Compiler Authors.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Externs for the Network Information API.\\n * @externs\\n */\\n\\n/**\\n * @see http://wicg.github.io/netinfo/#-dfn-networkinformation-dfn-interface\\n * @constructor\\n */\\nfunction NetworkInformation() {}\\n\\n/** @type {ConnectionType} */\\nNetworkInformation.prototype.type;\\n\\n/** @type {EffectiveConnectionType} */\\nNetworkInformation.prototype.effectiveType;\\n\\n/** @type {Megabit} */\\nNetworkInformation.prototype.downlinkMax;\\n\\n/** @type {Megabit} */\\nNetworkInformation.prototype.downlink;\\n\\n/** @type {Millisecond} */\\nNetworkInformation.prototype.rtt;\\n\\n/** @type {?function(Event)} */\\nNetworkInformation.prototype.onchange;\\n\\n/**\\n * @typedef {number}\\n */\\nvar Megabit;\\n\\n/**\\n * @typedef {number}\\n */\\nvar Millisecond;\\n\\n/**\\n * Enum of:\\n * 'bluetooth',\\n * 'cellular',\\n * 'ethernet',\\n * 'mixed',\\n * 'none',\\n * 'other',\\n * 'unknown',\\n * 'wifi',\\n * 'wimax'\\n * @typedef {string}\\n */\\nvar ConnectionType;\\n\\n/**\\n * Enum of:\\n * '2g',\\n * '3g',\\n * '4g',\\n * 'slow-2g'\\n * @typedef {string}\\n */\\nvar EffectiveConnectionType;\\n\\n/** @type {!NetworkInformation} */\\nNavigator.prototype.connection;\\n\",\"externs/w3c_permissions.js\":\"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C's Permissions API.\\n * @see https://w3c.github.io/permissions/\\n *\\n * @externs\\n */\\n\\n\\n/**\\n * @typedef {{name: PermissionName}}\\n * @see https://w3c.github.io/permissions/#permission-descriptor\\n */\\nvar PermissionDescriptor;\\n\\n\\n/**\\n * @typedef {{name: PermissionName, userVisibleOnly: boolean}}\\n * @see https://w3c.github.io/permissions/#push\\n */\\nvar PushPermissionDescriptor;\\n\\n\\n/**\\n * @typedef {{name: PermissionName, sysex: boolean}}\\n * @see https://w3c.github.io/permissions/#midi\\n */\\nvar MidiPermissionDescriptor;\\n\\n\\n/**\\n * Set of possible values: 'geolocation', 'notifications', 'push', 'midi'.\\n * @typedef {string}\\n * @see https://w3c.github.io/permissions/#idl-def-PermissionName\\n */\\nvar PermissionName;\\n\\n\\n/**\\n * Set of possible values: 'granted', 'denied', 'prompt'.\\n * @typedef {string}\\n * @see https://w3c.github.io/permissions/#idl-def-PermissionState\\n */\\nvar PermissionState;\\n\\n\\n/**\\n * @constructor\\n * @implements {EventTarget}\\n * @see https://w3c.github.io/permissions/#status-of-a-permission\\n */\\nfunction PermissionStatus() {}\\n\\n/** @type {PermissionState} */\\nPermissionStatus.prototype.state;\\n\\n/**\\n * @type {PermissionState}\\n * @deprecated, use PermissionStatus.state for newer clients\\n */\\nPermissionStatus.prototype.status;\\n\\n/** @type {?function(!Event)} */\\nPermissionStatus.prototype.onchange;\\n\\n/** @override */\\nPermissionStatus.prototype.addEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nPermissionStatus.prototype.removeEventListener = function(\\n type, listener, opt_options) {};\\n\\n/** @override */\\nPermissionStatus.prototype.dispatchEvent = function(evt) {};\\n\\n\\n/**\\n * @constructor\\n * @see https://w3c.github.io/permissions/#idl-def-permissions\\n */\\nfunction Permissions() {}\\n\\n/**\\n * @param {PermissionDescriptor} permission The permission to look up\\n * @return {!Promise}\\n * @see https://w3c.github.io/permissions/#dom-permissions-query\\n */\\nPermissions.prototype.query = function(permission) {};\\n\\n\\n/** @type {Permissions} */\\nNavigator.prototype.permissions;\\n\",\"externs/w3c_pointer_events.js\":\"/*\\n * Copyright 2014 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C's Pointer Events specification.\\n * Created from\\n * http://www.w3.org/TR/pointerevents/\\n *\\n * @externs\\n */\\n\\n\\n/**\\n * @type {string}\\n * @see http://www.w3.org/TR/pointerevents/#the-touch-action-css-property\\n */\\nCSSProperties.prototype.touchAction;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/pointerevents/#widl-Navigator-pointerEnabled\\n */\\nNavigator.prototype.pointerEnabled;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints\\n */\\nNavigator.prototype.maxTouchPoints;\\n\\n\\n/**\\n * @record\\n * @extends {MouseEventInit}\\n * @see https://www.w3.org/TR/pointerevents/#idl-def-PointerEventInit\\n */\\nfunction PointerEventInit() {}\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.pointerId;\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.width;\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.height;\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.pressure;\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.tiltX;\\n\\n/** @type {undefined|number} */\\nPointerEventInit.prototype.tiltY;\\n\\n/** @type {undefined|string} */\\nPointerEventInit.prototype.pointerType;\\n\\n/** @type {undefined|boolean} */\\nPointerEventInit.prototype.isPrimary;\\n\\n/**\\n * @constructor\\n * @extends {MouseEvent}\\";a.a+='n * @param {string} type\\n * @param {PointerEventInit=} opt_eventInitDict\\n * @see http://www.w3.org/TR/pointerevents/#pointerevent-interface\\n */\\nfunction PointerEvent(type, opt_eventInitDict) {}\\n\\n/** @type {number} */\\nPointerEvent.prototype.pointerId;\\n\\n/** @type {number} */\\nPointerEvent.prototype.width;\\n\\n/** @type {number} */\\nPointerEvent.prototype.height;\\n\\n/** @type {number} */\\nPointerEvent.prototype.pressure;\\n\\n/** @type {number} */\\nPointerEvent.prototype.tiltX;\\n\\n/** @type {number} */\\nPointerEvent.prototype.tiltY;\\n\\n/** @type {string} */\\nPointerEvent.prototype.pointerType;\\n\\n/** @type {boolean} */\\nPointerEvent.prototype.isPrimary;\\n\\n// Microsoft pointerType values\\n/** @type {string} */\\nPointerEvent.prototype.MSPOINTER_TYPE_TOUCH;\\n\\n/** @type {string} */\\nPointerEvent.prototype.MSPOINTER_TYPE_PEN;\\n\\n/** @type {string} */\\nPointerEvent.prototype.MSPOINTER_TYPE_MOUSE;\\n\\n/**\\n * @see https://w3c.github.io/pointerevents/extension.html\\n * @return {!Array}\\n */\\nPointerEvent.prototype.getCoalescedEvents = function() {};\\n\\n","externs/w3c_range.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s range specification.\\n * This file depends on w3c_dom2.js.\\n * The whole file has been fully type annotated.\\n * Created from\\n * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html\\n *\\n * @externs\\n * @author acleung@google.com (Alan Leung)\\n * @author stevey@google.com (Steve Yegge)\\n */\\n\\n\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Interface\\n */\\nfunction Range() {}\\n\\n// constants on the constructor\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.START_TO_START = 0;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.START_TO_END = 1;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.END_TO_END = 2;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.END_TO_START = 3;\\n\\n// constants repeated on the prototype\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.prototype.START_TO_START = 0;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.prototype.START_TO_END = 1;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.prototype.END_TO_END = 2;\\n\\n/**\\n * @const {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow\\n */\\nRange.prototype.END_TO_START = 3;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-startParent\\n */\\nRange.prototype.startContainer;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-startOffset\\n */\\nRange.prototype.startOffset;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-endParent\\n */\\nRange.prototype.endContainer;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-endOffset\\n */\\nRange.prototype.endOffset;\\n\\n/**\\n * @type {boolean}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-collapsed\\n */\\nRange.prototype.collapsed;\\n\\n/**\\n * @type {Node}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-commonParent\\n */\\nRange.prototype.commonAncestorContainer;\\n\\n/**\\n * @param {Node} refNode\\n * @param {number} offset\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setStart\\n */\\nRange.prototype.setStart = function(refNode, offset) {};\\n\\n/**\\n * @param {Node} refNode\\n * @param {number} offset\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEnd\\n */\\nRange.prototype.setEnd = function(refNode, offset) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-setStartBefore\\n */\\nRange.prototype.setStartBefore = function(refNode) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setStartAfter\\n */\\nRange.prototype.setStartAfter = function(refNode) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEndBefore\\n */\\nRange.prototype.setEndBefore = function(refNode) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEndAfter\\n */\\nRange.prototype.setEndAfter = function(refNode) {};\\n\\n/**\\n * @param {boolean} toStart\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-collapse\\n */\\nRange.prototype.collapse = function(toStart) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-selectNode\\n */\\nRange.prototype.selectNode = function(refNode) {};\\n\\n/**\\n * @param {Node} refNode\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-selectNodeContents\\n */\\nRange.prototype.selectNodeContents = function(refNode) {};\\n\\n/**\\n * @param {number} how\\n * @param {Range} sourceRange\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-compareBoundaryPoints\\n */\\nRange.prototype.compareBoundaryPoints = function(how, sourceRange) {};\\n\\n/**\\n * @return {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-deleteContents\\n */\\nRange.prototype.deleteContents = function() {};\\n\\n/**\\n * @return {DocumentFragment}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-extractContents\\n */\\nRange.prototype.extractContents = function() {};\\n\\n/**\\n * @return {DocumentFragment}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-cloneContents\\n */\\nRange.prototype.cloneContents = function() {};\\n\\n/**\\n * @param {Node} newNode\\n * @return {DocumentFragment}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-insertNode\\n */\\nRange.prototype.insertNode = function(newNode) {};\\n\\n/**\\n * @param {Node} newParent\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-surroundContents\\n */\\nRange.prototype.surroundContents = function(newParent) {};\\n\\n/**\\n * @return {Range}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-clone\\n */\\nRange.prototype.cloneRange = function() {};\\n\\n/**\\n * @return {undefined}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-detach\\n */\\nRange.prototype.detach = function() {};\\n\\n// Introduced in DOM Level 2:\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-DocumentRange-idl\\n */\\nfunction DocumentRange() {}\\n\\n/**\\n * @return {Range}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-DocumentRange-method-createRange\\n */\\nDocumentRange.prototype.createRange = function() {};\\n\\n// Introduced in DOM Level 2:\\n/**\\n * @constructor\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeException\\n */\\nfunction RangeException() {}\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode\\n */\\nRangeException.prototype.code;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode\\n */\\nRangeException.prototype.BAD_BOUNDARYPOINTS_ERR = 1;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode\\n */\\nRangeException.prototype.INVALID_NODE_TYPE_ERR = 2;\\n","externs/w3c_rtc.js":"/*\\n * Copyright 2012 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for components of the WebRTC browser API.\\n * @see https://www.w3.org/TR/webrtc/\\n * @see https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-19\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API\\n * @see https://www.w3.org/TR/mediacapture-streams/\\n *\\n * @externs\\n * @author bemasc@google.com (Benjamin M. Schwartz)\\n */\\n\\n/**\\n * @typedef {string}\\n * @see {https://www.w3.org/TR/mediacapture-streams/\\n * #idl-def-MediaStreamTrackState}\\n * In WebIDL this is an enum with values \'live\', \'mute\', and \'ended\',\\n * but there is no mechanism in Closure for describing a specialization of\\n * the string type.\\n */\\nvar MediaStreamTrackState;\\n\\n/**\\n * @interface\\n */\\nfunction SourceInfo() {}\\n\\n/** @const {string} */\\nSourceInfo.prototype.kind;\\n\\n/** @const {string} */\\nSourceInfo.prototype.id;\\n\\n/** @const {?string} */\\nSourceInfo.prototype.label;\\n\\n/** @const {boolean} */\\nSourceInfo.prototype.facing;\\n\\n/**\\n * @interface\\n * @see https://w3c.github.io/mediacapture-image/#mediasettingsrange-section\\n */\\nfunction MediaSettingsRange() {}\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nMediaSettingsRange.prototype.max;\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nMediaSettingsRange.prototype.min;\\n\\n/**\\n * @type {number}\\n * @const\\n */\\nMediaSettingsRange.prototype.step;\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities\\n * @see https://w3c.github.io/mediacapture-image/#mediatrackcapabilities-section\\n */\\nfunction MediaTrackCapabilities() {}\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.width;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.height;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.aspectRatio;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.frameRate;\\n\\n/** @type {!Array} */\\nMediaTrackCapabilities.prototype.facingMode;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.volume;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.sampleRate;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.sampleSize;\\n\\n/** @type {!Array} */\\nMediaTrackCapabilities.prototype.echoCancellation;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.latency;\\n\\n/** @type {number} */\\nMediaTrackCapabilities.prototype.channelCount;\\n\\n/** @type {string} */\\nMediaTrackCapabilities.prototype.deviceId;\\n\\n/** @type {string} */\\nMediaTrackCapabilities.prototype.groupId;\\n\\n/** @type {!Array} */\\nMediaTrackCapabilities.prototype.whiteBalanceMode;\\n\\n/** @type {!Array} */\\nMediaTrackCapabilities.prototype.exposureMode;\\n\\n/** @type {!Array} */\\nMediaTrackCapabilities.prototype.focusMode;\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.exposureCompensation;\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.colorTemperature\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.iso\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.brightness\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.contrast\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.saturation\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.sharpness\\n\\n/** @type {!MediaSettingsRange} */\\nMediaTrackCapabilities.prototype.zoom\\n\\n/** @type {boolean} */\\nMediaTrackCapabilities.prototype.torch\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/mediacapture-streams/#media-track-settings\\n * @see https://w3c.github.io/mediacapture-image/#mediatracksettings-section\\n */\\nfunction MediaTrackSettings() {}\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.width;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.height;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.aspectRatio;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.frameRate;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.facingMode;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.volume;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.sampleRate;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.sampleSize;\\n\\n/** @type {boolean} */\\nMediaTrackSettings.prototype.echoCancellation;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.latency;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.channelCount;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.deviceId;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.groupId;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.whiteBalanceMode;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.exposureMode;\\n\\n/** @type {string} */\\nMediaTrackSettings.prototype.focusMode;\\n\\n/** @type {!Array<{x: number, y: number}>} */\\nMediaTrackSettings.prototype.pointsOfInterest;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.exposureCompensation;\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.colorTemperature\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.iso\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.brightness\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.contrast\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.saturation\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.sharpness\\n\\n/** @type {number} */\\nMediaTrackSettings.prototype.zoom\\n\\n/** @type {boolean} */\\nMediaTrackSettings.prototype.torch\\n\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n * @see https://www.w3.org/TR/mediacapture-streams/#mediastreamtrack\\n */\\nfunction MediaStreamTrack() {}\\n\\n/**\\n * @param {!function(!Array)} callback\\n * @return {undefined}\\n * @deprecated Use MediaDevices.enumerateDevices().\\n */\\nMediaStreamTrack.getSources = function(callback) {};\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nMediaStreamTrack.prototype.kind;\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nMediaStreamTrack.prototype.id;\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nMediaStreamTrack.prototype.label;\\n\\n/**\\n * @type {boolean}\\n */\\nMediaStreamTrack.prototype.enabled;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nMediaStreamTrack.prototype.muted;\\n\\n/**\\n * @type {string}\\n * @see https://crbug.com/653531\\n * @see https://wicg.github.io/mst-content-hint/\\n */\\nMediaStreamTrack.prototype.contentHint;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nMediaStreamTrack.prototype.remote;\\n\\n/**\\n * @type {MediaStreamTrackState}\\n * Read only.\\';a.a+='n */\\nMediaStreamTrack.prototype.readyState;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStreamTrack.prototype.onmute;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStreamTrack.prototype.onunmute;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStreamTrack.prototype.onended;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStreamTrack.prototype.onoverconstrained;\\n\\n/**\\n * Applies the specified set of constraints to the track, if any specified; or\\n * if no constraints are specified, removes all constraints from the track.\\n *\\n * @param {MediaTrackConstraints=} constraints Constraints to apply to the\\n * track.\\n * @return {!Promise} A |Promise| that is resolved when the constraints\\n * have been applied, or rejected if there was an error applying the\\n * constraints.\\n */\\nMediaStreamTrack.prototype.applyConstraints = function(constraints) {};\\n\\n/**\\n * @return {!MediaStreamTrack}\\n */\\nMediaStreamTrack.prototype.clone = function() {};\\n\\n/** @return {void} */\\nMediaStreamTrack.prototype.stop = function() {};\\n\\n/** @return {!MediaTrackCapabilities} */\\nMediaStreamTrack.prototype.getCapabilities = function() {};\\n\\n/** @return {!MediaTrackConstraints} */\\nMediaStreamTrack.prototype.getConstraints = function() {};\\n\\n/** @return {!MediaTrackSettings} */\\nMediaStreamTrack.prototype.getSettings = function() {};\\n\\n/**\\n * @typedef {{track: MediaStreamTrack}}\\n */\\nvar MediaStreamTrackEventInit;\\n\\n\\n/**\\n * @param {string} type\\n * @param {!MediaStreamTrackEventInit} eventInitDict\\n * @constructor\\n * @extends {Event}\\n * @see https://www.w3.org/TR/mediacapture-streams/#mediastreamtrackevent\\n */\\nfunction MediaStreamTrackEvent(type, eventInitDict) {}\\n\\n/**\\n * @type {!MediaStreamTrack}\\n * @const\\n */\\nMediaStreamTrackEvent.prototype.track;\\n\\n/**\\n * @param {!MediaStream|!Array=} streamOrTracks\\n * @constructor\\n * @implements {EventTarget}\\n * @see https://www.w3.org/TR/mediacapture-streams/#mediastream\\n */\\nfunction MediaStream(streamOrTracks) {}\\n\\n/**\\n * @override\\n */\\nMediaStream.prototype.addEventListener = function(type, listener,\\n opt_useCapture) {};\\n\\n/**\\n * @override\\n */\\nMediaStream.prototype.removeEventListener = function(type, listener,\\n opt_useCapture) {};\\n\\n/**\\n * @override\\n * @return {boolean}\\n */\\nMediaStream.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * TODO(bemasc): Remove this property.\\n * @deprecated\\n * @type {string}\\n * @const\\n */\\nMediaStream.prototype.label;\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nMediaStream.prototype.id;\\n\\n/**\\n * @return {!Array}\\n */\\nMediaStream.prototype.getAudioTracks = function() {};\\n\\n/**\\n * @return {!Array}\\n */\\nMediaStream.prototype.getVideoTracks = function() {};\\n\\n/**\\n * @return {!Array}\\n */\\nMediaStream.prototype.getTracks = function() {};\\n\\n/**\\n * @param {string} trackId\\n * @return {MediaStreamTrack}\\n */\\nMediaStream.prototype.getTrackById = function(trackId) {};\\n\\n/**\\n * @param {!MediaStreamTrack} track\\n * @return {undefined}\\n */\\nMediaStream.prototype.addTrack = function(track) {};\\n\\n/**\\n * @param {!MediaStreamTrack} track\\n * @return {undefined}\\n */\\nMediaStream.prototype.removeTrack = function(track) {};\\n\\n/**\\n * @return {!MediaStream}\\n */\\nMediaStream.prototype.clone = function() {};\\n\\n/**\\n * @deprecated\\n * @type {boolean}\\n */\\nMediaStream.prototype.ended;\\n\\n/**\\n * @deprecated\\n * @type {?function(!Event)}\\n */\\nMediaStream.prototype.onended;\\n\\n/**\\n * @type {boolean}\\n */\\nMediaStream.prototype.active;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStream.prototype.onactive;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nMediaStream.prototype.oninactive;\\n\\n/**\\n * @type {?function(!MediaStreamTrackEvent)}\\n */\\nMediaStream.prototype.onaddtrack;\\n\\n/**\\n * @type {?function(!MediaStreamTrackEvent)}\\n */\\nMediaStream.prototype.onremovetrack;\\n\\n/**\\n * @deprecated\\n * TODO(bemasc): Remove this method once browsers have updated to\\n * MediaStreamTrack.stop().\\n * @return {undefined}\\n */\\nMediaStream.prototype.stop = function() {};\\n\\n/**\\n * @type {function(new: MediaStream,\\n * (!MediaStream|!Array)=)}\\n */\\nvar webkitMediaStream;\\n\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/webrtc/#rtcrtpsender-interface\\n */\\nfunction RTCRtpSender() {}\\n\\n/**\\n * @const {!MediaStreamTrack}\\n */\\nRTCRtpSender.prototype.track;\\n\\n/**\\n * @param {!MediaStreamTrack} track\\n */\\nRTCRtpSender.prototype.replaceTrack = function(track) {};\\n\\n\\n/**\\n * @return {!Object}\\n */\\nRTCRtpSender.prototype.getParameters = function() {};\\n\\n\\n/**\\n * @param {!Object} params\\n * @return {!Promise}\\n */\\nRTCRtpSender.prototype.setParameters = function(params) {};\\n\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/webrtc/#dom-rtcrtpcontributingsource\\n */\\nfunction RTCRtpContributingSource() {}\\n\\n/**\\n * @type {?number}\\n */\\nRTCRtpContributingSource.prototype.source;\\n\\n/**\\n * @type {?Date}\\n */\\nRTCRtpContributingSource.prototype.timestamp;\\n\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/webrtc/#rtcrtpreceiver-interface\\n */\\nfunction RTCRtpReceiver() {}\\n\\n/**\\n * @const {!MediaStreamTrack}\\n */\\nRTCRtpReceiver.prototype.track;\\n\\n/**\\n * @return {!Array}\\n */\\nRTCRtpReceiver.prototype.getContributingSources = function() {};\\n\\n\\n/**\\n * @interface\\n * @see https://www.w3.org/TR/webrtc/#rtcrtptransceiver-interface\\n */\\nfunction RTCRtpTransceiver() {}\\n\\n/**\\n * @const {?RTCRtpSender}\\n */\\nRTCRtpTransceiver.prototype.sender;\\n\\n/**\\n * @const {?RTCRtpReceiver}\\n */\\nRTCRtpTransceiver.prototype.receiver;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-longrange\\n * @record\\n */\\nfunction LongRange() {}\\n\\n/**\\n * @type {number|undefined}\\n */\\nLongRange.prototype.max;\\n\\n/**\\n * @type {number|undefined}\\n */\\nLongRange.prototype.min;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-doublerange\\n * @record\\n */\\nfunction DoubleRange() {}\\n\\n/**\\n * @type {number|undefined}\\n */\\nDoubleRange.prototype.max;\\n\\n/**\\n * @type {number|undefined}\\n */\\nDoubleRange.prototype.min;\\n\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainbooleanparameters\\n * @record\\n */\\nfunction ConstrainBooleanParameters() {}\\n\\n/**\\n * @type {boolean|undefined}\\n */\\nConstrainBooleanParameters.prototype.exact;\\n\\n/**\\n * @type {boolean|undefined}\\n */\\nConstrainBooleanParameters.prototype.ideal;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindomstringparameters\\n * @record\\n */\\nfunction ConstrainDOMStringParameters() {}\\n\\n/**\\n * @type {string|Array|undefined}\\n */\\nConstrainDOMStringParameters.prototype.exact;\\n\\n/**\\n * @type {string|Array|undefined}\\n */\\nConstrainDOMStringParameters.prototype.ideal;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindoublerange\\n * @record\\n * @extends {DoubleRange}\\n */\\nfunction ConstrainDoubleRange() {}\\n\\n/**\\n * @type {number|undefined}\\n */\\nConstrainDoubleRange.prototype.exact;\\n\\n/**\\n * @type {number|undefined}\\n */\\nConstrainDoubleRange.prototype.ideal;\\n\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainlongrange\\n * @record\\n * @extends {LongRange}\\n */\\nfunction ConstrainLongRange() {}\\n\\n/**\\n * @type {number|undefined}\\n */\\nConstrainLongRange.prototype.exact;\\n\\n/**\\n * @type {number|undefined}\\n */\\nConstrainLongRange.prototype.ideal;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainboolean\\n * @typedef {boolean|ConstrainBooleanParameters}\\n */\\nvar ConstrainBoolean;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindomString\\n * @typedef {string|Array|ConstrainDOMStringParameters}\\n */\\nvar ConstrainDOMString;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constraindouble\\n * @typedef {number|ConstrainDoubleRange}\\n */\\nvar ConstrainDouble;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-constrainlong\\n * @typedef {number|ConstrainLongRange}\\n */\\nvar ConstrainLong;\\n\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediatrackconstraintset\\n * @record\\n * @private\\n */\\nfunction MediaTrackConstraintSet() {}\\n\\n/**\\n * @type {ConstrainBoolean|undefined}\\n */\\nMediaTrackConstraintSet.prototype.autoGainControl;\\n\\n/**\\n * @type {ConstrainDouble|undefined}\\n */\\nMediaTrackConstraintSet.prototype.aspectRatio;\\n\\n/**\\n * @type {ConstrainLong|undefined}\\n */\\nMediaTrackConstraintSet.prototype.channelCount;\\n\\n/**\\n * @type {ConstrainDOMString|undefined}\\n */\\nMediaTrackConstraintSet.prototype.deviceId;\\n\\n/**\\n * @type {ConstrainBoolean|undefined}\\n */\\nMediaTrackConstraintSet.prototype.echoCancellation;\\n\\n/**\\n * @type {ConstrainDOMString|undefined}\\n */\\nMediaTrackConstraintSet.prototype.facingMode;\\n\\n/**\\n * @type {ConstrainDouble|undefined}\\n */\\nMediaTrackConstraintSet.prototype.frameRate;\\n\\n/**\\n * @type {ConstrainDOMString|undefined}\\n */\\nMediaTrackConstraintSet.prototype.groupId;\\n\\n/**\\n * @type {ConstrainLong|undefined}\\n */\\nMediaTrackConstraintSet.prototype.height;\\n\\n/**\\n * @type {ConstrainDouble|undefined}\\n */\\nMediaTrackConstraintSet.prototype.latency;\\n\\n/**\\n * @type {ConstrainBoolean|undefined}\\n */\\nMediaTrackConstraintSet.prototype.noiseSuppression;\\n\\n/**\\n * @type {ConstrainLong|undefined}\\n */\\nMediaTrackConstraintSet.prototype.sampleRate;\\n\\n/**\\n * @type {ConstrainLong|undefined}\\n */\\nMediaTrackConstraintSet.prototype.sampleSize;\\n\\n/**\\n * @type {ConstrainDouble|undefined}\\n */\\nMediaTrackConstraintSet.prototype.volume;\\n\\n/**\\n * @type {ConstrainLong|undefined}\\n */\\nMediaTrackConstraintSet.prototype.width;\\n\\n\\n/**\\n * @record\\n * @extends {MediaTrackConstraintSet}\\n */\\nfunction MediaTrackConstraints() {}\\n\\n/**\\n * @type {Array|undefined}\\n */\\nMediaTrackConstraints.prototype.advanced;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-main/getusermedia.html#media-track-constraints\\n * @record\\n */\\nfunction MediaStreamConstraints() {}\\n\\n/**\\n * @type {boolean|MediaTrackConstraints|undefined}\\n */\\nMediaStreamConstraints.prototype.audio;\\n\\n/**\\n * @type {boolean|MediaTrackConstraints|undefined}\\n */\\nMediaStreamConstraints.prototype.video;\\n\\n/**\\n * @see {http://dev.w3.org/2011/webrtc/editor/getusermedia.html#\\n * navigatorusermediaerror-and-navigatorusermediaerrorcallback}\\n * @interface\\n */\\nfunction NavigatorUserMediaError() {}\\n\\n/**\\n * @type {number}\\n * @deprecated Removed from the standard and some browsers.\\n * @const\\n */\\nNavigatorUserMediaError.prototype.PERMISSION_DENIED; /** 1 */\\n\\n/**\\n * @type {number}\\n * @deprecated Removed from the standard and some browsers.\\n * Read only.\\n */\\nNavigatorUserMediaError.prototype.code;\\n\\n/**\\n * @type {string}\\n * Read only.\\n */\\nNavigatorUserMediaError.prototype.name;\\n\\n/**\\n * @type {?string}\\n * Read only.\\n */\\nNavigatorUserMediaError.prototype.message;\\n\\n/**\\n * @type {?string}\\n * Read only.\\n */\\nNavigatorUserMediaError.prototype.constraintName;\\n\\n/**\\n * @param {MediaStreamConstraints} constraints A MediaStreamConstraints object.\\n * @param {function(!MediaStream)} successCallback\\n * A NavigatorUserMediaSuccessCallback function.\\n * @param {function(!NavigatorUserMediaError)=} errorCallback A\\n * NavigatorUserMediaErrorCallback function.\\n * @see http://dev.w3.org/2011/webrtc/editor/getusermedia.html\\n * @see https://www.w3.org/TR/mediacapture-streams/\\n * @return {undefined}\\n */\\nNavigator.prototype.webkitGetUserMedia =\\n function(constraints, successCallback, errorCallback) {};\\n\\n/**\\n * @param {string} type\\n * @param {!Object} eventInitDict\\n * @constructor\\n */\\nfunction MediaStreamEvent(type, eventInitDict) {}\\n\\n/**\\n * @type {?MediaStream}\\n * @const\\n */\\nMediaStreamEvent.prototype.stream;\\n\\n/**\\n * @record\\n * @see https://www.w3.org/TR/mediastream-recording/#dictdef-mediarecorderoptions\\n */\\nfunction MediaRecorderOptions() {}\\n\\n/** @type {(string|undefined)} */\\nMediaRecorderOptions.prototype.mimeType\\n\\n/** @type {(number|undefined)} */\\nMediaRecorderOptions.prototype.audioBitsPerSecond\\n\\n/** @type {(number|undefined)} */\\nMediaRecorderOptions.prototype.videoBitsPerSecond\\n\\n/** @type {(number|undefined)} */\\nMediaRecorderOptions.prototype.bitsPerSecond\\n\\n/**\\n * @see https://www.w3.org/TR/mediastream-recording/#mediarecorder-api\\n * @param {!MediaStream} stream\\n * @param {MediaRecorderOptions=} options\\n * @implements {EventTarget}\\n * @constructor\\n */\\nfunction MediaRecorder(stream, options) {}\\n\\n/**\\n * @override\\n */\\nMediaRecorder.prototype.addEventListener = function(type, listener,\\n opt_useCapture) {};\\n\\n/**\\n * @override\\n */\\nMediaRecorder.prototype.removeEventListener = function(type, listener,\\n opt_useCapture) {};\\n\\n/**\\n * @override\\n * @return {boolean}\\n */\\nMediaRecorder.prototype.dispatchEvent = function(evt) {};\\n\\n/**\\n * @type {!MediaStream}\\n */\\nMediaRecorder.prototype.stream;\\n\\n/**\\n * @type {string}\\n */\\nMediaRecorder.prototype.mimeType;\\n\\n/**\\n * @type {string}\\n */\\nMediaRecorder.prototype.state;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.onstart;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.onstop;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.ondataavailable;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.onpause;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.onresume;\\n\\n/**\\n * @type {(function(!Event)|undefined)}\\n */\\nMediaRecorder.prototype.onerror;\\n\\n/**\\n * @type {number}\\n */\\nMediaRecorder.prototype.videoBitsPerSecond;\\n\\n/**\\n * @type {number}\\n */\\nMediaRecorder.prototype.audioBitsPerSecond;\\n\\n/**\\n * @param {number=} timeslice\\n */\\nMediaRecorder.prototype.start = function(timeslice) {};\\n\\n/** @return {void} */\\nMediaRecorder.prototype.stop = function() {};\\n\\n/** @return {void} */\\nMediaRecorder.prototype.pause = function() {};\\n\\n/** @return {void} */\\nMediaRecorder.prototype.resume = function() {};\\n\\n/** @return {void} */\\nMediaRecorder.prototype.requestData = function() {};\\n\\n/**\\n * @param {string} type\\n * @return {boolean}\\n */\\nMediaRecorder.isTypeSupported = function(type) {};\\n\\n/**\\n * @interface\\n * @see https://w3c.github.io/mediacapture-image/##photosettings-section\\n */\\nfunction PhotoSettings() {}\\n\\n/**\\n * @type {string}\\n */\\nPhotoSettings.prototype.fillLightMode;\\n\\n/**\\n * @type {number}\\n */\\nPhotoSettings.prototype.imageHeight;\\n\\n/**\\n * @type {number}\\n */\\nPhotoSettings.prototype.imageWidth;\\n\\n/**\\n * @type {boolean}\\n */\\nPhotoSettings.prototype.redEyeReduction;\\n\\n/**\\n * @interface\\n * @see https://w3c.github.io/mediacapture-image/##photocapabilities-section\\n */\\nfunction PhotoCapabilities() {}\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nPhotoCapabilities.prototype.redEyeReduction;\\n\\n/**\\n * @type {!MediaSettingsRange}\\n * @const\\n */\\nPhotoCapabilities.prototype.imageHeight;\\n\\n/**\\n * @type {!MediaSettingsRange}\\n * @const\\n */\\nPhotoCapabilities.prototype.imageWidth;\\n\\n/**\\n * @type {!Array}\\n * @const\\n */\\nPhotoCapabilities.prototype.fillLightMode;\\n\\n/**\\n * @see https://w3c.github.io/mediacapture-image/\\n * @param {!MediaStreamTrack} videoTrack\\n * @constructor\\n */\\nfunction ImageCapture(videoTrack) {}\\n\\n/**\\n * @param {!PhotoSettings=} photoSettings\\n * @return {!Promise}\\n */\\nImageCapture.prototype.takePhoto = function(photoSettings) {};\\n\\n/**\\n * @return {!Promise}\\n */\\nImageCapture.prototype.getPhotoCapabilities = function() {};\\n\\n/**\\n * @return {!Promise}\\n */\\nImageCapture.prototype.grabFrame = function() {};\\n\\n/**\\n * @type {!MediaStreamTrack}\\n * @const\\n */\\nImageCapture.prototype.track;\\n\\n/**\\n * @see https://www.w3.org/TR/webrtc/#rtctrackevent\\n * @param {string} type\\n * @param {!Object} eventInitDict\\n * @constructor\\n */\\nfunction RTCTrackEvent(type, eventInitDict) {}\\n\\n/**\\n * @type {?RTCRtpReceiver}\\n * @const\\n */\\nRTCTrackEvent.prototype.receiver;\\n\\n/**\\n * @type {?MediaStreamTra';a.a+="ck}\\n * @const\\n */\\nRTCTrackEvent.prototype.track;\\n\\n/**\\n * @type {?Array}\\n * @const\\n */\\nRTCTrackEvent.prototype.streams;\\n\\n/**\\n * @type {?RTCRtpTransceiver}\\n * @const\\n */\\nRTCTrackEvent.prototype.transceiver;\\n\\n/**\\n * @typedef {string}\\n * @see https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaDeviceKind\\n * In WebIDL this is an enum with values 'audioinput', 'audiooutput', and\\n * 'videoinput', but there is no mechanism in Closure for describing a\\n * specialization of the string type.\\n */\\nvar MediaDeviceKind;\\n\\n/**\\n * @interface\\n */\\nfunction MediaDeviceInfo() {}\\n\\n/** @const {string} */\\nMediaDeviceInfo.prototype.deviceId;\\n\\n/** @const {!MediaDeviceKind} */\\nMediaDeviceInfo.prototype.kind;\\n\\n/** @const {string} */\\nMediaDeviceInfo.prototype.label;\\n\\n/** @const {string} */\\nMediaDeviceInfo.prototype.groupId;\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n * @see https://www.w3.org/TR/mediacapture-streams/#mediadevices\\n */\\nfunction MediaDevices() {}\\n\\n/**\\n * @return {!Promise>}\\n */\\nMediaDevices.prototype.enumerateDevices = function() {};\\n\\n/**\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\\n * @param {!MediaStreamConstraints} constraints\\n * @return {!Promise}\\n */\\nMediaDevices.prototype.getUserMedia = function(constraints) {}\\n\\n/** @const {!MediaDevices} */\\nNavigator.prototype.mediaDevices;\\n\\n/**\\n * @typedef {string}\\n * @see https://www.w3.org/TR/webrtc/#rtcsdptype\\n * In WebIDL this is an enum with values 'offer', 'pranswer', and 'answer',\\n * but there is no mechanism in Closure for describing a specialization of\\n * the string type.\\n */\\nvar RTCSdpType;\\n\\n/**\\n * @param {!Object=} descriptionInitDict The RTCSessionDescriptionInit\\n * dictionary. This optional argument may have type\\n * {type:RTCSdpType, sdp:string}, but neither of these keys are required to be\\n * present, and other keys are ignored, so the closest Closure type is Object.\\n * @constructor\\n * @see https://www.w3.org/TR/webrtc/#rtcsessiondescription-class\\n */\\nfunction RTCSessionDescription(descriptionInitDict) {}\\n\\n/**\\n * @type {?RTCSdpType}\\n * @see https://www.w3.org/TR/webrtc/#dom-rtcsessiondescription-type\\n */\\nRTCSessionDescription.prototype.type;\\n\\n/**\\n * @type {?string}\\n * @see https://www.w3.org/TR/webrtc/#dom-rtcsessiondescription-sdp\\n */\\nRTCSessionDescription.prototype.sdp;\\n\\n/**\\n * TODO(bemasc): Remove this definition once it is removed from the browser.\\n * @param {string} label The label index (audio/video/data -> 0,1,2)\\n * @param {string} sdp The ICE candidate in SDP text form\\n * @constructor\\n */\\nfunction IceCandidate(label, sdp) {}\\n\\n/**\\n * @return {string}\\n */\\nIceCandidate.prototype.toSdp = function() {};\\n\\n/**\\n * @type {?string}\\n */\\nIceCandidate.prototype.label;\\n\\n/**\\n * @param {!Object=} candidateInitDict The RTCIceCandidateInit dictionary.\\n * This optional argument may have type\\n * {candidate: string, sdpMid: string, sdpMLineIndex:number}, but none of\\n * these keys are required to be present, and other keys are ignored, so the\\n * closest Closure type is Object.\\n * @constructor\\n * @see https://www.w3.org/TR/webrtc/#rtcicecandidate-interface\\n */\\nfunction RTCIceCandidate(candidateInitDict) {}\\n\\n/**\\n * @type {?string}\\n */\\nRTCIceCandidate.prototype.candidate;\\n\\n/**\\n * @type {?string}\\n */\\nRTCIceCandidate.prototype.sdpMid;\\n\\n/**\\n * @type {?number}\\n */\\nRTCIceCandidate.prototype.sdpMLineIndex;\\n\\n/**\\n * @typedef {{urls: string}|{urls: !Array}}\\n * @private\\n * @see https://www.w3.org/TR/webrtc/#rtciceserver-dictionary\\n * This dictionary type also has an optional key {credential: ?string}.\\n */\\nvar RTCIceServerRecord_;\\n\\n/**\\n * @interface\\n * @private\\n */\\nfunction RTCIceServerInterface_() {}\\n\\n/**\\n * @type {string|!Array}\\n */\\nRTCIceServerInterface_.prototype.urls;\\n\\n/**\\n * @type {?string}\\n */\\nRTCIceServerInterface_.prototype.username;\\n\\n/**\\n * @type {?string}\\n */\\nRTCIceServerInterface_.prototype.credential;\\n\\n/**\\n * This type, and several below it, are constructed as unions between records\\n *\\n * @typedef {RTCIceServerRecord_|RTCIceServerInterface_}\\n * @private\\n */\\nvar RTCIceServer;\\n\\n/**\\n * @typedef {{iceServers: !Array}}\\n * @private\\n */\\nvar RTCConfigurationRecord_;\\n\\n/**\\n * @interface\\n * @private\\n */\\nfunction RTCConfigurationInterface_() {}\\n\\n/**\\n * @type {!Array}\\n */\\nRTCConfigurationInterface_.prototype.iceServers;\\n\\n/**\\n * @typedef {RTCConfigurationRecord_|RTCConfigurationInterface_}\\n */\\nvar RTCConfiguration;\\n\\n/**\\n * @typedef {function(!RTCSessionDescription)}\\n */\\nvar RTCSessionDescriptionCallback;\\n\\n/**\\n * @typedef {function(string)}\\n */\\nvar RTCPeerConnectionErrorCallback;\\n\\n/**\\n * @typedef {function()}\\n */\\nvar RTCVoidCallback;\\n\\n/**\\n * @typedef {string}\\n */\\nvar RTCSignalingState;\\n\\n/**\\n * @typedef {string}\\n */\\nvar RTCIceConnectionState;\\n\\n/**\\n * @typedef {string}\\n */\\nvar RTCIceGatheringState;\\n\\n/**\\n * @param {string} type\\n * @param {!Object} eventInitDict\\n * @constructor\\n */\\nfunction RTCPeerConnectionIceEvent(type, eventInitDict) {}\\n\\n/**\\n * @type {RTCIceCandidate}\\n * @const\\n */\\nRTCPeerConnectionIceEvent.prototype.candidate;\\n\\n// Note: The specification of RTCStats types is still under development.\\n// Declarations here will be updated and removed to follow the development of\\n// modern browsers, breaking compatibility with older versions as they become\\n// obsolete.\\n/**\\n * @interface\\n */\\nfunction RTCStatsReport() {}\\n\\n/**\\n * @type {Date}\\n * @const\\n */\\nRTCStatsReport.prototype.timestamp;\\n\\n/**\\n * @return {!Array}\\n */\\nRTCStatsReport.prototype.names = function() {};\\n\\n/**\\n * @param {string} name\\n * @return {string}\\n */\\nRTCStatsReport.prototype.stat = function(name) {};\\n\\n/**\\n * @deprecated\\n * @type {RTCStatsReport}\\n * @const\\n */\\nRTCStatsReport.prototype.local;\\n\\n/**\\n * @deprecated\\n * @type {RTCStatsReport}\\n * @const\\n */\\nRTCStatsReport.prototype.remote;\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nRTCStatsReport.prototype.type;\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nRTCStatsReport.prototype.id;\\n\\n// Note: Below are Map like methods supported by WebRTC statistics\\n// specification-compliant RTCStatsReport. Currently only implemented by\\n// Mozilla.\\n// See https://www.w3.org/TR/webrtc/#rtcstatsreport-object for definition.\\n/**\\n * @param {function(this:SCOPE, Object)} callback\\n * @param {SCOPE=} opt_thisObj The value of \\\"this\\\" inside callback function.\\n * @template SCOPE\\n * @readonly\\n */\\nRTCStatsReport.prototype.forEach = function(callback, opt_thisObj) {};\\n\\n/**\\n * @param {string} key\\n * @return {Object}\\n * @readonly\\n */\\nRTCStatsReport.prototype.get = function(key) {};\\n\\n/**\\n * @return {!Iterator}\\n * @readonly\\n */\\nRTCStatsReport.prototype.keys = function() {};\\n\\n/**\\n * TODO(bemasc): Remove this type once it is no longer in use. It has already\\n * been removed from the specification.\\n * @typedef {RTCStatsReport}\\n * @deprecated\\n */\\nvar RTCStatsElement;\\n\\n/**\\n * @interface\\n */\\nfunction RTCStatsResponse() {}\\n\\n/**\\n * @return {!Array}\\n */\\nRTCStatsResponse.prototype.result = function() {};\\n\\n/**\\n * @typedef {function(!RTCStatsResponse, MediaStreamTrack=)}\\n */\\nvar RTCStatsCallback;\\n\\n/**\\n * This type is not yet standardized, so the properties here only represent\\n * the current capabilities of libjingle (and hence Chromium).\\n * TODO(bemasc): Add a link to the relevant standard once MediaConstraint has a\\n * standard definition.\\n *\\n * @interface\\n * @private\\n */\\nfunction MediaConstraintSetInterface_() {}\\n\\n/**\\n * @type {?boolean}\\n */\\nMediaConstraintSetInterface_.prototype.OfferToReceiveAudio;\\n\\n/**\\n * @type {?boolean}\\n */\\nMediaConstraintSetInterface_.prototype.OfferToReceiveVideo;\\n\\n/**\\n * @type {?boolean}\\n */\\nMediaConstraintSetInterface_.prototype.DtlsSrtpKeyAgreement;\\n\\n/**\\n * @type {?boolean}\\n */\\nMediaConstraintSetInterface_.prototype.RtpDataChannels;\\n\\n/**\\n * TODO(bemasc): Make this type public once it is defined in a standard.\\n *\\n * @typedef {Object|MediaConstraintSetInterface_}\\n * @private\\n */\\nvar MediaConstraintSet_;\\n\\n/**\\n * @interface\\n * @private\\n */\\nfunction MediaConstraintsInterface_() {}\\n\\n/**\\n * @type {?MediaConstraintSet_}\\n */\\nMediaConstraintsInterface_.prototype.mandatory;\\n\\n/**\\n * @type {?Array}\\n */\\nMediaConstraintsInterface_.prototype.optional;\\n\\n/**\\n * This type is used extensively in\\n * {@see http://dev.w3.org/2011/webrtc/editor/webrtc.html} but is not yet\\n * defined.\\n *\\n * @typedef {Object|MediaConstraintsInterface_}\\n */\\nvar MediaConstraints;\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n */\\nfunction RTCDataChannel() {}\\n\\n/**\\n * @type {string}\\n * @const\\n */\\nRTCDataChannel.prototype.label;\\n\\n/**\\n * @type {boolean}\\n * @const\\n */\\nRTCDataChannel.prototype.reliable;\\n\\n/**\\n * An enumerated string type (RTCDataChannelState) with values:\\n * \\\"connecting\\\", \\\"open\\\", \\\"closing\\\", and \\\"closed\\\".\\n * @type {string}\\n * Read only.\\n */\\nRTCDataChannel.prototype.readyState;\\n\\n/**\\n * @type {number}\\n * Read only.\\n */\\nRTCDataChannel.prototype.bufferedAmount;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCDataChannel.prototype.onopen;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCDataChannel.prototype.onerror;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCDataChannel.prototype.onclose;\\n\\nRTCDataChannel.prototype.close = function() {};\\n\\n/**\\n * @type {?function(!MessageEvent<*>)}\\n */\\nRTCDataChannel.prototype.onmessage;\\n\\n/**\\n * @type {string}\\n */\\nRTCDataChannel.prototype.binaryType;\\n\\n/**\\n * @param {string|!Blob|!ArrayBuffer|!ArrayBufferView} data\\n * @return {undefined}\\n */\\nRTCDataChannel.prototype.send = function(data) {};\\n\\n/**\\n * @constructor\\n * @extends {Event}\\n * @private\\n */\\nfunction RTCDataChannelEvent() {}\\n\\n/**\\n * @type {!RTCDataChannel}\\n * Read only.\\n */\\nRTCDataChannelEvent.prototype.channel;\\n\\n/**\\n * @typedef {{reliable: boolean}}\\n */\\nvar RTCDataChannelInitRecord_;\\n\\n/**\\n * @interface\\n * @private\\n */\\nfunction RTCDataChannelInitInterface_() {}\\n\\n/**\\n * @type {boolean}\\n */\\nRTCDataChannelInitInterface_.prototype.reliable;\\n\\n/**\\n * @typedef {RTCDataChannelInitInterface_|RTCDataChannelInitRecord_}\\n */\\nvar RTCDataChannelInit;\\n\\n/**\\n * @typedef {{expires: number}}\\n */\\nvar RTCCertificate;\\n\\n/**\\n * @param {RTCConfiguration} configuration\\n * @param {!MediaConstraints=} constraints\\n * @constructor\\n * @implements {EventTarget}\\n */\\nfunction RTCPeerConnection(configuration, constraints) {}\\n\\n/**\\n * @param {Object} keygenAlgorithm\\n * @return {Promise}\\n */\\nRTCPeerConnection.generateCertificate = function (keygenAlgorithm) {};\\n\\n/**\\n * @override\\n */\\nRTCPeerConnection.prototype.addEventListener = function(\\n type, listener, opt_useCapture) {};\\n\\n/**\\n * @override\\n */\\nRTCPeerConnection.prototype.removeEventListener = function(\\n type, listener, opt_useCapture) {};\\n\\n/**\\n * @override\\n * @return {boolean}\\n */\\nRTCPeerConnection.prototype.dispatchEvent = function(evt) {};\\n\\n\\n// NB: Until closure annotations support overloading, many of the following\\n// functions take odd unions of parameter types. This is to support the various\\n// api differences between browsers. Generally, returning a promise means you\\n// don't take callback function parameters and draw any further parameters\\n// forward, and vice versa.\\n\\n/**\\n * @param {(!RTCSessionDescriptionCallback|!MediaConstraints)=}\\n * successCallbackOrConstraints\\n * @param {!RTCPeerConnectionErrorCallback=} failureCallback\\n * @param {!MediaConstraints=} constraints\\n * @return {!Promise|undefined}\\n */\\nRTCPeerConnection.prototype.createOffer = function(successCallbackOrConstraints,\\n failureCallback, constraints) {};\\n\\n/**\\n * @param {(!RTCSessionDescriptionCallback|!MediaConstraints)=}\\n * successCallbackOrConstraints\\n * @param {!RTCPeerConnectionErrorCallback=} failureCallback\\n * @param {!MediaConstraints=} constraints\\n * @return {!Promise|undefined}\\n */\\nRTCPeerConnection.prototype.createAnswer =\\n function(successCallbackOrConstraints, failureCallback, constraints) {};\\n\\n/**\\n * @param {!RTCSessionDescription} description\\n * @param {!RTCVoidCallback=} successCallback\\n * @param {!RTCPeerConnectionErrorCallback=} failureCallback\\n * @return {!Promise|undefined}\\n */\\nRTCPeerConnection.prototype.setLocalDescription = function(description,\\n successCallback, failureCallback) {};\\n\\n/**\\n * @param {!RTCSessionDescription} description\\n * @param {!RTCVoidCallback=} successCallback\\n * @param {!RTCPeerConnectionErrorCallback=} failureCallback\\n * @return {!Promise|undefined}\\n */\\nRTCPeerConnection.prototype.setRemoteDescription = function(description,\\n successCallback, failureCallback) {};\\n\\n/**\\n * @type {?RTCSessionDescription}\\n * Read only.\\n */\\nRTCPeerConnection.prototype.localDescription;\\n\\n/**\\n * @type {?RTCSessionDescription}\\n * Read only.\\n */\\nRTCPeerConnection.prototype.remoteDescription;\\n\\n/**\\n * @type {RTCSignalingState}\\n * Read only.\\n */\\nRTCPeerConnection.prototype.signalingState;\\n\\n/**\\n * @param {?RTCConfiguration=} configuration\\n * @param {?MediaConstraints=} constraints\\n * @return {undefined}\\n */\\nRTCPeerConnection.prototype.updateIce = function(configuration, constraints) {};\\n\\n/**\\n * Void in Chrome for now, a promise that you can then/catch in Firefox.\\n * @param {!RTCIceCandidate} candidate\\n * @param {!RTCVoidCallback=} successCallback\\n * @param {!function(DOMException)=} failureCallback\\n * @return {!Promise|undefined}\\n */\\nRTCPeerConnection.prototype.addIceCandidate = function(candidate, successCallback, failureCallback) {};\\n\\n/**\\n * @type {!RTCIceGatheringState}\\n * Read only.\\n */\\nRTCPeerConnection.prototype.iceGatheringState;\\n\\n/**\\n * @type {!RTCIceConnectionState}\\n * Read only.\\n */\\nRTCPeerConnection.prototype.iceConnectionState;\\n\\n/**\\n * @return {!Array}\\n */\\nRTCPeerConnection.prototype.getLocalStreams = function() {};\\n\\n/**\\n * @return {!Array}\\n */\\nRTCPeerConnection.prototype.getRemoteStreams = function() {};\\n\\n/**\\n * @param {string} streamId\\n * @return {MediaStream}\\n */\\nRTCPeerConnection.prototype.getStreamById = function(streamId) {};\\n\\n/**\\n * @return {!Array}\\n */\\nRTCPeerConnection.prototype.getSenders = function() {};\\n\\n/**\\n * @return {!Array}\\n */\\nRTCPeerConnection.prototype.getReceivers = function() {};\\n\\n/**\\n * @param {?string} label\\n * @param {RTCDataChannelInit=} dataChannelDict\\n * @return {!RTCDataChannel}\\n */\\nRTCPeerConnection.prototype.createDataChannel =\\n function(label, dataChannelDict) {};\\n/**\\n * @param {!MediaStream} stream\\n * @param {!MediaConstraints=} constraints\\n * @return {undefined}\\n */\\nRTCPeerConnection.prototype.addStream = function(stream, constraints) {};\\n\\n/**\\n * @param {!MediaStream} stream\\n * @return {undefined}\\n */\\nRTCPeerConnection.prototype.removeStream = function(stream) {};\\n\\n/**\\n * @param {!MediaStreamTrack} track\\n * @param {!MediaStream} stream\\n * @param {...MediaStream} var_args Additional streams.\\n * @return {!RTCRtpSender}\\n */\\nRTCPeerConnection.prototype.addTrack = function(track, stream, var_args) {};\\n\\n\\n/**\\n * @param {!RTCRtpSender} sender\\n * @return {undefined}\\n */\\nRTCPeerConnection.prototype.removeTrack = function(sender) {};\\n\\n// TODO(bemasc): Add identity provider stuff once implementations exist\\n\\n// TODO(rjogrady): Per w3c spec, getStats() should always return a Promise.\\n// Remove RTCStatsReport from the return value once Firefox supports that.\\n/**\\n * Firefox' getstats is synchronous and returns a much simpler\\n * {!RTCStatsReport} Map-like object.\\n * @param {!RTCStatsCallback=} successCallback\\n * @param {MediaStreamTrack=} selector\\n * @return {undefined|!RTCStatsReport|!Promise}\\n */\\nRTCPeerConnection.prototype.getStats = function(successCallback, selector) {};\\n\\nRTCPeerConnection.prototype.close = function() {};\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCPeerConnection.prototype.onnegotiationn";a.a+='eeded;\\n\\n/**\\n * @type {?function(!RTCPeerConnectionIceEvent)}\\n */\\nRTCPeerConnection.prototype.onicecandidate;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCPeerConnection.prototype.onsignalingstatechange;\\n\\n/**\\n * @type {?function(!MediaStreamEvent)}\\n */\\nRTCPeerConnection.prototype.onaddstream;\\n\\n/**\\n * @type {?function(!RTCTrackEvent)}\\n */\\nRTCPeerConnection.prototype.ontrack;\\n\\n/**\\n * @type {?function(!MediaStreamEvent)}\\n */\\nRTCPeerConnection.prototype.onremovestream;\\n\\n/**\\n * @type {?function(!Event)}\\n */\\nRTCPeerConnection.prototype.oniceconnectionstatechange;\\n\\n/**\\n * @type {?function(!RTCDataChannelEvent)}\\n */\\nRTCPeerConnection.prototype.ondatachannel;\\n\\n/**\\n * @const\\n */\\nvar webkitRTCPeerConnection = RTCPeerConnection;\\n","externs/w3c_screen_orientation.js":"/*\\n * Copyright 2016 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Screen Orientation API.\\n * @see https://w3c.github.io/screen-orientation/\\n *\\n * @externs\\n */\\n\\n/**\\n * @interface\\n * @extends {EventTarget}\\n * @see https://w3c.github.io/screen-orientation/#screenorientation-interface\\n */\\nvar ScreenOrientation = function() {};\\n\\n/**\\n * @param {string} orientation\\n * @return {!Promise}\\n */\\nScreenOrientation.prototype.lock = function(orientation) {};\\n\\n/** @return {void} */\\nScreenOrientation.prototype.unlock = function() {};\\n\\n/** @const {string} */\\nScreenOrientation.prototype.type;\\n\\n/** @const {number} */\\nScreenOrientation.prototype.angle;\\n\\n/** @type {?function(!Event)} */\\nScreenOrientation.prototype.onchange;\\n\\n/**\\n * @type {?ScreenOrientation}\\n * @see https://w3c.github.io/screen-orientation/#extensions-to-the-screen-interface\\n */\\nScreen.prototype.orientation;\\n","externs/w3c_selectors.js":"/*\\n * Copyright 2008 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Selectors API.\\n * This file depends on w3c_dom1.js.\\n * @see http://www.w3.org/TR/selectors-api2/\\n *\\n * @externs\\n * @author mihaip@google.com (Mihai Parparita)\\n */\\n\\n/**\\n * @param {string} selectors\\n * @return {?Element}\\n * @override\\n * @nosideeffects\\n */\\nDocument.prototype.querySelector = function(selectors) {};\\n\\n/**\\n * @param {string} selectors\\n * @return {!NodeList}\\n * @override\\n * @nosideeffects\\n */\\nDocument.prototype.querySelectorAll = function(selectors) {};\\n\\n/**\\n * @param {string} selectors\\n * @return {?Element}\\n * @override\\n * @nosideeffects\\n */\\nElement.prototype.querySelector = function(selectors) {};\\n\\n/**\\n * @param {string} selectors\\n * @return {!NodeList}\\n * @override\\n * @nosideeffects\\n */\\nElement.prototype.querySelectorAll = function(selectors) {};\\n\\n/**\\n * https://dom.spec.whatwg.org/#dom-element-closest\\n * https://developer.mozilla.org/en-US/docs/Web/API/Element.closest\\n * @param {string} selectors\\n * @return {?Element}\\n * @nosideeffects\\n */\\nElement.prototype.closest = function(selectors) {};\\n\\n/**\\n * https://dom.spec.whatwg.org/#dom-element-matches\\n * https://developer.mozilla.org/en-US/docs/Web/API/Element.matches\\n * @param {string} selectors\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.matches = function(selectors) {};\\n\\n/**\\n * @param {string} selectors\\n * @param {(Node|NodeList)=} refNodes\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.matchesSelector = function(selectors, refNodes) {};\\n\\n/**\\n * @see https://developer.mozilla.org/en/DOM/Node.mozMatchesSelector\\n * @param {string} selectors\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.mozMatchesSelector = function(selectors) {};\\n\\n/**\\n * @see http://developer.apple.com/library/safari/documentation/WebKit/Reference/ElementClassRef/Element/Element.html\\n * @param {string} selectors\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.webkitMatchesSelector = function(selectors) {};\\n\\n/**\\n * @see http://msdn.microsoft.com/en-us/library/ff975201.aspx\\n * @param {string} selectors\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.msMatchesSelector = function(selectors) {};\\n\\n/**\\n * @see http://www.opera.com/docs/changelogs/windows/1150/\\n * @param {string} selectors\\n * @return {boolean}\\n * @nosideeffects\\n */\\nElement.prototype.oMatchesSelector = function(selectors) {};\\n","externs/w3c_serviceworker.js":"/*\\n * Copyright 2014 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n/**\\n * @fileoverview Externs for service worker.\\n *\\n * @see http://www.w3.org/TR/service-workers/\\n * @externs\\n */\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-interface\\n * @constructor\\n * @extends {Worker}\\n */\\nfunction ServiceWorker() {}\\n\\n/** @type {string} */\\nServiceWorker.prototype.scriptURL;\\n\\n/** @type {ServiceWorkerState} */\\nServiceWorker.prototype.state;\\n\\n/** @type {?function(!Event)} */\\nServiceWorker.prototype.onstatechange;\\n\\n/**\\n * Set of possible string values: \'installing\', \'installed\', \'activating\',\\n * \'activated\', \'redundant\'.\\n * @typedef {string}\\n */\\nvar ServiceWorkerState;\\n\\n/**\\n * @see https://w3c.github.io/ServiceWorker/#navigationpreloadmanager\\n * @constructor\\n */\\nfunction NavigationPreloadManager() {}\\n\\n/** @return {!Promise} */\\nNavigationPreloadManager.prototype.enable = function() {};\\n\\n/** @return {!Promise} */\\nNavigationPreloadManager.prototype.disable = function() {};\\n\\n/**\\n * @param {string=} value\\n * @return {!Promise}\\n */\\nNavigationPreloadManager.prototype.setHeaderValue = function(value) {};\\n\\n/** @return {!Promise} */\\nNavigationPreloadManager.prototype.getState = function() {};\\n\\n/**\\n * @typedef {{\\n * enabled: (boolean|undefined),\\n * headerValue: (string|undefined)\\n * }}\\n */\\nvar NavigationPreloadState;\\n\\n/**\\n * @see https://w3c.github.io/push-api/\\n * @constructor\\n */\\nfunction PushSubscription() {}\\n\\n/** @type {string} */\\nPushSubscription.prototype.endpoint;\\n\\n/**\\n * Please note there is an intent to deprecate this field in Chrome 43 or 44.\\n * See https://www.chromestatus.com/feature/5283829761703936.\\n * @type {string}\\n */\\nPushSubscription.prototype.subscriptionId;\\n\\n/** @return {!Promise} */\\nPushSubscription.prototype.unsubscribe = function() {};\\n\\n/** @enum {string} */\\n// This is commented out since it has not been implemented yet in Chrome beta.\\n// Uncomment once it is available.\\n// var PushPermissionStatus = {\\n// GRANTED: \'granted\',\\n// DENIED: \'denied\',\\n// DEFAULT: \'default\'\\n//};\\n\\n/**\\n * @see https://w3c.github.io/push-api/#idl-def-PushManager\\n * @constructor\\n */\\nfunction PushManager() {}\\n\\n/**\\n * @param {PushSubscriptionOptions=} opt_options\\n * @return {!Promise}\\n */\\nPushManager.prototype.subscribe = function(opt_options) {};\\n\\n/** @return {!Promise} */\\nPushManager.prototype.getSubscription = function() {};\\n\\n/** @return {!Promise} */\\n// This is commented out since it has not been implemented yet in Chrome beta.\\n// Uncomment once it is available.\\n// PushManager.prototype.hasPermission = function() {};\\n\\n/**\\n * @see https://wicg.github.io/BackgroundSync/spec/#sync-manager-interface\\n * @constructor\\n */\\nfunction SyncManager() {}\\n\\n/**\\n * @param {string} tag\\n * @return {!Promise}\\n */\\nSyncManager.prototype.register = function(tag) {}\\n\\n/**\\n * @return {!Promise>}\\n */\\nSyncManager.prototype.getTags = function() {}\\n\\n/**\\n * @see https://wicg.github.io/BackgroundSync/spec/#sync-event\\n * @constructor\\n * @extends{ExtendableEvent}\\n */\\nfunction SyncEvent() {}\\n\\n/** @type {string} */\\nSyncEvent.prototype.tag;\\n\\n/** @type {boolean} */\\nSyncEvent.prototype.lastChance;\\n\\n/**\\n * @typedef {{userVisibleOnly: (boolean|undefined)}}\\n * @see https://w3c.github.io/push-api/#idl-def-PushSubscriptionOptions\\n */\\nvar PushSubscriptionOptions;\\n\\n/**\\n * @see http://www.w3.org/TR/push-api/#idl-def-PushMessageData\\n * @constructor\\n */\\nfunction PushMessageData() {}\\n\\n/** @return {!ArrayBuffer} */\\nPushMessageData.prototype.arrayBuffer = function() {};\\n\\n/** @return {!Blob} */\\nPushMessageData.prototype.blob = function() {};\\n\\n/** @return {*} */\\nPushMessageData.prototype.json = function() {};\\n\\n/** @return {string} */\\nPushMessageData.prototype.text = function() {};\\n\\n\\n/**\\n * @see http://www.w3.org/TR/push-api/#idl-def-PushEvent\\n * @constructor\\n * @param {string} type\\n * @param {!ExtendableEventInit=} opt_eventInitDict\\n * @extends {ExtendableEvent}\\n */\\nfunction PushEvent(type, opt_eventInitDict) {}\\n\\n/** @type {?PushMessageData} */\\nPushEvent.prototype.data;\\n\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-registration-interface\\n * @interface\\n * @extends {EventTarget}\\n */\\nfunction ServiceWorkerRegistration() {}\\n\\n/** @type {ServiceWorker} */\\nServiceWorkerRegistration.prototype.installing;\\n\\n/** @type {ServiceWorker} */\\nServiceWorkerRegistration.prototype.waiting;\\n\\n/** @type {ServiceWorker} */\\nServiceWorkerRegistration.prototype.active;\\n\\n/** @type {NavigationPreloadManager} */\\nServiceWorkerRegistration.prototype.navigationPreload;\\n\\n/** @type {string} */\\nServiceWorkerRegistration.prototype.scope;\\n\\n/** @return {!Promise} */\\nServiceWorkerRegistration.prototype.unregister = function() {};\\n\\n/** @type {?function(!Event)} */\\nServiceWorkerRegistration.prototype.onupdatefound;\\n\\n/** @return {!Promise} */\\nServiceWorkerRegistration.prototype.update = function() {};\\n\\n/**\\n * @see https://w3c.github.io/push-api/\\n * @type {!PushManager}\\n */\\nServiceWorkerRegistration.prototype.pushManager;\\n\\n/**\\n * @see https://notifications.spec.whatwg.org/#service-worker-api\\n * @param {string} title\\n * @param {NotificationOptions=} opt_options\\n * @return {!Promise}\\n */\\nServiceWorkerRegistration.prototype.showNotification =\\n function(title, opt_options) {};\\n\\n/**\\n * @see https://notifications.spec.whatwg.org/#service-worker-api\\n * @param {!GetNotificationOptions=} opt_filter\\n * @return {!Promise>}\\n */\\nServiceWorkerRegistration.prototype.getNotifications = function(opt_filter) {};\\n\\n/**\\n * @see https://wicg.github.io/BackgroundSync/spec/#service-worker-registration-extensions\\n * @type {!SyncManager}\\n */\\nServiceWorkerRegistration.prototype.sync;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-container-interface\\n * @interface\\n * @extends {EventTarget}\\n */\\nfunction ServiceWorkerContainer() {}\\n\\n/** @type {?ServiceWorker} */\\nServiceWorkerContainer.prototype.controller;\\n\\n/** @type {!Promise} */\\nServiceWorkerContainer.prototype.ready;\\n\\n/**\\n * @param {string} scriptURL\\n * @param {RegistrationOptions=} opt_options\\n * @return {!Promise}\\n */\\nServiceWorkerContainer.prototype.register = function(scriptURL, opt_options) {};\\n\\n/**\\n * @param {string=} opt_documentURL\\n * @return {!Promise}\\n */\\nServiceWorkerContainer.prototype.getRegistration = function(opt_documentURL) {};\\n\\n/**\\n * @return {!Promise>}\\n */\\nServiceWorkerContainer.prototype.getRegistrations = function() {};\\n\\n/** @type {?function(!Event)} */\\nServiceWorkerContainer.prototype.oncontrollerchange;\\n\\n/** @type {?function(!ErrorEvent)} */\\nServiceWorkerContainer.prototype.onerror;\\n\\n/**\\n * @typedef {{scope: (string|undefined), useCache: (boolean|undefined)}}\\n */\\nvar RegistrationOptions;\\n\\n/** @type {!ServiceWorkerContainer} */\\nNavigator.prototype.serviceWorker;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-global-scope-interface\\n * @interface\\n * @extends {WorkerGlobalScope}\\n */\\nfunction ServiceWorkerGlobalScope() {}\\n\\n/** @type {!Cache} */\\nServiceWorkerGlobalScope.prototype.scriptCache;\\n\\n/** @type {!CacheStorage} */\\nServiceWorkerGlobalScope.prototype.caches;\\n\\n/** @type {!ServiceWorkerClients} */\\nServiceWorkerGlobalScope.prototype.clients;\\n\\n/** @type {string} */\\nServiceWorkerGlobalScope.prototype.scope;\\n\\n/** @type {!ServiceWorkerRegistration} */\\nServiceWorkerGlobalScope.prototype.registration;\\n\\n/** @return {!Promise} */\\nServiceWorkerGlobalScope.prototype.skipWaiting = function() {};\\n\\n/** @type {!Console} */\\nServiceWorkerGlobalScope.prototype.console;\\n\\n/** @type {?function(!InstallEvent)} */\\nServiceWorkerGlobalScope.prototype.oninstall;\\n\\n/** @type {?function(!ExtendableEvent)} */\\nServiceWorkerGlobalScope.prototype.onactivate;\\n\\n/** @type {?function(!FetchEvent)} */\\nServiceWorkerGlobalScope.prototype.onfetch;\\n\\n/**\\n * TODO(mtragut): This handler should get a custom event in the future.\\n * @type {?function(!Event)}\\n */\\nServiceWorkerGlobalScope.prototype.onbeforeevicted;\\n\\n/**\\n * TODO(mtragut): This handler should get a custom event in the future.\\n * @type {?function(!Event)}\\n */\\nServiceWorkerGlobalScope.prototype.onevicted;\\n\\n/** @type {?function(!MessageEvent)} */\\nServiceWorkerGlobalScope.prototype.onmessage;\\n\\n/** @type {!IDBFactory|undefined} */\\nServiceWorkerGlobalScope.prototype.indexedDB;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-client-interface\\n * @constructor\\n */\\nfunction ServiceWorkerClient() {}\\n\\n/** @type {!Promise} */\\nServiceWorkerClient.prototype.ready;\\n\\n/** @type {boolean} */\\nServiceWorkerClient.prototype.hidden;\\n\\n/** @type {boolean} */\\nServiceWorkerClient.prototype.focused;\\n\\n/** @type {VisibilityState} */\\nServiceWorkerClient.prototype.visibilityState;\\n\\n/** @type {string} */\\nServiceWorkerClient.prototype.url;\\n\\n/** @type {string} */\\nServiceWorkerClient.prototype.id;\\n\\n/**\\n * // TODO(mtragut): Possibly replace the type with enum ContextFrameType once\\n * the enum is defined.\\n * @type {string}\\n */\\nServiceWorkerClient.prototype.frameType;\\n\\n/**\\n * @param {*} message\\n * @param {(!Array|undefined)=} opt_transfer\\n * @return {undefined}\\n */\\nServiceWorkerClient.prototype.postMessage = function(message, opt_transfer) {};\\n\\n/** @return {!Promise} */\\nServiceWorkerClient.prototype.focus = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#service-worker-clients-interface\\n * @interface\\n */\\nfunction ServiceWorkerClients() {}\\n\\n/**\\n * Deprecated in Chrome M43+, use matchAll instead. Reference:\\n * https://github.com/slightlyoff/ServiceWorker/issues/610.\\n * TODO(joeltine): Remove when getAll is fully deprecated.\\n * @param {ServiceWorkerClientQueryOptions=} opt_options\\n * @return {!Promise>}\\n */\\nServiceWorkerClients.prototype.getAll = function(opt_options) {';a.a+='};\\n\\n/**\\n * @param {ServiceWorkerClientQueryOptions=} opt_options\\n * @return {!Promise>}\\n */\\nServiceWorkerClients.prototype.matchAll = function(opt_options) {};\\n\\n/**\\n * @return {!Promise}\\n */\\nServiceWorkerClients.prototype.claim = function() {};\\n\\n/**\\n * @param {string} url\\n * @return {!Promise}\\n */\\nServiceWorkerClients.prototype.openWindow = function(url) {};\\n\\n/**\\n * @param {string} id\\n * @return {!Promise}\\n */\\nServiceWorkerClients.prototype.get = function(id) {};\\n\\n/** @typedef {{includeUncontrolled: (boolean|undefined)}} */\\nvar ServiceWorkerClientQueryOptions;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#cache-interface\\n * @interface\\n */\\nfunction Cache() {}\\n\\n/**\\n * @param {!RequestInfo} request\\n * @param {CacheQueryOptions=} opt_options\\n * @return {!Promise}\\n */\\nCache.prototype.match = function(request, opt_options) {};\\n\\n/**\\n * @param {RequestInfo=} opt_request\\n * @param {CacheQueryOptions=} opt_options\\n * @return {!Promise>}\\n */\\nCache.prototype.matchAll = function(opt_request, opt_options) {};\\n\\n/**\\n * @param {!RequestInfo} request\\n * @return {!Promise}\\n */\\nCache.prototype.add = function(request) {};\\n\\n/**\\n * @param {!Array} requests\\n * @return {!Promise}\\n */\\nCache.prototype.addAll = function(requests) {};\\n\\n/**\\n * @param {!RequestInfo} request\\n * @param {!Response} response\\n * @return {!Promise}\\n */\\nCache.prototype.put = function(request, response) {};\\n\\n/**\\n * @param {!RequestInfo} request\\n * @param {CacheQueryOptions=} opt_options\\n * @return {!Promise}\\n */\\nCache.prototype.delete = function(request, opt_options) {};\\n\\n/**\\n * @param {RequestInfo=} opt_request\\n * @param {CacheQueryOptions=} opt_options\\n * @return {!Promise>}\\n */\\nCache.prototype.keys = function(opt_request, opt_options) {};\\n\\n/**\\n * @typedef {{\\n * ignoreSearch: (boolean|undefined),\\n * ignoreMethod: (boolean|undefined),\\n * ignoreVary: (boolean|undefined),\\n * prefixMatch: (boolean|undefined),\\n * cacheName: (string|undefined)\\n * }}\\n */\\nvar CacheQueryOptions;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#cache-storage-interface\\n * @interface\\n */\\nfunction CacheStorage() {}\\n\\n/**\\n * Window instances have a property called caches which implements CacheStorage\\n * @see https://www.w3.org/TR/service-workers/#cache-objects\\n * @type {!CacheStorage}\\n */\\nWindow.prototype.caches;\\n\\n/**\\n * @param {!RequestInfo} request\\n * @param {CacheQueryOptions=} opt_options\\n * @return {!Promise}\\n */\\nCacheStorage.prototype.match = function(request, opt_options) {};\\n\\n/**\\n * @param {string} cacheName\\n * @return {!Promise}\\n */\\nCacheStorage.prototype.has = function(cacheName) {};\\n\\n/**\\n * @param {string} cacheName\\n * @return {!Promise}\\n */\\nCacheStorage.prototype.open = function(cacheName) {};\\n\\n/**\\n * @param {string} cacheName\\n * @return {!Promise}\\n */\\nCacheStorage.prototype.delete = function(cacheName) {};\\n\\n/** @return {!Promise>} */\\nCacheStorage.prototype.keys = function() {};\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#extendable-event-interface\\n * @constructor\\n * @param {string} type\\n * @param {ExtendableEventInit=} opt_eventInitDict\\n * @extends {Event}\\n */\\nfunction ExtendableEvent(type, opt_eventInitDict) {}\\n\\n/**\\n * @param {IThenable} f\\n * @return {undefined}\\n */\\nExtendableEvent.prototype.waitUntil = function(f) {};\\n\\n/**\\n * @typedef {{\\n * bubbles: (boolean|undefined),\\n * cancelable: (boolean|undefined)\\n * }}\\n */\\nvar ExtendableEventInit;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#install-event-interface\\n * @constructor\\n * @param {string} type\\n * @param {InstallEventInit=} opt_eventInitDict\\n * @extends {ExtendableEvent}\\n */\\nfunction InstallEvent(type, opt_eventInitDict) {}\\n\\n/** @type {ServiceWorker} */\\nExtendableEvent.prototype.activeWorker;\\n\\n/**\\n * @typedef {{\\n * bubbles: (boolean|undefined),\\n * cancelable: (boolean|undefined),\\n * activeWorker: (!ServiceWorker|undefined)\\n * }}\\n */\\nvar InstallEventInit;\\n\\n/**\\n * @see http://www.w3.org/TR/service-workers/#fetch-event-interface\\n * @constructor\\n * @param {string} type\\n * @param {FetchEventInit=} opt_eventInitDict\\n * @extends {ExtendableEvent}\\n */\\nfunction FetchEvent(type, opt_eventInitDict) {}\\n\\n/** @type {!Request} */\\nFetchEvent.prototype.request;\\n\\n/**\\n * @type {!Promise}\\n */\\nFetchEvent.prototype.preloadResponse;\\n\\n/**\\n * @type {!ServiceWorkerClient}\\n * @deprecated\\n */\\nFetchEvent.prototype.client;\\n\\n/** @type {?string} */\\nFetchEvent.prototype.clientId;\\n\\n/** @type {!boolean} */\\nFetchEvent.prototype.isReload;\\n\\n/** @type {?string} */\\nFetchEvent.prototype.targetClientId;\\n\\n/** @type {?string} */\\nFetchEvent.prototype.reservedClientId;\\n\\n/**\\n * @param {(Response|IThenable)} r\\n * @return {undefined}\\n */\\nFetchEvent.prototype.respondWith = function(r) {};\\n\\n/**\\n * @param {string} url\\n * @return {!Promise}\\n */\\nFetchEvent.prototype.forwardTo = function(url) {};\\n\\n/**\\n * @return {!Promise}\\n */\\nFetchEvent.prototype.default = function() {};\\n\\n/**\\n * @typedef {{\\n * bubbles: (boolean|undefined),\\n * cancelable: (boolean|undefined),\\n * request: (!Request|undefined),\\n * preloadResponse: (!Promise),\\n * client: (!ServiceWorkerClient|undefined),\\n * isReload: (!boolean|undefined)\\n * }}\\n */\\nvar FetchEventInit;\\n","externs/w3c_touch_event.js":"/*\\n * Copyright 2015 The Closure Compiler Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/**\\n * @fileoverview Definitions for W3C\'s Touch Events specification.\\n * @see http://www.w3.org/TR/touch-events/\\n * @externs\\n */\\n\\n/**\\n * @typedef {{\\n * identifier: number,\\n * target: !EventTarget,\\n * clientX: (number|undefined),\\n * clientY: (number|undefined),\\n * screenX: (number|undefined),\\n * screenY: (number|undefined),\\n * pageX: (number|undefined),\\n * pageY: (number|undefined),\\n * radiusX: (number|undefined),\\n * radiusY: (number|undefined),\\n * rotationAngle: (number|undefined),\\n * force: (number|undefined)\\n * }}\\n */\\nvar TouchInitDict;\\n\\n/**\\n * The Touch class represents a single touch on the surface. A touch is the\\n * presence or movement of a finger that is part of a unique multi-touch\\n * sequence.\\n * @see http://www.w3.org/TR/touch-events/#touch-interface\\n * @param {!TouchInitDict} touchInitDict\\n * @constructor\\n */\\nfunction Touch(touchInitDict) {}\\n\\n/**\\n * The x-coordinate of the touch\'s location relative to the window\'s viewport.\\n * @type {number}\\n */\\nTouch.prototype.clientX;\\n\\n/**\\n * The y-coordinate of the touch\'s location relative to the window\'s viewport.\\n * @type {number}\\n */\\nTouch.prototype.clientY;\\n\\n/**\\n * The unique identifier for this touch object.\\n * @type {number}\\n */\\nTouch.prototype.identifier;\\n\\n/**\\n * The x-coordinate of the touch\'s location in page coordinates.\\n * @type {number}\\n */\\nTouch.prototype.pageX;\\n\\n/**\\n * The y-coordinate of the touch\'s location in page coordinates.\\n * @type {number}\\n */\\nTouch.prototype.pageY;\\n\\n/**\\n * The x-coordinate of the touch\'s location in screen coordinates.\\n * @type {number}\\n */\\nTouch.prototype.screenX;\\n\\n/**\\n * The y-coordinate of the touch\'s location in screen coordinates.\\n * @type {number}\\n */\\nTouch.prototype.screenY;\\n\\n/**\\n * The target of this touch.\\n * @type {EventTarget}\\n */\\nTouch.prototype.target;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-force\\n */\\nTouch.prototype.force;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-radiusX\\n */\\nTouch.prototype.radiusX;\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-radiusY\\n */\\nTouch.prototype.radiusY;\\n\\n\\n/**\\n * @type {number}\\n * @see http://www.w3.org/TR/2011/WD-touch-events-20110505/#widl-Touch-rotationAngle\\n */\\nTouch.prototype.rotationAngle;\\n\\n\\n/**\\n * Creates a new Touch object.\\n * @see http://www.w3.org/TR/touch-events/#widl-Document-createTouch-Touch-WindowProxy-view-EventTarget-target-long-identifier-long-pageX-long-pageY-long-screenX-long-screenY\\n * @param {Window} view\\n * @param {EventTarget} target\\n * @param {number} identifier\\n * @param {number} pageX\\n * @param {number} pageY\\n * @param {number} screenX\\n * @param {number} screenY\\n * @return {Touch}\\n */\\nDocument.prototype.createTouch = function(view, target, identifier, pageX,\\n pageY, screenX, screenY) {};\\n\\n\\n/**\\n * The TouchList class is used to represent a collection of Touch objects.\\n * @see http://www.w3.org/TR/touch-events/#touchlist-interface\\n * @constructor\\n * @implements {IArrayLike}\\n */\\nfunction TouchList() {}\\n\\n/**\\n * The number of Touch objects in this TouchList object.\\n * @type {number}\\n */\\nTouchList.prototype.length;\\n\\n/**\\n * Returns the Touch object at the given index.\\n * @param {number} index\\n * @return {?Touch}\\n */\\nTouchList.prototype.item = function(index) {};\\n\\n/**\\n * @param {number} identifier\\n * @return {?Touch}\\n * @see http://www.w3.org/TR/touch-events-extensions/#widl-TouchList-identifiedTouch-Touch-long-identifier\\n */\\nTouchList.prototype.identifiedTouch = function(identifier) {};\\n\\n/**\\n * Creates a new TouchList object.\\n * @see http://www.w3.org/TR/touch-events/#widl-Document-createTouchList-TouchList-Touch-touches\\n * @param {Array} touches\\n * @return {TouchList}\\n */\\nDocument.prototype.createTouchList = function(touches) {};\\n\\n/**\\n * @record\\n * @extends {UIEventInit}\\n */\\nfunction TouchEventInit() {}\\n\\n/** @type {undefined|?EventTarget} */\\nTouchEventInit.prototype.relatedTarget;\\n\\n/** @type {undefined|!Array} */\\nTouchEventInit.prototype.touches;\\n\\n/** @type {undefined|!Array} */\\nTouchEventInit.prototype.targetTouches;\\n\\n/** @type {undefined|!Array} */\\nTouchEventInit.prototype.changedTouches;\\n\\n/**\\n * The TouchEvent class encapsulates information about a touch event.\\n *\\n *

    The system continually sends TouchEvent objects to an application as\\n * fingers touch and move across a surface. A touch event provides a snapshot of\\n * all touches during a multi-touch sequence, most importantly the touches that\\n * are new or have changed for a particular target. A multi-touch sequence\\n * begins when a finger first touches the surface. Other fingers may\\n * subsequently touch the surface, and all fingers may move across the surface.\\n * The sequence ends when the last of these fingers is lifted from the surface.\\n * An application receives touch event objects during each phase of any touch.\\n * <\/p>\\n *\\n *

    The different types of TouchEvent objects that can occur are:\\n *